Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Dec 2017 08:25:55 +0000 (UTC)
From:      Stefan Esser <se@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r456890 - in head/ports-mgmt/portmaster: . files
Message-ID:  <201712210825.vBL8PtfL021440@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: se
Date: Thu Dec 21 08:25:55 2017
New Revision: 456890
URL: https://svnweb.freebsd.org/changeset/ports/456890

Log:
  Patch package version into the port and install man-page with patched path
  for non-standard LOCALBASE. The port used to patch the man-page, but then
  installed the unpatched version.
  
  Approved by:	antoine (implicit)

Modified:
  head/ports-mgmt/portmaster/Makefile
  head/ports-mgmt/portmaster/files/patch-portmaster

Modified: head/ports-mgmt/portmaster/Makefile
==============================================================================
--- head/ports-mgmt/portmaster/Makefile	Thu Dec 21 08:11:34 2017	(r456889)
+++ head/ports-mgmt/portmaster/Makefile	Thu Dec 21 08:25:55 2017	(r456890)
@@ -2,7 +2,7 @@
 
 PORTNAME=	portmaster
 PORTVERSION=	3.17.11
-PORTREVISION=	11
+PORTREVISION=	12
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	LOCAL/bdrewery/${PORTNAME}/ \
 		http://mirror.shatow.net/freebsd/${PORTNAME}/ \
@@ -32,14 +32,14 @@ verify: checksum
 
 do-build:
 .for file in portmaster files/portmaster.rc.sample files/portmaster.8
-	${SED} -e 's#/usr/local#${LOCALBASE}#g' ${WRKSRC}/${file} \
-	  > ${WRKDIR}/${file:T}
+	${REINPLACE_CMD} -e 's#/usr/local#${LOCALBASE}#g' \
+	    -e 's#%%PKGNAME%%#${PKGNAME}#g' ${WRKSRC}/${file}
 .endfor
 
 do-install:
-	${INSTALL_SCRIPT} ${WRKDIR}/portmaster \
+	${INSTALL_SCRIPT} ${WRKSRC}/portmaster \
 	    ${STAGEDIR}${PREFIX}/sbin
-	${INSTALL_DATA} ${WRKDIR}/portmaster.rc.sample \
+	${INSTALL_DATA} ${WRKSRC}/files/portmaster.rc.sample \
 	    ${STAGEDIR}${PREFIX}/etc
 	${INSTALL_MAN} ${WRKSRC}/files/portmaster.8 \
 	    ${STAGEDIR}${MAN8PREFIX}/man/man8

Modified: head/ports-mgmt/portmaster/files/patch-portmaster
==============================================================================
--- head/ports-mgmt/portmaster/files/patch-portmaster	Thu Dec 21 08:11:34 2017	(r456889)
+++ head/ports-mgmt/portmaster/files/patch-portmaster	Thu Dec 21 08:25:55 2017	(r456890)
@@ -1,6 +1,16 @@
 --- portmaster.orig	2017-12-14 16:26:55 UTC
 +++ portmaster
-@@ -310,7 +310,7 @@ safe_exit () {
+@@ -51,7 +51,8 @@ fi
+ #=============== Begin functions we always want to have ===============
+ 
+ version () {
+-	echo '' ; echo "===>>> Version 3.17.10"
++	local pkgname="%%PKGNAME%%"
++	echo '' ; echo "===>>> Version ${pkgname##*-}"
+ 	#svn='$FreeBSD: user/dougb/portmaster/portmaster 241090 2012-10-01 08:32:05Z dougb $'
+ }
+ 
+@@ -310,7 +311,7 @@ safe_exit () {
  } # safe_exit()
  
  flavor_part	() { expr "$1" : ".*@" >/dev/null && echo "${1#*@}"; }
@@ -9,7 +19,7 @@
  export_flavor	() { local flavor="$1"; if [ "$FLAVOR" != "$flavor" ]; then
  			pm_v "===>>> Setting FLAVOR to '$flavor' (was '$FLAVOR')";
  			export FLAVOR="$flavor"; fi; }
-@@ -652,7 +652,7 @@ for var in "$@" ; do
+@@ -652,7 +653,7 @@ for var in "$@" ; do
  				export LOCAL_PACKAGEDIR ;;
  	--delete-packages)	PM_DELETE_PACKAGES=pm_delete_packages
  				export PM_DELETE_PACKAGES ;;
@@ -18,7 +28,7 @@
  	--update-if-newer)	PM_UPDATE_IF_NEWER=pm_update_if_newer
  				export PM_UPDATE_IF_NEWER ;;
  	--delete-build-only)	PM_DEL_BUILD_ONLY=pm_dbo
-@@ -811,15 +811,6 @@ if [ "$$" -eq "$PM_PARENT_PID" ]; then
+@@ -811,15 +812,6 @@ if [ "$$" -eq "$PM_PARENT_PID" ]; then
  	[ -n "$PM_URB" -o -n "$UPDATE_ALL" ] && [ -n "$1" ] &&
  	    fail 'The -[ar] options are not compatible with other updates'
  
