[89693] trunk/dports/lang/ruby19

jberry at macports.org jberry at macports.org
Mon Feb 6 15:49:47 PST 2012


Revision: 89693
          http://trac.macports.org/changeset/89693
Author:   jberry at macports.org
Date:     2012-02-06 15:49:47 -0800 (Mon, 06 Feb 2012)
Log Message:
-----------
Fix build of ruby1.9 where build_arch flags are explicitly specified.
(building with build_arch x86_64 under 10.5 as one example).
The newly applied patches have been reported upstream:
	https://bugs.ruby-lang.org/issues/5975

Modified Paths:
--------------
    trunk/dports/lang/ruby19/Portfile

Added Paths:
-----------
    trunk/dports/lang/ruby19/files/patch-configure.diff
    trunk/dports/lang/ruby19/files/patch-configure.in.diff

Modified: trunk/dports/lang/ruby19/Portfile
===================================================================
--- trunk/dports/lang/ruby19/Portfile	2012-02-06 22:28:02 UTC (rev 89692)
+++ trunk/dports/lang/ruby19/Portfile	2012-02-06 23:49:47 UTC (rev 89693)
@@ -44,7 +44,11 @@
 # https://github.com/rubygems/rubygems/pull/196
 # fix 'Invalid gemspec in [... json-1.6.1.gemspec]: invalid date format in
 #      specification: "2011-09-18 00:00:00.000000000Z"'
-patchfiles			patch-lib-rubygems-specification.rb.diff
+# fix bug in configure(.in) handling of ARCH_FLAG
+#      https://bugs.ruby-lang.org/issues/5975
+patchfiles			patch-lib-rubygems-specification.rb.diff \
+					patch-configure.diff \
+					patch-configure.in.diff
 
 # ruby-1.9.3 supports Xcode-4.2 clang and gcc-4.2.
 # ruby built with llvm-gcc will be broken.
@@ -65,8 +69,13 @@
 
 # Ignore minor version for archdir, like i686-darwin9.
 # Port "ruby" does the same.
-configure.env		UNAME_RELEASE=${os.major}
+configure.env-append UNAME_RELEASE=${os.major}
 
+# Add the architecture flag as required
+if {[info exists build_arch] && ${build_arch} != ""} {
+	configure.args-append "--with-arch=${build_arch}"
+}
+
 post-destroot {
 	foreach type {site vendor} {
 			set libdir ${destroot}${prefix}/lib/ruby1.9/${type}_ruby/1.9.1

Added: trunk/dports/lang/ruby19/files/patch-configure.diff
===================================================================
--- trunk/dports/lang/ruby19/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/lang/ruby19/files/patch-configure.diff	2012-02-06 23:49:47 UTC (rev 89693)
@@ -0,0 +1,15 @@
+--- configure.orig	2012-02-06 15:05:54.000000000 -0800
++++ configure	2012-02-06 15:06:51.000000000 -0800
+@@ -17094,9 +17094,9 @@
+ fi
+ if test "${ARCH_FLAG}"; then
+     archflagpat=`eval echo '"'"${ARCH_FLAG}"'"' | sed 's/[][|.*]/\\&/g'`
+-    CFLAGS=`echo "$CFLAGS" | sed "s|$archflagpat"'|$(ARCH_FLAG)|'`
+-    CXXFLAGS=`echo "$CXXFLAGS" | sed "s|$archflagpat"'|$(ARCH_FLAG)|'`
+-    LDFLAGS=`echo "$LDFLAGS" | sed "s|$archflagpat"'|$(ARCH_FLAG)|'`
++    CFLAGS=`echo "$CFLAGS" | sed "s|$archflagpat"'| $(ARCH_FLAG)|'`
++    CXXFLAGS=`echo "$CXXFLAGS" | sed "s|$archflagpat"'| $(ARCH_FLAG)|'`
++    LDFLAGS=`echo "$LDFLAGS" | sed "s|$archflagpat"'| $(ARCH_FLAG)|'`
+ fi
+ warnflags="$rb_cv_warnflags"
+ cflags="$orig_cflags "'${optflags} ${debugflags} ${warnflags}'

Added: trunk/dports/lang/ruby19/files/patch-configure.in.diff
===================================================================
--- trunk/dports/lang/ruby19/files/patch-configure.in.diff	                        (rev 0)
+++ trunk/dports/lang/ruby19/files/patch-configure.in.diff	2012-02-06 23:49:47 UTC (rev 89693)
@@ -0,0 +1,15 @@
+--- configure.in.orig	2012-02-06 15:10:15.000000000 -0800
++++ configure.in	2012-02-06 15:10:10.000000000 -0800
+@@ -2684,9 +2684,9 @@
+ fi
+ if test "${ARCH_FLAG}"; then
+     archflagpat=`eval echo '"'"${ARCH_FLAG}"'"' | sed 's/[[][|.*]]/\\&/g'`
+-    CFLAGS=`echo "$CFLAGS" | sed "s|$archflagpat"'|$(ARCH_FLAG)|'`
+-    CXXFLAGS=`echo "$CXXFLAGS" | sed "s|$archflagpat"'|$(ARCH_FLAG)|'`
+-    LDFLAGS=`echo "$LDFLAGS" | sed "s|$archflagpat"'|$(ARCH_FLAG)|'`
++    CFLAGS=`echo "$CFLAGS" | sed "s|$archflagpat"'| $(ARCH_FLAG)|'`
++    CXXFLAGS=`echo "$CXXFLAGS" | sed "s|$archflagpat"'| $(ARCH_FLAG)|'`
++    LDFLAGS=`echo "$LDFLAGS" | sed "s|$archflagpat"'| $(ARCH_FLAG)|'`
+ fi
+ warnflags="$rb_cv_warnflags"
+ AC_SUBST(cppflags, [])dnl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120206/ac91c555/attachment-0001.html>


More information about the macports-changes mailing list