aboutsummaryrefslogtreecommitdiff
path: root/devel/tcl-memchan
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2002-01-28 16:28:04 +0000
committerMikhail Teterin <mi@FreeBSD.org>2002-01-28 16:28:04 +0000
commit0d081000a58c18c9c1029112a3e67175777cda52 (patch)
tree8dd651db5689135b96e9c92dc8a84966edaa0a61 /devel/tcl-memchan
parent3adbe3170c5063f5b73be263cb43c26e45206c3e (diff)
downloadports-0d081000a58c18c9c1029112a3e67175777cda52.tar.gz
ports-0d081000a58c18c9c1029112a3e67175777cda52.zip
Notes
Diffstat (limited to 'devel/tcl-memchan')
-rw-r--r--devel/tcl-memchan/files/Makefile.bsd49
1 files changed, 49 insertions, 0 deletions
diff --git a/devel/tcl-memchan/files/Makefile.bsd b/devel/tcl-memchan/files/Makefile.bsd
new file mode 100644
index 000000000000..e5435a0ca9c4
--- /dev/null
+++ b/devel/tcl-memchan/files/Makefile.bsd
@@ -0,0 +1,49 @@
+LIB= Memchan
+SHLIB_MAJOR= 2
+SHLIB_MINOR= 2
+
+.PATH: ${.CURDIR}/generic
+
+.if exists(${.CURDIR}/Makefile.in)
+_SRCS!= ${MAKE} -f ${.CURDIR}/Makefile.in -V Memchan_SOURCES
+SRCS= ${_SRCS:S/@srcdir@\/generic\///}
+.endif
+
+TCL_VER?= 8.3
+LOCALBASE?= /usr/local
+
+CFLAGS+= -I${LOCALBASE}/include/tcl${TCL_VER} \
+ -DMEMCHAN_VERSION='"${SHLIB_MAJOR}.${SHLIB_MINOR}"'
+
+LDADD= -L${LOCALBASE}/lib -ltcl${TCL_VER:S/.//}
+
+INTERNALLIB = don't build the useless static version
+NOPROFILE = don't care for profiling
+
+all: ${SHLIB_NAME} pkgIndex.tcl test
+
+pkgIndex.tcl:
+ echo 'package ifneeded ${LIB} ${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ [list load [file join $$dir $(SHLIB_NAME)]]' > pkgIndex.tcl
+
+DIR = lib/tcl${TCL_VER}/${LIB}
+SHLIBDIR = ${PREFIX}/${DIR}
+MANDIR = ${PREFIX}/man/man
+
+${SHLIBDIR}:
+ ${MKDIR} ${SHLIBDIR}
+
+env:
+ @${ECHO} SHLIB_NAME=${SHLIB_NAME} SHLIB_LINK=${SHLIB_LINK} DIR=${DIR}
+
+beforeinstall: ${SHLIBDIR} pkgIndex.tcl
+ ${INSTALL_DATA} pkgIndex.tcl ${SHLIBDIR}/pkgIndex.tcl
+
+.include <bsd.lib.mk>
+
+test: ${SHLIB_NAME} pkgIndex.tcl
+ echo ' set auto_path ${.OBJDIR}; cd ${.CURDIR}/tests; \
+ package require ${LIB} ${SHLIB_MAJOR}.${SHLIB_MINOR}; \
+ if {[catch {source all} msg]} { \
+ puts stderr $msg; exit -1 \
+ }' | ${LOCALBASE}/bin/tclsh${TCL_VER}