[78336] trunk/dports/lang/lua50

jmr at macports.org jmr at macports.org
Tue May 3 18:38:42 PDT 2011


Revision: 78336
          http://trac.macports.org/changeset/78336
Author:   jmr at macports.org
Date:     2011-05-03 18:38:42 -0700 (Tue, 03 May 2011)
Log Message:
-----------
lua50: fix build_arch and universal support (#24298), use right compiler

Modified Paths:
--------------
    trunk/dports/lang/lua50/Portfile
    trunk/dports/lang/lua50/files/patch-Makefile
    trunk/dports/lang/lua50/files/patch-config

Modified: trunk/dports/lang/lua50/Portfile
===================================================================
--- trunk/dports/lang/lua50/Portfile	2011-05-04 00:49:28 UTC (rev 78335)
+++ trunk/dports/lang/lua50/Portfile	2011-05-04 01:38:42 UTC (rev 78336)
@@ -24,6 +24,14 @@
 post-patch {
 	reinplace s|@PREFIX@|${prefix}| ${worksrcpath}/config
 	reinplace s|@DESTROOT@|${destroot}| ${worksrcpath}/config
+	reinplace s|@CC@|${configure.cc}| ${worksrcpath}/config
+	if {[variant_isset universal]} {
+	    reinplace "s|@CFLAGS@|${configure.cflags} ${configure.universal_cflags}|" ${worksrcpath}/config
+	    reinplace "s|@LDFLAGS@|${configure.universal_ldflags}|" ${worksrcpath}/config ${worksrcpath}/Makefile
+	} else {
+	    reinplace "s|@CFLAGS@|${configure.cflags} ${configure.cc_archflags}|" ${worksrcpath}/config
+	    reinplace "s|@LDFLAGS@|${configure.ld_archflags}|" ${worksrcpath}/config ${worksrcpath}/Makefile
+	}
 }
 
 build.target	all dylib dylibbin

Modified: trunk/dports/lang/lua50/files/patch-Makefile
===================================================================
--- trunk/dports/lang/lua50/files/patch-Makefile	2011-05-04 00:49:28 UTC (rev 78335)
+++ trunk/dports/lang/lua50/files/patch-Makefile	2011-05-04 01:38:42 UTC (rev 78336)
@@ -35,8 +35,8 @@
  
 +# shared libraries (for Darwin)
 +dylib:
-+	$(CC) -dynamiclib -flat_namespace -undefined suppress -o lib/liblua.$V.$@ src/*.o -install_name $(INSTALL_LIB)/liblua.$V.$@ -compatibility_version $V -current_version $V
-+	$(CC) -dynamiclib -flat_namespace -undefined suppress -o lib/liblualib.$V.$@ src/lib/*.o -install_name $(INSTALL_LIB)/liblualib.$V.$@ -compatibility_version $V -current_version $V
++	$(CC) @LDFLAGS@ -dynamiclib -flat_namespace -undefined suppress -o lib/liblua.$V.$@ src/*.o -install_name $(INSTALL_LIB)/liblua.$V.$@ -compatibility_version $V -current_version $V
++	$(CC) @LDFLAGS@ -dynamiclib -flat_namespace -undefined suppress -o lib/liblualib.$V.$@ src/lib/*.o -install_name $(INSTALL_LIB)/liblualib.$V.$@ -compatibility_version $V -current_version $V
 +	cd lib; ln -fs liblua.$V.$@ liblua.$@; ln -fs liblualib.$V.$@ liblualib.$@; ln -fs liblua.$V.$@ liblua.$(V:%.0=%).$@; ln -fs liblualib.$V.$@ liblualib.$(V:%.0=%).$@
 +
  # binaries using shared libraries

Modified: trunk/dports/lang/lua50/files/patch-config
===================================================================
--- trunk/dports/lang/lua50/files/patch-config	2011-05-04 00:49:28 UTC (rev 78335)
+++ trunk/dports/lang/lua50/files/patch-config	2011-05-04 01:38:42 UTC (rev 78336)
@@ -1,5 +1,5 @@
---- config.orig	Wed Nov  3 09:54:19 2004
-+++ config	Wed Nov  3 10:31:25 2004
+--- config.orig	2003-04-12 00:00:41.000000000 +1000
++++ config	2011-05-04 07:24:39.000000000 +1000
 @@ -25,8 +25,8 @@
  # interface (e.g., Linux, Solaris, IRIX, BSD, AIX, HPUX, and probably others),
  # uncomment the next two lines.
@@ -29,7 +29,7 @@
  
  # If you want to customize the stand-alone Lua interpreter, uncomment and
  # edit the following two lines; also edit etc/saconfig.c to suit your needs.
-@@ -100,8 +100,9 @@
+@@ -100,15 +100,16 @@
  # to add -lreadline (and perhaps also -lhistory and -lcurses or -lncurses)
  # to EXTRA_LIBS.
  #
@@ -41,6 +41,28 @@
  
  # ------------------------------------------------------------------ C compiler
  
+ # You need an ANSI C compiler. gcc is a popular one. We do not use -ansi in
+ # WARN because it disables POSIX features used in the libraries.
+ #
+-CC= gcc
++CC= @CC@
+ WARN= -Wall
+ 
+ # ------------------------------------------------------------------ C options
+@@ -119,11 +120,11 @@
+ # debug information. If you only want the shared libraries, you may want to
+ # add -fPIC to MYCFLAGS.
+ #
+-MYCFLAGS= -O2
++MYCFLAGS= @CFLAGS@
+ #MYCFLAGS= -O3 -fomit-frame-pointer # -fPIC
+ 
+ # Write here any options you may need for your C linker.
+-#MYLDFLAGS=
++MYLDFLAGS= @LDFLAGS@
+ 
+ # ------------------------------------------------------------------ librarian
+ 
 @@ -148,19 +149,20 @@
  
  # Locations for "make install". You may need to be root do "make install".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110503/1de4ce98/attachment.html>


More information about the macports-changes mailing list