aboutsummaryrefslogtreecommitdiff
path: root/databases/metakit
diff options
context:
space:
mode:
Diffstat (limited to 'databases/metakit')
-rw-r--r--databases/metakit/Makefile44
-rw-r--r--databases/metakit/files/Makefile.kit52
-rw-r--r--databases/metakit/pkg-plist4
3 files changed, 94 insertions, 6 deletions
diff --git a/databases/metakit/Makefile b/databases/metakit/Makefile
index 8f5f11c16144..4663da1dc856 100644
--- a/databases/metakit/Makefile
+++ b/databases/metakit/Makefile
@@ -21,6 +21,10 @@ RUN_DEPENDS= python1.5:${PORTSDIR}/lang/python15
.if defined(METAKIT_WITH_TCL)
LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83
.endif
+.if defined(METAKIT_WITH_TCLKIT)
+LIB_DEPENDS= tcl84.1:${PORTSDIR}/lang/tcl84
+BUILD_DEPENDS= wish8.4:${PORTSDIR}/x11-toolkits/tk84
+.endif
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/builds
USE_LIBTOOL= yes
@@ -38,36 +42,64 @@ PLIST_SUB+= WITH_PYTHON="@comment "
.endif
.if defined(METAKIT_WITH_TCL)
-CONFIGURE_ARGS+= --with-tcl=${LOCALBASE}/lib/tcl8.3
+CONFIGURE_ARGS+= --with-tcl=${LOCALBASE}/lib/tcl${TCL_V}
CATEGORIES+= tcl83
+TCL_V= 8.3
+TCL_SHORT_V= 83
PLIST_SUB+= WITH_TCL=""
.else
PLIST_SUB+= WITH_TCL="@comment "
.endif
+.if defined(METAKIT_WITH_TCLKIT)
+CONFIGURE_ARGS+= --with-tcl=${LOCALBASE}/lib/tcl${TCL_V}
+TCL_V= 8.4
+TCL_SHORT_V= 84
+MAKE_ENV+= V=${TCL_V} SHORT_V=${TCL_SHORT_V}
+VFIX= tcl/kit/kitsh.vfs/lib/vfs/vfs.tcl \
+ tcl/kit/kit-unix.vfs/lib/tk8.4/pkgIndex.tcl
+PLIST_SUB+= WITH_TCLKIT=""
+.else
+PLIST_SUB+= WITH_TCLKIT="@comment "
+.endif
+
pre-patch:
@${PERL5} -pi -e "s=\@TCL_BIN_DIR\@=${LOCALBASE}/lib=" \
${WRKSRC}/../unix/Makefile.in
- @${PERL5} -pi -e "s=-ltclstub8.4=-ltclstub83=" \
+ @${PERL5} -pi -e "s=-ltclstub8.4=-ltclstub${TCL_SHORT_V}=" \
${WRKSRC}/../unix/Makefile.in
@${PERL5} -pi -e "s= -Ds = -s =" \
${WRKSRC}/../unix/Makefile.in
@${PERL5} -pi -e "s= -D = =" \
${WRKSRC}/../unix/Makefile.in
@${PERL5} -pi -e \
- "s=-I..TCL_BIN_DIR.=-I${LOCALBASE}/include/tcl8.3/unix=" \
+ "s=-I..TCL_BIN_DIR.=-I${LOCALBASE}/include/tcl${TCL_V}/unix=" \
${WRKSRC}/../unix/Makefile.in
@${PERL5} -pi -e "s=doc/==" ${WRKSRC}/../MetaKit.html
+.if defined(METAKIT_WITH_TCLKIT)
+post-patch:
+.for i in ${VFIX}
+ @${PERL5} -pi -e "s=libtk8[.]4=libtk${TCL_SHORT_V}=" ${WRKSRC}/../${i}
+.endfor
+
+post-build:
+ @(cd ${WRKSRC}/../tcl/kit && ${SETENV} ${MAKE_ENV} \
+ ${MAKE} ${MAKE_FLAGS} ${FILESDIR}/Makefile.kit ${MAKE_ARGS})
+.endif
+
post-install:
.if !defined(METAKIT_WITHOUT_PYTHON)
@${INSTALL_PROGRAM} ${WRKSRC}/Mk4py.so \
${PREFIX}/lib/python1.5/site-packages
.endif
+.if defined(METAKIT_WITH_TCLKIT)
+ @${INSTALL_PROGRAM} ${WRKSRC}/../tcl/kit/tclkit ${PREFIX}/bin
+.endif
.if !defined(NOPORTDOCS)
${MKDIR} ${PREFIX}/share/doc/metakit
- (cd ${WRKSRC}/../doc && ${TAR} -c -f - .) \
- | (cd ${PREFIX}/share/doc/metakit && ${TAR} --unlink -x -f -)
+ (${TAR} -C ${WRKSRC}/../doc -cf - . | \
+ ${TAR} -C ${PREFIX}/share/doc/metakit --unlink -xf -)
${INSTALL_DATA} ${WRKSRC}/../MetaKit.html ${WRKSRC}/../CHANGES \
${WRKSRC}/../README ${WRKSRC}/../WHATSNEW \
${PREFIX}/share/doc/metakit
@@ -76,7 +108,7 @@ post-install:
test:
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test)
-.if defined(METAKIT_WITH_TCL)
+.if defined(METAKIT_WITH_TCL) || defined(METAKIT_WITH_TCLKIT)
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test-tcl)
.endif
diff --git a/databases/metakit/files/Makefile.kit b/databases/metakit/files/Makefile.kit
new file mode 100644
index 000000000000..73015fc961a4
--- /dev/null
+++ b/databases/metakit/files/Makefile.kit
@@ -0,0 +1,52 @@
+#
+# $FreeBSD%
+#
+
+D= -DNDEBUG -DKIT_INCLUDES_TK -DHAVE_UNISTD_H
+A= -DTCL_LOCAL_APPINIT=TclKit_AppInit
+I= -I. -I${LOCALBASE}/include/tcl${V}/generic \
+ -I${LOCALBASE}/include/tk${V}/generic \
+ -I../../include -I/usr/X11R6/include -I${LOCALBASE}/include
+L= ${LOCALBASE}/lib/libtcl${SHORT_V}.a \
+ ${LOCALBASE}/lib/libtk${SHORT_V}.a \
+ ../../builds/libmk4tcl.a
+X= /usr/X11R6/lib/libX11.a
+C= ${LOCALBASE}/lib/tcl${V}
+K= ${LOCALBASE}/lib/tk${V}
+
+all: tclkit
+
+tclkit: kit
+ mkdir -p kit.vfs/lib kitsh.vfs/lib kitsh.vfs/bin \
+ kit-unix.vfs/lib kitsh-unix.vfs/lib \
+ kitsh.vfs/lib/tcl${V} kitsh.vfs/lib/tk${V}
+ rm -f kitsh.vfs/bin/sync.tcl
+ cp -p sync.tcl kitsh.vfs/bin/
+ (tar -C ${C} -cf - . | tar -C kitsh.vfs/lib/tcl${V} -xf -)
+ rm kitsh.vfs/lib/tcl${V}/encoding/*
+ for i in ascii cp1252 iso8859-1 iso8859-2 macRoman ; do \
+ cp -p ${C}/encoding/$$i.enc \
+ kitsh.vfs/lib/tcl${V}/encoding ; done
+ rm -rf kitsh.vfs/lib/tcl${V}/dde*
+ rm -rf kitsh.vfs/lib/tcl${V}/reg*
+ rm -rf kitsh.vfs/lib/tcl${V}/tcltest*
+ (tar -C ${K} -cf - . | tar -C kitsh.vfs/lib/tk${V} -xf -)
+ -FILES=`find kit.vfs/lib -type f -name license.terms -print` && \
+ test -n "$$FILES" && rm $$FILES
+ rm -rf kit.vfs/lib/tk${V}/demos
+ rm -rf kit.vfs/lib/tk${V}/images
+ rm -f tclkit
+ ./kit
+ ls -l tclkit
+
+kit:
+ rm -f *.o
+ ${CC} -c ${CFLAGS} $I $D *.c
+ g++ -c $I $D -fexceptions *.cpp
+ ${CC} -c ${CFLAGS} $I $D $A ${LOCALBASE}/lib/tcl${V}/tclAppInit.c
+ g++ -static -o kit *.o $L $X -lm -lz
+ strip kit
+
+clean:
+ rm -f *.o tclkit kit
+
diff --git a/databases/metakit/pkg-plist b/databases/metakit/pkg-plist
index aa05ffcaf224..b4450689bad1 100644
--- a/databases/metakit/pkg-plist
+++ b/databases/metakit/pkg-plist
@@ -12,6 +12,10 @@ lib/libmk4.so.0
%%WITH_TCL%%lib/libmk4tcl.a
%%WITH_TCL%%lib/libmk4tcl.so
%%WITH_TCL%%lib/libmk4tcl.so.0
+%%WITH_TCLKIT%%lib/libmk4tcl.a
+%%WITH_TCLKIT%%lib/libmk4tcl.so
+%%WITH_TCLKIT%%lib/libmk4tcl.so.0
+%%WITH_TCLKIT%%bin/tclkit
%%PORTDOCS%%share/doc/metakit/api/c4_Bytes.html
%%PORTDOCS%%share/doc/metakit/api/c4_BytesProp.html
%%PORTDOCS%%share/doc/metakit/api/c4_BytesProp_desc.html