diff options
-rw-r--r-- | Packages.txt | 25 | ||||
-rw-r--r-- | mk/bsd.pkg.mk | 21 | ||||
-rw-r--r-- | mk/mk.conf.example | 6 |
3 files changed, 39 insertions, 13 deletions
diff --git a/Packages.txt b/Packages.txt index 091bf819f00..1b2e65524db 100644 --- a/Packages.txt +++ b/Packages.txt @@ -1,4 +1,4 @@ -# $NetBSD: Packages.txt,v 1.179 2001/08/22 17:59:11 jlam Exp $ +# $NetBSD: Packages.txt,v 1.180 2001/08/24 00:54:48 hubertf Exp $ ########################################################################### ========================== @@ -711,6 +711,16 @@ When you have finished a package, remember to generate the checksums for the patch files by using the "make makepatchsum" command, see section 4.2. +If it is desired to store any patches that should not be committed into +pkgsrc, they can be kept outside the pkgsrc tree in the $LOCALPATCHES +directory. The directory tree there is expected to have the same +"category/package" structure as pkgsrc, and patches are expected to be +stored inside these dirs (also known as $LOCALPATCHES/$PKGPATH). For +example if you want to keep a private patch for pkgsrc/graphics/png, keep +it in $LOCALPATCHES/graphics/png/mypatch. All files in the named directory +are expected to be patch files, and they are applied after the "normal" +pkgsrc patches are applied. + 4.4 pkg/* ========= @@ -1237,12 +1247,13 @@ The main targets used during the build process defined in bsd.pkg.mk are: EXTRACT_AFTER_ARGS. * patch: - After extraction, all the patches named by the PATCHFILES and those - present in the patches subdirectory of the package are applied. - Patchfiles ending in .Z or .gz are uncompressed before they are - applied, files ending in .orig or .rej are ignored. Any special - options to patch(1) can be handed in PATCH_DIST_ARGS. See section - 4.3 for more details. + After extraction, all the patches named by the PATCHFILES, those present + in the patches subdirectory of the package as well as in + $LOCALPATCHES/$PKGPATH (e.g. /usr/local/patches/graphics/png) are + applied. Patchfiles ending in .Z or .gz are uncompressed before they are + applied, files ending in .orig or .rej are ignored. Any special options + to patch(1) can be handed in PATCH_DIST_ARGS. See section 4.3 for more + details. By default patch is given special args to make it fail if the patches with some lines of fuzz. Please fix (regen) the patches diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index b5cdfd8f182..9b3c7feccfc 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.801 2001/08/23 16:37:27 abs Exp $ +# $NetBSD: bsd.pkg.mk,v 1.802 2001/08/24 00:54:47 hubertf Exp $ # # This file is in the public domain. # @@ -1416,7 +1416,14 @@ do-patch: uptodate-digest else \ ${ECHO_MSG} "${_PKGSRC_IN}> Applying ${OPSYS} patches for ${PKGNAME}" ; \ fail=""; \ - for i in ${PATCHDIR}/patch-*; do \ + for i in ${PATCHDIR}/patch-* ${LOCALPATCHES}/${PKGPATH}/* ; do \ + if [ "$$i" = "${LOCALPATCHES}/${PKGPATH}/*" ]; then \ + continue ; \ + fi ; \ + if [ ! -f "$$i" ]; then \ + ${ECHO_MSG} "${_PKGSRC_IN}> $$i is not a valid patch file - skipping" ; \ + continue ; \ + fi ; \ case $$i in \ *.orig|*.rej|*~) \ ${ECHO_MSG} "${_PKGSRC_IN}> Ignoring patchfile $$i" ; \ @@ -1424,6 +1431,8 @@ do-patch: uptodate-digest ;; \ ${PATCHDIR}/patch-local-*) \ ;; \ + ${LOCALPATCHES}/${PKGPATH}/*) \ + ;; \ *) \ if [ -f ${DISTINFO_FILE} ]; then \ filename=`expr $$i : '.*/\(.*\)'`; \ @@ -3099,14 +3108,15 @@ print-PLIST: | ${SED} \ -e 's@${PREFIX}/./@@' \ -e 's@${OPSYS}@\$${OPSYS}@' \ - -e 's@${OS_VERSION:S/./\./}@\$${OS_VERSION}@' \ + -e 's@${OS_VERSION:S/./\./}@\$${OS_VERSION}@' \ -e 's@${MACHINE_ARCH}@\$${MACHINE_ARCH}@' \ -e 's@${MACHINE_GNU_ARCH}@\$${MACHINE_GNU_ARCH}@' \ -e 's@${MACHINE_GNU_PLATFORM}@\$${MACHINE_GNU_PLATFORM}@' \ -e 's@${LOWER_VENDOR}@\$${LOWER_VENDOR}@' \ -e 's@${LOWER_OPSYS}@\$${LOWER_OPSYS}@' \ -e 's@${PKGNAME}@\$${PKGNAME}@' \ - | ${SORT} \ + | ${SORT} \ + | ${GREP} -v emul/linux/proc \ | ${AWK} ' \ /^@/ { print $$0; next } \ /.*\/lib[^\/]+\.so\.[0-9]+\.[0-9]+\.[0-9]+$$/ { \ @@ -3155,7 +3165,8 @@ print-PLIST: -e s@${MACHINE_GNU_PLATFORM}@\$${MACHINE_GNU_PLATFORM}@ \ -e s@${LOWER_VENDOR}@\$${LOWER_VENDOR}@ \ -e s@${LOWER_OPSYS}@\$${LOWER_OPSYS}@ \ - -e s@${PKGNAME}@\$${PKGNAME}@ + -e s@${PKGNAME}@\$${PKGNAME}@ \ + | ${GREP} -v emul/linux/proc .endif # target(print-PLIST) diff --git a/mk/mk.conf.example b/mk/mk.conf.example index ef550b23c50..ee2905a192c 100644 --- a/mk/mk.conf.example +++ b/mk/mk.conf.example @@ -1,4 +1,4 @@ -# $NetBSD: mk.conf.example,v 1.238 2001/08/19 08:47:57 zuntum Exp $ +# $NetBSD: mk.conf.example,v 1.239 2001/08/24 00:54:46 hubertf Exp $ # # Sample /etc/mk.conf file, which can be used to set specific values @@ -347,6 +347,10 @@ # Possible: -v, -u, etc. See pkg_add(8) # Default: (no option) +#LOCALPATCHES=... +# Directory where local patches are stored. See pkgsrc/Packages.txt. +# Possible: Any local directory +# Default: none # # Definitions used only in the packages collection |