ports/115788: lang/itcl - Modernization and adoption

Erik Greenwald erik at smluc.org
Fri Aug 24 18:20:02 UTC 2007


>Number:         115788
>Category:       ports
>Synopsis:       lang/itcl - Modernization and adoption
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 24 18:20:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Erik Greenwald
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD vidar.br0kenland.org 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Sat Jan 13 11:46:43 EST 2007 root at vidar.br0kenland.org:/usr/obj/usr/src/sys/VIDAR i386

>Description:
Updated to use bsd.tcl.mk knobs. Ability to use tcl85 as well as
84. Adoption. Thanks!

>How-To-Repeat:
>Fix:

--- lang_itcl.patch begins here ---
Index: lang/itcl/Makefile
===================================================================
RCS file: /home/ncvs/ports/lang/itcl/Makefile,v
retrieving revision 1.43
diff -u -r1.43 Makefile
--- lang/itcl/Makefile	15 Aug 2006 00:29:07 -0000	1.43
+++ lang/itcl/Makefile	24 Aug 2007 17:57:40 -0000
@@ -7,22 +7,21 @@
 
 PORTNAME=	itcl
 PORTVERSION=	3.3
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	lang tcl84
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=incrtcl
 DISTNAME=	itcl${PORTVERSION}
 
-MAINTAINER=	ports at FreeBSD.org
+MAINTAINER=	erik at smluc.org
 COMMENT=	[incr Tcl] (A.K.A. "itcl")
 
-LIB_DEPENDS=	tcl84:${PORTSDIR}/lang/tcl84
+USE_TCL=	84+
 
 USE_LDCONFIG=	yes
-PKGINSTALL=	${PORTSDIR}/lang/tcl84/pkg-install.tclsh
-PKGDEINSTALL=	${PORTSDIR}/lang/tcl84/pkg-deinstall.tclsh
 MAKE_ENV+=	${PLIST_SUB} \
-		SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${SHLIB_MINOR}
+		SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${SHLIB_MINOR} \
+		USE_TCL=${USE_TCL} TCL_INCLUDEDIR=${TCL_INCLUDEDIR}
 
 .if defined(MAKE_JOBS)
 MAKE_ARGS+=	-j${MAKE_JOBS}
@@ -43,12 +42,18 @@
 
 ITCL_LIB_FILE=	${ITCL_LIB}.${SHLIB_MAJOR}
 
+# need to split the bsd.port.mk up to get the USE_TCL test to work in here
+.include <bsd.port.pre.mk>
+
 post-build test:
 	cd ${WRKSRC} && ${SETENV} ITCL_LIBRARY=${WRKSRC}/library \
-		${PREFIX}/bin/tclsh8.4 tests/all.tcl -load "load ./${ITCL_LIB}"
+		${TCLSH} tests/all.tcl -load "load ./${ITCL_LIB}"
+.if ${USE_TCL} != 85
+	@${ECHO} "ensemble.test fails due to changed error message. It's OK."
+.endif
 
 post-install:
 	${INSTALL_DATA} ${WRKSRC}/doc/*.n ${PREFIX}/man/mann/
 	${INSTALL_DATA} ${WRKSRC}/doc/*.3 ${PREFIX}/man/man3/
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Index: lang/itcl/files/Makefile.lib
===================================================================
RCS file: /home/ncvs/ports/lang/itcl/files/Makefile.lib,v
retrieving revision 1.10
diff -u -r1.10 Makefile.lib
--- lang/itcl/files/Makefile.lib	22 May 2006 17:21:08 -0000	1.10
+++ lang/itcl/files/Makefile.lib	24 Aug 2007 17:57:40 -0000
@@ -1,8 +1,8 @@
-NOPROFILE=	yes
+NO_PROFILE=	yes
 LIB=		itcl
 ITCL_LIBRARY=	${PREFIX}/lib/itcl${MAJOR}.${MINOR}
 CFLAGS+=	-I. -I./../generic \
-		-I${PREFIX}/include/tcl8.4/generic \
+		-I${TCL_INCLUDEDIR}/generic \
 		-DHAVE_GETCWD=1 -DNO_VALUES_H=1 -DHAVE_UNISTD_H=1 -DUSE_TERMIOS=1\
 		-DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1\
 		-DHAVE_TM_GMTOFF=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1\
@@ -11,7 +11,11 @@
 		-DHAVE_SYS_FILIO_H=1 \
 		-DRETSIGTYPE=void \
 		-DITCL_LIBRARY=\"${ITCL_LIBRARY}\"
-LDADD+=		-L${PREFIX}/lib -ltcl84
+LDADD+=		-L${PREFIX}/lib -ltcl${USE_TCL}
+
+.if ${USE_TCL} >= 85
+LDADD+=		-ltclstub${USE_TCL}
+.endif
 
 .PATH:	${.CURDIR}/unix ${.CURDIR}/generic ${.CURDIR}/man
 
--- lang_itcl.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list