pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc * Make PKGSRC_TOPDIR a private variable by renaming it...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/77822f4b1115
branches:  trunk
changeset: 481547:77822f4b1115
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Oct 07 02:01:37 2004 +0000

description:
* Make PKGSRC_TOPDIR a private variable by renaming it to _PKGSRC_TOPDIR,
  as it's only used internally by bsd.prefs.mk.

* Make _PKGSRCDIR a public variable by renaming it to PKGSRCDIR.
  Also, generate its value from ${_PKGSRC_TOPDIR} so it's less fragile
  than the old method of stripping off the last two components of
  ${.CURDIR}.  PKGSRCDIR may now be used after bsd.prefs.mk is defined.

* Change all references to _PKGSRCDIR to PKGSRCDIR.

diffstat:

 Makefile                               |   7 +---
 cross/COMMON/cross.mk                  |   4 +-
 emulators/suse91_linux/Makefile.common |   4 +-
 emulators/suse_linux/Makefile.common   |   4 +-
 lang/tcl-tclX/Makefile                 |   6 ++-
 lang/tk-tclX/Makefile                  |  12 ++++---
 math/p5-Math-Pari/Makefile             |  10 +++---
 mk/autoconf.mk                         |   4 +-
 mk/bsd.pkg.mk                          |  30 +++++++++---------
 mk/bsd.prefs.mk                        |  34 +++++++++++---------
 mk/bulk/bsd.bulk-pkg.mk                |  56 +++++++++++++++++-----------------
 mk/defaults/mk.conf                    |   6 +-
 mk/platform/SunOS.mk                   |   4 +-
 net/ppp-mppe/Makefile                  |   8 ++--
 pkgtools/pkg_regress/Makefile          |   4 +-
 pkgtools/pkgclean/Makefile             |   4 +-
 pkgtools/pkgdep/Makefile               |   4 +-
 pkgtools/pkgdepgraph/Makefile          |   6 +-
 pkgtools/pkgfind/Makefile              |   4 +-
 pkgtools/pkglint/Makefile              |   6 +-
 print/ja-ptex-bin/Makefile             |   4 +-
 print/texfamily/Makefile               |   4 +-
 security/audit-packages/Makefile       |   4 +-
 23 files changed, 117 insertions(+), 112 deletions(-)

diffs (truncated from 790 to 300 lines):

diff -r c7cd80b823be -r 77822f4b1115 Makefile
--- a/Makefile  Wed Oct 06 23:27:19 2004 +0000
+++ b/Makefile  Thu Oct 07 02:01:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.65 2004/08/27 21:32:55 jlam Exp $
+# $NetBSD: Makefile,v 1.66 2004/10/07 02:01:37 jlam Exp $
 #
 
 .include "mk/bsd.prefs.mk"
@@ -59,7 +59,7 @@
 PKGSRCTOP=     yes
 
 
-# If PACKAGES is set to the default (${_PKGSRCDIR}/packages), the current
+# If PACKAGES is set to the default (${PKGSRCDIR}/packages), the current
 # ${MACHINE_ARCH} and "release" (uname -r) will be used. Otherwise a directory
 # structure of ...pkgsrc/packages/`uname -r`/${MACHINE_ARCH} is assumed.
 # The PKG_URL is set from FTP_PKG_URL_* or CDROM_PKG_URL_*, depending on
@@ -99,9 +99,6 @@
 # directory.
 .if make(bulk-cache) || make(clean-bulk-cache)
 .include "${.CURDIR}/mk/bulk/bsd.bulk-pkg.mk"
-# force the setting of _PKGSRCDIR because the way it gets
-# set in bsd.prefs.mk is broken if you're in this top level directory
-_PKGSRCDIR=${.CURDIR}
 .endif
 
 .PHONY: ${.CURDIR}/PKGDB
diff -r c7cd80b823be -r 77822f4b1115 cross/COMMON/cross.mk
--- a/cross/COMMON/cross.mk     Wed Oct 06 23:27:19 2004 +0000
+++ b/cross/COMMON/cross.mk     Thu Oct 07 02:01:37 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: cross.mk,v 1.29 2004/07/09 20:48:15 kristerw Exp $
+#      $NetBSD: cross.mk,v 1.30 2004/10/07 02:01:37 jlam Exp $
 
 # Shared definitions for building a cross-compile environment.
 
