diff options
author | Mark Linimon <linimon@FreeBSD.org> | 2007-04-03 03:34:50 +0000 |
---|---|---|
committer | Mark Linimon <linimon@FreeBSD.org> | 2007-04-03 03:34:50 +0000 |
commit | 0ac660bf909ab5aacbc80fd70d8635781638f980 (patch) | |
tree | 58ed1373a7f38b6375540bd020532ec9fbd27cab /ports-mgmt | |
parent | 73c95afbd51aa8f604b8c3cf1aeb327d7bec2642 (diff) |
Notes
Diffstat (limited to 'ports-mgmt')
-rw-r--r-- | ports-mgmt/portmk/Mk/bsd.port.mk | 260 |
1 files changed, 143 insertions, 117 deletions
diff --git a/ports-mgmt/portmk/Mk/bsd.port.mk b/ports-mgmt/portmk/Mk/bsd.port.mk index 8040307a5554..796402aede13 100644 --- a/ports-mgmt/portmk/Mk/bsd.port.mk +++ b/ports-mgmt/portmk/Mk/bsd.port.mk @@ -355,12 +355,13 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # Some installations may wish to override the default # to specify a version without X11 and/or localized # versions for their nationality. -# WITH_GHOSTSCRIPT_GPL -# - If set, this port uses the GPL version of the ghostscript -# software instead of the GNU version, which is used otherwise. +# Default: print/ghostscript-gpl # WITH_GHOSTSCRIPT_AFPL # - If set, this port uses the AFPL version of the ghostscript -# software instead of the GNU version, which is used otherwise. +# software instead of the GPL version, which is used otherwise. +# WITH_GHOSTSCRIPT_GNU +# - If set, this port uses the GNU version of the ghostscript +# software instead of the GPL version, which is used otherwise. ## # USE_BISON - If set, this port uses bison for building. ## @@ -1273,7 +1274,13 @@ UNIQUENAME?= ${PKGNAMEPREFIX}${PORTNAME} OPTIONSFILE?= ${PORT_DBDIR}/${UNIQUENAME}/options _OPTIONSFILE!= ${ECHO_CMD} "${OPTIONSFILE}" .if defined(OPTIONS) -. if defined(PACKAGE_BUILDING) || (defined(BATCH) && !exists(${_OPTIONSFILE})) +# include OPTIONSFILE first if exists +. if exists(${_OPTIONSFILE}) && !make(rmconfig) +. include "${_OPTIONSFILE}" +. endif +. if exists(${_OPTIONSFILE}.local) +. include "${_OPTIONSFILE}.local" +. endif WITHOUT:= WITH:= . if defined(OPTIONS) @@ -1289,23 +1296,21 @@ WITH:= ${WITH} ${OPT} OPT:=${RO} . endfor . endif +# define only if NO WITH/WITHOUT_${W} is defined . for W in ${WITH} +. if !defined(WITH_${W}) && !defined(WITHOUT_${W}) WITH_${W}:= true +. endif . endfor . for W in ${WITHOUT} +. if !defined(WITH_${W}) && !defined(WITHOUT_${W}) WITHOUT_${W}:= true +. endif . endfor . undef WITH . undef WITHOUT . undef RO . undef REALOPTIONS -. endif -. if exists(${_OPTIONSFILE}) && !make(rmconfig) -. include "${_OPTIONSFILE}" -. endif -. if exists(${_OPTIONSFILE}.local) -. include "${_OPTIONSFILE}.local" -. endif .endif .endif @@ -1545,7 +1550,7 @@ PERL= ${LOCALBASE}/bin/perl .endif .endif -.if defined(USE_TCL) || defined(USE_TCL_BUILD) || defined(USE_TK) || defined(USE_TK_BUILD) +.if defined(USE_TCL) || defined(USE_TCL_BUILD) || defined(USE_TCL_RUN) || defined(USE_TCL_WRAPPER) || defined(USE_TK) || defined(USE_TK_BUILD) || defined(USE_TK_RUN) || defined(USE_TK_WRAPPER) .if exists(${DEVELPORTSDIR}/Mk/bsd.tcl.mk) .include "${DEVELPORTSDIR}/Mk/bsd.tcl.mk" .else @@ -2188,20 +2193,20 @@ CONFIGURE_ARGS+=--x-libraries=${X11BASE}/lib --x-includes=${X11BASE}/include # Set the default for the installation of Postscript(TM)- # compatible functionality. .if !defined(WITHOUT_X11) -.if defined(WITH_GHOSTSCRIPT_AFPL) +.if defined(WITH_GHOSTSCRIPT_GNU) +GHOSTSCRIPT_PORT?= print/ghostscript-gnu +.elif defined(WITH_GHOSTSCRIPT_AFPL) GHOSTSCRIPT_PORT?= print/ghostscript-afpl -.elif defined(WITH_GHOSTSCRIPT_GPL) -GHOSTSCRIPT_PORT?= print/ghostscript-gpl .else -GHOSTSCRIPT_PORT?= print/ghostscript-gnu +GHOSTSCRIPT_PORT?= print/ghostscript-gpl .endif .else -.if defined(WITH_GHOSTSCRIPT_AFPL) +.if defined(WITH_GHOSTSCRIPT_GNU) +GHOSTSCRIPT_PORT?= print/ghostscript-gnu-nox11 +.elif defined(WITH_GHOSTSCRIPT_AFPL) GHOSTSCRIPT_PORT?= print/ghostscript-afpl-nox11 -.elif defined(WITH_GHOSTSCRIPT_GPL) -GHOSTSCRIPT_PORT?= print/ghostscript-gpl-nox11 .else -GHOSTSCRIPT_PORT?= print/ghostscript-gnu-nox11 +GHOSTSCRIPT_PORT?= print/ghostscript-gpl-nox11 .endif .endif @@ -2931,8 +2936,8 @@ VALID_CATEGORIES+= accessibility afterstep arabic archivers astro audio \ palm parallel pear perl5 plan9 polish portuguese ports-mgmt \ print python ruby rubygems russian \ scheme science security shells spanish sysutils \ - tcl80 tcl81 tcl82 tcl83 tcl84 textproc \ - tk80 tk82 tk83 tk84 tkstep80 \ + tcl tcl80 tcl82 tcl83 tcl84 textproc \ + tk tk80 tk82 tk83 tk84 tkstep80 \ ukrainian vietnamese windowmaker www \ x11 x11-clocks x11-fm x11-fonts x11-servers x11-themes x11-toolkits \ x11-wm xfce zope @@ -3328,8 +3333,7 @@ DEPENDS_ARGS+= NOCLEANDEPENDS=yes # ################################################################ .if (!defined(OPTIONS) || defined(CONFIG_DONE) || \ - defined(PACKAGE_BUILDING) || defined(BATCH) || \ - exists(${_OPTIONSFILE}) || exists(${_OPTIONSFILE}.local)) + defined(PACKAGE_BUILDING) || defined(BATCH)) _OPTIONS_OK=yes .endif @@ -3463,16 +3467,25 @@ check-vulnerable: fi .endif +# set alg to any of SIZE, MD5, SHA256 (or any other checksum algorithm): +DISTINFO_DATA?= DIR=${DIST_SUBDIR}; ${AWK} -v alg=$$alg \ + -v file=$${DIR:+$$DIR/}$${file\#\#*/} \ + '$$1 == alg && $$2 == "(" file ")" {print $$4}' ${MD5_FILE} + # Fetch .if !target(do-fetch) do-fetch: @${MKDIR} ${_DISTDIR} - @(cd ${_DISTDIR}; \ + @cd ${_DISTDIR};\ ${_MASTER_SITES_ENV} ; \ for _file in ${DISTFILES}; do \ - file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^:]+$$//'` ; \ - select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e 's/,/ /g'` ; \ + file=$${_file%%:*}; \ + if [ $$_file = $$file ]; then \ + select=''; \ + else \ + select=`${ECHO_CMD} $${_file##*:} | ${SED} -e 's/,/ /g'` ; \ + fi; \ force_fetch=false; \ filebasename=`${BASENAME} $$file`; \ for afile in ${FORCE_FETCH}; do \ @@ -3482,8 +3495,6 @@ do-fetch: fi; \ done; \ if [ ! -f $$file -a ! -f $$filebasename -o "$$force_fetch" = "true" ]; then \ - DIR=${DIST_SUBDIR}; \ - pattern="$${DIR:+$$DIR/}`${ECHO_CMD} $$file | ${SED} -e 's/\./\\\\./g'`"; \ if [ -L $$file -o -L $$filebasename ]; then \ ${ECHO_MSG} "=> ${_DISTDIR}/$$file is a broken symlink."; \ ${ECHO_MSG} "=> Perhaps a filesystem (most likely a CD) isn't mounted?"; \ @@ -3491,7 +3502,8 @@ do-fetch: exit 1; \ fi ; \ if [ -f ${MD5_FILE} -a "x${NO_CHECKSUM}" = "x" ]; then \ - if ! ${GREP} -q "^MD5 ($$pattern)" ${MD5_FILE}; then \ + _md5sum=`alg=MD5; ${DISTINFO_DATA}`; \ + if [ -z "$$_md5sum" ]; then \ ${ECHO_MSG} "=> $${DIR:+$$DIR/}$$file is not in ${MD5_FILE}."; \ ${ECHO_MSG} "=> Either ${MD5_FILE} is out of date, or"; \ ${ECHO_MSG} "=> $${DIR:+$$DIR/}$$file is spelled incorrectly."; \ @@ -3518,8 +3530,7 @@ do-fetch: fi ; \ for site in `eval $$SORTED_MASTER_SITES_CMD_TMP ${_RANDOMIZE_SITES}`; do \ ${ECHO_MSG} "=> Attempting to fetch from $${site}."; \ - DIR=${DIST_SUBDIR}; \ - CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ + CKSIZE=`alg=SIZE; ${DISTINFO_DATA}`; \ case $${file} in \ */*) ${MKDIR} $${file%/*}; \ args="-o $${file} $${site}$${file}";; \ @@ -3533,10 +3544,10 @@ do-fetch: ${ECHO_MSG} "=> port manually into ${_DISTDIR} and try again."; \ exit 1; \ fi \ - done) + done .if defined(PATCHFILES) - @(cd ${_DISTDIR}; \ - ${_PATCH_SITES_ENV} ; \ + @cd ${_DISTDIR};\ + ${_PATCH_SITES_ENV} ; \ for _file in ${PATCHFILES}; do \ file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^:]+$$//'` ; \ select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e 's/,/ /g'` ; \ @@ -3571,9 +3582,7 @@ do-fetch: fi ; \ for site in `eval $$SORTED_PATCH_SITES_CMD_TMP`; do \ ${ECHO_MSG} "=> Attempting to fetch from $${site}."; \ - DIR=${DIST_SUBDIR}; \ - pattern="$${DIR:+$$DIR/}`${ECHO_CMD} $$file | ${SED} -e 's/\./\\\\./g'`"; \ - CKSIZE=`${GREP} "^SIZE ($$pattern)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ + CKSIZE=`alg=SIZE; ${DISTINFO_DATA}`; \ case $${file} in \ */*) ${MKDIR} $${file%/*}; \ args="-o $${file} $${site}$${file}";; \ @@ -3587,7 +3596,7 @@ do-fetch: ${ECHO_MSG} "=> port manually into ${_DISTDIR} and try again."; \ exit 1; \ fi \ - done) + done .endif .endif @@ -4310,7 +4319,7 @@ fetch: ${_FETCH_DEP} ${_FETCH_SEQ} .if !target(${target}) && defined(_OPTIONS_OK) ${target}: ${${target:U}_COOKIE} .elif !target(${target}) -${target}: config +${target}: config-conditional @cd ${.CURDIR} && ${MAKE} CONFIG_DONE=1 ${__softMAKEFLAGS} ${${target:U}_COOKIE} .elif target(${target}) && defined(IGNORE) .endif @@ -4630,8 +4639,8 @@ fetch-list: continue; \ fi; \ fi; \ - DIR=${DIST_SUBDIR}; \ - CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ + DIR=${DIST_SUBDIR};\ + CKSIZE=`alg=SIZE; ${DISTINFO_DATA}`; \ case $${file} in \ */*) args="-o $${file} $${site}$${file}";; \ *) args=$${site}$${file};; \ @@ -4662,8 +4671,7 @@ fetch-list: SORTED_PATCH_SITES_CMD_TMP="${SORTED_PATCH_SITES_DEFAULT_CMD}" ; \ fi ; \ for site in `eval $$SORTED_PATCH_SITES_CMD_TMP ${_RANDOMIZE_SITES}`; do \ - DIR=${DIST_SUBDIR}; \ - CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ + CKSIZE=`alg=SIZE; ${DISTINFO_DATA}`; \ case $${file} in \ */*) args="-o $${file} $${site}$${file}";; \ *) args=$${site}$${file};; \ @@ -4740,15 +4748,10 @@ makesum: check-checksum-algorithms .if !target(checksum) checksum: fetch check-checksum-algorithms - @ \ - \ - ${checksum_init} \ - \ + @${checksum_init} \ if [ -f ${MD5_FILE} ]; then \ - ( cd ${DISTDIR}; OK=""; \ + cd ${DISTDIR}; OK="";\ for file in ${_CKSUMFILES}; do \ - pattern="`${ECHO_CMD} $$file | ${SED} -e 's/\./\\\\./g'`"; \ - \ ignored="true"; \ for alg in ${CHECKSUM_ALGORITHMS:U}; do \ ignore="false"; \ @@ -4756,7 +4759,7 @@ checksum: fetch check-checksum-algorithms \ if [ $$alg_executable != "NO" ]; then \ MKSUM=`$$alg_executable < $$file`; \ - CKSUM=`${GREP} "^$$alg ($$pattern)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ + CKSUM=`${DISTINFO_DATA}`; \ else \ ignore="true"; \ fi; \ @@ -4801,8 +4804,6 @@ checksum: fetch check-checksum-algorithms done; \ \ for file in ${_IGNOREFILES}; do \ - pattern="`${ECHO_CMD} $$file | ${SED} -e 's/\./\\\\./g'`"; \ - \ ignored="true"; \ alreadymatched="false"; \ for alg in ${CHECKSUM_ALGORITHMS:U}; do \ @@ -4810,7 +4811,7 @@ checksum: fetch check-checksum-algorithms eval alg_executable=\$$$$alg; \ \ if [ $$alg_executable != "NO" ]; then \ - CKSUM=`${GREP} "^$$alg ($$pattern)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ + CKSUM=`${DISTINFO_DATA}`; \ else \ ignore="true"; \ fi; \ @@ -4858,7 +4859,6 @@ checksum: fetch check-checksum-algorithms if [ "$$OK" != "true" ]; then \ exit 1; \ fi \ - ); \ elif [ -n "${_CKSUMFILES:M*}" ]; then \ ${ECHO_MSG} "=> No checksum file (${MD5_FILE})."; \ fi @@ -5176,62 +5176,60 @@ fetch-recursive-list: done .endif +# Used by fetch-required and fetch-required list, this script looks +# at each of the dependencies. If 3 items are specified in the tuple, +# such as foo:${PORTSDIR}/graphics/foo:extract, the first item (foo) +# is examined. Only if it begins with a / and does not exist on the +# file-system will ``make targ'' proceed. +# For more usual (dual-item) dependency tuples, the ``make targ'' +# proceeds, if the exact package, which the directory WOULD'VE installed, +# is not yet installed. +# This is the exact behaviour of the old code, and it may need +# revisiting. For example, the entire first case seems dubious, and in +# the second case we, probably, should be satisfied with _any_ (earlier) +# package, with the same origin as that of the dir. +# +# -mi +FETCH_LIST?= for i in $$deps; do \ + prog=$${i%%:*}; dir=$${i\#*:}; \ + case $$dir in \ + *:*) if [ $$prog != $${prog\#/} -o ! -e $$prog ]; then \ + dir=$${dir%%:*}; \ + else \ + continue; \ + fi;; \ + *) if [ -d ${PKG_DBDIR}/$$(cd $$dir; ${MAKE} -V PKGNAME) ]; then \ + continue; \ + fi;; \ + esac; \ + echo cd $$dir; ${MAKE} $$targ; \ + done + .if !target(fetch-required) fetch-required: fetch +.if defined(NO_DEPENDS) + @${ECHO_MSG} "===> NO_DEPENDS is set, not fetching any distfiles for ${PKG_NAME}" +.else @${ECHO_MSG} "===> Fetching all required distfiles for ${PKGNAME} and dependencies" .for deptype in EXTRACT PATCH FETCH BUILD RUN .if defined(${deptype}_DEPENDS) -.if !defined(NO_DEPENDS) - @for i in ${${deptype}_DEPENDS}; do \ - prog=`${ECHO_CMD} $$i | ${CUT} -f 1 -d ':'`; \ - dir=`${ECHO_CMD} $$i | ${CUT} -f 2-999 -d ':'`; \ - if ${EXPR} "$$dir" : '.*:' > /dev/null; then \ - dir=`${ECHO_CMD} $$dir | ${CUT} -f 1 -d ':'`; \ - if ${EXPR} "$$prog" : \\/ >/dev/null; then \ - if [ ! -e "$$prog" ]; then \ - (cd $$dir; ${MAKE} fetch); \ - fi; \ - fi; \ - else \ - (cd $$dir; \ - tmp=`${MAKE} -V PKGNAME`; \ - if [ ! -d ${PKG_DBDIR}/$${tmp} ]; then \ - ${MAKE} fetch; \ - fi ); \ - fi; \ - done -.endif + @targ=fetch; deps="${${deptype}_DEPENDS}"; ${FETCH_LIST} .endif .endfor .endif +.endif + .if !target(fetch-required-list) fetch-required-list: fetch-list +.if !defined(NO_DEPENDS) .for deptype in EXTRACT PATCH FETCH BUILD RUN .if defined(${deptype}_DEPENDS) -.if !defined(NO_DEPENDS) - @for i in ${${deptype}_DEPENDS}; do \ - prog=`${ECHO_CMD} $$i | ${CUT} -f 1 -d ':'`; \ - dir=`${ECHO_CMD} $$i | ${CUT} -f 2-999 -d ':'`; \ - if ${EXPR} "$$dir" : '.*:' > /dev/null; then \ - dir=`${ECHO_CMD} $$dir | ${CUT} -f 1 -d ':'`; \ - if ${EXPR} "$$prog" : \\/ >/dev/null; then \ - if [ ! -e "$$prog" ]; then \ - (cd $$dir; ${MAKE} fetch-list); \ - fi; \ - fi; \ - else \ - (cd $$dir; \ - tmp=`${MAKE} -V PKGNAME`; \ - if [ ! -d ${PKG_DBDIR}/$${tmp} ]; then \ - ${MAKE} fetch-list; \ - fi ); \ - fi; \ - done -.endif + @targ=fetch-list; deps="${${deptype}_DEPENDS}"; ${FETCH_LIST} .endif .endfor .endif +.endif .if !target(checksum-recursive) checksum-recursive: @@ -5249,7 +5247,7 @@ build-depends-list: .endif BUILD-DEPENDS-LIST= \ - for dir in $$(${ECHO_CMD} "${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//' | ${SORT} -u); do \ + for dir in $$(${ECHO_CMD} "${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}" | ${SED} -E -e 's,([^: ]*):([^: ]*)(:[^ ]*)?,\2,g' -e 'y/ /\n/'| ${SORT} -u); do \ if [ -d $$dir ]; then \ ${ECHO_CMD} $$dir; \ else \ @@ -5263,7 +5261,7 @@ run-depends-list: .endif RUN-DEPENDS-LIST= \ - for dir in $$(${ECHO_CMD} "${LIB_DEPENDS} ${RUN_DEPENDS}" | ${SED} -e 'y/ /\n/' | ${CUT} -f 2 -d ':' | ${SORT} -u); do \ + for dir in $$(${ECHO_CMD} "${_LIB_RUN_DEPENDS:C,.*:([^:]*).*,\1,}" | ${SED} -e 'y/ /\n/' | ${SORT} -u); do \ if [ -d $$dir ]; then \ ${ECHO_CMD} $$dir; \ else \ @@ -5279,6 +5277,7 @@ package-depends-list: @${PACKAGE-DEPENDS-LIST} .endif +_LIB_RUN_DEPENDS= ${LIB_DEPENDS} ${RUN_DEPENDS} PACKAGE-DEPENDS-LIST?= \ if [ "${CHILD_DEPENDS}" ]; then \ installed=$$(${PKG_INFO} -qO ${PKGORIGIN} 2>/dev/null || \ @@ -5294,21 +5293,22 @@ PACKAGE-DEPENDS-LIST?= \ done; \ fi; \ checked="${PARENT_CHECKED}"; \ - for dir in $$(${ECHO_CMD} "${LIB_DEPENDS} ${RUN_DEPENDS}" | ${SED} -e 'y/ /\n/' | ${CUT} -f 2 -d ':'); do \ + for dir in ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}; do \ dir=$$(${REALPATH} $$dir); \ if [ -d $$dir ]; then \ - if (${ECHO_CMD} $$checked | ${GREP} -qwv "$$dir"); then \ - childout=$$(cd $$dir; ${MAKE} CHILD_DEPENDS=yes PARENT_CHECKED="$$checked" package-depends-list); \ - set -- $$childout; \ - childdir=""; \ - while [ $$\# != 0 ]; do \ - childdir="$$childdir $$2"; \ - ${ECHO_CMD} "$$1 $$2 $$3"; \ - shift 3; \ - done; \ - checked="$$dir $$childdir $$checked"; \ - fi; \ - else \ + case $$checked in \ + $$dir|$$dir\ *|*\ $$dir|*\ $$dir\ *) continue;; \ + esac; \ + childout=$$(cd $$dir; ${MAKE} CHILD_DEPENDS=yes PARENT_CHECKED="$$checked" package-depends-list); \ + set -- $$childout; \ + childdir=""; \ + while [ $$\# != 0 ]; do \ + childdir="$$childdir $$2"; \ + ${ECHO_CMD} "$$1 $$2 $$3"; \ + shift 3; \ + done; \ + checked="$$dir $$childdir $$checked"; \ + else \\ ${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \ fi; \ done @@ -5328,7 +5328,7 @@ package-recursive: package # Show missing dependiencies missing: @for dir in $$(${ALL-DEPENDS-LIST}); do \ - THISORIGIN=$$(${ECHO_CMD} $$dir | ${SED} 's,${PORTSDIR}/,,'); \ + THISORIGIN=$${dir##${PORTSDIR}/}; \ installed=$$(${PKG_INFO} -qO $${THISORIGIN}); \ if [ -z "$$installed" ]; then \ ${ECHO_CMD} $$THISORIGIN; \ @@ -5531,7 +5531,7 @@ generate-plist: @${ECHO_CMD} '@cwd ${PREFIX}' >> ${TMPPLIST} .endif @for i in $$(${ECHO_CMD} ${__MANPAGES} ${_TMLINKS:M${_PREFIX}*:S|^${_PREFIX}/||} ' ' | ${SED} -E -e 's|man([1-9ln])/([^/ ]+) |cat\1/\2 |g'); do \ - ${ECHO_CMD} "@unexec rm -f %D/$${i%.gz} %D/$${i%.gz}.gz" >> ${TMPPLIST}; \ + ${ECHO_CMD} "@unexec rm -f %D/$$i %D/$${i%.gz} %D/$${i%.bz2} %D/$$i.gz %D/$$i.bz2" >> ${TMPPLIST}; \ done .endfor @if [ -f ${PLIST} ]; then \ @@ -5544,7 +5544,7 @@ generate-plist: .endfor .for dir in ${PLIST_DIRS} - @${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} | ${SED} -e 's,^,@dirrm ,' >> ${TMPPLIST} + @${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^,@dirrm ,' >> ${TMPPLIST} .endfor # To be removed once INSTALLS_SHLIB has been eradicated. .if defined(INSTALLS_SHLIB) && !defined(INSTALL_AS_USER) @@ -5726,7 +5726,7 @@ fake-pkg: if [ -f ${PKGMESSAGE} ]; then \ ${CP} ${PKGMESSAGE} ${PKG_DBDIR}/${PKGNAME}/+DISPLAY; \ fi; \ - for dep in `${PKG_INFO} -qf ${PKGNAME} | ${GREP} -w ^@pkgdep | ${AWK} '{print $$2}' | ${SORT} -u`; do \ + for dep in `${PKG_INFO} -qf ${PKGNAME} | ${AWK} '/^@pkgdep / {print $$2}' | ${SORT} -u`; do \ if [ -d ${PKG_DBDIR}/$$dep -a -z `${ECHO_CMD} $$dep | ${GREP} -E ${PKG_IGNORE_DEPENDS}` ]; then \ if ! ${GREP} ^${PKGNAME}$$ ${PKG_DBDIR}/$$dep/+REQUIRED_BY \ >/dev/null 2>&1; then \ @@ -5869,10 +5869,36 @@ config-recursive: .if !target(config-conditional) config-conditional: -.if defined(OPTIONS) && !exists(${_OPTIONSFILE}) +.if defined(OPTIONS) +.if exists(${_OPTIONSFILE}) +# scan saved options and invalidate them, if the set of options does not match + @. ${_OPTIONSFILE}; \ + set ${OPTIONS} XXX; \ + while [ $$# -gt 3 ]; do \ + withvar=WITH_$$1; \ + withoutvar=WITHOUT_$$1; \ + withval=$$(eval ${ECHO_CMD} $$\{$${withvar}\}); \ + withoutval=$$(eval ${ECHO_CMD} $$\{$${withoutvar}\}); \ + if [ ! -z "$${withval}" ]; then \ + val=on; \ + elif [ ! -z "$${withoutval}" ]; then \ + val=off; \ + else \ + val=missing; \ + fi; \ + if [ "$${val}" = "missing" ]; then \ + OPTIONS_INVALID=yes; \ + fi; \ + shift 3; \ + done; \ + if [ "$${OPTIONS_INVALID}" = "yes" ]; then \ + cd ${.CURDIR} && ${MAKE} config; \ + fi; +.else cd ${.CURDIR} && ${MAKE} config; .endif .endif +.endif .if !target(showconfig) showconfig: |