[84376] trunk/dports/emulators/nonpareil/Portfile

jmr at macports.org jmr at macports.org
Sat Sep 24 00:43:57 PDT 2011


Revision: 84376
          http://trac.macports.org/changeset/84376
Author:   jmr at macports.org
Date:     2011-09-24 00:43:53 -0700 (Sat, 24 Sep 2011)
Log Message:
-----------
nonpareil: don't use the bundled copy of scons, and apply osx.patch with all variants (#27071), simplify patching code

Modified Paths:
--------------
    trunk/dports/emulators/nonpareil/Portfile

Modified: trunk/dports/emulators/nonpareil/Portfile
===================================================================
--- trunk/dports/emulators/nonpareil/Portfile	2011-09-24 04:06:02 UTC (rev 84375)
+++ trunk/dports/emulators/nonpareil/Portfile	2011-09-24 07:43:53 UTC (rev 84376)
@@ -24,7 +24,6 @@
 homepage			http://nonpareil.brouhaha.com/
 master_sites		http://nonpareil.brouhaha.com/download:prog	\
 					macports:nonpareil:appbundles				\
-					http://pagesperso-orange.fr/kdntl/hp41:hpil	\
 					macports:nonpareil:voyager
 
 set patchversion	47826
@@ -55,28 +54,22 @@
 depends_build		port:bison								\
 					port:flex								\
 					port:pkgconfig							\
-					port:python25							\
 					port:scons
 
-patchfiles			patch-src-util.diff
+patchfiles			osx.patch								\
+					patch-src-util.diff
 
-worksrcdir			${name}-${version}
 use_parallel_build	yes
 use_configure		no
-build.cmd			"scons-local/scons.py"
+build.cmd			scons
 build.args			prefix=${prefix}
 build.target
 
-destroot.cmd		"scons-local/scons.py"
 destroot.args		prefix=${prefix} destdir=${destroot}
 
 
-post-extract {
-	system "
-		pushd ${workpath}/${name}-${version}/scons-local;
-			tar -xzf scons-local-0.96.90.tar.gz
-		popd
-	"
+post-patch {
+	reinplace s|@PREFIX@|${prefix}|g ${worksrcpath}/src/SConscript
 }
 
 platform macosx {
@@ -115,10 +108,8 @@
 							patch-src-voyager.diff
 
 	post-patch {
-		system "
-			pushd ${workpath}/${name}-${version};
-				cp -r -v ../voyager-r${patchversion}/* .
-			popd;
+		system -W ${worksrcpath} "
+			cp -R -v ../voyager-r${patchversion}/* .
 		"
 	}
 	post-destroot {
@@ -141,38 +132,21 @@
 variant hpil												\
 	description "Include HP-Interface-Loop emulation (experimental) See http://pagesperso-orange.fr/kdntl/hp41/nonpareil-patch-doc.html"	{
 
-	set hpil nonpareil-wholepatch-20090714.diff
+    global hpil
+	set hpil nonpareil-wholepatch-20090714.diff.bz2
 
-	distfiles-append		${hpil}.bz2:hpil	
+    # can't just add to patchfiles because this one needs -p1 but the rest -p0
+	distfiles-append		${hpil}:hpil
+	master_sites-append     http://pagesperso-orange.fr/kdntl/hp41:hpil
 
-	checksums-append		${hpil}.bz2 \
+	checksums-append		${hpil} \
 	                md5     2bc700c9cb49ec4e0fe0240ab5653688 \
                     sha1    e77648269e6e8cb04f6b4b275077ed8493b451ae \
                     rmd160  ec3bea3f6eda7d29a480a880a7875d4e9fc6c8cf
 	
 	patchfiles-delete		patch-src-util.diff
-	build.cmd				"scons"
-	destroot.cmd			"scons"
 
-	post-extract {
-		system "
-			bzip2 --verbose --decompress --stdout ${distpath}/nonpareil-wholepatch-20090714.diff.bz2 >${workpath}/nonpareil-wholepatch-20090714.diff;
-		"
-	}
-	pre-patch {
-		file copy ${filespath}/osx.patch ${filespath}/osx.patch.diff 
-		reinplace s|@PREFIX@|${prefix}|g ${filespath}/osx.patch.diff
-	}
 	post-patch {
-		system "
-			pushd ${workpath};
-				patch -p0 < ${workpath}/nonpareil-wholepatch-20090714.diff;
-				pushd ${worksrcdir};
-					patch -p0 < ${filespath}/osx.patch.diff;
-				popd;
-			popd;
-		"
-		file delete ${filespath}/osx.patch.diff
+		system -W ${worksrcpath} "bzcat ${distpath}/${hpil} | patch -p1"
 	}
 }
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110924/000dea70/attachment.html>


More information about the macports-changes mailing list