aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authormi <mi@FreeBSD.org>2002-01-29 00:28:04 +0800
committermi <mi@FreeBSD.org>2002-01-29 00:28:04 +0800
commit8726bb638d7be82ec7b4d6ead0fc266f660dbe08 (patch)
tree20b466992f43691af1ec271536e9c3ecb623c6cf /devel
parenta4742036b1c3256241d8c157cd5b5fba2ddc42e1 (diff)
downloadfreebsd-ports-gnome-8726bb638d7be82ec7b4d6ead0fc266f660dbe08.tar.gz
freebsd-ports-gnome-8726bb638d7be82ec7b4d6ead0fc266f660dbe08.tar.zst
freebsd-ports-gnome-8726bb638d7be82ec7b4d6ead0fc266f660dbe08.zip
Actually add the Makefile.bsd... Damn...
Submitted by: fenner
Diffstat (limited to 'devel')
-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}