[73807] trunk/dports/math/lp_solve

ryandesign at macports.org ryandesign at macports.org
Thu Nov 25 13:35:11 PST 2010


Revision: 73807
          http://trac.macports.org/changeset/73807
Author:   ryandesign at macports.org
Date:     2010-11-25 13:35:07 -0800 (Thu, 25 Nov 2010)
Log Message:
-----------
lp_solve: add universal variant; see #27448

Modified Paths:
--------------
    trunk/dports/math/lp_solve/Portfile
    trunk/dports/math/lp_solve/files/Makefile

Modified: trunk/dports/math/lp_solve/Portfile
===================================================================
--- trunk/dports/math/lp_solve/Portfile	2010-11-25 21:07:42 UTC (rev 73806)
+++ trunk/dports/math/lp_solve/Portfile	2010-11-25 21:35:07 UTC (rev 73807)
@@ -2,6 +2,7 @@
 # $Id$
 
 PortSystem              1.0
+PortGroup               muniversal 1.0
 
 name                    lp_solve
 version                 5.5.2.0
@@ -36,27 +37,16 @@
 
 use_configure           no
 
-build.args              CC="${configure.cc} ${configure.cc_archflags}" \
-                        PREFIX="${prefix}"
+build.args              PREFIX="${prefix}"
+destroot.args           PREFIX="${prefix}"
 
-destroot {
-    switch ${configure.build_arch} {
-        x86_64 -
-        ppc64 {
-            set bits 64
-        }
-        i386 -
-        ppc {
-            set bits 32
-        }
+if {[variant_isset universal]} {
+    set merger_must_run_binaries yes
+    foreach arch ${configure.universal_archs} {
+        lappend merger_build_args(${arch}) CC='${configure.cc} -arch ${arch}'
     }
-    xinstall -m 755 -W ${worksrcpath}/lpsolve55/bin/osx${bits} \
-        liblpsolve55.a liblpsolve55.dylib ${destroot}${prefix}/lib
-    xinstall -m 755 -W ${worksrcpath}/lp_solve/bin/osx${bits} \
-        lp_solve ${destroot}${prefix}/bin
-    xinstall -m 755 -d ${destroot}${prefix}/include/lpsolve
-    eval xinstall -m 644 [glob ${worksrcpath}/*.h] \
-        ${destroot}${prefix}/include/lpsolve/
+} else {
+    build.args-append CC='${configure.cc} ${configure.cc_archflags}'
 }
 
 livecheck.type          regex

Modified: trunk/dports/math/lp_solve/files/Makefile
===================================================================
--- trunk/dports/math/lp_solve/files/Makefile	2010-11-25 21:07:42 UTC (rev 73806)
+++ trunk/dports/math/lp_solve/files/Makefile	2010-11-25 21:35:07 UTC (rev 73807)
@@ -2,9 +2,17 @@
 
 SUBDIRS = lpsolve55 lp_solve
 
-.PHONY: all $(SUBDIRS)
+.PHONY: all install $(SUBDIRS)
 
 all: $(SUBDIRS)
 
 $(SUBDIRS):
 	cd "$@" && c="$(CC)" prefix="$(PREFIX)" sh -x ./ccc.osx
+
+install:
+	install -m 755 -d $(DESTDIR)$(PREFIX)/bin
+	install -m 755 lpsolve55/bin/*/liblpsolve55.a lpsolve55/bin/*/liblpsolve55.dylib $(DESTDIR)$(PREFIX)/lib/
+	install -m 755 -d $(DESTDIR)$(PREFIX)/lib
+	install -m 755 lp_solve/bin/*/lp_solve $(DESTDIR)$(PREFIX)/bin/
+	install -m 755 -d $(DESTDIR)$(PREFIX)/include/lpsolve
+	install -m 644 *.h $(DESTDIR)$(PREFIX)/include/lpsolve/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101125/128c64d9/attachment.html>


More information about the macports-changes mailing list