[115240] trunk/dports/math/sgd

hum at macports.org hum at macports.org
Sun Dec 29 17:20:58 PST 2013


Revision: 115240
          https://trac.macports.org/changeset/115240
Author:   hum at macports.org
Date:     2013-12-29 17:20:58 -0800 (Sun, 29 Dec 2013)
Log Message:
-----------
sgd: add patch to build on Mavericks.

Modified Paths:
--------------
    trunk/dports/math/sgd/Portfile

Added Paths:
-----------
    trunk/dports/math/sgd/files/
    trunk/dports/math/sgd/files/patch-c++11.diff

Modified: trunk/dports/math/sgd/Portfile
===================================================================
--- trunk/dports/math/sgd/Portfile	2013-12-29 23:22:24 UTC (rev 115239)
+++ trunk/dports/math/sgd/Portfile	2013-12-30 01:20:58 UTC (rev 115240)
@@ -24,15 +24,18 @@
 master_sites        http://leon.bottou.org/_media/projects/
 checksums           rmd160  ee438a984a67b36944d4dba3fa2de2cd017d665f \
                     sha256  f591e8352bfc47f280887a23cac521123814556abd510b65e4ba39218275a112
-
+ 
 depends_lib         port:zlib
 
+patchfiles          patch-c++11.diff
+
 use_configure       no
 
 variant universal {}
 
 build.args          CXX=${configure.cxx} \
-                    CXXFLAGS="${configure.cxxflags} -I../lib -L${prefix}/lib [get_canonical_archflags cxx]"
+                    CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx] -I../lib" \
+                    LIBS="-L${prefix}/lib -lz -lm"
 
 destroot {
     # install executables.

Added: trunk/dports/math/sgd/files/patch-c++11.diff
===================================================================
--- trunk/dports/math/sgd/files/patch-c++11.diff	                        (rev 0)
+++ trunk/dports/math/sgd/files/patch-c++11.diff	2013-12-30 01:20:58 UTC (rev 115240)
@@ -0,0 +1,42 @@
+--- crf/crfasgd.cpp.orig	2012-09-14 23:31:35.000000000 +0900
++++ crf/crfasgd.cpp	2013-12-30 10:07:41.000000000 +0900
+@@ -40,7 +40,10 @@
+ 
+ using namespace std;
+ 
+-#if defined(__GXX_EXPERIMENTAL_CXX0X__)
++#if __cplusplus >= 201103L || defined(_LIBCPP_VERSION)
++# include <unordered_map>
++# define hash_map unordered_map
++#elif defined(__GXX_EXPERIMENTAL_CXX0X__)
+ # include <unordered_map>
+ # define hash_map unordered_map
+ #elif defined(__GNUC__)
+--- crf/crfsgd.cpp.orig	2012-09-14 23:31:35.000000000 +0900
++++ crf/crfsgd.cpp	2013-12-30 10:07:52.000000000 +0900
+@@ -40,7 +40,10 @@
+ 
+ using namespace std;
+ 
+-#if defined(__GXX_EXPERIMENTAL_CXX0X__)
++#if __cplusplus >= 201103L || defined(_LIBCPP_VERSION)
++# include <unordered_map>
++# define hash_map unordered_map
++#elif defined(__GXX_EXPERIMENTAL_CXX0X__)
+ # include <unordered_map>
+ # define hash_map unordered_map
+ #elif defined(__GNUC__)
+--- svm/prep_rcv1.cpp.orig	2012-09-14 23:31:35.000000000 +0900
++++ svm/prep_rcv1.cpp	2013-12-30 10:08:13.000000000 +0900
+@@ -31,7 +31,10 @@
+ 
+ using namespace std;
+ 
+-#if defined(__GXX_EXPERIMENTAL_CXX0X__)
++#if __cplusplus >= 201103L || defined(_LIBCPP_VERSION)
++# include <unordered_map>
++# define hash_map unordered_map
++#elif defined(__GXX_EXPERIMENTAL_CXX0X__)
+ # include <unordered_map>
+ # define hash_map unordered_map
+ #elif defined(__GNUC__)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20131229/c50021cd/attachment.html>


More information about the macports-changes mailing list