pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/xpkgwedge Modernize this package a bit:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/dcd9210d1326
branches:  trunk
changeset: 460414:dcd9210d1326
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat Aug 30 11:08:22 2003 +0000

description:
Modernize this package a bit:

* Use bsd.pkg.install.mk instead of supplying custom INSTALL/DEINSTALL
  scripts.

* Note that this package doesn't really use buildlink.

* Remove ancient BUILDLINK_DEPENDS= line at the bottom of the file that
  we no longer need since the buildlink1 days of yore.

diffstat:

 pkgtools/xpkgwedge/DEINSTALL |  41 +++++++--------------------------------
 pkgtools/xpkgwedge/INSTALL   |  41 ++++++++-------------------------------
 pkgtools/xpkgwedge/Makefile  |  45 ++++++-------------------------------------
 3 files changed, 24 insertions(+), 103 deletions(-)

diffs (207 lines):

diff -r 7b9e2c1ec2fb -r dcd9210d1326 pkgtools/xpkgwedge/DEINSTALL
--- a/pkgtools/xpkgwedge/DEINSTALL      Sat Aug 30 10:46:05 2003 +0000
+++ b/pkgtools/xpkgwedge/DEINSTALL      Sat Aug 30 11:08:22 2003 +0000
@@ -1,34 +1,17 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.2 2002/02/26 21:49:05 jlam Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CMP="@CMP@"
-CP="@CP@"
-ECHO="@ECHO@"
-GREP="@GREP@"
-RM="@RM@"
-RMDIR="@RMDIR@"
-TRUE="@TRUE@"
+# $NetBSD: DEINSTALL,v 1.3 2003/08/30 11:08:22 jlam Exp $
 
 FONT_PROGS="@FONT_PROGS@"
 X11BASE=@X11BASE@
+
 X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def
 HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def
 
 case ${STAGE} in
-DEINSTALL)
-       ;;
-
 POST-DEINSTALL)
-       for prog in ${FONT_PROGS}
-       do
-               if [ -f ${PKG_PREFIX}/bin/${prog} -a                    \
-                    ${PKG_PREFIX} != ${X11BASE} ]
-               then
-                       ${RM} -f ${PKG_PREFIX}/bin/${prog}
+       for prog in ${FONT_PROGS}; do
+               if [ -f ${PKG_PREFIX}/bin/$prog -a                      \
+                    ${PKG_PREFIX} != ${X11BASE} ]; then
+                       ${RM} -f ${PKG_PREFIX}/bin/$prog
                fi
        done
 
@@ -36,19 +19,11 @@
        ${CP} -f ${HOSTDEF} ${HOSTDEF}.bak
        ( ${GREP} -v xpkgwedge ${HOSTDEF}.bak || ${TRUE} ) > ${HOSTDEF}
        ${RM} -f ${HOSTDEF}.bak
-       if [ ${PKG_PREFIX} != ${X11BASE} ] && \
-               [ -f ${X11_HOSTDEF} ] && \
-               ${CMP} -s ${X11_HOSTDEF} ${HOSTDEF}
-       then
+       if [ ${PKG_PREFIX} != ${X11BASE} -a -f ${X11_HOSTDEF} ] && \
+          ${CMP} -s ${X11_HOSTDEF} ${HOSTDEF}; then
                ${RM} -f ${HOSTDEF}
        fi
        ${ECHO} "done."
        ${RMDIR} -p ${PKG_PREFIX}/lib/X11/config 2>/dev/null || ${TRUE}
        ;;
-
-*)
-       ${ECHO} "Unexpected argument: ${STAGE}"
-       exit 1
-       ;;
 esac
-exit 0
diff -r 7b9e2c1ec2fb -r dcd9210d1326 pkgtools/xpkgwedge/INSTALL
--- a/pkgtools/xpkgwedge/INSTALL        Sat Aug 30 10:46:05 2003 +0000
+++ b/pkgtools/xpkgwedge/INSTALL        Sat Aug 30 11:08:22 2003 +0000
@@ -1,44 +1,27 @@
-#!/bin/sh
-#
-# $NetBSD: INSTALL,v 1.3 2003/05/06 17:42:24 jmmv Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CP="@CP@"
-ECHO="@ECHO@"
-GREP="@GREP@"
-LN="@LN@"
-RM="@RM@"
+# $NetBSD: INSTALL,v 1.4 2003/08/30 11:08:22 jlam Exp $
 
 FONT_PROGS="@FONT_PROGS@"
 X11BASE=@X11BASE@
+
 X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def
 HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def
 
 case ${STAGE} in
-PRE-INSTALL)
-       ;;
-
 POST-INSTALL)
-       for prog in ${FONT_PROGS}
-       do
-               if [ -f ${X11BASE}/bin/${prog} -a                       \
-                    ${PKG_PREFIX} != ${X11BASE} ]
-               then
-                       ${LN} -fs ${X11BASE}/bin/${prog}                \
-                               ${PKG_PREFIX}/bin/${prog}
+       for prog in ${FONT_PROGS}; do
+               if [ -f ${X11BASE}/bin/$prog -a                         \
+                    ${PKG_PREFIX} != ${X11BASE} ]; then
+                       ${LN} -fs ${X11BASE}/bin/$prog                  \
+                               ${PKG_PREFIX}/bin/$prog
                fi
        done
 