@@ -34,7 +44,7 @@
  	if [ -n "$PM_INDEX" ] &&
  	    [ -z "$LIST" -a -z "$LIST_ORIGINS" -a -z "$EXPUNGE" -a -z "$CLEAN_STALE" ]; then
  		if [ -z "$INDEXFILE" ]; then
-@@ -1039,7 +1030,7 @@ find_moved_port () {
+@@ -1039,7 +1031,7 @@ find_moved_port () {
  				return 0
  			else
  				reason=${moved##*|}
@@ -43,7 +53,7 @@
  					fail "The $sf port has been deleted: $reason"
  			fi ;;
  		${sf}\|*) moved_npd=${moved#*\|}	# New port directory
-@@ -1349,15 +1340,7 @@ if [ -n "$CLEAN_PACKAGES" ]; then
+@@ -1349,15 +1341,7 @@ if [ -n "$CLEAN_PACKAGES" ]; then
  fi	# [ -n "$CLEAN_PACKAGES" ]
  
  if [ -n "$CHECK_DEPENDS" ]; then
@@ -60,7 +70,7 @@
  	exit 0
  fi
  
-@@ -1449,6 +1432,24 @@ check_force_multi () {
+@@ -1449,6 +1433,24 @@ check_force_multi () {
  	fi
  }
  
@@ -85,7 +95,7 @@
  check_for_updates () {
  	# Global: num_updates
  	local nf iport originflavor flavor origin port_ver do_update skip
-@@ -1622,7 +1623,7 @@ pm_pkg_create () {
+@@ -1622,7 +1624,7 @@ pm_pkg_create () {
  				pm_cd_pd $portdir
  				latest_link=`pm_make -V LATEST_LINK`
  				cd ${1}/Latest
@@ -94,7 +104,7 @@
  			fi
  
  			cd ${1}/${portdir%/*}
-@@ -1994,8 +1995,8 @@ fi
+@@ -1994,8 +1996,8 @@ fi
  if [ -n "$CLEAN_STALE" ]; then
  	[ -z "$no_del_list" ] && export no_del_list=':'
  
@@ -105,7 +115,7 @@
  		iport="${file%/+REQUIRED_BY}" ; iport=${iport#$pdb/}
  
  		case "$no_del_list" in *:${iport}:*) continue ;; esac
-@@ -2148,24 +2149,6 @@ update_pm_nu () {
+@@ -2148,24 +2150,6 @@ update_pm_nu () {
  	PM_NEEDS_UPDATE="${PM_NEEDS_UPDATE}${1} "
  }
  
@@ -130,7 +140,7 @@
  update_build_l () {
  	local originflavor origin flavor iport
  
-@@ -2280,10 +2263,12 @@ make_dep_list () {
+@@ -2280,10 +2264,12 @@ make_dep_list () {
  
  	for dep_type in $*; do
  		case $dep_type in
@@ -145,7 +155,7 @@
  		*)
  			fail "make_dep_list: Unsupported option '$dep_type'"
  		esac
-@@ -2364,7 +2349,7 @@ dependency_check () {
+@@ -2364,7 +2350,7 @@ dependency_check () {
  				continue
  			case "$rundeps" in
  			*" ${dep} "*|*${dep}*)
@@ -154,7 +164,7 @@
  				rundep_list="$rundep_list $varname"
  				eval $varname=\"$portdir \$$varname\"
  				eval ${varname}_p=$dep
-@@ -2436,9 +2421,7 @@ dependency_check () {
+@@ -2436,9 +2422,7 @@ dependency_check () {
  				confl_p=`pkg query -g "%n-%v" $glob 2>/dev/null`
  				if [ -n "$confl_p" ]; then
  					confl_p=${confl_p%% *}
@@ -164,7 +174,7 @@
  					if [ "${d_port#$pd/}" = "$portdir" ]; then
  						echo -e "\n===>>> $origin seems to depend on $portdir"
  						echo '       which looks like a dependency loop'
-@@ -2797,7 +2780,12 @@ multiport () {
+@@ -2797,7 +2781,12 @@ multiport () {
  				numports=$(( $numports - 1 ))
  				continue
  			fi
@@ -178,7 +188,7 @@
  		esac
  
  		case "$PM_NEEDS_UPDATE" in
-@@ -2880,7 +2880,7 @@
+@@ -2892,7 +2881,7 @@ if [ "$$" -eq "$PM_PARENT_PID" -a -z "$SHOW_WORK" ]; t
  		NO_DEP_UPDATES=no_dep_updates ; build_l=''
  		export NO_DEP_UPDATES build_l
  
@@ -187,7 +197,7 @@
  	fi
  
  	if [ -n "$PM_BUILD_ONLY_LIST" ]; then
-@@ -3033,7 +3021,7 @@ if [ -z "$REPLACE_ORIGIN" ]; then
+@@ -3033,7 +3022,7 @@ if [ -z "$REPLACE_ORIGIN" ]; then
  			*)	echo '' ; no_valid_port ;;
  			esac
  		done ;;
@@ -196,7 +206,7 @@
  	esac
  
  	if [ -z "$portdir" -a -z "$upg_port" ]; then
-@@ -3129,12 +3117,13 @@ iport_from_pkgname () {
+@@ -3129,12 +3118,13 @@ iport_from_pkgname () {
  	dir=$(dir_part $1)
  	flavor=$(flavor_part $1)
  	pkgname=$(make -C "$pd/$dir" -V PKGNAME FLAVOR=$flavor) || return 1
@@ -212,7 +222,7 @@
  	# || fail "XXX Cannot find installed port '$portdir'"
  fi
  
-@@ -3383,7 +3372,7 @@ fetch_package () {
+@@ -3383,7 +3373,7 @@ fetch_package () {
  	fi
  
  	if [ -z "$PM_ALWAYS_FETCH" ]; then
@@ -221,7 +231,7 @@
  			pm_v "===>>> Package exists, skipping fetch"
  			return 0
  		else
-@@ -3391,7 +3380,7 @@ fetch_package () {
+@@ -3391,7 +3381,7 @@ fetch_package () {
  		fi
  	else
  		do_fetch=do_fetch_always_fetch
@@ -230,7 +240,7 @@
  	fi
  
  	if [ -n "$do_fetch" ]; then
-@@ -3403,10 +3392,10 @@ fetch_package () {
+@@ -3403,10 +3393,10 @@ fetch_package () {
  			fi
  		fi
  
@@ -245,7 +255,7 @@
  		fi
  	fi
  }
-@@ -3420,9 +3409,11 @@ fetch_package () {
+@@ -3420,9 +3410,11 @@ fetch_package () {
  				release=packages-${release%-RELEASE*}-release ;;
  		9\.0-CURRENT*)	release=packages-9-current ;;
  		10\.0-CURRENT*)	release=packages-10-current ;;
@@ -259,7 +269,7 @@
  				release=packages-${release}-release ;;
  		esac
  
-@@ -3439,15 +3430,17 @@ fetch_package () {
+@@ -3439,15 +3431,17 @@ fetch_package () {
  	echo "===>>> Checking package repository for latest available version"
  
  	if [ -n "$LOCAL_PACKAGEDIR" ]; then
@@ -282,7 +292,7 @@
  				latest_pv=${latest_pv##*/}
  			else
  				pm_v "===>>> No local package for ${new_port}, attempting fetch"
-@@ -3510,7 +3503,7 @@ fetch_package () {
+@@ -3510,7 +3504,7 @@ fetch_package () {
  		fi
  	else
  		latest_pv=${latest_pv#*href=\"}
@@ -291,7 +301,7 @@
  	fi
  
  notnewer () {
-@@ -3594,6 +3587,7 @@ if [ -z "$use_package" ]; then
+@@ -3594,6 +3588,7 @@ if [ -z "$use_package" ]; then
  	fi
  
  	pm_cd_pd $portdir
@@ -299,7 +309,7 @@
  	[ -z "$DONT_PRE_CLEAN" ] && { pm_make clean NOCLEANDEPENDS=ncd ||
  		fail 'make clean failed'; }
  
-@@ -3635,7 +3629,7 @@ pkg_flavor () {
+@@ -3635,7 +3630,7 @@ pkg_flavor () {
  	eval pm_make -DNO_DEPENDS stage $port_log_args || fail "make stage failed for $portdir"
  else
  	[ -z "$local_package" ] && {
@@ -308,7 +318,7 @@
  fi
  
  # Ignore if no old port exists, or -F
-@@ -3685,7 +3679,7 @@ if [ -n "$upg_port" -o -n "$ro_upg_port" ] && [ -z "$F
+@@ -3685,7 +3680,7 @@ if [ -n "$upg_port" -o -n "$ro_upg_port" ] && [ -z "$F
  	if [ -n "$upg_port" ]; then
  		case " $PM_PRESERVE_PORTS " in
  		*" $portdir "*)
@@ -317,7 +327,7 @@
  			eval preserve_port_files="\$${preserve_port}_files"
  			preserve_dir=`/usr/bin/mktemp -d ${TMPDIR}/d-${PM_PARENT_PID}-${preserve_port} 2>/dev/null` ||
  				fail "Could not create a temporary directory for $preserve_port in $TMPDIR"
-@@ -3762,14 +3756,14 @@ if [ -z "$use_package" ]; then
+@@ -3762,14 +3757,14 @@ if [ -z "$use_package" ]; then
  else
  	[ -n "$local_package" ] && ppd=${LOCAL_PACKAGEDIR}/All
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712210825.vBL8PtfL021440>