* 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.
This commit is contained in:
jlam 2004-10-07 02:01:37 +00:00
parent d2eb44c14d
commit 17c3aafac1
23 changed files with 117 additions and 112 deletions

View file

@ -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 @@ SUBDIR+= ${USER_ADDITIONAL_PKGS}
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 @@ README.html: .PRECIOUS
# 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

View file

@ -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 @@ PLIST_SRC= ${WRKDIR}/.PLIST_SRC
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}

View file

@ -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 @@ do-install:
${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 \

View file

@ -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 @@ do-install:
${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 \

View file

@ -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 @@ CONFIGURE_ARGS+= --enable-shared \
--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} \

View file

@ -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 @@ CONFIGURE_ARGS+= --enable-shared \
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 @@ INSTALLATION_DIRS= bin include
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

View file

@ -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 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Math/Pari/.packlist
# 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"

View file

@ -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 @@ do-libtool-m4-override:
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

View file

@ -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 @@ BUILD_DEPENDS+= bzip2>=0.9.0b:../../archivers/bzip2
# 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 @@ uptodate-digest:
.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+='Error: The package tools installed on this system are out of d
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 @@ SCRIPTS_ENV+= CURDIR=${.CURDIR} DISTDIR=${DISTDIR} \
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 @@ show-needs-update:
. 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 @@ do-config-star-override:
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 @@ do-config-star-override:
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 @@ README.html: .PRECIOUS
@if ${TEST} -d ${PACKAGES}; then \
cd ${PACKAGES}; \
case `${PWD_CMD}` in \
${_PKGSRCDIR}/packages) \
${PKGSRCDIR}/packages) \
MULTIARCH=no; \
;; \
*) \
@ -4347,7 +4347,7 @@ print-summary-data:
@${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 @@ print-summary-data:
.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 @@ fake-pkg: ${PLIST} ${DESCR} ${MESSAGE}
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}
. endfor

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.prefs.mk,v 1.170 2004/10/06 20:59:40 jlam Exp $
# $NetBSD: bsd.prefs.mk,v 1.171 2004/10/07 02:01:39 jlam Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@ -214,16 +214,16 @@ OBJECT_FMT?= a.out
# Calculate depth
.if exists(${.CURDIR}/mk/bsd.pkg.mk)
PKGSRC_TOPDIR= ${.CURDIR}
_PKGSRC_TOPDIR= ${.CURDIR}
.elif exists(${.CURDIR}/../mk/bsd.pkg.mk)
PKGSRC_TOPDIR= ${.CURDIR}/..
_PKGSRC_TOPDIR= ${.CURDIR}/..
.elif exists(${.CURDIR}/../../mk/bsd.pkg.mk)
PKGSRC_TOPDIR= ${.CURDIR}/../..
_PKGSRC_TOPDIR= ${.CURDIR}/../..
.endif
# include the defaults file
.if exists(${PKGSRC_TOPDIR}/mk/defaults/mk.conf)
. include "${PKGSRC_TOPDIR}/mk/defaults/mk.conf"
.if exists(${_PKGSRC_TOPDIR}/mk/defaults/mk.conf)
. include "${_PKGSRC_TOPDIR}/mk/defaults/mk.conf"
.endif
.if ${OPSYS} == "NetBSD"
@ -257,10 +257,10 @@ SHAREMODE?= ${DOCMODE}
# Load the OS-specific definitions for program variables. Default to loading
# the NetBSD ones if an OS-specific file doesn't exist.
.if exists(${PKGSRC_TOPDIR}/mk/platform/${OPSYS}.mk)
. include "${PKGSRC_TOPDIR}/mk/platform/${OPSYS}.mk"
.elif exists(${PKGSRC_TOPDIR}/mk/platform/NetBSD.mk)
. include "${PKGSRC_TOPDIR}/mk/platform/NetBSD.mk"
.if exists(${_PKGSRC_TOPDIR}/mk/platform/${OPSYS}.mk)
. include "${_PKGSRC_TOPDIR}/mk/platform/${OPSYS}.mk"
.elif exists(${_PKGSRC_TOPDIR}/mk/platform/NetBSD.mk)
. include "${_PKGSRC_TOPDIR}/mk/platform/NetBSD.mk"
.endif
PKGDIRMODE?= 755
@ -465,10 +465,14 @@ PKG_FAIL_REASON+= 'for more details.'
_PKGSRCDIR?= ${.CURDIR:C|/[^/]*/[^/]*$||}
PKGPATH?= ${.CURDIR:C|.*/([^/]*/[^/]*)$|\1|}
.if !defined(PKGSRCDIR)
PKGSRCDIR!= cd ${_PKGSRC_TOPDIR} && ${PWD_CMD}
MAKEFLAGS+= PKGSRCDIR=${PKGSRCDIR:Q}
.endif
DISTDIR?= ${_PKGSRCDIR}/distfiles
PACKAGES?= ${_PKGSRCDIR}/packages
TEMPLATES?= ${_PKGSRCDIR}/templates
DISTDIR?= ${PKGSRCDIR}/distfiles
PACKAGES?= ${PKGSRCDIR}/packages
TEMPLATES?= ${PKGSRCDIR}/templates
PATCHDIR?= ${.CURDIR}/patches
SCRIPTDIR?= ${.CURDIR}/scripts
@ -512,8 +516,8 @@ PKG_DEFAULT_OPTIONS?= # empty
PKG_OPTIONS?= # empty
# Wrapper framework definitions
.if exists(${PKGSRC_TOPDIR}/mk/wrapper/wrapper-defs.mk)
. include "${PKGSRC_TOPDIR}/mk/wrapper/wrapper-defs.mk"
.if exists(${PKGSRCDIR}/mk/wrapper/wrapper-defs.mk)
. include "${PKGSRCDIR}/mk/wrapper/wrapper-defs.mk"
.endif
.endif # BSD_PKG_MK

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.bulk-pkg.mk,v 1.62 2004/07/25 08:40:46 grant Exp $
# $NetBSD: bsd.bulk-pkg.mk,v 1.63 2004/10/07 02:01:39 jlam Exp $
#
# Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@NetBSD.org>
@ -81,41 +81,41 @@ BUILDLOG?= .make${BULK_ID}
# foo/bar devel/libfoo
# meaning 'foo/bar' is requied to build 'devel/libfoo'
# this is in the format needed by tsort(1)
DEPENDSTREEFILE?= ${_PKGSRCDIR}/.dependstree${BULK_ID}
DEPENDSTREEFILE?= ${PKGSRCDIR}/.dependstree${BULK_ID}
# This is a top level file which lists the entire pkgsrc depends tree in the
# format:
# foo/bar depends on: devel/libfoo devel/libbar devel/baz .....
# ie, to build foo/bar we need devel/libfoo devel/libbar devel/baz ... installed
DEPENDSFILE?= ${_PKGSRCDIR}/.depends${BULK_ID}
DEPENDSFILE?= ${PKGSRCDIR}/.depends${BULK_ID}
# This is a top level file which lists the entire pkgsrc depends tree in the
# format:
# devel/libfoo is depended upon by: foo/bar graphics/gtkfoo ...
# ie, to build foo/bar we need devel/libfoo to be installed.
# to build graphics/gtkfoo we need devel/libfoo to be installed
SUPPORTSFILE?= ${_PKGSRCDIR}/.supports${BULK_ID}
SUPPORTSFILE?= ${PKGSRCDIR}/.supports${BULK_ID}
# This is a top level file which cross-references each package name and pkg
# directory in the format:
# devel/libfoo libfoo-1.3
INDEXFILE?= ${_PKGSRCDIR}/.index${BULK_ID}
INDEXFILE?= ${PKGSRCDIR}/.index${BULK_ID}
# File containing a list of all the packages in the correct order for a bulk
# build. The correct order is one where packages that are required by others
# are built before the packages which require them.
ORDERFILE?= ${_PKGSRCDIR}/.order${BULK_ID}
ORDERFILE?= ${PKGSRCDIR}/.order${BULK_ID}
# File which is used as a timestamp for when the build started. This is used
# eventually for looking for leftover files (files not properly deinstalled)
STARTFILE?= ${_PKGSRCDIR}/.start${BULK_ID}
STARTFILE?= ${PKGSRCDIR}/.start${BULK_ID}
# File which is used as a database for bulk builds in which SPECIFIC_PKGS is
# defined. This database is used to hold all the dependency and index
# information for the specific packages as well as their dependencies. In a
# SPECIFIC_PKGS bulk build, this file is created and then used to create the
# INDEXFILE and DEPENDSTREEFILE.
BULK_DBFILE?= ${_PKGSRCDIR}/.bulk_db${BULK_ID}
BULK_DBFILE?= ${PKGSRCDIR}/.bulk_db${BULK_ID}
# A list of pkgs which we should _never_ delete during a build. The primary
# use is for digest and also for xpkgwedge. Add pkgtools/xpkgwedge in
@ -132,7 +132,7 @@ _PRESERVE_WRKDIR?= no
bulk-cache:
@${ECHO_MSG} "BULK> Installing BULK_PREREQ packages"
.for __prereq in ${BULK_PREREQ}
cd ${_PKGSRCDIR}/${__prereq} && ${MAKE} bulk-install
cd ${PKGSRCDIR}/${__prereq} && ${MAKE} bulk-install
.endfor
${RM} -f ${BULK_DBFILE}
${TOUCH} ${BULK_DBFILE}
@ -140,15 +140,15 @@ bulk-cache:
@${ECHO} "This file is unused for a full pkgsrc bulk build" >> ${BULK_DBFILE}
@${ECHO} "It is only used for a SPECIFIC_PKGS bulk build" >> ${BULK_DBFILE}
@${ECHO_MSG} "BULK> Building complete pkgsrc dependency tree (this may take a while)."
cd ${_PKGSRCDIR} && ${SETENV} BMAKE=${MAKE} ${SH} mk/bulk/printdepends ${BROKENFILE} > ${DEPENDSTREEFILE}
cd ${PKGSRCDIR} && ${SETENV} BMAKE=${MAKE} ${SH} mk/bulk/printdepends ${BROKENFILE} > ${DEPENDSTREEFILE}
@${ECHO_MSG} "BULK> Generating package name <=> package directory cross reference file"
@${ECHO_MSG} " (this may take a while)."
cd ${_PKGSRCDIR} && ${SETENV} BMAKE=${MAKE} ${SH} mk/bulk/printindex ${BROKENFILE} > ${INDEXFILE}
cd ${PKGSRCDIR} && ${SETENV} BMAKE=${MAKE} ${SH} mk/bulk/printindex ${BROKENFILE} > ${INDEXFILE}
.else
@${ECHO_MSG} "BULK> Extracting database for SPECIFIC_PKGS subset of pkgsrc"
@${ECHO_MSG} " along with their dependencies"
.for __tmp__ in ${SUBDIR} ${BULK_PREREQ} lang/perl5 pkgtools/pkglint
cd ${_PKGSRCDIR}/${__tmp__} && ../../mk/scripts/mkdatabase -a -f ${BULK_DBFILE}
cd ${PKGSRCDIR}/${__tmp__} && ../../mk/scripts/mkdatabase -a -f ${BULK_DBFILE}
.endfor
@${ECHO_MSG} "BULK> Extracting dependency tree file"
${AWK} '/^(build_)?depends/ {pkgs[$$2] = 1; cat=$$2; sub(/\/.*/, "", cat); \
@ -167,8 +167,8 @@ bulk-cache:
@${ECHO_MSG} "BULK> Sorting build order."
${TSORT} ${DEPENDSTREEFILE} > ${ORDERFILE}
@${ECHO_MSG} "BULK> Generating up and down dependency files."
${AWK} -f ${_PKGSRCDIR}/mk/bulk/tflat up ${DEPENDSTREEFILE} > ${SUPPORTSFILE}
${AWK} -f ${_PKGSRCDIR}/mk/bulk/tflat down ${DEPENDSTREEFILE} > ${DEPENDSFILE}
${AWK} -f ${PKGSRCDIR}/mk/bulk/tflat up ${DEPENDSTREEFILE} > ${SUPPORTSFILE}
${AWK} -f ${PKGSRCDIR}/mk/bulk/tflat down ${DEPENDSTREEFILE} > ${DEPENDSFILE}
# remove the bulk cache files
clean-bulk-cache:
@ -273,7 +273,7 @@ bulk-package:
${ECHO_MSG} "BULK> Cleaning package and its depends" ;\
if [ "${USE_BULK_CACHE}" = "yes" ]; then \
for pkgdir in ${PKGPATH} `${GREP} "^${PKGPATH} " ${DEPENDSFILE} | ${SED} -e 's;^.*:;;g'`; do \
${DO} (cd ${_PKGSRCDIR}/$$pkgdir && ${MAKE} clean) ; \
${DO} (cd ${PKGSRCDIR}/$$pkgdir && ${MAKE} clean) ; \
done ;\
else \
${ECHO_MSG} ${MAKE} clean CLEANDEPENDS=YES;\
@ -361,25 +361,25 @@ bulk-package:
if [ -z "$$pkgname" ]; then pkgname=unknown ; fi ; \
${ECHO_MSG} "BULK> marking package that requires ${PKGNAME} as broken: $$pkgname ($$pkgdir)";\
pkgerr="-1"; \
pkgignore=`(cd ${_PKGSRCDIR}/$$pkgdir && ${MAKE} show-var VARNAME=PKG_FAIL_REASON)`; \
pkgskip=`(cd ${_PKGSRCDIR}/$$pkgdir && ${MAKE} show-var VARNAME=PKG_SKIP_REASON)`; \
if [ ! -z "$${pkgignore}$${pkgskip}" -a ! -f ${_PKGSRCDIR}/$$pkgdir/${BROKENFILE} ]; then \
${ECHO_MSG} "BULK> $$pkgname ($$pkgdir) may not be packaged because:" >> ${_PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
${ECHO_MSG} "BULK> $$pkgignore" >> ${_PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
${ECHO_MSG} "BULK> $$pkgskip" >> ${_PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
if [ -z "`(cd ${_PKGSRCDIR}/$$pkgdir && ${MAKE} show-var VARNAME=BROKEN)`" ]; then \
pkgignore=`(cd ${PKGSRCDIR}/$$pkgdir && ${MAKE} show-var VARNAME=PKG_FAIL_REASON)`; \
pkgskip=`(cd ${PKGSRCDIR}/$$pkgdir && ${MAKE} show-var VARNAME=PKG_SKIP_REASON)`; \
if [ ! -z "$${pkgignore}$${pkgskip}" -a ! -f ${PKGSRCDIR}/$$pkgdir/${BROKENFILE} ]; then \
${ECHO_MSG} "BULK> $$pkgname ($$pkgdir) may not be packaged because:" >> ${PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
${ECHO_MSG} "BULK> $$pkgignore" >> ${PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
${ECHO_MSG} "BULK> $$pkgskip" >> ${PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
if [ -z "`(cd ${PKGSRCDIR}/$$pkgdir && ${MAKE} show-var VARNAME=BROKEN)`" ]; then \
pkgerr="0"; \
else \
pkgerr="1"; \
fi; \
fi; \
${ECHO_MSG} "BULK> $$pkgname ($$pkgdir) is broken because it depends upon ${PKGNAME} (${PKGPATH}) which is broken." \
>> ${_PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
>> ${PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
${ECHO_MSG} "Please view the <a href=\"../../${PKGPATH}/${BROKENFILE}\">build log for ${PKGNAME}</a>" \
>> ${_PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
>> ${PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
nbrokenby=`expr $$nbrokenby + 1`;\
if ${GREP} -q " $$pkgdir/${BROKENFILE}" ${_PKGSRCDIR}/${BROKENFILE} ; then :; else \
${ECHO} " $$pkgerr $$pkgdir/${BROKENFILE} 0 " >> ${_PKGSRCDIR}/${BROKENFILE} ;\
if ${GREP} -q " $$pkgdir/${BROKENFILE}" ${PKGSRCDIR}/${BROKENFILE} ; then :; else \
${ECHO} " $$pkgerr $$pkgdir/${BROKENFILE} 0 " >> ${PKGSRCDIR}/${BROKENFILE} ;\
fi ;\
done ;\
fi ;\
@ -387,7 +387,7 @@ bulk-package:
if [ -f ${INTERACTIVE_COOKIE} ]; then \
nerrors="0"; \
fi; \
${ECHO_MSG} " $$nerrors ${PKGPATH}/${BROKENFILE} $$nbrokenby " >> ${_PKGSRCDIR}/${BROKENFILE} \
${ECHO_MSG} " $$nerrors ${PKGPATH}/${BROKENFILE} $$nbrokenby " >> ${PKGSRCDIR}/${BROKENFILE} \
) 2>&1 | ${TEE} -a ${BROKENFILE}; \
fi ; \
case ${_PRESERVE_WRKDIR} in \
@ -395,7 +395,7 @@ bulk-package:
*) ${ECHO_MSG} "BULK> Cleaning packages and its depends"; \
if [ "${USE_BULK_CACHE}" = "yes" ]; then \
for pkgdir in ${PKGPATH} `${GREP} "^${PKGPATH} " ${DEPENDSFILE} | ${SED} -e 's;^.*:;;g'`; do \
${DO} (cd ${_PKGSRCDIR}/$$pkgdir && ${MAKE} clean) ; \
${DO} (cd ${PKGSRCDIR}/$$pkgdir && ${MAKE} clean) ; \
done; \
else \
${ECHO_MSG} ${MAKE} clean CLEANDEPENDS=YES;\

View file

@ -1,4 +1,4 @@
# $NetBSD: mk.conf,v 1.2 2004/10/06 20:59:40 jlam Exp $
# $NetBSD: mk.conf,v 1.3 2004/10/07 02:01:39 jlam Exp $
#
# A file providing defaults for pkgsrc and the packages collection.
@ -218,7 +218,7 @@ BSDXSRCDIR?= /usr/xsrc
# Possible: any path
# Default: /usr/xsrc
DISTDIR?= ${_PKGSRCDIR}/distfiles
DISTDIR?= ${PKGSRCDIR}/distfiles
# Directory where original distribution
# files are stored.
# Possible: any path you like
@ -284,7 +284,7 @@ RCD_SCRIPTS_DIR?= /etc/rc.d
# Possible: any path you like
# Default: /etc/rc.d
PACKAGES?= ${_PKGSRCDIR}/packages
PACKAGES?= ${PKGSRCDIR}/packages
# Store generated packages on a per-architecture base
# Possible: any path you like
# Default: /usr/pkgsrc/packages

View file

@ -1,4 +1,4 @@
# $NetBSD: SunOS.mk,v 1.1 2004/10/06 20:51:47 jlam Exp $
# $NetBSD: SunOS.mk,v 1.2 2004/10/07 02:01:39 jlam Exp $
#
# Variable definitions for the SunOS/Solaris operating system.
@ -170,7 +170,7 @@ _STRIPFLAG_INSTALL?= -s # install(1) option to strip
@echo "ERROR: pkgsrc now requires a more functional sed(1) than Solaris provides."
@echo "you can satisfy this requirement by running:"
@echo ""
@echo " cd ${_PKGSRCDIR}/textproc/nbsed; ${MAKE} install"
@echo " cd ${PKGSRCDIR}/textproc/nbsed; ${MAKE} install"
@echo ""
@echo "this will install ${LOCALBASE}/bin/nbsed and eliminate this message."
@echo "(nbsed is already installed by recent bootstrap-pkgsrc)."

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.26 2004/05/23 15:09:06 heinz Exp $
# $NetBSD: Makefile,v 1.27 2004/10/07 02:01:38 jlam Exp $
DISTNAME= ppp-2.3.9
PKGNAME= ppp-mppe-2.3.9
@ -14,9 +14,6 @@ CONFLICTS+= ppp-2.*
ONLY_FOR_PLATFORM= NetBSD-*-*
OPENSSL_VERS= 0.9.6m
OPENSSL_SRC= ${_PKGSRCDIR}/security/openssl/${WRKDIR:T}/openssl-${OPENSSL_VERS}
HAS_CONFIGURE= yes
MANCOMPRESSED_IF_MANZ= yes
@ -24,6 +21,9 @@ MANCOMPRESSED_IF_MANZ= yes
BUILD_DEFS+= MANINSTALL
OPENSSL_VERS= 0.9.6m
OPENSSL_SRC= ${PKGSRCDIR}/security/openssl/${WRKDIR:T}/openssl-${OPENSSL_VERS}
post-extract:
if [ ! -r ${OPENSSL_SRC}/crypto/rc4 ]; then \
cd ../../security/openssl && ${MAKE} extract; \

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1 2004/08/28 00:26:57 gavan Exp $
# $NetBSD: Makefile,v 1.2 2004/10/07 02:01:38 jlam Exp $
DISTNAME= pkg_regress-0.0
CATEGORIES= pkgtools
@ -22,7 +22,7 @@ INSTALLATION_DIRS= sbin
do-build:
${SED} -e 's#@MAKE@#${MAKE}#g' \
-e 's#@PKGSRCDIR@#${_PKGSRCDIR}#g' \
-e 's#@PKGSRCDIR@#${PKGSRCDIR}#g' \
-e 's#@SH@#${SH}#g' \
-e 's#@EGREP@#${EGREP}#g' \
${FILESDIR}/pkg_regress.sh >${WRKSRC}/pkg_regress.sh

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1.1.1 2004/06/22 20:02:41 xtraeme Exp $
# $NetBSD: Makefile,v 1.2 2004/10/07 02:01:38 jlam Exp $
DISTNAME= pkgclean-20040622
CATEGORIES= pkgtools
@ -33,7 +33,7 @@ do-install:
SUBST_CLASSES= path
SUBST_STAGE.path= post-patch
SUBST_FILES.path= pkgclean.c pkgclean.1
SUBST_SED.path= -e "s,@PKGSRCDIR@,${_PKGSRCDIR},g"
SUBST_SED.path= -e "s,@PKGSRCDIR@,${PKGSRCDIR},g"
SUBST_MESSAGE.path= "Adjusting pkgsrc directory."
.include "../../mk/bsd.pkg.mk"

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.8 2004/01/20 12:23:57 agc Exp $
# $NetBSD: Makefile,v 1.9 2004/10/07 02:01:38 jlam Exp $
#
DISTNAME= pkgdep-1.0
@ -18,7 +18,7 @@ NO_CONFIGURE= yes
do-build:
${CP} ${FILESDIR}/pkgdep.pl ${WRKDIR}/pkgdep
# ${SED} -e 's|/usr/pkgsrc|${_PKGSRCDIR}|' \
# ${SED} -e 's|/usr/pkgsrc|${PKGSRCDIR}|' \
# ${FILESDIR}/pkgdep.pl > ${WRKDIR}/pkgdep
do-install:

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.17 2004/07/28 01:42:43 atatat Exp $
# $NetBSD: Makefile,v 1.18 2004/10/07 02:01:38 jlam Exp $
#
DISTNAME= pkgdepgraph-2.7
@ -33,14 +33,14 @@ do-build:
.for FILE in pkgdepgraph
${SED} -e 's|@PREFIX@|${PREFIX}|g' \
-e 's|@PKG_DBDIR@|${PKG_DBDIR}|g' \
-e 's|@PKGSRCDIR@|${_PKGSRCDIR}|g' \
-e 's|@PKGSRCDIR@|${PKGSRCDIR}|g' \
-e 's|@DISTVER@|${DISTVER}|g' \
< ${WRKSRC}/${FILE}.pl \
> ${WRKSRC}/${FILE}
.endfor
.for FILE in pkgdepgraph.1 pkgdepgraph.0
${SED} -e 's|@PKG_DBDIR@|${PKG_DBDIR}|g' \
-e 's|@PKGSRCDIR@|${_PKGSRCDIR}|g' \
-e 's|@PKGSRCDIR@|${PKGSRCDIR}|g' \
< ${WRKSRC}/${FILE}.in \
> ${WRKSRC}/${FILE}
.endfor

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1.1.1 2004/06/22 20:01:01 xtraeme Exp $
# $NetBSD: Makefile,v 1.2 2004/10/07 02:01:38 jlam Exp $
DISTNAME= pkgfind-20040622
CATEGORIES= pkgtools
@ -33,7 +33,7 @@ do-install:
SUBST_CLASSES= path
SUBST_STAGE.path= post-patch
SUBST_FILES.path= pkgfind.c pkgfind.1
SUBST_SED.path= -e "s,/usr/pkgsrc,${_PKGSRCDIR},g"
SUBST_SED.path= -e "s,/usr/pkgsrc,${PKGSRCDIR},g"
SUBST_MESSAGE.path= "Adjusting pkgsrc directory."
.include "../../mk/bsd.pkg.mk"

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.204 2004/09/24 15:33:26 wiz Exp $
# $NetBSD: Makefile,v 1.205 2004/10/07 02:01:38 jlam Exp $
#
DISTNAME= pkglint-3.91
@ -22,7 +22,7 @@ NO_CHECKSUM= yes
NO_CONFIGURE= yes
USE_LANGUAGES= # empty
MAKE_ENV= PKGSRCDIR=${_PKGSRCDIR:Q}
MAKE_ENV= PKGSRCDIR=${PKGSRCDIR:Q}
DISTVER= ${DISTNAME:S/pkglint-//}
@ -42,7 +42,7 @@ do-extract:
do-build:
.for FILE in ${SUBST_FILES}
${SED} -e 's|@PREFIX@|${PREFIX}|g' \
-e 's|@PORTSDIR@|${_PKGSRCDIR}|g' \
-e 's|@PORTSDIR@|${PKGSRCDIR}|g' \
-e 's|@DISTVER@|${DISTVER}|g' \
-e 's|@MAKE@|${MAKE}|g' \
-e 's|@PERL@|${PERL5}|g' \

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.12 2004/05/23 15:09:06 heinz Exp $
# $NetBSD: Makefile,v 1.13 2004/10/07 02:01:38 jlam Exp $
DISTNAME= ptex-src-${PTEX_VERS}
PKGNAME= ja-ptex-bin-${PTEX_VERS}
@ -37,7 +37,7 @@ DF_TETEX_BIN= tetex-src-${TETEX_BIN_VERS}${EXTRACT_SUFX}
DF_DVIPSK_PATCH= dvipsk-jpatch-${DVIPSK_PATCH_VERS}${EXTRACT_SUFX}
DF_MENDEXK= mendexk${MENDEXK_VERS}${EXTRACT_SUFX}
WRKDIR_= ${_PKGSRCDIR}/print/teTeX-bin/${WRKDIR:T}
WRKDIR_= ${PKGSRCDIR}/print/teTeX-bin/${WRKDIR:T}
TETEX_DIR= ${WRKDIR_}/tetex-src-${TETEX_BIN_VERS}
WRKSRC= ${TETEX_DIR}
WRKSRC_PTEX= ${WRKSRC}/texk/web2c/${DISTNAME:S/-src//}

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.8 2004/05/23 15:09:06 heinz Exp $
# $NetBSD: Makefile,v 1.9 2004/10/07 02:01:38 jlam Exp $
DISTNAME= TeXfamily-1.2.1
PKGREVISION= 5
@ -31,7 +31,7 @@ DEPENDS+= TeXfamily-share>=1.2.1nb3:../../print/texfamily-share
DEPENDS+= ja-vflib-lib-[0-9]*:../../print/ja-vflib-lib
DIST_SUBDIR= TeXfamily
TETEX_DIR= ${_PKGSRCDIR}/print/teTeX1-bin/${WRKDIR:T}/teTeX-1.0
TETEX_DIR= ${PKGSRCDIR}/print/teTeX1-bin/${WRKDIR:T}/teTeX-1.0
WRKSRC= ${TETEX_DIR}
EXTRACT_ONLY= # none

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.49 2004/06/06 08:28:54 agc Exp $
# $NetBSD: Makefile,v 1.50 2004/10/07 02:01:38 jlam Exp $
DISTNAME= audit-packages-1.32
CATEGORIES= security pkgtools
@ -27,7 +27,7 @@ do-build:
-e 's|@AWK@|${AWK}|g' \
-e 's|@FETCH_CMD@|${FETCH_CMD}|g' \
-e 's|@FETCH_CMD_SHORT@|${FETCH_CMD:T}|g' \
-e 's|@PKGSRCDIR@|${_PKGSRCDIR}|g' \
-e 's|@PKGSRCDIR@|${PKGSRCDIR}|g' \
-e 's|@PKG_TOOLS_BIN@|${PKG_TOOLS_BIN}|g' \
-e 's|@SH@|${SH}|g' \
-e 's|@DIGEST@|${DIGEST}|g' \