[145156] trunk/dports/archivers/p7zip/Portfile

khindenburg at macports.org khindenburg at macports.org
Tue Jan 26 19:37:12 PST 2016


Revision: 145156
          https://trac.macports.org/changeset/145156
Author:   khindenburg at macports.org
Date:     2016-01-26 19:37:11 -0800 (Tue, 26 Jan 2016)
Log Message:
-----------
p7zip: attempt to use the right compiler on multiple architecture #50146

Modified Paths:
--------------
    trunk/dports/archivers/p7zip/Portfile

Modified: trunk/dports/archivers/p7zip/Portfile
===================================================================
--- trunk/dports/archivers/p7zip/Portfile	2016-01-27 03:09:24 UTC (rev 145155)
+++ trunk/dports/archivers/p7zip/Portfile	2016-01-27 03:37:11 UTC (rev 145156)
@@ -36,16 +36,28 @@
 }
 
 configure {
-    copy -force ${worksrcpath}/makefile.macosx_llvm_64bits ${worksrcpath}/makefile.machine
-    # this also corrects a typo in the makefile ('XX' rather than 'CXX')
-    reinplace "s|^XX=/usr/bin/llvm-g++|CXX=${configure.cxx}|" \
+    if {${build_arch} eq "x86_64"} {
+        copy -force ${worksrcpath}/makefile.macosx_llvm_64bits ${worksrcpath}/makefile.machine
+        # this also corrects a typo in the makefile ('XX' rather than 'CXX')
+        reinplace "s|^XX=/usr/bin/llvm-g++|CXX=${configure.cxx}|g" \
+             ${worksrcpath}/makefile.machine
+        reinplace "s|^CC=/usr/bin/llvm-gcc|CC=${configure.cc}|g" \
+             ${worksrcpath}/makefile.machine
+    } else {
+        if {${build_arch} eq "ppc"} {
+            copy -force ${worksrcpath}/makefile.macosx_gcc_32bits_ppc ${worksrcpath}/makefile.machine
+        } elseif {${build_arch} eq "ppc64"} {
+            copy -force ${worksrcpath}/makefile.macosx_gcc_64bits ${worksrcpath}/makefile.machine
+        } else {
+            copy -force ${worksrcpath}/makefile.macosx_gcc_32bits_asm ${worksrcpath}/makefile.machine
+        }
+        reinplace "s|^CXX=c++|CXX=${configure.cxx}|g" \
             ${worksrcpath}/makefile.machine
-    reinplace "s|^CC=/usr/bin/llvm-gcc|CC=${configure.cc}|" \
+        reinplace "s|^CC=cc|CC=${configure.cc}|g" \
             ${worksrcpath}/makefile.machine
-    reinplace "s|-m64||g" \
-            ${worksrcpath}/makefile.machine
-    reinplace "s|\$(LOCAL_FLAGS)|[get_canonical_archflags] \$(LOCAL_FLAGS)|" \
-            ${worksrcpath}/makefile.machine
+    }
+    reinplace "s|\$(LOCAL_FLAGS)|[get_canonical_archflags] \$(LOCAL_FLAGS)|g" \
+        ${worksrcpath}/makefile.machine
 }
 
 # build 7za, 7z and 7zr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160126/398655d5/attachment.html>


More information about the macports-changes mailing list