@@ -12,7 +12,7 @@
 HOMEPAGE?=             http://egcs.cygnus.com/
 
 TARGET_DIR=            ${PREFIX}/${TARGET_ARCH}
-COMMON_DIR=            ${_PKGSRCDIR}/cross/COMMON
+COMMON_DIR=            ${PKGSRCDIR}/cross/COMMON
 PLIST_PRE?=            ${PKGDIR}/PLIST
 MESSAGE_SUBST+=                CROSSBASE=${CROSSBASE}
 
diff -r c7cd80b823be -r 77822f4b1115 emulators/suse91_linux/Makefile.common
--- a/emulators/suse91_linux/Makefile.common    Wed Oct 06 23:27:19 2004 +0000
+++ b/emulators/suse91_linux/Makefile.common    Thu Oct 07 02:01:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.3 2004/08/07 13:05:03 jdolecek Exp $
+# $NetBSD: Makefile.common,v 1.4 2004/10/07 02:01:37 jlam Exp $
 
 SUSE_VERSION=          9.1
 
@@ -56,7 +56,7 @@
          ${CP} ${PKGDIR}/PLIST ${PLIST_SRC}; \
        else \
          ${RM} -f ${PLIST_SRC}; \
-         ${CP} ${_PKGSRCDIR}/emulators/suse_linux/PLIST_dynamic ${PLIST_SRC} ; \
+         ${CP} ${PKGSRCDIR}/emulators/suse_linux/PLIST_dynamic ${PLIST_SRC} ; \
        fi
        ${RPM2PKG} ${RPM2PKGARGS}
        @if ${GREP} -q 'lib.*\.so' ${PLIST_SRC}; then \
diff -r c7cd80b823be -r 77822f4b1115 emulators/suse_linux/Makefile.common
--- a/emulators/suse_linux/Makefile.common      Wed Oct 06 23:27:19 2004 +0000
+++ b/emulators/suse_linux/Makefile.common      Thu Oct 07 02:01:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.18 2004/05/27 10:28:54 tron Exp $
+# $NetBSD: Makefile.common,v 1.19 2004/10/07 02:01:37 jlam Exp $
 
 SUSE_VERSION=          7.3
 
@@ -43,7 +43,7 @@
          ${CP} ${PKGDIR}/PLIST ${PLIST_SRC}; \
        else \
          ${RM} -f ${PLIST_SRC}; \
-         ${CP} ${_PKGSRCDIR}/emulators/suse_linux/PLIST_dynamic ${PLIST_SRC} ; \
+         ${CP} ${PKGSRCDIR}/emulators/suse_linux/PLIST_dynamic ${PLIST_SRC} ; \
        fi
        ${RPM2PKG} ${RPM2PKGARGS}
        @if ${GREP} -q 'lib.*\.so' ${PLIST_SRC}; then \
diff -r c7cd80b823be -r 77822f4b1115 lang/tcl-tclX/Makefile
--- a/lang/tcl-tclX/Makefile    Wed Oct 06 23:27:19 2004 +0000
+++ b/lang/tcl-tclX/Makefile    Thu Oct 07 02:01:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2004/10/03 00:15:03 tv Exp $
+# $NetBSD: Makefile,v 1.22 2004/10/07 02:01:37 jlam Exp $
 #
 
 DISTNAME=      tclx8.3.5-src
@@ -25,7 +25,9 @@
                        --enable-tk=NO
 TEST_TARGET=           test
 
-PKGSRC_TCL_SRC_DIR=    ${_PKGSRCDIR}/lang/tcl/${WRKDIR:T}/tcl8.4.6
+.include "../../mk/bsd.prefs.mk"
+
+PKGSRC_TCL_SRC_DIR=    ${PKGSRCDIR}/lang/tcl/${WRKDIR:T}/tcl8.4.6
 CONFIGURE_ENV+=                PKGSRC_TCL_SRC_DIR="${PKGSRC_TCL_SRC_DIR}"
 
 MAKE_ENV+=             GTAR=${GTAR} CHOWN=${CHOWN} CHMOD=${CHMOD} \
