diff options
| author | Brett Koonce | 2013-11-14 20:56:37 -0600 |
|---|---|---|
| committer | Adam Vandenberg | 2013-11-14 23:52:48 -0800 |
| commit | 19a05fad45aa38ed02f3840ed054893ff5e4419d (patch) | |
| tree | 061d01c1766adf3aae98edaf52354baa58b76fe1 /Library/Formula | |
| parent | 9447f792d29e019c34a7158fdbd7063f0fb4f1a0 (diff) | |
| download | homebrew-19a05fad45aa38ed02f3840ed054893ff5e4419d.tar.bz2 | |
pure 0.58
Closes #24334.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/pure.rb | 177 |
1 files changed, 8 insertions, 169 deletions
diff --git a/Library/Formula/pure.rb b/Library/Formula/pure.rb index b17e93401..a15750fd0 100644 --- a/Library/Formula/pure.rb +++ b/Library/Formula/pure.rb @@ -2,11 +2,9 @@ require 'formula' class Pure < Formula homepage 'http://purelang.bitbucket.org/' - url 'https://bitbucket.org/purelang/pure-lang/downloads/pure-0.57.tar.gz' - sha1 '5c7441993752d0e2cba74912521d6df865e5dc0b' + url 'https://bitbucket.org/purelang/pure-lang/downloads/pure-0.58.tar.gz' + sha1 '9ec99ed3a8166659153e25efcbfc14a227d9ad95' - # Autotools are needed due to patching configure.ac. Remove on new releases. - depends_on :autoconf depends_on :automake depends_on :libtool @@ -16,180 +14,21 @@ class Pure < Formula depends_on 'mpfr' resource 'docs' do - url 'https://bitbucket.org/purelang/pure-lang/downloads/pure-docs-0.57.tar.gz' - sha1 '7f2c6051b831d3de887f2182e8b29b1716ab45fd' - end - - # Patches backported from trunk for llvm 3.3 compatibility. Originally: - # https://bitbucket.org/purelang/pure-lang/commits/2866a677f3362ccfd0ced24b9dd235bff627f4c5/raw/ - # removing changes to ChangeLog to apply. - def patches - { - :p2 => [ - DATA, - 'https://bitbucket.org/purelang/pure-lang/commits/387a67f2f9943640c05b3e8d796ddf7f06febe3f/raw/' - ] - } + url 'https://bitbucket.org/purelang/pure-lang/downloads/pure-docs-0.58.tar.gz' + sha1 'f67a2e4723d7bbd92818e75f675e8057a02f3a00' end def install - # Force regenerate configure/Makefile due to patching - # configure.ac. Remove when new release is available. - system "autoreconf -fiv" - system "./configure", "--disable-debug", "--prefix=#{prefix}", "--enable-release", "--without-elisp" system "make" - system "make check" system "make install" resource('docs').stage { system "make", "prefix=#{prefix}", "install" } end -end -__END__ -# HG changeset patch -# User Albert Graef <Dr.Graef@t-online.de> -# Date 1376480012 -7200 -# Node ID 2866a677f3362ccfd0ced24b9dd235bff627f4c5 -# Parent 356f97c14d61d49431c622e2ee1ece4bdc1fab54 -LLVM 3.3 compatibility fixes. - -diff --git a/pure/configure.ac b/pure/configure.ac ---- a/pure/configure.ac -+++ b/pure/configure.ac -@@ -321,6 +321,17 @@ - AC_LANG_PUSH([C++]) - save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="`$LLVMCONF --cppflags` $CPPFLAGS" -+AC_CACHE_CHECK([for new LLVM IRBuilder class (LLVM >= 3.3)], [pure_cv_new_builder33], -+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ -+ #include <llvm/IR/IRBuilder.h> -+ ], [ -+ llvm::IRBuilder<> b(llvm::getGlobalContext()); -+ ]) -+ ], [pure_cv_new_builder33=yes], [pure_cv_new_builder33=no]) -+ ]) -+if test "$pure_cv_new_builder33" = yes; then -+pure_cv_new_builder26=yes -+else - AC_CACHE_CHECK([for new LLVM IRBuilder class (LLVM >= 3.2)], [pure_cv_new_builder32], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ - #include <llvm/IRBuilder.h> -@@ -342,6 +353,7 @@ - ], [pure_cv_new_builder26=yes], [pure_cv_new_builder26=no]) - ]) - fi -+fi - if test "$pure_cv_new_builder26" = yes; then - AC_DEFINE(NEW_BUILDER, 1, [Define when building with new-style LLVM IRBuilder template class.]) - AC_DEFINE(LLVM26, 1, [Define when building with new-style LLVM API (LLVM 2.6 or later).]) -@@ -372,7 +384,7 @@ - fi - fi - AC_CHECK_HEADERS([llvm/Support/DynamicLibrary.h], [], [], [[#include <llvm/ADT/StringRef.h>]]) --AC_CHECK_HEADERS([llvm/Support/raw_ostream.h llvm/Support/raw_os_ostream.h llvm/ModuleProvider.h llvm/TypeSymbolTable.h llvm/DataLayout.h llvm/IRBuilder.h llvm/Support/TargetSelect.h]) -+AC_CHECK_HEADERS([llvm/Support/raw_ostream.h llvm/Support/raw_os_ostream.h llvm/ModuleProvider.h llvm/TypeSymbolTable.h llvm/DataLayout.h llvm/IR/DataLayout.h llvm/DerivedTypes.h llvm/IRBuilder.h llvm/IR/IRBuilder.h llvm/Support/TargetSelect.h]) - if test "$pure_cv_new_builder26" = yes; then - AC_CHECK_DECLS([llvm::PerformTailCallOpt, llvm::GuaranteedTailCallOpt], [], [], [[#include <llvm/ADT/StringRef.h> - #include <llvm/Target/TargetOptions.h>]]) -diff --git a/pure/interpreter.cc b/pure/interpreter.cc ---- a/pure/interpreter.cc -+++ b/pure/interpreter.cc -@@ -47,7 +47,11 @@ - #include <fnmatch.h> - #include <glob.h> - -+#if LLVM33 -+#include <llvm/IR/CallingConv.h> -+#else - #include <llvm/CallingConv.h> -+#endif - #include <llvm/PassManager.h> - #include <llvm/Support/CallSite.h> - #include <llvm/Transforms/Utils/BasicBlockUtils.h> -diff --git a/pure/interpreter.hh b/pure/interpreter.hh ---- a/pure/interpreter.hh -+++ b/pure/interpreter.hh -@@ -19,12 +19,20 @@ - #ifndef INTERPRETER_HH - #define INTERPRETER_HH - -+#ifdef HAVE_LLVM_DERIVEDTYPES_H -+// LLVM 3.3 and later have these headers in a different directory. - #include <llvm/DerivedTypes.h> -+#include <llvm/Module.h> -+#include <llvm/GlobalValue.h> -+#else -+#include <llvm/IR/DerivedTypes.h> -+#include <llvm/IR/Module.h> -+#include <llvm/IR/GlobalValue.h> -+#endif -+ - #include <llvm/ExecutionEngine/ExecutionEngine.h> - #include <llvm/ExecutionEngine/JIT.h> --#include <llvm/Module.h> - #include <llvm/PassManager.h> --#include <llvm/GlobalValue.h> - #include <llvm/Analysis/Verifier.h> - #include <llvm/Target/TargetOptions.h> - #include <llvm/Transforms/Scalar.h> -@@ -42,15 +50,25 @@ - #include <llvm/DataLayout.h> - #define LLVM32 1 - #else -+#ifdef HAVE_LLVM_IR_DATALAYOUT_H -+#include <llvm/IR/DataLayout.h> -+#define LLVM32 1 -+#define LLVM33 1 -+#else - #include <llvm/Target/TargetData.h> - #endif -+#endif - - #ifdef HAVE_LLVM_IRBUILDER_H - // LLVM 3.2 and later have this header in a different directory. - #include <llvm/IRBuilder.h> - #else -+#ifdef HAVE_LLVM_IR_IRBUILDER_H -+#include <llvm/IR/IRBuilder.h> -+#else - #include <llvm/Support/IRBuilder.h> - #endif -+#endif - - #ifdef HAVE_LLVM_MODULEPROVIDER_H - #include <llvm/ModuleProvider.h> -@@ -75,8 +93,12 @@ - #endif - - #if LLVM26 -+#if LLVM33 -+#include "llvm/IR/LLVMContext.h" -+#else - #include "llvm/LLVMContext.h" - #endif -+#endif - - #include "parserdefs.hh" - // Get rid of silly warnings in bison-generated position.hh. -diff --git a/pure/runtime.cc b/pure/runtime.cc ---- a/pure/runtime.cc -+++ b/pure/runtime.cc -@@ -15397,7 +15397,6 @@ - pure_ref(f); - pure_ref(x); - -- typedef typename element_of<matrix_type>::type elem_type; - matrix_type *xm = static_cast<matrix_type*>(x->data.mat.p); - size_t lasti,lastj; - pure_expr *out; //result matrix -@@ -15666,7 +15665,6 @@ - pure_ref(f); - pure_ref(x); - -- typedef typename element_of<matrix_type>::type elem_type; - matrix_type *xm = static_cast<matrix_type*>(x->data.mat.p); - ptrdiff_t lasti,lastj; - pure_expr *out; //result matrix + test do + system "#{bin}/pure", "--version" + end +end |
