summaryrefslogtreecommitdiff
path: root/graphics/tiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-10-20 09:15:23 +0000
committerjlam <jlam@pkgsrc.org>2002-10-20 09:15:23 +0000
commitd1991ca9610278a8d0c9ef90e4544c7e7274ffbb (patch)
tree031443cb0a78a657956207007efdad276ec0973d /graphics/tiff
parent8f33914f7c4b95554434ec4b51fb8e17a179b32b (diff)
downloadpkgsrc-d1991ca9610278a8d0c9ef90e4544c7e7274ffbb.tar.gz
Use bsd.pkg.install.mk and change INSTALL.OpenWindows into a model for how
to replace the complexity of the default INSTALL/DEINSTALL scripts with something simpler when simple is all that's needed. Also replace the check for OpenWindows with one that's more sensible.
Diffstat (limited to 'graphics/tiff')
-rw-r--r--graphics/tiff/INSTALL.OpenWindows44
-rw-r--r--graphics/tiff/Makefile29
2 files changed, 28 insertions, 45 deletions
diff --git a/graphics/tiff/INSTALL.OpenWindows b/graphics/tiff/INSTALL.OpenWindows
index ab4e12dec80..0ebac569b7d 100644
--- a/graphics/tiff/INSTALL.OpenWindows
+++ b/graphics/tiff/INSTALL.OpenWindows
@@ -1,23 +1,19 @@
-#!/bin/sh
+# INSTALL_TMPL replacement
#
-# $NetBSD: INSTALL.OpenWindows,v 1.1 2001/11/01 20:38:21 zuntum Exp $
+# $NetBSD: INSTALL.OpenWindows,v 1.2 2002/10/20 09:15:23 jlam Exp $
-PKGNAME=$1
-STAGE=$2
+LIBTIFF="libtiff.so libtiff.so.3"
case ${STAGE} in
PRE-INSTALL)
- cd @X11BASE@/lib
- if [ -f libtiff.so ]
- then
- @MV@ libtiff.so libtiff.so.openwin
- @LN@ -s @PREFIX@/lib/libtiff.so
- fi
- if [ -f libtiff.so.3 ]
- then
- @MV@ libtiff.so.3 libtiff.so.3.openwin
- @LN@ -s @PREFIX@/lib/libtiff.so.3
- fi
+ for lib in ${LIBTIFF}; do
+ src="${PKG_PREFIX}/lib/${lib}"
+ dest="@X11BASE@/lib/${lib}"
+ if [ -f ${dest} ]; then
+ ${MV} -f ${dest} ${dest}.openwin
+ ${LN} -sf ${src} ${dest}
+ fi
+ done
;;
POST-INSTALL)
@@ -27,20 +23,16 @@ DEINSTALL)
;;
POST-DEINSTALL)
- cd @X11BASE@/lib
- if [ -f libtiff.so.3.openwin ]
- then
- @MV@ libtiff.so.3.openwin libtiff.so.3
- fi
- if [ -f libtiff.so.openwin ]
- then
- @MV@ libtiff.so.openwin libtiff.so
- fi
+ for lib in ${LIBTIFF}; do
+ file="@X11BASE@/lib/${lib}"
+ if [ -f ${file}.openwin ]; then
+ ${MV} -f ${file}.openwin ${file}
+ fi
+ done
;;
*)
- echo "Unexpected argument: ${STAGE}"
+ ${ECHO} "Unexpected argument: ${STAGE}"
exit 1
;;
esac
-exit 0
diff --git a/graphics/tiff/Makefile b/graphics/tiff/Makefile
index fa336f4eb89..88aee8c69eb 100644
--- a/graphics/tiff/Makefile
+++ b/graphics/tiff/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.41 2002/08/25 18:39:23 jlam Exp $
+# $NetBSD: Makefile,v 1.42 2002/10/20 09:15:23 jlam Exp $
DISTNAME= tiff-v3.5.7
PKGNAME= tiff-3.5.7
@@ -12,12 +12,10 @@ MAINTAINER= packages@netbsd.org
HOMEPAGE= http://www.libtiff.org/
COMMENT= Library and tools for reading and writing TIFF data files
-USE_LIBTOOL= yes
-HAS_CONFIGURE= yes
-CONFIGURE_ARGS= --noninteractive --site=${FILESDIR} --prefix=${PREFIX}
-CONFIGURE_ENV+= CC="${CC}"
-
USE_BUILDLINK2= # defined
+USE_LIBTOOL= # defined
+HAS_CONFIGURE= # defined
+CONFIGURE_ARGS= --noninteractive --site=${FILESDIR} --prefix=${PREFIX}
.include "../../mk/bsd.prefs.mk"
@@ -48,21 +46,14 @@ pre-patch:
${SED} -e "s,\(\$${CC} -o\),\$${LIBTOOL} \1,g" \
${WRKSRC}/tools/Makefile.in.in > ${WRKSRC}/tools/Makefile.in
-.if defined(HAVE_OPENWINDOWS)
-INSTALL_FILE= ${WRKDIR}/INSTALL
-DEINSTALL_FILE= ${INSTALL_FILE}
+.include "../../devel/zlib/buildlink2.mk"
+.include "../../graphics/jpeg/buildlink2.mk"
-pre-build:
- @${SED} -e 's#@LN@#${LN}#g' \
- -e 's#@MV@#${MV}#g' \
- -e 's#@PREFIX@#${PREFIX}#g' \
- -e 's#@X11BASE@#${X11BASE}#g' \
- ${PKGDIR}/INSTALL.OpenWindows >${INSTALL_FILE}
+.if !empty(X11BASE:M*openwin)
+INSTALL_TMPL= ${.CURDIR}/INSTALL.OpenWindows
+DEINSTALL_TMPL= ${INSTALL_TMPL}
-pre-install:
- ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
+. include "../../mk/bsd.pkg.install.mk"
.endif
-.include "../../devel/zlib/buildlink2.mk"
-.include "../../graphics/jpeg/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"