[138020] trunk/dports/devel/mpfr/Portfile

larryv at macports.org larryv at macports.org
Thu Jun 25 18:51:13 PDT 2015


Revision: 138020
          https://trac.macports.org/changeset/138020
Author:   larryv at macports.org
Date:     2015-06-25 18:51:13 -0700 (Thu, 25 Jun 2015)
Log Message:
-----------
mpfr: Generate `patchfiles` from `checksums`

New upstream patches need only be added to `checksums`, and the rest
will work itself out.

Modified Paths:
--------------
    trunk/dports/devel/mpfr/Portfile

Modified: trunk/dports/devel/mpfr/Portfile
===================================================================
--- trunk/dports/devel/mpfr/Portfile	2015-06-26 01:51:11 UTC (rev 138019)
+++ trunk/dports/devel/mpfr/Portfile	2015-06-26 01:51:13 UTC (rev 138020)
@@ -10,9 +10,8 @@
 PortGroup           compiler_blacklist_versions 1.0
 
 name                mpfr
+# The actual version is generated below, after patchfiles is defined.
 set base_version    3.1.2
-set patch_level     10
-version             ${base_version}-p${patch_level}
 revision            3
 categories          devel math
 platforms           darwin
@@ -37,15 +36,8 @@
 use_xz              yes
 checksums           ${distname}${extract.suffix} \
                         rmd160  902870a4c8bea3067b49e7a859dad0cf3fdffd06 \
-                        sha256  399d0f47ef6608cc01d29ed1b99c7faff36d9994c45f36f41ba250147100453b
-
-# Don't link with "-flat_namespace -undefined suppress" on Yosemite and later.
-patchfiles          yosemite-libtool.patch
-
-for {set i 1} {${i} <= ${patch_level}} {incr i} {
-    patchfiles-append   patch[format %02d ${i}]
-}
-checksums-append    patch01 \
+                        sha256  399d0f47ef6608cc01d29ed1b99c7faff36d9994c45f36f41ba250147100453b \
+                    patch01 \
                         rmd160  c6907261f3faa467a9d9cecdba6f9917db3b7de0 \
                         sha256  38c6bcfd42c0fc5abe8ec3a43381508ed64c0c2fc0feb2403e5a120f56cd0821 \
                     patch02 \
@@ -80,7 +72,18 @@
 dist_subdir         ${name}/${base_version}
 
 patch.args          -p1
+patchfiles          {*}[lsearch -all -inline ${checksums} {patch[0-9][0-9]}]
 
+set patch_level [llength ${patchfiles}]
+if {${patch_level} > 0} {
+    version         ${base_version}-p${patch_level}
+} else {
+    version         ${base_version}
+}
+
+# Don't link with "-flat_namespace -undefined suppress" on Yosemite and later.
+patchfiles-append   yosemite-libtool.patch
+
 # Since patch08 changes configure.ac, we need to do this before the
 # build tries to.
 use_autoreconf      yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150625/2cfe7260/attachment.html>


More information about the macports-changes mailing list