diff options
author | se <se@FreeBSD.org> | 2018-01-18 06:43:24 +0800 |
---|---|---|
committer | se <se@FreeBSD.org> | 2018-01-18 06:43:24 +0800 |
commit | 2092b8cb4a6f827416667b534a716e03487a71c4 (patch) | |
tree | 3eb846a4a9e5aaa3420ce23621f8bdc08494c2c4 | |
parent | 2645d7e44e4bf28cc9793b825a1640c07a2edf50 (diff) | |
download | freebsd-ports-gnome-2092b8cb4a6f827416667b534a716e03487a71c4.tar.gz freebsd-ports-gnome-2092b8cb4a6f827416667b534a716e03487a71c4.tar.zst freebsd-ports-gnome-2092b8cb4a6f827416667b534a716e03487a71c4.zip |
Fix previous commit (r459202) which introduced dependencies that specify
an optional make target. The patch file contained 2 typoes ("{$" instead
of "${").
Add clean phase for dependencies that are not installed but required when
the dependent port is built (e.g. because of references to source files of
that port, or because of static linking against libraries in the stage area
of such a dependency).
Approved by: antoine (implicit)
-rw-r--r-- | ports-mgmt/portmaster/Makefile | 4 | ||||
-rw-r--r-- | ports-mgmt/portmaster/files/patch-portmaster | 37 |
2 files changed, 30 insertions, 11 deletions
diff --git a/ports-mgmt/portmaster/Makefile b/ports-mgmt/portmaster/Makefile index 01c52dc49f02..dfbe940b1a2b 100644 --- a/ports-mgmt/portmaster/Makefile +++ b/ports-mgmt/portmaster/Makefile @@ -2,7 +2,7 @@ PORTNAME= portmaster PORTVERSION= 3.19 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= ports-mgmt MAINTAINER= se@FreeBSD.org @@ -29,7 +29,7 @@ verify: checksum do-build: .for file in portmaster files/portmaster.rc.sample files/portmaster.8 - ${REINPLACE_CMD} -e 's#/usr/local#${LOCALBASE}#g' \ + @${REINPLACE_CMD} -e 's#/usr/local#${LOCALBASE}#g' \ -e 's#===>>> Version [0-9._]*#===>>> Version ${PKGVERSION}#' ${WRKSRC}/${file} .endfor diff --git a/ports-mgmt/portmaster/files/patch-portmaster b/ports-mgmt/portmaster/files/patch-portmaster index edd53e35d321..3977d32e3ed8 100644 --- a/ports-mgmt/portmaster/files/patch-portmaster +++ b/ports-mgmt/portmaster/files/patch-portmaster @@ -15,8 +15,8 @@ -flavor_part () { expr "$1" : ".*@" >/dev/null && echo "${1#*@}"; } -dir_part () { echo "${1%%@*}"; } -+target_part () { [ -z "{$1##*:*}" ] && echo "${1#*:}" || echo install; } -+flavor_part () { local tmp="${1%%:*}"; [ -z "{$tmp##*@*}" ] && echo "${tmp#*@}"; } ++target_part () { [ -z "${1##*:*}" ] && echo "${1#*:}" || echo install; } ++flavor_part () { local tmp="${1%%:*}"; [ -z "${tmp##*@*}" ] && echo "${tmp#*@}"; } +dir_part () { local tmp="${1%%:*}"; echo "${tmp%%@*}"; } export_flavor () { local flavor="$1"; if [ "$FLAVOR" != "$flavor" ]; then pm_v "===>>> Setting FLAVOR to '$flavor' (was '$FLAVOR')"; @@ -99,21 +99,25 @@ fi for glob in $conflicts; do confl_p=`pkg query -g "%n-%v" $glob 2>/dev/null` -@@ -2498,7 +2499,8 @@ dependency_check () { +@@ -2498,7 +2499,11 @@ dependency_check () { check_for_updates $iport $origin || fail 'Update failed' else check_interactive $origin || continue - update_port $origin -+ [ "$make_target" = "install" ] && make_target="" -+ update_port $origin${make_target:+:$make_target} ++ if [ "$make_target" != "install" ]; then ++ [ -z "$PM_FIRST_PASS" ] && post_clean_l="$post_clean_l $origin" ++ origin="$origin:$make_target" ++ fi ++ update_port "$origin" fi done [ -n "$PM_FIRST_PASS" ] && unset doing_dep_check -@@ -3029,8 +3031,11 @@ no_valid_port () { +@@ -3029,8 +3034,12 @@ no_valid_port () { echo "===>>> Try $progname --help" ; echo '' ; safe_exit 1 } +make_target=$(target_part "$1") ++post_clean_l="" + # Figure out what we are going to be working on if [ -z "$REPLACE_ORIGIN" ]; then @@ -121,7 +125,7 @@ export_flavor $(flavor_part $portdir) [ -n "$portdir" ] && { argv=$portdir ; unset portdir; } argv=${argv:-$1} ; argv=${argv%/} ; argv=`globstrip $argv` -@@ -3061,6 +3066,8 @@ if [ -z "$REPLACE_ORIGIN" ]; then +@@ -3061,6 +3070,8 @@ if [ -z "$REPLACE_ORIGIN" ]; then unset glob_dirs fi unset argv @@ -130,7 +134,7 @@ else portdir="${1#$pd/}" ; portdir="${portdir%/}" export_flavor=$(flavor_part $portdir) -@@ -3234,6 +3241,9 @@ elif [ -n "$FETCH_ONLY" -a -n "$PM_PACKAGES" ]; then +@@ -3234,6 +3245,9 @@ elif [ -n "$FETCH_ONLY" -a -n "$PM_PACKAGES" ]; then update_pm_nu $portdir fi @@ -140,7 +144,7 @@ # Do these things first time through if [ -z "$PM_INDEX_ONLY" -a -z "$PM_BUILDING" -a -z "$SHOW_WORK" -a -z "$NO_ACTION" ]; then # Do not start this in the background until we are sure we are going to proceed -@@ -3639,12 +3649,18 @@ pkg_flavor () { +@@ -3639,12 +3653,18 @@ pkg_flavor () { if [ -n "$HIDE_BUILD" ] && [ -n "$(pm_make -V LICENSE)" ]; then pm_make extract ask-license || fail "make extract ask-license failed for $portdir" fi @@ -159,3 +163,18 @@ else [ -z "$local_package" ] && { fetch_package $latest_pv || fail "Fetch for ${latest_pv}.txz failed"; } +@@ -3876,9 +3896,12 @@ if [ -n "$MAKE_PACKAGE" ]; then + fi + + if [ -z "$use_package" -a -z "$DONT_POST_CLEAN" ]; then +-# export_flavor $(flavor_part $portdir) ++ for dir in $post_clean_l; do ++ pm_v "===>>> Running 'make clean' for special build dependency $dir" ++ (FLAVOR=$(flavor_part $portdir) pm_make_s -C "$pd/$dir" clean NOCLEANDEPENDS=ncd2 >/dev/null)& ++ done + pm_v "===>>> Running 'make clean' in the background" +- (pm_make_s clean NOCLEANDEPENDS=ncd2 >/dev/null)& ++ (FLAVOR=$(flavor_part $portdir) pm_make_s clean NOCLEANDEPENDS=ncd2 >/dev/null)& + pm_v + fi + if [ -n "$ro_opd" ]; then |