Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jun 2015 07:26:28 +0000 (UTC)
From:      Mikhail Teterin <mi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r388573 - in head/devel: . critcl tcllib tcllibc
Message-ID:  <201506050726.t557QSwU027644@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mi
Date: Fri Jun  5 07:26:27 2015
New Revision: 388573
URL: https://svnweb.freebsd.org/changeset/ports/388573

Log:
  Split the compiled pieces out of tcllib into a slave port of its own to avoid
  a circular dependency: compiling C-files of tcllib requires critcl, but critcl
  requires the cmdline (pure-Tcl) component of tcllib.
  
  PR:		195863, 200612
  Approved by:	gahr (blanket)

Added:
  head/devel/tcllibc/
  head/devel/tcllibc/Makefile   (contents, props changed)
  head/devel/tcllibc/pkg-descr   (contents, props changed)
  head/devel/tcllibc/pkg-plist   (contents, props changed)
Modified:
  head/devel/Makefile
  head/devel/critcl/Makefile
  head/devel/tcllib/Makefile
  head/devel/tcllib/pkg-descr
  head/devel/tcllib/pkg-plist

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Fri Jun  5 07:23:15 2015	(r388572)
+++ head/devel/Makefile	Fri Jun  5 07:26:27 2015	(r388573)
@@ -4918,6 +4918,7 @@
     SUBDIR += tclgetopts
     SUBDIR += tcllauncher
     SUBDIR += tcllib
+    SUBDIR += tcllibc
     SUBDIR += tclmore
     SUBDIR += tcloo
     SUBDIR += tclreadline

Modified: head/devel/critcl/Makefile
==============================================================================
--- head/devel/critcl/Makefile	Fri Jun  5 07:23:15 2015	(r388572)
+++ head/devel/critcl/Makefile	Fri Jun  5 07:26:27 2015	(r388573)
@@ -3,7 +3,7 @@
 
 PORTNAME=	critcl
 PORTVERSION=	3.1.12
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	devel
 
 MAINTAINER=	tcltk@FreeBSD.org
@@ -14,7 +14,8 @@ LICENSE_NAME=	Tcl/Tk License
 LICENSE_FILE=	${WRKSRC}/license.terms
 LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
 
-RUN_DEPENDS=	${LOCALBASE}/lib/Trf/pkgIndex.tcl:${PORTSDIR}/devel/tcl-trf
+RUN_DEPENDS=	${LOCALBASE}/lib/Trf/pkgIndex.tcl:${PORTSDIR}/devel/tcl-trf	\
+		${LOCALBASE}/lib/tcllib/cmdline/pkgIndex.tcl:${PORTSDIR}/devel/tcllib
 
 USES+=		tcl
 USE_GITHUB=	yes

Modified: head/devel/tcllib/Makefile
==============================================================================
--- head/devel/tcllib/Makefile	Fri Jun  5 07:23:15 2015	(r388572)
+++ head/devel/tcllib/Makefile	Fri Jun  5 07:26:27 2015	(r388573)
@@ -16,19 +16,15 @@ LICENSE_NAME=	Tcl/Tk License
 LICENSE_FILE=	${WRKSRC}/license.terms
 LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
 
-BUILD_DEPENDS=	critcl:${PORTSDIR}/devel/critcl
-
 OPTIONS_DEFINE=	DOCS MANPAGES
 
 WRKSRC=		${WRKDIR}/tcllib-tcllib_${DISTVERSION}
 USES+=		tcl
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV+=	ac_cv_path_tclsh="${TCLSH}"
-ALL_TARGET=	critcl
 MAKE_ENV+=	LANG=C
 PORTDOCS=	*
 REINPLACE_ARGS=	-i'""'
-PLIST_SUB+=	BINARCH=${OPSYS:tl}-${ARCH:S/i386/ix86/}
 
 INSTALL_ARGS=	-pkgs -pkg-path ${STAGEDIR}${PREFIX}/lib/tcllib \
 		-apps -app-path ${STAGEDIR}${PREFIX}/bin \
