[137299] trunk/dports/devel

larryv at macports.org larryv at macports.org
Mon Jun 8 11:06:10 PDT 2015


Revision: 137299
          https://trac.macports.org/changeset/137299
Author:   larryv at macports.org
Date:     2015-06-08 11:06:10 -0700 (Mon, 08 Jun 2015)
Log Message:
-----------
autoconf, libtool: Use system M4 on Leopard and later

Still trying to minimize dependencies of Autotools and Libtool.

Specific to `libtool`:
- Avoid a weird, inadvertent dependency on the `m4` port if it's present
  at compile time.
- Bake the path to the system M4 into libtoolize to prevent it from
  picking up different executables depending on whether said `m4` port
  is installed or not. (Setting "M4" in the calling environment will
  still override libtoolize's default.)

Modified Paths:
--------------
    trunk/dports/devel/autoconf/Portfile
    trunk/dports/devel/libtool/Portfile

Added Paths:
-----------
    trunk/dports/devel/libtool/files/
    trunk/dports/devel/libtool/files/hardcode-m4.patch

Modified: trunk/dports/devel/autoconf/Portfile
===================================================================
--- trunk/dports/devel/autoconf/Portfile	2015-06-08 18:06:07 UTC (rev 137298)
+++ trunk/dports/devel/autoconf/Portfile	2015-06-08 18:06:10 UTC (rev 137299)
@@ -6,7 +6,7 @@
 name                autoconf
 epoch               1
 version             2.69
-revision            4
+revision            5
 categories          devel
 # the license is GPL-3+ with an exception:
 # http://www.gnu.org/licenses/autoconf-exception.html
@@ -27,8 +27,8 @@
                     package can use, in the form of m4 macro calls.
 homepage            http://www.gnu.org/software/autoconf/
 
+depends_lib         port:gettext
 installs_libs       no
-depends_lib         port:gettext port:m4
 
 master_sites        gnu
 use_xz              yes
@@ -45,6 +45,14 @@
 patchfiles-append \
         0001-tests-avoid-spurious-test-failure-with-libtool-2.4.3.patch
 
+# The README prescribes GNU M4 1.4.6 or later, which Leopard and later
+# have. Tiger only provides 1.4.2.
+if {${os.platform} eq "darwin" && ${os.major} >= 9} {
+    configure.env       M4=/usr/bin/m4
+} else {
+    depends_lib-append  port:m4
+}
+
 # It should be safe to use the system Perl, since the scripts only use
 # core modules. The README prescribes 5.6 or later, and Tiger has 5.8.6.
 configure.perl      /usr/bin/perl

Modified: trunk/dports/devel/libtool/Portfile
===================================================================
--- trunk/dports/devel/libtool/Portfile	2015-06-08 18:06:07 UTC (rev 137298)
+++ trunk/dports/devel/libtool/Portfile	2015-06-08 18:06:10 UTC (rev 137299)
@@ -5,6 +5,7 @@
 
 name                libtool
 version             2.4.6
+revision            1
 categories          devel sysutils
 platforms           darwin freebsd
 # Scripts are GPL-2+, libltdl is LGPL-2+, but all parts that tend to be
@@ -23,12 +24,19 @@
 checksums           rmd160  6f4b4c3e89426652da3acffa707f71bb4ccee26a \
                     sha256  e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3
 
+# For consistency, always use the M4 detected by configure.
+patchfiles          hardcode-m4.patch
+post-patch {
+    # Stop build from trying to regenerate this after patching.
+    touch ${worksrcpath}/doc/libtoolize.1
+}
+
 # Leopard and later provide GNU M4 1.4.6, which works fine. Tiger's
 # 1.4.2 does not (#47545).
 #   - http://lists.gnu.org/archive/html/libtool/2014-12/msg00002.html
 #   - http://lists.gnu.org/archive/html/libtool/2015-01/msg00004.html
 if {${os.platform} eq "darwin" && ${os.major} >= 9} {
-    depends_lib     bin:gm4:m4
+    configure.env   M4=/usr/bin/m4
 } else {
     depends_lib     port:m4
 }

Added: trunk/dports/devel/libtool/files/hardcode-m4.patch
===================================================================
--- trunk/dports/devel/libtool/files/hardcode-m4.patch	                        (rev 0)
+++ trunk/dports/devel/libtool/files/hardcode-m4.patch	2015-06-08 18:06:10 UTC (rev 137299)
@@ -0,0 +1,54 @@
+Index: Makefile.in
+===================================================================
+--- Makefile.in.orig
++++ Makefile.in
+@@ -694,6 +694,7 @@ configure_edit = $(bootstrap_edit) \
+ 	-e 's|@LN_S\@|$(LN_S)|g' \
+ 	-e "s|@ltdl_ac_aux_dir\@|$(ltdl_ac_aux_dir)|g" \
+ 	-e 's|@macro_dir\@|$(macro_dir)|g' \
++	-e 's|@M4\@|$(M4)|g' \
+ 	-e 's|@pkgauxdir\@|$(pkgauxdir)|g' \
+ 	-e 's|@pkgaux_files\@|$(pkgaux_scripts) $(pkgaux_data_files)|g' \
+ 	-e 's|@pkgaux_install_files\@|$(pkgaux_install_files)|g' \
+Index: configure
+===================================================================
+--- configure.orig
++++ configure
+@@ -29875,6 +29875,7 @@ FGREP='`$ECHO "$FGREP" | $SED "$delay_si
+ LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+ NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+ LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
++M4='`$ECHO "$M4" | $SED "$delay_single_quote_subst"`'
+ max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -30305,6 +30306,7 @@ FGREP \
+ LD \
+ NM \
+ LN_S \
++M4 \
+ lt_SP2NL \
+ lt_NL2SP \
+ reload_flag \
+@@ -31531,6 +31533,9 @@ NM=$lt_NM
+ # Whether we need soft or hard links.
+ LN_S=$lt_LN_S
+ 
++# GNU M4.
++M4=$lt_M4$
++
+ # What is the maximum length of a command?
+ max_cmd_len=$max_cmd_len
+ 
+Index: libtoolize.in
+===================================================================
+--- libtoolize.in.orig
++++ libtoolize.in
+@@ -44,6 +44,7 @@
+ : ${FGREP="@FGREP@"}
+ : ${GREP="@GREP@"}
+ : ${LN_S="@LN_S@"}
++: ${M4="@M4@"}
+ : ${SED="@SED@"}
+ 
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150608/b98e2d81/attachment.html>


More information about the macports-changes mailing list