[42096] trunk/dports/lang/pure
ryandesign at macports.org
ryandesign at macports.org
Fri Nov 14 21:02:25 PST 2008
Revision: 42096
http://trac.macports.org/changeset/42096
Author: ryandesign at macports.org
Date: 2008-11-14 21:02:25 -0800 (Fri, 14 Nov 2008)
Log Message:
-----------
pure: fix build with llvm 2.4; see http://groups.google.com/group/pure-lang/t/fb50ac08cdc8a205?hl=en
Modified Paths:
--------------
trunk/dports/lang/pure/Portfile
Added Paths:
-----------
trunk/dports/lang/pure/files/
trunk/dports/lang/pure/files/patch-llvm-2.4.diff
Modified: trunk/dports/lang/pure/Portfile
===================================================================
--- trunk/dports/lang/pure/Portfile 2008-11-15 04:46:19 UTC (rev 42095)
+++ trunk/dports/lang/pure/Portfile 2008-11-15 05:02:25 UTC (rev 42096)
@@ -33,9 +33,12 @@
port:gsl \
port:libiconv \
port:libtool \
- path:bin/llvm-config:llvm-devel \
+ path:bin/llvm-config:llvm \
port:readline
+patchfiles \
+ patch-llvm-2.4.diff
+
configure.args \
--enable-gsl
@@ -43,7 +46,7 @@
set llvm_minimum_version 2.4
set llvm_installed_version [exec llvm-config --version]
if {[rpm-vercomp ${llvm_installed_version} ${llvm_minimum_version}] < 0} {
- return -code error "pure ${version} requires llvm ${llvm_minimum_version} or later but you have llvm ${llvm_installed_version}. Please deactivate llvm and install llvm-devel, then try again."
+ return -code error "pure ${version} requires llvm ${llvm_minimum_version} or later but you have llvm ${llvm_installed_version}."
}
}
Added: trunk/dports/lang/pure/files/patch-llvm-2.4.diff
===================================================================
--- trunk/dports/lang/pure/files/patch-llvm-2.4.diff (rev 0)
+++ trunk/dports/lang/pure/files/patch-llvm-2.4.diff 2008-11-15 05:02:25 UTC (rev 42096)
@@ -0,0 +1,157 @@
+--- ChangeLog 2008-11-04 11:29:48.000000000 -0600
++++ ChangeLog 2008-11-14 22:54:25.000000000 -0600
+@@ -1,3 +1,9 @@
++2008-11-14 Albert Graef <Dr.Graef at t-online.de>
++
++ * configure.ac: Check for new template arguments of the IRBuilder
++ class (LLVM 2.4). Reported by Ryan Schmidt. NOTE: This change
++ requires a reconfigure.
++
+ 2008-11-04 Albert Graef <Dr.Graef at t-online.de>
+
+ * 0.13 release.
+--- config.h.in 2008-10-01 04:16:43.000000000 -0500
++++ config.h.in 2008-11-14 22:53:40.000000000 -0600
+@@ -117,6 +117,9 @@
+ /* Define if signal handlers must be reinstalled by handler. */
+ #undef MUST_REINSTALL_SIGHANDLERS
+
++/* Define when building with new-style LLVM IRBuilder template class. */
++#undef NEW_BUILDER
++
+ /* Define to the address where bug reports for this package should be sent. */
+ #undef PACKAGE_BUGREPORT
+
+--- configure 2008-11-03 06:50:50.000000000 -0600
++++ configure 2008-11-14 22:53:39.000000000 -0600
+@@ -6318,6 +6318,85 @@
+ fi
+ fi
+ fi
++ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++
++save_CXXFLAGS=$CXXFLAGS
++CXXFLAGS="`llvm-config --cppflags` $CXXFLAGS"
++
++{ echo "$as_me:$LINENO: checking for new LLVM IRBuilder class" >&5
++echo $ECHO_N "checking for new LLVM IRBuilder class... $ECHO_C" >&6; }
++if test "${new_builder+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++ #include <llvm/Support/IRBuilder.h>
++
++int
++main ()
++{
++
++ llvm::IRBuilder<> b;
++
++ ;
++ return 0;
++}
++
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && {
++ test -z "$ac_cxx_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
++ new_builder=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ new_builder=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++fi
++{ echo "$as_me:$LINENO: result: $new_builder" >&5
++echo "${ECHO_T}$new_builder" >&6; }
++CXXFLAGS=$save_CXXFLAGS
++if test "$new_builder" = yes; then
++ # do whatever adjusting you need to do for presence of the library:
++
++cat >>confdefs.h <<\_ACEOF
++#define NEW_BUILDER 1
++_ACEOF
++
++fi
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
+ ac_config_files="$ac_config_files Makefile"
+
+ cat >confcache <<\_ACEOF
+@@ -7440,8 +7519,10 @@
+ fi
+
+
++llvm_version=`llvm-config --version`
++
+ { echo "$as_me:$LINENO: result:
+-Pure is now configured for ${host}.
++Pure is now configured for LLVM ${llvm_version} on ${host}.
+
+ Source directory: ${srcdir}
+ Installation prefix: ${prefix}
+@@ -7455,7 +7536,7 @@
+ time use the 'make uninstall' command.
+ " >&5
+ echo "${ECHO_T}
+-Pure is now configured for ${host}.
++Pure is now configured for LLVM ${llvm_version} on ${host}.
+
+ Source directory: ${srcdir}
+ Installation prefix: ${prefix}
+--- interpreter.hh 2008-10-30 11:44:09.000000000 -0500
++++ interpreter.hh 2008-11-14 22:53:39.000000000 -0600
+@@ -14,6 +14,7 @@
+ #include <time.h>
+ #include <set>
+ #include <string>
++#include "config.h"
+ #include "expr.hh"
+ #include "matcher.hh"
+ #include "symtable.hh"
+@@ -94,7 +95,13 @@
+ : v(_v), vtag(_vtag), idx(_idx), p(_p) {}
+ };
+
++#ifdef NEW_BUILDER
++/* LLVM 2.4 has a new IRBuilder class which takes some optional template
++ parameters. */
++#define Builder llvm::IRBuilder<>
++#else
+ #define Builder llvm::IRBuilder
++#endif
+
+ typedef list<Env*> EnvStack;
+ typedef map<int32_t,Env*> EnvMap;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081114/bc42c706/attachment.html>
More information about the macports-changes
mailing list