diff -r c7cd80b823be -r 77822f4b1115 lang/tk-tclX/Makefile
--- a/lang/tk-tclX/Makefile     Wed Oct 06 23:27:19 2004 +0000
+++ b/lang/tk-tclX/Makefile     Thu Oct 07 02:01:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2004/10/03 00:15:03 tv Exp $
+# $NetBSD: Makefile,v 1.20 2004/10/07 02:01:37 jlam Exp $
 #
 
 DISTNAME=      tclx8.3.5-src
@@ -25,9 +25,11 @@
 TEST_DIRS=             ${WRKSRC}/../tk/unix
 TEST_TARGET=           test
 
+.include "../../mk/bsd.prefs.mk"
+
 CONFIGURE_ENV+=                \
-       PKGSRC_TCL_SRC_DIR="${_PKGSRCDIR}/lang/tcl/${WRKDIR:T}/tcl8.4.6" \
-       PKGSRC_TK_SRC_DIR="${_PKGSRCDIR}/x11/tk/${WRKDIR:T}/tk8.4.6"
+       PKGSRC_TCL_SRC_DIR="${PKGSRCDIR}/lang/tcl/${WRKDIR:T}/tcl8.4.6" \
+       PKGSRC_TK_SRC_DIR="${PKGSRCDIR}/x11/tk/${WRKDIR:T}/tk8.4.6"
 
 MAKE_ENV+=             GTAR=${GTAR} CHOWN=${CHOWN} CHMOD=${CHMOD} \
                        SHAREMODE=${SHAREMODE} SHAREOWN=${SHAREOWN} \
@@ -46,10 +48,10 @@
 
 post-extract:
        ${MV} ${WRKSRC}/../doc/Memory.n ${WRKSRC}/../doc/TclXMemory.n
-       @if [ ! -r ${_PKGSRCDIR}/lang/tcl/${WRKDIR:T}/tcl8.4.6 ]; then  \
+       @if [ ! -r ${PKGSRCDIR}/lang/tcl/${WRKDIR:T}/tcl8.4.6 ]; then   \
                cd ../../lang/tcl && ${MAKE} extract;                   \
        fi
-       @if [ ! -r ${_PKGSRCDIR}/x11/tk/${WRKDIR:T}/tk8.4.6 ]; then     \
+       @if [ ! -r ${PKGSRCDIR}/x11/tk/${WRKDIR:T}/tk8.4.6 ]; then      \
                cd ../../x11/tk && ${MAKE} extract;                     \
        fi
 
diff -r c7cd80b823be -r 77822f4b1115 math/p5-Math-Pari/Makefile
--- a/math/p5-Math-Pari/Makefile        Wed Oct 06 23:27:19 2004 +0000
+++ b/math/p5-Math-Pari/Makefile        Thu Oct 07 02:01:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2004/04/27 21:26:08 snj Exp $
+# $NetBSD: Makefile,v 1.14 2004/10/07 02:01:38 jlam Exp $
 #
 
 DISTNAME=              Math-Pari-2.010501
@@ -23,14 +23,14 @@
 
 # XXX: could be improved...
 post-extract:
-       if [ ! -d ${_PKGSRCDIR}/math/pari/${WRKDIR_BASENAME} ]; then \
-         cd ${_PKGSRCDIR}/math/pari && ${MAKE} configure; \
+       if [ ! -d ${PKGSRCDIR}/math/pari/${WRKDIR_BASENAME} ]; then \
+         cd ${PKGSRCDIR}/math/pari && ${MAKE} configure; \
        fi
        ${RM} -f ${WRKSRC}/pari-*
-       ${LN} -sf ${_PKGSRCDIR}/math/pari/${WRKDIR_BASENAME}/pari-* ${WRKSRC}/
+       ${LN} -sf ${PKGSRCDIR}/math/pari/${WRKDIR_BASENAME}/pari-* ${WRKSRC}/
 
 pre-clean:
-       cd ${_PKGSRCDIR}/math/pari && ${MAKE} clean
+       cd ${PKGSRCDIR}/math/pari && ${MAKE} clean
 
 .include "../../lang/perl5/module.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r c7cd80b823be -r 77822f4b1115 mk/autoconf.mk
