Turns out I broke a few too many things with my last commit by

removing the symlinking of the installed shared library into the
${PREFIX}/lib. Those broken things should really use:

	package require Img	(from TCL)
or
	Tcl_PkgRequire(interp, "Img", "1.2", 0)	(from C)

instead of  trying to link  with libimg directly, but  there are
too many of them and sobomax lost (his and mine) cool.

This version will just install the library (and SHLIB_LINK) into
${PREFIX}/lib directly. pkgIndex.tcl is modified accordingly.
This commit is contained in:
Mikhail Teterin
2001-03-13 19:15:26 +00:00
parent 5d9696f34e
commit 98d579de66
2 changed files with 12 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ LIB= img
PORTVERSION?= 1.2.4
LOCALBASE?= /usr/local
X11BASE?= /usr/X11R6
TCL_VER?= 8.3
SHLIB_MAJOR= 1
@@ -20,7 +21,8 @@ TK_STUB_LIB_SPEC= -L${LOCALBASE}/lib -ltkstub${TCL_VER:S/.//}
.endif
LDADD= -lm -lz -L${LOCALBASE}/lib -lpng -ljpeg -ltiff \
${TCL_STUB_LIB_SPEC} ${TCL_STUB_LIB_SPEC}
${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC} \
-L${X11BASE}/lib -lX11
CFLAGS+= -I${LOCALBASE}/include/tcl${TCL_VER}
CFLAGS+= -I${LOCALBASE}/include/tcl${TCL_VER}/generic
@@ -42,19 +44,20 @@ all: ${SHLIB_NAME} pkgIndex.tcl
pkgIndex.tcl: pkgIndex.tcl.in
sed -e 's,@IMG_PATCH_LEVEL@,${PORTVERSION},g' \
-e 's,@IMG_SHARED_LIB_FILE@,${SHLIB_NAME},g' \
-e 's,@IMG_SHARED_LIB_FILE@,../${SHLIB_NAME},g' \
< pkgIndex.tcl.in > pkgIndex.tcl
DIR = lib/Img1.2
SHLIBDIR = ${LOCALBASE}/${DIR}
INSTDIR = ${LOCALBASE}/${DIR}
SHLIBDIR = ${LOCALBASE}/lib
${SHLIBDIR} ${SHLIBDIR}/msgs:
${INSTDIR} ${INSTDIR}/msgs:
${MKDIR} $@
beforeinstall: ${SHLIBDIR} ${SHLIBDIR}/msgs
beforeinstall: ${INSTDIR} ${INSTDIR}/msgs
${INSTALL_DATA} pkgIndex.tcl ${.CURDIR}/demo.tcl ${.CURDIR}/tkv.tcl \
${.CURDIR}/imgmsg.tcl ${SHLIBDIR}
${INSTALL_DATA} ${.CURDIR}/msgs/* ${SHLIBDIR}/msgs/
${.CURDIR}/imgmsg.tcl ${INSTDIR}
${INSTALL_DATA} ${.CURDIR}/msgs/* ${INSTDIR}/msgs/
environ:
@${ECHO} SHLIB_NAME=${SHLIB_NAME} SHLIB_LINK=${SHLIB_LINK} DIR=${DIR}

View File

@@ -2,8 +2,8 @@
%%DIR%%/demo.tcl
%%DIR%%/tkv.tcl
%%DIR%%/imgmsg.tcl
%%DIR%%/%%SHLIB_NAME%%
%%DIR%%/%%SHLIB_LINK%%
lib/%%SHLIB_NAME%%
lib/%%SHLIB_LINK%%
%%DIR%%/msgs/de.msg
%%DIR%%/msgs/el.msg
%%DIR%%/msgs/en.msg