@@ -39,7 +35,7 @@ INSTALL_ARGS=	-pkgs -pkg-path ${STAGEDIR
 #
 # Man pages
 #
-.if ${PORT_OPTIONS:MMANPAGES}
+.if ${PORT_OPTIONS:MMANPAGES} && !(defined(ALL_TARGET) && ${ALL_TARGET:Mcritcl})
 ALL_TARGET+=	nroff-doc
 INSTALL_ARGS+=	-nroff-path ${STAGEDIR}${PREFIX}/man/mann
 PLIST_SUB+=	MAN=""
@@ -51,13 +47,14 @@ PLIST_SUB+=	MAN="@comment "
 #
 # HTML documentation
 #
-.if ${PORT_OPTIONS:MDOCS}
+.if ${PORT_OPTIONS:MDOCS} && !(defined(ALL_TARGET) && ${ALL_TARGET:Mcritcl})
 ALL_TARGET+=	html-doc
 INSTALL_ARGS+=	-html-path ${STAGEDIR}${DOCSDIR}
 .else
 INSTALL_ARGS+=	-no-html
 .endif
 
+.if !target(post-patch)
 post-patch:
 #
 # 	Ensure, the detailed output of vendors' self-tests is
@@ -96,12 +93,12 @@ post-patch:
 	for man in `${FIND} . -name "*.n"`; do \
 	    ${MV} $$man `echo $$man | ${SED} -e 's|n$$|tcllib.n|'`; \
 	done
-	cd ${WRKSRC}/modules/json/c && ${YACC} -b json json.y
+.endif
 
+.if !target(do-install)
 do-install:
 	cd ${WRKSRC} && ${TCLSH} ./installer.tcl ${INSTALL_ARGS}
-	${RM} ${WRKSRC}/modules/tcllibc/license.terms
-	${CP} -Rp ${WRKSRC}/modules/tcllibc ${STAGEDIR}${PREFIX}/lib/tcllib/
+.endif
 
 test check regression-test: build
 	cd ${WRKSRC} && ${SETENV} LANG=C LC_ALL=C DISPLAY= ${MAKE} test

Modified: head/devel/tcllib/pkg-descr
==============================================================================
--- head/devel/tcllib/pkg-descr	Fri Jun  5 07:23:15 2015	(r388572)
+++ head/devel/tcllib/pkg-descr	Fri Jun  5 07:26:27 2015	(r388573)
@@ -9,4 +9,8 @@ documentation at
 
 to get the idea.
 
+This port installs pure-Tcl versions of the modules only.
+C-implementations -- for some of the modules -- can be added by
+installing devel/tcllibc port.
+
 WWW: http://tcllib.sourceforge.net/

Modified: head/devel/tcllib/pkg-plist
==============================================================================
--- head/devel/tcllib/pkg-plist	Fri Jun  5 07:23:15 2015	(r388572)
+++ head/devel/tcllib/pkg-plist	Fri Jun  5 07:26:27 2015	(r388573)
@@ -554,10 +554,6 @@ lib/tcllib/struct/tree_c.tcl
 lib/tcllib/struct/tree_tcl.tcl
 lib/tcllib/tar/pkgIndex.tcl
 lib/tcllib/tar/tar.tcl
-lib/tcllib/tcllibc/critcl-rt.tcl
-lib/tcllib/tcllibc/%%BINARCH%%/tcllibc.so
-lib/tcllib/tcllibc/pkgIndex.tcl
-lib/tcllib/tcllibc/teapot.txt
 lib/tcllib/tepam/pkgIndex.tcl
 lib/tcllib/tepam/tepam.tcl
 lib/tcllib/tepam/tepam_doc_gen.tcl

Added: head/devel/tcllibc/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/tcllibc/Makefile	Fri Jun  5 07:26:27 2015	(r388573)
@@ -0,0 +1,25 @@
+# Created by: Mikhail Teterin <mi@aldan.algebra.com>
+# $FreeBSD$
+
+PKGNAMESUFFIX=	c
+
+COMMENT=	Compiled implementations of some of the modules of Tcllib
+
+BUILD_DEPENDS=	critcl:${PORTSDIR}/devel/critcl
+
+MASTERDIR=	${.CURDIR:H}/tcllib
+TMPPLIST=		${WRKDIR}/PLIST
+DESCR=		${.CURDIR}/pkg-descr
+ALL_TARGET=	critcl
+
+post-patch:
+	cd ${WRKSRC}/modules/json/c && ${YACC} -b json json.y
+
+do-install:
+	${RM} -f ${WRKSRC}/modules/tcllibc/license.terms
+	${MKDIR} ${STAGEDIR}${PREFIX}/lib/tcllib
+	${MV} ${WRKSRC}/modules/tcllibc ${STAGEDIR}${PREFIX}/lib/tcllib/
+	${SED} -e s,%%PLATFORM%%,`${LOCALBASE}/bin/critcl -show | ${SED} -n 's| *platform *||p'`,\
+		${.CURDIR}/pkg-plist > ${TMPPLIST}
+
+.include "${MASTERDIR}/Makefile"

Added: head/devel/tcllibc/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/tcllibc/pkg-descr	Fri Jun  5 07:26:27 2015	(r388573)
@@ -0,0 +1,5 @@
+Some of the modules in Tcllib have C-implementations, which are
+considerably faster than the pure-Tcl ones.
+
+This port adds tcllibc, which contains all such available C-versions
+of Tcllib's modules.

Added: head/devel/tcllibc/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/tcllibc/pkg-plist	Fri Jun  5 07:26:27 2015	(r388573)
@@ -0,0 +1,4 @@
+lib/tcllib/tcllibc/critcl-rt.tcl
+lib/tcllib/tcllibc/%%PLATFORM%%/tcllibc.so
+lib/tcllib/tcllibc/pkgIndex.tcl
+lib/tcllib/tcllibc/teapot.txt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506050726.t557QSwU027644>