--- a/mk/autoconf.mk    Wed Oct 06 23:27:19 2004 +0000
+++ b/mk/autoconf.mk    Thu Oct 07 02:01:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: autoconf.mk,v 1.4 2004/02/20 09:58:49 jlam Exp $
+# $NetBSD: autoconf.mk,v 1.5 2004/10/07 02:01:38 jlam Exp $
 #
 # makefile fragment for packages that use autoconf
 # AUTOCONF_REQD can be set to the minimum version required.
@@ -51,7 +51,7 @@
        for file in ${_pattern_:S/libtool.m4$/configure/}; do           \
                if [ -f "$$file" ]; then                                \
                        libtool_m4=`${DIRNAME} $$file`/libtool.m4;      \
-                       ${LN} -sf ${_PKGSRCDIR}/mk/gnu-config/libtool-1.4.m4 \
+                       ${LN} -sf ${PKGSRCDIR}/mk/gnu-config/libtool-1.4.m4 \
                                $$libtool_m4;                           \
                fi;                                                     \
        done
diff -r c7cd80b823be -r 77822f4b1115 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Wed Oct 06 23:27:19 2004 +0000
+++ b/mk/bsd.pkg.mk     Thu Oct 07 02:01:37 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1509 2004/10/05 15:28:50 jlam Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1510 2004/10/07 02:01:38 jlam Exp $
 #
 # This file is in the public domain.
 #
@@ -598,9 +598,9 @@
 
 # Figure out where the local mtree file is
 .if defined(USE_X11BASE)
-MTREE_FILE?=   ${_PKGSRCDIR}/mk/${OPSYS}.x11.dist
+MTREE_FILE?=   ${PKGSRCDIR}/mk/${OPSYS}.x11.dist
 .else
-MTREE_FILE?=   ${_PKGSRCDIR}/mk/${OPSYS}.pkg.dist
+MTREE_FILE?=   ${PKGSRCDIR}/mk/${OPSYS}.pkg.dist
 .endif
 
 MTREE_ARGS?=   -U -f ${MTREE_FILE} -d -e -p
@@ -850,7 +850,7 @@
 .if !empty(USE_DIGEST:M[yY][eE][sS])
        ${_PKG_SILENT}${_PKG_DEBUG}                                     \
        if [ -f ${DISTINFO_FILE} -a \( ! -f ${DIGEST} -o ${DIGEST_VERSION} -lt ${DIGEST_REQD} \) ]; then \
