[115901] trunk/dports/lang/pure

ryandesign at macports.org ryandesign at macports.org
Mon Jan 13 17:12:49 PST 2014


Revision: 115901
          https://trac.macports.org/changeset/115901
Author:   ryandesign at macports.org
Date:     2014-01-13 17:12:49 -0800 (Mon, 13 Jan 2014)
Log Message:
-----------
pure: use llvm-3.4; I can no longer reproduce the pure-gen build failure that caused us to revert back to using llvm-3.2 in r111396

Revision Links:
--------------
    https://trac.macports.org/changeset/111396

Modified Paths:
--------------
    trunk/dports/lang/pure/Portfile

Added Paths:
-----------
    trunk/dports/lang/pure/files/patch-llvm-3.4.diff

Modified: trunk/dports/lang/pure/Portfile
===================================================================
--- trunk/dports/lang/pure/Portfile	2014-01-14 00:45:21 UTC (rev 115900)
+++ trunk/dports/lang/pure/Portfile	2014-01-14 01:12:49 UTC (rev 115901)
@@ -34,12 +34,12 @@
 
 livecheck.type          none
 
-set llvm_version        3.2
+set llvm_version        3.4
 set llvm_prefix         ${prefix}/libexec/llvm-${llvm_version}
 configure.env           PATH=${llvm_prefix}/bin:$env(PATH)
 
 if {${name} eq ${subport}} {
-    revision                    1
+    revision                    2
     
     depends_lib                 port:gmp \
                                 port:libiconv \
@@ -50,16 +50,19 @@
     
     depends_run                 port:w3m
     
+    patchfiles                  patch-llvm-3.4.diff
+    
+    use_autoreconf              yes
+    
     configure.args              --without-elisp \
-                                --with-tool-prefix=${llvm_prefix}/bin/
+                                --with-tool-prefix=${llvm_prefix}/bin
     
     # Prevent build failure when old llvm port is installed
     configure.cppflags          -I${llvm_prefix}/include ${configure.cppflags}
     configure.ldflags           -L${llvm_prefix}/lib ${configure.ldflags}
     
     platform macosx {
-        depends_run-delete      port:w3m
-        depends_run-append      port:openbrowser
+        depends_run-replace     port:w3m port:openbrowser
         patchfiles-append       patch-openbrowser.diff
     }
     

Added: trunk/dports/lang/pure/files/patch-llvm-3.4.diff
===================================================================
--- trunk/dports/lang/pure/files/patch-llvm-3.4.diff	                        (rev 0)
+++ trunk/dports/lang/pure/files/patch-llvm-3.4.diff	2014-01-14 01:12:49 UTC (rev 115901)
@@ -0,0 +1,43 @@
+https://bitbucket.org/purelang/pure-lang/commits/00f09b2a47d3a7811f767ab30f679ebb984084d7
+--- configure.ac.orig
++++ configure.ac
+@@ -376,6 +376,19 @@
+ if test "$pure_cv_new_ostream" = yes; then
+   AC_DEFINE(NEW_OSTREAM, 1, [Define when building with new llvm::raw_fd_ostream interface (LLVM >= 2.7).])
+ fi
++AC_CACHE_CHECK([for new llvm::raw_fd_ostream interface (LLVM >= 3.4)], [pure_cv_new_ostream34],
++  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
++	#include <string>
++        #include <llvm/Support/raw_ostream.h>
++      ], [
++  	std::string error;
++        llvm::raw_fd_ostream os("xxxjunk", error, llvm::sys::fs::F_Excl);
++      ])
++    ], [pure_cv_new_ostream34=yes], [pure_cv_new_ostream34=no])
++  ])
++if test "$pure_cv_new_ostream34" = yes; then
++  AC_DEFINE(NEW_OSTREAM34, 1, [Define when building with new llvm::raw_fd_ostream interface (LLVM >= 3.4).])
++fi
+ else
+ AC_CACHE_CHECK([for new LLVM IRBuilder class (LLVM >= 2.4)], [pure_cv_new_builder],
+   [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+--- interpreter.cc.orig
++++ interpreter.cc
+@@ -10240,6 +10240,9 @@
+ #define ostream_clear_error(os) os.clear()
+ #endif
+ 
++#if NEW_OSTREAM34 // LLVM 3.4 cosmetic changes
++#define new_raw_fd_ostream(s,binary,msg) new llvm::raw_fd_ostream(s,msg,(binary)?llvm::sys::fs::F_Binary:llvm::sys::fs::F_None)
++#else
+ #if NEW_OSTREAM // LLVM >= 2.7 takes an enumeration as the last parameter
+ #define new_raw_fd_ostream(s,binary,msg) new llvm::raw_fd_ostream(s,msg,(binary)?llvm::raw_fd_ostream::F_Binary:0)
+ #else
+@@ -10249,6 +10252,7 @@
+ #define new_raw_fd_ostream(s,binary,msg) new llvm::raw_fd_ostream(s,binary,msg)
+ #endif
+ #endif
++#endif
+ 
+ void interpreter::check_used(set<Function*>& used,
+ 			     map<GlobalVariable*,Function*>& varmap)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140113/e338ed22/attachment.html>


More information about the macports-changes mailing list