-       if [ ${PKG_PREFIX} = ${X11BASE} -o -f ${HOSTDEF} ]
-       then
+       if [ ${PKG_PREFIX} = ${X11BASE} -o -f ${HOSTDEF} ]; then
                ${ECHO} -n "Updating ${HOSTDEF}..."
                ${CP} -f ${HOSTDEF} ${HOSTDEF}.bak
        else
                ${ECHO} -n "Creating ${HOSTDEF}..."
-               if [ -f ${X11_HOSTDEF} ]
-               then
+               if [ -f ${X11_HOSTDEF} ]; then
                        ${CP} -f ${X11_HOSTDEF} ${HOSTDEF}.bak
                else
                        ${CP} -f /dev/null ${HOSTDEF}.bak
@@ -50,10 +33,4 @@
        ${RM} -f ${HOSTDEF}.bak
        ${ECHO} "done."
        ;;
-
-*)
-       ${ECHO} "Unexpected argument: ${STAGE}"
-       exit 1
-       ;;
 esac
-exit 0
diff -r 7b9e2c1ec2fb -r dcd9210d1326 pkgtools/xpkgwedge/Makefile
--- a/pkgtools/xpkgwedge/Makefile       Sat Aug 30 10:46:05 2003 +0000
+++ b/pkgtools/xpkgwedge/Makefile       Sat Aug 30 11:08:22 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2003/07/21 17:14:11 martti Exp $
+# $NetBSD: Makefile,v 1.39 2003/08/30 11:08:23 jlam Exp $
 
 DISTNAME=      xpkgwedge-1.7
 WRKSRC=                ${WRKDIR}
@@ -14,57 +14,26 @@
 
 EXTRACT_ONLY=  # empty
 NO_CONFIGURE=  # defined
+NO_BUILDLINK=  # defined
 NO_CHECKSUM=   # defined
 
-USE_BUILDLINK2=        # defined
-
-DEINSTALL_FILE=        ${WRKDIR}/DEINSTALL
-INSTALL_FILE=  ${WRKDIR}/INSTALL
+USE_PKGINSTALL=        YES
+USE_X11=       YES
 
 # FONT_PROGS are symlinked from ${X11BASE}/bin to ${PREFIX}/bin to allow
 # ${PREFIX}/bin/${prog} to always work.
 #
 FONT_PROGS=            bdftopcf fstobdf mkfontdir
 
-FILES_SUBST=           FONT_PROGS=${FONT_PROGS:Q}
-FILES_SUBST+=          X11BASE=${X11BASE}
-FILES_SUBST+=          PREFIX=${PREFIX}
-FILES_SUBST+=          CMP=${CMP:Q}
-FILES_SUBST+=          CP=${CP:Q}
-FILES_SUBST+=          ECHO=${ECHO:Q}
-FILES_SUBST+=          GREP=${GREP:Q}
-FILES_SUBST+=          LN=${LN:Q}
-FILES_SUBST+=          MAKE=${MAKE:Q}
-FILES_SUBST+=          RM=${RM:Q}
-FILES_SUBST+=          RMDIR=${RMDIR:Q}
-FILES_SUBST+=          TRUE=${TRUE:Q}
-FILES_SUBST_SED=       ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
-
-pre-extract:
-       @if [ ! -f ${X11BASE}/include/X11/X.h ]; then \
-               ${ECHO} 'xpkgwedge requires $$X11BASE to point to the real X distribution.'; \
-               ${ECHO} 'If you are setting this variable in mk.conf, fix or remove the setting'; \
-               ${ECHO} 'and then install xpkgwedge.'; \
-               ${FALSE}; \
-       fi
+FILES_SUBST+=          FONT_PROGS=${FONT_PROGS:Q}
+FILES_SUBST+=          MAKE=${MAKE_PROGRAM:Q}
 
 do-build:
-       ${SED} ${FILES_SUBST_SED} ${FILESDIR}/pkgxmkmf.in > ${WRKDIR}/pkgxmkmf
-
-pre-install:
-       ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
-       ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
+       @${SED} ${FILES_SUBST_SED} ${FILESDIR}/pkgxmkmf.in > ${WRKDIR}/pkgxmkmf
 
 do-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/lib/X11/config
        ${INSTALL_DATA} ${FILESDIR}/xpkgwedge.def ${PREFIX}/lib/X11/config
        ${INSTALL_SCRIPT} ${WRKSRC}/pkgxmkmf ${PREFIX}/bin/pkgxmkmf
 
-post-install:
-       PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
-
 .include "../../mk/bsd.pkg.mk"
-
-# Clear the build dependencies list so that xpkgwedge will not be recursively
-# dependent on itself.
-BUILD_DEPENDS=



Home | Main Index | Thread Index | Old Index