aboutsummaryrefslogtreecommitdiff
path: root/graphics/libimg
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/libimg')
-rw-r--r--graphics/libimg/Makefile31
-rw-r--r--graphics/libimg/distinfo2
-rw-r--r--graphics/libimg/files/Makefile.bsd76
-rw-r--r--graphics/libimg/files/patch-aa43
-rw-r--r--graphics/libimg/files/patch-ab11
-rw-r--r--graphics/libimg/pkg-plist26
6 files changed, 119 insertions, 70 deletions
diff --git a/graphics/libimg/Makefile b/graphics/libimg/Makefile
index 6453397dfd67..eb99e2767cb1 100644
--- a/graphics/libimg/Makefile
+++ b/graphics/libimg/Makefile
@@ -6,29 +6,40 @@
#
PORTNAME= libimg
-PORTVERSION= 1.2.2
-CATEGORIES= graphics tk82
+PORTVERSION= 1.2.4
+CATEGORIES= graphics tk83
MASTER_SITES= ftp://ftp.neosoft.com/pub/tcl/sorted/packages-8.0/graphics/Img/1.2/
DISTNAME= img${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
-LIB_DEPENDS= tk82.1:${PORTSDIR}/x11-toolkits/tk82 \
+LIB_DEPENDS= tk83.1:${PORTSDIR}/x11-toolkits/tk83 \
png.4:${PORTSDIR}/graphics/png \
jpeg.9:${PORTSDIR}/graphics/jpeg \
tiff.4:${PORTSDIR}/graphics/tiff
-WRKSRC= ${WRKDIR}/img1.2.2
+WRKSRC= ${WRKDIR}/img${PORTVERSION}
-ALL_TARGET= default
+# We don't need the bundled libraries at all, except for a few headers
+# from libtiff, see comment in files/Makefile.bsd:
+EXTRACT_AFTER_ARGS= | ${TAR} -xf - --exclude '*/libz/*' \
+ --exclude '*/compat/*' --exclude '*/libtiff/*.c' \
+ --exclude '*/libjpeg/*' --exclude '*/libpng/*'
+
+MAKEFILE= ${FILESDIR}/Makefile.bsd
+
+MAKE_ARGS= PORTVERSION="${PORTVERSION}" LOCALBASE="${LOCALBASE}" \
+ MKDIR="${MKDIR}" INSTALL_DATA="${INSTALL_DATA}"
INSTALLS_SHLIB= yes
-GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --with-tcl=${PREFIX}/lib/tcl8.2 --with-tk=${PREFIX}/lib/tk8.2 \
- --disable-stubs
+.if !defined(NOPORTDOCS)
post-install:
- ${LN} -sf ${PREFIX}/lib/Img1.2/libimg82.so.1 ${PREFIX}/lib/libimg.so.1
- ${LN} -sf ${PREFIX}/lib/libimg.so.1 ${PREFIX}/lib/libimg.so
+ ${MKDIR} ${LOCALBASE}/share/doc/Img1.2
+ ${INSTALL_DATA} ${WRKSRC}/doc/* ${LOCALBASE}/share/doc/Img1.2
+.endif
.include <bsd.port.mk>
+
+PLIST_SUBP!= ${ENV} TCL_VER=${TCL_VER} ${MAKE} -f ${MAKEFILE} environ
+PLIST_SUB+= ${PLIST_SUBP}
diff --git a/graphics/libimg/distinfo b/graphics/libimg/distinfo
index 951f1a46a501..bacb11463e94 100644
--- a/graphics/libimg/distinfo
+++ b/graphics/libimg/distinfo
@@ -1 +1 @@
-MD5 (img1.2.2.tar.gz) = 8c9150eda70edb9fc695f560c780bc34
+MD5 (img1.2.4.tar.gz) = abfda1cc55555fc2490e761bde165078
diff --git a/graphics/libimg/files/Makefile.bsd b/graphics/libimg/files/Makefile.bsd
new file mode 100644
index 000000000000..2ed8da982a27
--- /dev/null
+++ b/graphics/libimg/files/Makefile.bsd
@@ -0,0 +1,76 @@
+LIB= img
+
+PORTVERSION?= 1.2.4
+LOCALBASE?= /usr/local
+TCL_VER?= 8.3
+
+SHLIB_MAJOR= 1
+SHLIB_MINOR= 2
+
+.if exists(${LOCALBASE}/lib/tcl${TCL_VER}/tkConfig.sh)
+# If for some reason the file does not exist -- make the best guess. In
+# reality, it will exist by the time we are actually doing the build, so
+# the quality of the guess does not matter. But we still try well. -mi
+TCL_STUB_LIB_SPEC!= . ${LOCALBASE}/lib/tcl${TCL_VER}/tclConfig.sh; \
+TK_STUB_LIB_SPEC!= . ${LOCALBASE}/lib/tcl${TCL_VER}/tclConfig.sh; \
+ echo $$TCL_STUB_LIB_SPEC
+.else
+TCL_STUB_LIB_SPEC= -L${LOCALBASE}/lib -ltclstub${TCL_VER:S/.//}
+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}
+
+CFLAGS+= -I${LOCALBASE}/include/tcl${TCL_VER}
+CFLAGS+= -I${LOCALBASE}/include/tcl${TCL_VER}/generic
+CFLAGS+= -D__X11__ -I${X11BASE}/include
+CFLAGS+= -I${LOCALBASE}/include/tk${TCL_VER}
+CFLAGS+= -DNDEBUG -Wall -I. -DUSE_TCL_STUBS -DUSE_TK_STUBS
+CFLAGS+= -DVERSION=\"${PORTVERSION}\" -I${LOCALBASE}/include
+CFLAGS+= -DHAVE_JPEGLIB_H -DHAVE_TIFF_H -DHAVE_DLFCN_H -DHAVE_IMG_H
+
+# This seems terrible... The package uses libtiff's interfaces, which are
+# clearly marked as internal... It includes the libtiff's header files, which
+# libtiff itself does NOT install. -mi
+CFLAGS+= -I${.CURDIR}/libtiff
+
+INTERNALLIB = don't build the useless static version
+NOPROFILE = don't build the profilable lib
+
+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' \
+ < pkgIndex.tcl.in > pkgIndex.tcl
+
+DIR = lib/Img1.2
+SHLIBDIR = ${LOCALBASE}/${DIR}
+
+${SHLIBDIR} ${SHLIBDIR}/msgs:
+ ${MKDIR} $@
+
+beforeinstall: ${SHLIBDIR} ${SHLIBDIR}/msgs
+ ${INSTALL_DATA} pkgIndex.tcl ${.CURDIR}/demo.tcl ${.CURDIR}/tkv.tcl \
+ ${.CURDIR}/imgmsg.tcl ${SHLIBDIR}
+ ${INSTALL_DATA} ${.CURDIR}/msgs/* ${SHLIBDIR}/msgs/
+
+environ:
+ @${ECHO} SHLIB_NAME=${SHLIB_NAME} SHLIB_LINK=${SHLIB_LINK} DIR=${DIR}
+
+# fundamentals of this library
+SRCS = imgInit.c imgObj.c imgUtil.c imgPmap.c imgUnixPmap.c \
+ imgBMP.c imgGIF.c imgJPEG.c imgPNG.c imgPS.c \
+ imgTIFF.c imgTIFFjpeg.c imgTIFFpixar.c imgTIFFzip.c \
+ imgWindow.c imgXBM.c imgXPM.c
+
+test: $(SHLIB_NAME)
+ PATH=${TK_BIN_DIR}:${PATH}; export PATH; \
+ TCLLIBPATH=`pwd`; export TCLLIBPATH; \
+ export SHLIB_PATH; \
+ LD_LIBRARY_PATH=`pwd`; \
+ export LD_LIBRARY_PATH; \
+ wish${TCL_VER} demo.tcl
+
+.include <bsd.lib.mk>
diff --git a/graphics/libimg/files/patch-aa b/graphics/libimg/files/patch-aa
deleted file mode 100644
index 3cbccff2d2e4..000000000000
--- a/graphics/libimg/files/patch-aa
+++ /dev/null
@@ -1,43 +0,0 @@
---- configure.orig Tue Oct 26 16:57:43 1999
-+++ configure Thu Nov 18 16:13:16 1999
-@@ -1715,8 +1715,8 @@
- TCL_INC_DIR=${TCL_TOP_DIR}/include
- elif test -d ${TCL_EXEC_PREFIX}/include -a -f ${TCL_EXEC_PREFIX}/include/tcl.h; then
- TCL_INC_DIR=${TCL_EXEC_PREFIX}/include
--elif test -d ${TCL_EXEC_PREFIX}/include -a -f ${TCL_EXEC_PREFIX}/include/tcl.h; then
-- TCL_INC_DIR=${TCL_EXEC_PREFIX}/include
-+elif test -d ${TCL_EXEC_PREFIX}/include -a -f ${TCL_EXEC_PREFIX}/include/tcl8.2/tcl.h; then
-+ TCL_INC_DIR=${TCL_EXEC_PREFIX}/include/tcl8.2
- else
- TCL_INC_DIR=$prefix/include
- fi
-@@ -1832,8 +1832,8 @@
- TK_INC_DIR=${TK_TOP_DIR}/include
- elif test -d ${TK_EXEC_PREFIX}/include -a -f ${TK_EXEC_PREFIX}/include/tk.h; then
- TK_INC_DIR=${TK_EXEC_PREFIX}/include
--elif test -d ${TK_EXEC_PREFIX}/include -a -f ${TK_EXEC_PREFIX}/include/tk.h; then
-- TK_INC_DIR=${TK_EXEC_PREFIX}/include
-+elif test -d ${TK_EXEC_PREFIX}/include -a -f ${TK_EXEC_PREFIX}/include/tk8.2/tk.h; then
-+ TK_INC_DIR=${TK_EXEC_PREFIX}/include/tk8.2
- else
- TK_INC_DIR=$prefix/include
- fi
-@@ -1936,12 +1936,12 @@
- if test "x$ok" = "xyes" -a "x${SHLIB_SUFFIX}" != "x"; then
- IMG_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
- if test "x$SHLIB_SUFFIX" = "x.so"; then
-- Z_LIB_FILE="libz${SHLIB_SUFFIX}.1.1.3"
-- PNG_LIB_FILE="libpng${SHLIB_SUFFIX}.2.1.0"
-- JPEG_LIB_FILE="libjpeg${SHLIB_SUFFIX}.62.0.0"
-- TIFF_LIB_FILE="libtiff${SHLIB_SUFFIX}.3.5.2"
-- TTF_LIB_FILE="libttf${SHLIB_SUFFIX}.2.0.1"
-- GIF_LIB_FILE="libungif${SHLIB_SUFFIX}.3.1.0"
-+ Z_LIB_FILE="libz${SHLIB_SUFFIX}.2"
-+ PNG_LIB_FILE="libpng${SHLIB_SUFFIX}.3"
-+ JPEG_LIB_FILE="libjpeg${SHLIB_SUFFIX}.9"
-+ TIFF_LIB_FILE="libtiff${SHLIB_SUFFIX}.4"
-+ TTF_LIB_FILE="libttf${SHLIB_SUFFIX}.3"
-+ GIF_LIB_FILE="libungif${SHLIB_SUFFIX}.5"
- else
- Z_LIB_FILE="libz${SHLIB_SUFFIX}"
- PNG_LIB_FILE="libpng${SHLIB_SUFFIX}"
diff --git a/graphics/libimg/files/patch-ab b/graphics/libimg/files/patch-ab
deleted file mode 100644
index fc60fd460be8..000000000000
--- a/graphics/libimg/files/patch-ab
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.in.orig Tue Oct 26 14:29:30 1999
-+++ Makefile.in Thu Nov 18 10:11:53 1999
-@@ -87,7 +87,7 @@
- TK_XLIBSW = @TK_XLIBSW@
-
- # Libraries to be included with libimg$(VERSION).so
--TCL_SHARED_LIBS = @TCL_SHARED_LIBS@
-+TCL_SHARED_LIBS =
-
- # Default top-level directories in which to install architecture-
- # specific files (exec_prefix) and machine-independent files such
diff --git a/graphics/libimg/pkg-plist b/graphics/libimg/pkg-plist
index 5e6dbbdf454f..d4fa9df622b3 100644
--- a/graphics/libimg/pkg-plist
+++ b/graphics/libimg/pkg-plist
@@ -1,5 +1,21 @@
-lib/Img1.2/pkgIndex.tcl
-lib/Img1.2/libimg82.so.1
-lib/libimg.so.1
-lib/libimg.so
-@dirrm lib/Img1.2
+%%DIR%%/pkgIndex.tcl
+%%DIR%%/demo.tcl
+%%DIR%%/tkv.tcl
+%%DIR%%/imgmsg.tcl
+%%DIR%%/%%SHLIB_NAME%%
+%%DIR%%/%%SHLIB_LINK%%
+%%DIR%%/msgs/de.msg
+%%DIR%%/msgs/el.msg
+%%DIR%%/msgs/en.msg
+%%DIR%%/msgs/es.msg
+%%DIR%%/msgs/fr.msg
+%%DIR%%/msgs/ja.msg
+%%DIR%%/msgs/nl.msg
+@dirrm %%DIR%%/msgs
+@dirrm %%DIR%%
+%%PORTDOCS%%share/doc/Img1.2/default.css
+%%PORTDOCS%%share/doc/Img1.2/formats.htm
+%%PORTDOCS%%share/doc/Img1.2/index.htm
+%%PORTDOCS%%share/doc/Img1.2/install.htm
+%%PORTDOCS%%share/doc/Img1.2/library.htm
+%%PORTDOCS%%@dirrm share/doc/Img1.2