-               { cd ${_PKGSRCDIR}/pkgtools/digest;                     \
+               { cd ${PKGSRCDIR}/pkgtools/digest;                      \
                ${MAKE} clean;                                          \
                if [ -f ${DIGEST} ]; then                               \
                        ${MAKE} ${MAKEFLAGS} deinstall;                 \
@@ -882,7 +882,7 @@
 PKG_FAIL_REASON+='The installed package tools are dated ${PKGTOOLS_VERSION:C|(....)(..)(..)|\1/\2/\3|} and you must update'
 PKG_FAIL_REASON+='them to at least ${PKGTOOLS_REQD:C|(....)(..)(..)|\1/\2/\3|} using the following command:'
 PKG_FAIL_REASON+=''
-PKG_FAIL_REASON+='     cd ${_PKGSRCDIR}/pkgtools/pkg_install && ${MAKE} clean && ${MAKE} install'
+PKG_FAIL_REASON+='     cd ${PKGSRCDIR}/pkgtools/pkg_install && ${MAKE} clean && ${MAKE} install'
 .              endif
 .      endif
 
@@ -1185,7 +1185,7 @@
        PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin \
        WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \
        SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \
-       _PKGSRCDIR=${_PKGSRCDIR} DEPENDS="${DEPENDS}" \
+       _PKGSRCDIR=${_PKGSRCDIR} PKGSRCDIR=${PKGSRCDIR} DEPENDS="${DEPENDS}" \
        PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} \
        VIEWBASE=${VIEWBASE}
 
@@ -1827,7 +1827,7 @@
 .  if defined(DEPENDS)
        ${_PKG_SILENT}${_PKG_DEBUG}                                     \
        for i in `${MAKE} show-all-depends-dirs`; do                    \
-               cd ${_PKGSRCDIR}/$$i;                                   \
+               cd ${PKGSRCDIR}/$$i;                                    \
                want=`${MAKE} show-var VARNAME=PKGNAME`;                \
                wild=`${MAKE} show-var VARNAME=PKGWILDCARD`;            \
                have=`${PKG_BEST_EXISTS} "$$wild" || ${TRUE}`;          \
@@ -2253,7 +2253,7 @@
        for file in ${_pattern_}; do                                    \
                if [ -f "$$file" ]; then                                \
                        ${RM} -f $$file;                                \
-                       ${LN} -s ${_PKGSRCDIR}/mk/gnu-config/config.guess \
+                       ${LN} -s ${PKGSRCDIR}/mk/gnu-config/config.guess \
                                $$file;                                 \
                fi;                                                     \
        done
@@ -2265,7 +2265,7 @@
        for file in ${_pattern_}; do                                    \
                if [ -f "$$file" ]; then                                \
                        ${RM} -f $$file;                                \
-                       ${LN} -s ${_PKGSRCDIR}/mk/gnu-config/config.sub \
+                       ${LN} -s ${PKGSRCDIR}/mk/gnu-config/config.sub  \
                                $$file;                                 \
                fi;                                                     \
        done
@@ -4254,7 +4254,7 @@
        @if ${TEST} -d ${PACKAGES}; then                                        \
                cd ${PACKAGES};                                         \
                case `${PWD_CMD}` in                                    \
-                       ${_PKGSRCDIR}/packages)                         \
+                       ${PKGSRCDIR}/packages)                          \
                                MULTIARCH=no;                           \
                                ;;                                      \
                        *)                                              \
@@ -4347,7 +4347,7 @@
        @${ECHO} "maintainer ${PKGPATH} ${MAINTAINER}"
        @${ECHO} "categories ${PKGPATH} ${CATEGORIES}"
        @if [ -f ${DESCR_SRC} ]; then                                           \
-               ${ECHO}  "descr ${PKGPATH} ${DESCR_SRC:S;${_PKGSRCDIR}/;;g}";   \
+               ${ECHO}  "descr ${PKGPATH} ${DESCR_SRC:S;${PKGSRCDIR}/;;g}";    \
        else                                                                    \
                ${ECHO}  "descr ${PKGPATH} /dev/null";                          \
        fi
@@ -4357,11 +4357,11 @@
 .if !target(show-license)
 show-license show-licence:
        @if [ "${LICENSE}" != "" ]; then                                \
-               if ${TEST} -f ${_PKGSRCDIR}/licenses/${LICENSE}; then   \
+               if ${TEST} -f ${PKGSRCDIR}/licenses/${LICENSE}; then    \
                        if [ "${PAGER}" != "" ]; then                   \
-                               ${PAGER} ${_PKGSRCDIR}/licenses/${LICENSE};\
+                               ${PAGER} ${PKGSRCDIR}/licenses/${LICENSE};\
                        else                                            \
-                               ${CAT} ${_PKGSRCDIR}/licenses/${LICENSE};\
+                               ${CAT} ${PKGSRCDIR}/licenses/${LICENSE};\
                        fi                                              \
                else                                                    \
                        ${ECHO} "Generic ${LICENSE} information not available"; \
@@ -4652,7 +4652,7 @@
                        esac;                                           \
                done;                                                   \
        fi;                                                             \
-       eval ${GREP} '\$$NetBSD' $$files | ${SED} -e 's|^${_PKGSRCDIR}/||' > ${BUILD_VERSION_FILE}
+       eval ${GREP} '\$$NetBSD' $$files | ${SED} -e 's|^${PKGSRCDIR}/||' > ${BUILD_VERSION_FILE}
 .  for def in ${BUILD_DEFS}
        @${ECHO} ${def}=${${def}:Q} | ${SED} -e 's|^PATH=[^     ]*|PATH=...|' >> ${BUILD_INFO_FILE}



Home | Main Index | Thread Index | Old Index