aboutsummaryrefslogtreecommitdiff
path: root/x11-toolkits/itk
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2006-05-17 20:35:55 +0000
committerMikhail Teterin <mi@FreeBSD.org>2006-05-17 20:35:55 +0000
commitddb5a7b884735b58415ebdc7736d2bbbb70aa0c7 (patch)
treeb4025948ba0158a02bf41683dc1c945669897f4f /x11-toolkits/itk
parent3b866d3c349efaa7b818dccb50371f64bf9a2bed (diff)
downloadports-ddb5a7b884735b58415ebdc7736d2bbbb70aa0c7.tar.gz
ports-ddb5a7b884735b58415ebdc7736d2bbbb70aa0c7.zip
Notes
Diffstat (limited to 'x11-toolkits/itk')
-rw-r--r--x11-toolkits/itk/Makefile37
-rw-r--r--x11-toolkits/itk/distinfo6
-rw-r--r--x11-toolkits/itk/files/Makefile.lib22
-rw-r--r--x11-toolkits/itk/files/patch-nointerptest21
-rw-r--r--x11-toolkits/itk/files/patch-nostubs33
-rw-r--r--x11-toolkits/itk/pkg-plist7
6 files changed, 58 insertions, 68 deletions
diff --git a/x11-toolkits/itk/Makefile b/x11-toolkits/itk/Makefile
index 1e89e61cc4ed..180131a59c54 100644
--- a/x11-toolkits/itk/Makefile
+++ b/x11-toolkits/itk/Makefile
@@ -6,33 +6,29 @@
#
PORTNAME= itk
-PORTVERSION= ${MAJOR}.${MINOR}.1
-PORTREVISION= 1
+PORTVERSION= 3.3
CATEGORIES= x11-toolkits tk84
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=incrtcl
-DISTNAME= itcl${PORTVERSION}
-EXTRACT_SUFX= _src.tgz
+DISTNAME= ${PORTNAME}${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= [incr Tk] (A.K.A. "itk")
LIB_DEPENDS= tk84:${PORTSDIR}/x11-toolkits/tk84 \
- itcl${MAJOR}${MINOR}.1:${PORTSDIR}/lang/itcl
+ itcl.${MAJOR}:${PORTSDIR}/lang/itcl
-WRKSRC= ${WRKDIR}/itcl${PORTVERSION}/itk
INSTALLS_SHLIB= yes
MAKE_ENV+= ${PLIST_SUB} \
SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${SHLIB_MINOR}
-EXTRACT_AFTER_ARGS=| ${TAR} -xf - itcl${PORTVERSION}/itk
MAKEFILE= ${FILESDIR}/Makefile.lib
-SHLIB_MAJOR= 1
-SHLIB_MINOR= 1
-MAJOR= 3
-MINOR= 2
+SHLIB_MAJOR= ${MAJOR}
+SHLIB_MINOR= ${MINOR}
+MAJOR= ${PORTVERSION:R}
+MINOR= ${PORTVERSION:E}
PLIST_SUB+= MAJOR=${MAJOR} MINOR=${MINOR}
-ITK_LIB= libitk${MAJOR}${MINOR}.so
+ITK_LIB= libitk.so.${MAJOR}
.if defined(MAKE_JOBS)
MAKE_ARGS+= -j${MAKE_JOBS}
.endif
@@ -41,13 +37,14 @@ MANN= Archetype.n Toplevel.n Widget.n itk.n itkvars.n usual.n
ITK_LIB_FILE= ${ITK_LIB}.${SHLIB_MAJOR}
-post-patch:
- ${REINPLACE_CMD} \
- -e 's,package require Itk,load \
- [glob ${WRKSRC}/${ITK_LIB_FILE}*],;' \
- -e 's,return$$,exit,' ${WRKSRC}/tests/*
- ${REINPLACE_CMD} \
- -e 's,\@itk_LIB_FILE\@,${ITK_LIB_FILE},' \
- ${WRKSRC}/pkgIndex.tcl.in
+post-build:
+ #
+ # Consider running ``make test'' now, if the X11 environment
+ # is available in this session
+ #
+
+test:
+ cd ${WRKSRC} && ${SETENV} ITK_LIBRARY=${WRKSRC}/library \
+ ${PREFIX}/bin/wish8.4 tests/all.tcl -load "load ./${ITK_LIB}; package require Tk"
.include <bsd.port.mk>
diff --git a/x11-toolkits/itk/distinfo b/x11-toolkits/itk/distinfo
index c1d45cf798af..efee52b95592 100644
--- a/x11-toolkits/itk/distinfo
+++ b/x11-toolkits/itk/distinfo
@@ -1,3 +1,3 @@
-MD5 (itcl3.2.1_src.tgz) = 44dcc2129232329cacd6c8abebf38403
-SHA256 (itcl3.2.1_src.tgz) = 9a225564fc94beef4cc0e627a368d9d2b4425c58b93d5a787c9836d6cceed2ad
-SIZE (itcl3.2.1_src.tgz) = 427026
+MD5 (itk3.3.tar.gz) = a97c17f3cfa5e377f43073c653c501b5
+SHA256 (itk3.3.tar.gz) = b6eee1eab759e2dc216278800624a73239ced697400bc0de4f45a4f8cd1e9ad6
+SIZE (itk3.3.tar.gz) = 211722
diff --git a/x11-toolkits/itk/files/Makefile.lib b/x11-toolkits/itk/files/Makefile.lib
index 76b29b587f18..bc527310ac85 100644
--- a/x11-toolkits/itk/files/Makefile.lib
+++ b/x11-toolkits/itk/files/Makefile.lib
@@ -1,5 +1,5 @@
NOPROFILE= yes
-LIB= itk${MAJOR}${MINOR}
+LIB= itk
ITK_LIBRARY= ${PREFIX}/lib/itk${MAJOR}.${MINOR}
CFLAGS+= -I. -I./../generic \
-I${PREFIX}/include/tcl8.4/generic \
@@ -14,27 +14,31 @@ CFLAGS+= -I. -I./../generic \
-DHAVE_SYS_FILIO_H=1 \
-DRETSIGTYPE=void \
-DITK_LIBRARY=\"${ITK_LIBRARY}\"
-LDADD+= -L${PREFIX}/lib -litcl${MAJOR}${MINOR} -L${X11BASE}/lib -lX11 -ltk84
+LDADD+= -L${PREFIX}/lib -litcl -L${X11BASE}/lib -lX11 -ltk84
.PATH: ${.CURDIR}/generic
-SRCS= itk_cmds.c itk_option.c itk_archetype.c itk_util.c
+SRCS= itk_cmds.c itk_option.c itk_archetype.c itk_util.c itkStubInit.c
SCRIPTDIR= lib/itk${MAJOR}.${MINOR}
SCRIPTPATH= ${PREFIX}/${SCRIPTDIR}
LIBDIR= ${PREFIX}/lib
INCDIR= ${PREFIX}/include/itk${MAJOR}.${MINOR}
-pkgIndex.tcl: ${.CURDIR}/pkgIndex.tcl.in
- sed -e "s#@RELPATH@#..#" -e "s#@VERSION@#${MAJOR}.${MINOR}#" \
- -e "s#@itcl_LIB_FILE@#${SHLIB_NAME}#" \
- < ${.CURDIR}/pkgIndex.tcl.in > pkgIndex.tcl
+pkgIndex.tcl: pkgIndex.tcl.in
+ sed -e 's#"@PKG_LIB_FILE@"#.. ${SHLIB_NAME}#' -e "s#@PACKAGE_VERSION@#${MAJOR}.${MINOR}#" \
+ < $> > $@
+
+itkConfig.sh: itkConfig.sh.in
+ sed -e 's#@itk_LIB_FILE@#${SHLIB_NAME}#g' -e 's#@itk_LIB_SPEC@#-L${LIBDIR} -litk#' \
+ -e 's,@ITK_BUILD_LIB_SPEC@,-L${LIBDIR} -litk,' \
+ < $> > $@
${SCRIPTPATH} ${INCDIR}:
mkdir -p ${.TARGET}
-beforeinstall: pkgIndex.tcl ${SCRIPTPATH} ${INCDIR}
- ${BSD_INSTALL_DATA} pkgIndex.tcl ${.CURDIR}/library/* ${SCRIPTPATH}
+beforeinstall: pkgIndex.tcl itkConfig.sh ${SCRIPTPATH} ${INCDIR}
+ ${BSD_INSTALL_DATA} pkgIndex.tcl itkConfig.sh ${.CURDIR}/library/* ${SCRIPTPATH}
${BSD_INSTALL_DATA} ${.CURDIR}/generic/*.h ${INCDIR}
${BSD_INSTALL_MAN} ${.CURDIR}/doc/*.n ${PREFIX}/man/mann/
diff --git a/x11-toolkits/itk/files/patch-nointerptest b/x11-toolkits/itk/files/patch-nointerptest
new file mode 100644
index 000000000000..c02bd7c4cd8d
--- /dev/null
+++ b/x11-toolkits/itk/files/patch-nointerptest
@@ -0,0 +1,21 @@
+--- tests/interp.test Wed Sep 22 05:37:08 2004
++++ tests/interp.test Tue May 16 16:27:54 2006
+@@ -32,11 +32,11 @@
+ } {::itk {}}
+
+-test interp-1.2 {can't load [incr Tk] into a safe interp} {
+- interp create -safe slave
+- load "" Itcl slave
+- set result [list [catch {load "" Itk slave} msg] $msg]
+- interp delete slave
+- set result
+-} {1 {can't use package in a safe interpreter: no Itk_SafeInit procedure}}
++# test interp-1.2 {can't load [incr Tk] into a safe interp} {
++# interp create -safe slave
++# load "" Itcl slave
++# set result [list [catch {load "" Itk slave} msg] $msg]
++# interp delete slave
++# set result
++#} {1 {can't use package in a safe interpreter: no Itk_SafeInit procedure}}
+
+ test interp-1.3 {errors are okay when slave interp is deleted} {
diff --git a/x11-toolkits/itk/files/patch-nostubs b/x11-toolkits/itk/files/patch-nostubs
deleted file mode 100644
index 69d42b75f408..000000000000
--- a/x11-toolkits/itk/files/patch-nostubs
+++ /dev/null
@@ -1,33 +0,0 @@
---- generic/itk_cmds.c.orig Fri Jun 22 04:38:54 2001
-+++ generic/itk_cmds.c Sun Mar 13 21:46:16 2005
-@@ -111,12 +111,14 @@
- {
- Tcl_Namespace *itkNs, *parserNs;
- ClientData parserInfo;
-+ #ifdef USE_ITK_STUBS
- extern ItkStubs itkStubs;
-+ #endif
-
-- if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
-+ if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
- return TCL_ERROR;
- };
-- if (Tk_InitStubs(interp, "8.1", 0) == NULL) {
-+ if (Tk_InitStubs(interp, TK_VERSION, 0) == NULL) {
- return TCL_ERROR;
- };
- if (Itcl_InitStubs(interp, ITCL_VERSION, 1) == NULL) {
-@@ -209,7 +211,12 @@
- * end-of-the-line?
- */
- if (Tcl_PkgProvideEx(interp, "Itk", ITCL_VERSION,
-- (ClientData) &itkStubs) != TCL_OK) {
-+#ifdef USE_ITK_STUBS
-+ (ClientData) &itkStubs
-+#else
-+ (ClientData) NULL
-+#endif
-+ ) != TCL_OK) {
- return TCL_ERROR;
- }
- return TCL_OK;
diff --git a/x11-toolkits/itk/pkg-plist b/x11-toolkits/itk/pkg-plist
index dda423ed0258..6ff3be4a556b 100644
--- a/x11-toolkits/itk/pkg-plist
+++ b/x11-toolkits/itk/pkg-plist
@@ -1,12 +1,13 @@
include/itk%%MAJOR%%.%%MINOR%%/itk.h
include/itk%%MAJOR%%.%%MINOR%%/itkDecls.h
-lib/libitk%%MAJOR%%%%MINOR%%.so.1
-lib/libitk%%MAJOR%%%%MINOR%%.so
-lib/libitk%%MAJOR%%%%MINOR%%.a
+lib/libitk.so.%%MAJOR%%.%%MINOR%%
+lib/libitk.so
+lib/libitk.a
lib/itk%%MAJOR%%.%%MINOR%%/Archetype.itk
lib/itk%%MAJOR%%.%%MINOR%%/Toplevel.itk
lib/itk%%MAJOR%%.%%MINOR%%/Widget.itk
lib/itk%%MAJOR%%.%%MINOR%%/itk.tcl
+lib/itk%%MAJOR%%.%%MINOR%%/itkConfig.sh
lib/itk%%MAJOR%%.%%MINOR%%/tclIndex
lib/itk%%MAJOR%%.%%MINOR%%/pkgIndex.tcl
@dirrm include/itk%%MAJOR%%.%%MINOR%%