[115519] trunk/dports/science/libANN

ryandesign at macports.org ryandesign at macports.org
Fri Jan 3 16:05:38 PST 2014


Revision: 115519
          https://trac.macports.org/changeset/115519
Author:   ryandesign at macports.org
Date:     2014-01-03 16:05:38 -0800 (Fri, 03 Jan 2014)
Log Message:
-----------
libANN: ensure we're UsingTheRightCompiler and -arch flags and add universal variant; rewrite master_sites to avoid double slash

Modified Paths:
--------------
    trunk/dports/science/libANN/Portfile

Added Paths:
-----------
    trunk/dports/science/libANN/files/patch-Make-config.diff

Modified: trunk/dports/science/libANN/Portfile
===================================================================
--- trunk/dports/science/libANN/Portfile	2014-01-03 23:49:57 UTC (rev 115518)
+++ trunk/dports/science/libANN/Portfile	2014-01-04 00:05:38 UTC (rev 115519)
@@ -17,16 +17,26 @@
 license             LGPL
 
 homepage            http://www.cs.umd.edu/~mount/ANN/
-master_sites        ${homepage}/Files/${version}/
+master_sites        ${homepage}Files/${version}/
 distname            ann_${version}
 
 checksums           md5     7ffaacc7ea79ca39d4958a6378071365 \
                     sha1    27ec04d55e244380ade3706a9b71c3d631e2ff1a \
                     rmd160  1b76b2f5c25c83c6d52a1a1e19e5b058ccf929d0
 
-patchfiles          patch-ann2fig-ann2fig.cpp.diff
+patchfiles          patch-Make-config.diff \
+                    patch-ann2fig-ann2fig.cpp.diff
 
+post-patch {
+    # Yes, libANN gives CFLAGS to the C++ compiler.
+    reinplace "s|@CFLAGS@|${configure.cxxflags}|g" ${worksrcpath}/Make-config
+    reinplace "s|@CXX@|${configure.cxx} [get_canonical_archflags cxx]|g" ${worksrcpath}/Make-config
+}
+
 use_configure       no
+
+variant universal {}
+
 build.target        macosx-g++
 
 destroot {

Added: trunk/dports/science/libANN/files/patch-Make-config.diff
===================================================================
--- trunk/dports/science/libANN/files/patch-Make-config.diff	                        (rev 0)
+++ trunk/dports/science/libANN/files/patch-Make-config.diff	2014-01-04 00:05:38 UTC (rev 115519)
@@ -0,0 +1,13 @@
+--- Make-config.orig	2010-01-27 22:40:01.000000000 -0600
++++ Make-config	2014-01-03 18:00:33.000000000 -0600
+@@ -80,8 +80,8 @@
+ macosx-g++:
+ 	$(MAKE) targets \
+ 	"ANNLIB = libANN.a" \
+-	"C++ = g++" \
+-	"CFLAGS = -O3" \
++	"C++ = @CXX@" \
++	"CFLAGS = @CFLAGS@" \
+ 	"MAKELIB = libtool -static -o " \
+ 	"RANLIB = true"
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140103/9bda920d/attachment.html>


More information about the macports-changes mailing list