diff --git a/srcpkgs/lightspark/patches/0001-Search-paths-for-LLVM-3.1-3.2.patch b/srcpkgs/lightspark/patches/0001-Search-paths-for-LLVM-3.1-3.2.patch new file mode 100644 index 00000000000..070ff35bcf6 --- /dev/null +++ b/srcpkgs/lightspark/patches/0001-Search-paths-for-LLVM-3.1-3.2.patch @@ -0,0 +1,25 @@ +From 508229a1ea169c8de7acf7f4284d6c56f08bedc4 Mon Sep 17 00:00:00 2001 +From: Antti Ajanki +Date: Sun, 12 May 2013 11:19:48 +0300 +Subject: [PATCH 01/33] Search paths for LLVM 3.1/3.2 + +--- + conf/FindLLVM.cmake | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/conf/FindLLVM.cmake b/conf/FindLLVM.cmake +index 7bd52e2..ab8f95d 100644 +--- a/conf/FindLLVM.cmake ++++ b/conf/FindLLVM.cmake +@@ -51,6 +51,8 @@ else (LLVM_INCLUDE_DIR) + /usr/lib/llvm-2.8/bin + /usr/lib/llvm-2.9/bin + /usr/lib/llvm-3.0/bin ++ /usr/lib/llvm-3.1/bin ++ /usr/lib/llvm-3.2/bin + ) + + find_program(LLVM_GCC_EXECUTABLE +-- +1.8.3 + diff --git a/srcpkgs/lightspark/patches/0001-Support-for-LLVM-3.3.patch b/srcpkgs/lightspark/patches/0001-Support-for-LLVM-3.3.patch new file mode 100644 index 00000000000..6a2e48a140f --- /dev/null +++ b/srcpkgs/lightspark/patches/0001-Support-for-LLVM-3.3.patch @@ -0,0 +1,128 @@ +From 56f4f48c47983432670d7aaa18614a98bd35961a Mon Sep 17 00:00:00 2001 +From: Antti Ajanki +Date: Sat, 18 May 2013 11:36:52 +0300 +Subject: [PATCH 01/29] Support for LLVM 3.3 + +--- + conf/FindLLVM.cmake | 6 ++++++ + src/scripting/abc.cpp | 15 +++++++++++---- + src/scripting/abc_codesynt.cpp | 25 ++++++++++++++++++------- + 3 files changed, 35 insertions(+), 11 deletions(-) + +diff --git a/conf/FindLLVM.cmake b/conf/FindLLVM.cmake +index ab8f95d..c94d7d4 100644 +--- a/conf/FindLLVM.cmake ++++ b/conf/FindLLVM.cmake +@@ -53,6 +53,7 @@ else (LLVM_INCLUDE_DIR) + /usr/lib/llvm-3.0/bin + /usr/lib/llvm-3.1/bin + /usr/lib/llvm-3.2/bin ++ /usr/lib/llvm-3.3/bin + ) + + find_program(LLVM_GCC_EXECUTABLE +@@ -170,11 +171,16 @@ else (LLVM_INCLUDE_DIR) + + set(CMAKE_REQUIRED_INCLUDES ${LLVM_INCLUDE_DIR}) + check_include_file_cxx("llvm/DataLayout.h" HAVE_DATALAYOUT_H) ++ check_include_file_cxx("llvm/IR/DataLayout.h" HAVE_IR_DATALAYOUT_H) + unset(CMAKE_REQUIRED_INCLUDES) + MESSAGE(STATUS "HAVE_DATALAYOUT_H: " ${HAVE_DATALAYOUT_H}) ++ MESSAGE(STATUS "HAVE_IR_DATALAYOUT_H: " ${HAVE_IR_DATALAYOUT_H}) + IF(HAVE_DATALAYOUT_H) + ADD_DEFINITIONS(-DHAVE_DATALAYOUT_H) + ENDIF(HAVE_DATALAYOUT_H) ++ IF(HAVE_IR_DATALAYOUT_H) ++ ADD_DEFINITIONS(-DHAVE_IR_DATALAYOUT_H) ++ ENDIF(HAVE_IR_DATALAYOUT_H) + + exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --cxxflags OUTPUT_VARIABLE LLVM_COMPILE_FLAGS ) + MESSAGE(STATUS "LLVM CXX flags: " ${LLVM_COMPILE_FLAGS}) +diff --git a/src/scripting/abc.cpp b/src/scripting/abc.cpp +index 608fe01..49f2e06 100644 +--- a/src/scripting/abc.cpp ++++ b/src/scripting/abc.cpp +@@ -23,12 +23,19 @@ + + #include "compat.h" + +-#include + #include + #include + #include +-#include +-#ifdef HAVE_DATALAYOUT_H ++#ifdef HAVE_IR_DATALAYOUT_H ++# include ++# include ++#else ++# include ++# include ++#endif ++#ifdef HAVE_IR_DATALAYOUT_H ++# include ++#elif defined HAVE_DATALAYOUT_H + # include + #else + # include +@@ -1516,7 +1523,7 @@ void ABCVm::Run(ABCVm* th) + assert_and_throw(th->ex); + + th->FPM=new llvm::FunctionPassManager(th->module); +-#ifdef HAVE_DATALAYOUT_H ++#if defined HAVE_DATALAYOUT_H || defined HAVE_IR_DATALAYOUT_H + th->FPM->add(new llvm::DataLayout(*th->ex->getDataLayout())); + #else + th->FPM->add(new llvm::TargetData(*th->ex->getTargetData())); +diff --git a/src/scripting/abc_codesynt.cpp b/src/scripting/abc_codesynt.cpp +index 2018be3..bb8e9a5 100644 +--- a/src/scripting/abc_codesynt.cpp ++++ b/src/scripting/abc_codesynt.cpp +@@ -25,18 +25,29 @@ + #endif + + #include "compat.h" +-#include +-#include + #include + #include +-#include +-#ifdef HAVE_IRBUILDER_H ++#ifdef HAVE_IR_DATALAYOUT_H ++# include ++# include ++# include ++# include ++#else ++# include ++# include ++# include ++# include ++#endif ++#ifdef HAVE_IR_DATALAYOUT_H ++# include ++#elif defined HAVE_IRBUILDER_H + # include + #else + # include + #endif +-#include +-#ifdef HAVE_DATALAYOUT_H ++#ifdef HAVE_IR_DATALAYOUT_H ++# include ++#elif defined HAVE_DATALAYOUT_H + # include + #else + # include +@@ -279,7 +290,7 @@ void ABCVm::registerFunctions() + llvm::FunctionType* FT=NULL; + + //Create types +-#ifdef HAVE_DATALAYOUT_H ++#if defined HAVE_DATALAYOUT_H || defined HAVE_IR_DATALAYOUT_H + ptr_type=ex->getDataLayout()->getIntPtrType(llvm_context()); + #else + ptr_type=ex->getTargetData()->getIntPtrType(llvm_context()); +-- +1.8.3 + diff --git a/srcpkgs/lightspark/patches/llvm32-irbuilder.patch b/srcpkgs/lightspark/patches/llvm32-irbuilder.patch deleted file mode 100644 index b569d925990..00000000000 --- a/srcpkgs/lightspark/patches/llvm32-irbuilder.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/conf/FindLLVM.cmake b/conf/FindLLVM.cmake -index 32d32b4..19a3934 100644 ---- a/conf/FindLLVM.cmake -+++ b/conf/FindLLVM.cmake -@@ -156,6 +156,15 @@ else (LLVM_INCLUDE_DIR) - IF(HAVE_SUPPORT_TARGETSELECT_H) - ADD_DEFINITIONS(-DHAVE_SUPPORT_TARGETSELECT_H) - ENDIF(HAVE_SUPPORT_TARGETSELECT_H) -+ -+ set(CMAKE_REQUIRED_INCLUDES ${LLVM_INCLUDE_DIR}) -+ set(CMAKE_REQUIRED_DEFINITIONS -D__STDC_LIMIT_MACROS=1 -D__STDC_CONSTANT_MACROS=1) -+ check_include_file_cxx("llvm/IRBuilder.h" HAVE_IRBUILDER_H) -+ unset(CMAKE_REQUIRED_INCLUDES) -+ MESSAGE(STATUS "HAVE_IRBUILDER_H: " ${HAVE_IRBUILDER_H}) -+ IF(HAVE_IRBUILDER_H) -+ ADD_DEFINITIONS(-DHAVE_IRBUILDER_H) -+ ENDIF(HAVE_IRBUILDER_H) - - exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --cxxflags OUTPUT_VARIABLE LLVM_COMPILE_FLAGS ) - MESSAGE(STATUS "LLVM CXX flags: " ${LLVM_COMPILE_FLAGS}) -diff --git a/src/scripting/abc_codesynt.cpp b/src/scripting/abc_codesynt.cpp -index d00521b..2648bbf 100644 ---- a/src/scripting/abc_codesynt.cpp -+++ b/src/scripting/abc_codesynt.cpp -@@ -29,8 +29,12 @@ - #include - #include - #include --#include --#include -+#include -+#ifdef HAVE_IRBUILDER_H -+# include -+#else -+# include -+#endif - #include - #include - #include diff --git a/srcpkgs/lightspark/patches/llvm32-targetdata.patch b/srcpkgs/lightspark/patches/llvm32-targetdata.patch deleted file mode 100644 index ff32a19531e..00000000000 --- a/srcpkgs/lightspark/patches/llvm32-targetdata.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/conf/FindLLVM.cmake b/conf/FindLLVM.cmake -index 19a3934..7bd52e2 100644 ---- a/conf/FindLLVM.cmake -+++ b/conf/FindLLVM.cmake -@@ -165,6 +165,14 @@ else (LLVM_INCLUDE_DIR) - IF(HAVE_IRBUILDER_H) - ADD_DEFINITIONS(-DHAVE_IRBUILDER_H) - ENDIF(HAVE_IRBUILDER_H) -+ -+ set(CMAKE_REQUIRED_INCLUDES ${LLVM_INCLUDE_DIR}) -+ check_include_file_cxx("llvm/DataLayout.h" HAVE_DATALAYOUT_H) -+ unset(CMAKE_REQUIRED_INCLUDES) -+ MESSAGE(STATUS "HAVE_DATALAYOUT_H: " ${HAVE_DATALAYOUT_H}) -+ IF(HAVE_DATALAYOUT_H) -+ ADD_DEFINITIONS(-DHAVE_DATALAYOUT_H) -+ ENDIF(HAVE_DATALAYOUT_H) - - exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --cxxflags OUTPUT_VARIABLE LLVM_COMPILE_FLAGS ) - MESSAGE(STATUS "LLVM CXX flags: " ${LLVM_COMPILE_FLAGS}) -diff --git a/src/scripting/abc.cpp b/src/scripting/abc.cpp -index 710eaec..a0546cb 100644 ---- a/src/scripting/abc.cpp -+++ b/src/scripting/abc.cpp -@@ -28,7 +28,11 @@ - #include - #include - #include --#include -+#ifdef HAVE_DATALAYOUT_H -+# include -+#else -+# include -+#endif - #ifdef HAVE_SUPPORT_TARGETSELECT_H - #include - #else -@@ -1456,7 +1460,11 @@ void ABCVm::Run(ABCVm* th) - assert_and_throw(th->ex); - - th->FPM=new llvm::FunctionPassManager(th->module); -+#ifdef HAVE_DATALAYOUT_H -+ th->FPM->add(new llvm::DataLayout(*th->ex->getDataLayout())); -+#else - th->FPM->add(new llvm::TargetData(*th->ex->getTargetData())); -+#endif - #ifdef EXPENSIVE_DEBUG - //This is pretty heavy, do not enable in release - th->FPM->add(llvm::createVerifierPass()); -diff --git a/src/scripting/abc_codesynt.cpp b/src/scripting/abc_codesynt.cpp -index 2648bbf..83c1d5f 100644 ---- a/src/scripting/abc_codesynt.cpp -+++ b/src/scripting/abc_codesynt.cpp -@@ -36,7 +36,11 @@ - # include - #endif - #include --#include -+#ifdef HAVE_DATALAYOUT_H -+# include -+#else -+# include -+#endif - #include - #include "scripting/abc.h" - #include "swftypes.h" -@@ -275,7 +279,11 @@ void ABCVm::registerFunctions() - llvm::FunctionType* FT=NULL; - - //Create types -+#ifdef HAVE_DATALAYOUT_H -+ ptr_type=ex->getDataLayout()->getIntPtrType(llvm_context()); -+#else - ptr_type=ex->getTargetData()->getIntPtrType(llvm_context()); -+#endif - //Pointer to 8 bit type, needed for pointer arithmetic - voidptr_type=llvm::IntegerType::get(getVm()->llvm_context(),8)->getPointerTo(); - number_type=llvm::Type::getDoubleTy(llvm_context()); diff --git a/srcpkgs/lightspark/template b/srcpkgs/lightspark/template index 2d07da19cc9..2701ea66791 100644 --- a/srcpkgs/lightspark/template +++ b/srcpkgs/lightspark/template @@ -1,7 +1,7 @@ # Template file for 'lightspark' pkgname=lightspark -version=0.7.0 -revision=6 +version=0.7.2 +revision=1 patch_args="-Np1" build_style=cmake configure_args="-DAUDIO_BACKEND=pulse -DENABLE_CURL=1 -DCOMPILE_PLUGIN=1" @@ -15,7 +15,7 @@ maintainer="Juan RP " homepage="http://lightspark.github.com/" license="LGPL-3" distfiles="http://launchpad.net/lightspark/trunk/$pkgname-$version/+download/$pkgname-$version.tar.gz" -checksum=f3df63692ad8409888336a58f4db96b3344737d492df3a3f06c7359fdf26c85b +checksum=70479bac90f3455a5ff6d0aaf6bccaedfbaac3c70bd602680f68ce75eab2dd1b lightspark_package() { conf_files="/etc/xdg/lightspark.conf"