[40719] trunk/dports/sysutils/rpm

afb at macports.org afb at macports.org
Sun Oct 12 03:32:04 PDT 2008


Revision: 40719
          http://trac.macports.org/changeset/40719
Author:   afb at macports.org
Date:     2008-10-12 03:32:03 -0700 (Sun, 12 Oct 2008)
Log Message:
-----------
fix nobuildrootpath script (#16820)

Modified Paths:
--------------
    trunk/dports/sysutils/rpm/Portfile

Added Paths:
-----------
    trunk/dports/sysutils/rpm/files/patch-scripts-brp-nobuildrootpath

Modified: trunk/dports/sysutils/rpm/Portfile
===================================================================
--- trunk/dports/sysutils/rpm/Portfile	2008-10-12 09:10:33 UTC (rev 40718)
+++ trunk/dports/sysutils/rpm/Portfile	2008-10-12 10:32:03 UTC (rev 40719)
@@ -4,7 +4,7 @@
 
 name			rpm
 version			4.4.9
-revision                6
+revision                7
 platforms		darwin freebsd linux
 categories		sysutils archivers
 maintainers		n3npq at mac.com
@@ -52,7 +52,8 @@
 			patch-rpmdav.c \
 			patch-rpmsq.c \
 			patch-rpmevr.h \
-			patch-parseBuildInstallClean.c
+			patch-parseBuildInstallClean.c \
+			patch-scripts-brp-nobuildrootpath
 
 post-patch {
 	# use external popt library

Added: trunk/dports/sysutils/rpm/files/patch-scripts-brp-nobuildrootpath
===================================================================
--- trunk/dports/sysutils/rpm/files/patch-scripts-brp-nobuildrootpath	                        (rev 0)
+++ trunk/dports/sysutils/rpm/files/patch-scripts-brp-nobuildrootpath	2008-10-12 10:32:03 UTC (rev 40719)
@@ -0,0 +1,40 @@
+Index: scripts/brp-nobuildrootpath
+===================================================================
+RCS file: /v/rpm/cvs/rpm/scripts/brp-nobuildrootpath,v
+retrieving revision 1.2
+retrieving revision 1.4
+diff -u -r1.2 -r1.4
+--- scripts/brp-nobuildrootpath	25 May 2007 18:34:16 -0000	1.2
++++ scripts/brp-nobuildrootpath	29 Jul 2008 20:49:30 -0000	1.4
+@@ -1,17 +1,21 @@
+ #!/bin/sh
+-
++#
++# A fixed version of this file that doesn't bomb out
++# when failing to match. Also removed the case statement
++# as it's simpler to just let 'find' do everything in one pass.
++#
++#
+ # If using normal root, avoid changing anything.
+ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
+     exit 0
+ fi
+-
++#
+ # Remove occurences of $RPM_BUILD_ROOT from *.la and *.pc files.
+-for f in `find $RPM_BUILD_ROOT -type f` ; do
+-    case "$f" in
+-    *.la|*.pc)
+-	grep "${RPM_BUILD_ROOT}\/" "$f" 2>&1 > /dev/null && \
+-	sed -e "s|${RPM_BUILD_ROOT}/|/|g" "$f" 2>/dev/null > "$f.out" && \
+-	mv "$f.out" "$f"
+-	;;
+-    esac
++#
++for f in `find $RPM_BUILD_ROOT -type f -name \*.pc -o -name \*.la` ; do
++    # -c to count the occurances, only proceed if >= 1
++    if [ "`grep -c "${RPM_BUILD_ROOT}\/" "$f"`" -ge 1 ]; then
++        sed -e "s|${RPM_BUILD_ROOT}/|/|g" "$f" > "$f.out" && \
++        mv -f "$f.out" "$f"
++    fi
+ done
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20081012/76664f9a/attachment.html 


More information about the macports-changes mailing list