Date: Tue, 23 Apr 2013 13:20:51 GMT From: Pietro Cerutti <gahr@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/178083: [patch] devel/tcl-memchan -- update to 2.3 Message-ID: <201304231320.r3NDKp7v088565@red.freebsd.org> Resent-Message-ID: <201304231330.r3NDU01f013581@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 178083 >Category: ports >Synopsis: [patch] devel/tcl-memchan -- update to 2.3 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Apr 23 13:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Pietro Cerutti >Release: >Organization: The FreeBSD Project >Environment: >Description: I have this patch to bring devel/tcl-memchan up to date to the latest version 2.3. Also, I take advantage of the TEA 3.0 configure script instead of using a custom Makefile. In my opinion, this cleans up the port quite a lot. In addition, I've added a regression-test target. >How-To-Repeat: >Fix: Patch attached with submission follows: Index: Makefile =================================================================== --- Makefile (revision 316354) +++ Makefile (working copy) @@ -1,42 +1,42 @@ -# New ports collection makefile for: TclTrf -# Date created: May 22, 2000 -# Whom: Mikhail Teterin <mi@aldan.algebra.com> -# +# Created by: Mikhail Teterin <mi@aldan.algebra.com> # $FreeBSD$ -# PORTNAME= memchan -PORTVERSION= 2.2.1 -PORTREVISION= 1 -CATEGORIES= devel tcl +PORTVERSION= 2.3 +CATEGORIES= devel MASTER_SITES= SF PKGNAMEPREFIX= tcl- +DISTNAME= Memchan${PORTVERSION} MAINTAINER= mi@aldan.algebra.com COMMENT= Two new channel types for in-memory channels in TCL8 -BUILD_DEPENDS= tclsh${TCL_VER}:${PORTSDIR}/lang/tcl${TCL_VER:S/.//} +WRKSRC= ${WRKDIR}/${DISTNAME} -MAKEFILE= ${FILESDIR}/Makefile.bsd -MAKE_ARGS+= -j`${SYSCTL} -n hw.ncpu` - USE_TCL= 84+ -DDIR= ${PREFIX}/lib/tcl${TCL_VER}/Trf +GNU_CONFIGURE= yes +CFLAGS+= -Wall +CONFIGURE_ARGS+=--prefix=${PREFIX} \ + --exec-prefix=${PREFIX} \ + --with-tcl=${TCL_LIBDIR} -MAKE_ENV+= TCL_VER=${TCL_VER} MKDIR="${MKDIR}" \ - PORTVERSION="${PORTVERSION:R}" \ - INSTALL_DATA="${INSTALL_DATA}" +PORTDOCS= * +PLIST_SUB+= PORTVERSION=${PORTVERSION} -# Too bad, n is no longer an acceptable section for bsd.man.mk -MANN= fifo.n fifo2.n memchan.n memchanapi.n null.n random.n zero.n +.include <bsd.port.options.mk> +post-patch: + ${REINPLACE_CMD} -e '/^install:/s|install-doc||' \ + ${WRKSRC}/Makefile.in + +.if ${PORT_OPTIONS:MDOCS} post-install: - cd ${WRKSRC}/doc && ${INSTALL_MAN} ${MANN} ${PREFIX}/man/mann -#.ifndef(NOPORTDOCS) -# ${MKDIR} ${DOCSDIR} -# ${CP} -pR ${WRKSRC}/doc/html/* ${DOCSDIR} -#.endif + ${MKDIR} ${DOCSDIR} + cd ${WRKSRC} && ${MAKE} doc-html + cd ${WRKSRC} && ${COPYTREE_SHARE} \*.html ${DOCSDIR} +.endif +regression-test: + cd ${WRKSRC} && ${MAKE} test + .include <bsd.port.mk> - -PLIST_SUB!= ${SETENV} TCL_VER=${TCL_VER} ${MAKE} -f ${MAKEFILE} env Index: distinfo =================================================================== --- distinfo (revision 316354) +++ distinfo (working copy) @@ -1,2 +1,2 @@ -SHA256 (memchan-2.2.1.tar.gz) = ae62284b6a0ce96a9a602bff9766086d23c210f333882fd7c931359310413512 -SIZE (memchan-2.2.1.tar.gz) = 1169233 +SHA256 (Memchan2.3.tar.gz) = adaa5952fe532a917372dcdbc873c082656c49b613d92b09e7938d8f276f2749 +SIZE (Memchan2.3.tar.gz) = 1786238 Index: files/Makefile.bsd =================================================================== --- files/Makefile.bsd (revision 316354) +++ files/Makefile.bsd (working copy) @@ -1,44 +0,0 @@ -LIBNAME= Memchan -SHLIB_NAME= lib${LIBNAME}.so.2 - -.PATH: ${.CURDIR}/generic ${.CURDIR}/isaac - -SRCS= memchan.c init.c counter.c fifo.c fifo2.c null.c buf.c \ - bufFix.c bufExt.c bufRange.c bufQueue.c bufStubInit.c \ - bufStubLib.c memchanStubInit.c zero.c random.c randport.c - -TCL_VER?= 8.3 -LOCALBASE?= /usr/local - -CFLAGS+= -I${LOCALBASE}/include/tcl${TCL_VER} \ - -DMEMCHAN_VERSION='"${PORTVERSION}"' - -LDADD= -L${LOCALBASE}/lib -ltcl${TCL_VER:S/.//} - -all: pkgIndex.tcl test - -pkgIndex.tcl: - echo 'package ifneeded ${LIBNAME} 2.2 \ - [list load [file join $$dir $(SHLIB_NAME)]]' > pkgIndex.tcl - -DIR = lib/tcl${TCL_VER}/${LIBNAME} -LIBDIR = ${PREFIX}/${DIR} -MANDIR = ${PREFIX}/man/man - -${LIBDIR}: - ${MKDIR} ${LIBDIR} - -env: - @${ECHO} SHLIB_NAME=${SHLIB_NAME} SHLIB_LINK=${SHLIB_LINK} DIR=${DIR} - -beforeinstall: ${LIBDIR} pkgIndex.tcl - ${INSTALL_DATA} pkgIndex.tcl ${LIBDIR}/pkgIndex.tcl - -.include <bsd.lib.mk> - -test: ${SHLIB_NAME} pkgIndex.tcl - echo ' set auto_path ${.OBJDIR}; cd ${.CURDIR}/tests; \ - package require ${LIBNAME}; \ - if {[catch {source all} msg]} { \ - puts stderr $msg; exit -1 \ - }' | ${LOCALBASE}/bin/tclsh${TCL_VER} Index: files/patch-stubs =================================================================== --- files/patch-stubs (revision 316354) +++ files/patch-stubs (working copy) @@ -1,9 +0,0 @@ ---- generic/init.c Tue Sep 26 16:52:50 2000 -+++ generic/init.c Fri Jan 25 14:13:31 2002 -@@ -87,5 +87,5 @@ - (Tcl_CmdDeleteProc*) NULL); - --#if GT81 -+#ifdef USE_TCL_STUBS - /* register extension and its interfaces as now available package - */ Index: files/patch-warnings =================================================================== --- files/patch-warnings (revision 316354) +++ files/patch-warnings (working copy) @@ -1,68 +0,0 @@ ---- generic/fifo.c Mon Aug 26 13:02:08 2002 -+++ generic/fifo.c Tue Apr 6 13:34:19 2004 -@@ -29,3 +29,5 @@ - -+#include <string.h> -+ - #include "memchanInt.h" - #include "buf.h" ---- generic/fifo2.c Mon Aug 26 13:02:08 2002 -+++ generic/fifo2.c Tue Apr 6 13:37:36 2004 -@@ -29,3 +29,5 @@ - -+#include <string.h> -+ - #include "memchanInt.h" - #include "buf.h" ---- generic/bufExt.c Mon Aug 26 13:02:08 2002 -+++ generic/bufExt.c Tue Apr 6 13:38:40 2004 -@@ -12,4 +12,6 @@ - */ - -+#include <string.h> -+ - #include "buf.h" - ---- generic/bufRange.c Mon Aug 26 13:02:08 2002 -+++ generic/bufRange.c Tue Apr 6 13:40:04 2004 -@@ -12,4 +12,6 @@ - */ - -+#include <string.h> -+ - #include "buf.h" - ---- generic/bufFix.c Mon Aug 26 13:02:08 2002 -+++ generic/bufFix.c Tue Apr 6 13:40:10 2004 -@@ -12,4 +12,6 @@ - */ - -+#include <string.h> -+ - #include "buf.h" - ---- generic/buf.c Mon Aug 26 13:02:08 2002 -+++ generic/buf.c Tue Apr 6 13:46:08 2004 -@@ -64,4 +64,4 @@ - { - Tcl_InterpDeleteProc* proc = (Tcl_InterpDeleteProc*) NULL; -- return (int) Tcl_GetAssocData (interp, ASSOC, &proc); -+ return (int)(long) Tcl_GetAssocData (interp, ASSOC, &proc); - } ---- generic/zero.c 2004-11-09 19:07:03.000000000 -0500 -+++ generic/zero.c 2008-11-15 14:49:50.000000000 -0500 -@@ -33,4 +33,5 @@ - - #include "memchanInt.h" -+#include <string.h> - - /* ---- generic/random.c 2004-11-09 19:07:01.000000000 -0500 -+++ generic/random.c 2008-11-15 14:51:14.000000000 -0500 -@@ -34,4 +34,6 @@ - #include "../isaac/rand.h" - #include <time.h> -+#include <string.h> -+ - /* - * Forward declarations of internal procedures. Index: pkg-descr =================================================================== --- pkg-descr (revision 316354) +++ pkg-descr (working copy) @@ -1,10 +1,10 @@ -memchan is an extension library to the script language tcl, as created -by John Ousterhout. It provides two new channel types for in-memory +memchan is an extension library to the script language tcl, as created +by John Ousterhout. It provides two new channel types for in-memory channels and the appropriate commands for their creation. -They are useful to transfer large amounts of data between procedures or -interpreters, and additionally provide an easy interface to on-the-fly -generation of code too. No need to set or append to a string, just do a +They are useful to transfer large amounts of data between procedures or +interpreters, and additionally provide an easy interface to on-the-fly +generation of code too. No need to set or append to a string, just do a simple puts. -WWW: http://memchan.sourceforge.net/ +WWW: http://memchan.sourceforge.net/ Index: pkg-plist =================================================================== --- pkg-plist (revision 316354) +++ pkg-plist (working copy) @@ -1,4 +1,9 @@ -%%DIR%%/pkgIndex.tcl -%%DIR%%/%%SHLIB_NAME%% -%%DIR%%/%%SHLIB_LINK%% -@dirrm %%DIR%% +lib/Memchan%%PORTVERSION%%/libMemchan.so.1 +lib/Memchan%%PORTVERSION%%/libMemchanstub.a +lib/Memchan%%PORTVERSION%%/pkgIndex.tcl +include/memchan.h +include/memchanDecls.h +include/buf.h +include/bufDecls.h +include/bufIntDecls.h +@dirrm lib/Memchan%%PORTVERSION%% >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304231320.r3NDKp7v088565>