lightspark: make this build with llvm-3.2.
This commit is contained in:
parent
70ec30b6df
commit
742a663273
3 changed files with 119 additions and 2 deletions
srcpkgs/lightspark
39
srcpkgs/lightspark/patches/llvm32-irbuilder.patch
Normal file
39
srcpkgs/lightspark/patches/llvm32-irbuilder.patch
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
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 <llvm/DerivedTypes.h>
|
||||||
|
#include <llvm/ExecutionEngine/ExecutionEngine.h>
|
||||||
|
#include <llvm/PassManager.h>
|
||||||
|
-#include <llvm/Constants.h>
|
||||||
|
-#include <llvm/Support/IRBuilder.h>
|
||||||
|
+#include <llvm/Constants.h>
|
||||||
|
+#ifdef HAVE_IRBUILDER_H
|
||||||
|
+# include <llvm/IRBuilder.h>
|
||||||
|
+#else
|
||||||
|
+# include <llvm/Support/IRBuilder.h>
|
||||||
|
+#endif
|
||||||
|
#include <llvm/LLVMContext.h>
|
||||||
|
#include <llvm/Target/TargetData.h>
|
||||||
|
#include <sstream>
|
77
srcpkgs/lightspark/patches/llvm32-targetdata.patch
Normal file
77
srcpkgs/lightspark/patches/llvm32-targetdata.patch
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
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 <llvm/ExecutionEngine/JIT.h>
|
||||||
|
#include <llvm/PassManager.h>
|
||||||
|
#include <llvm/LLVMContext.h>
|
||||||
|
-#include <llvm/Target/TargetData.h>
|
||||||
|
+#ifdef HAVE_DATALAYOUT_H
|
||||||
|
+# include <llvm/DataLayout.h>
|
||||||
|
+#else
|
||||||
|
+# include <llvm/Target/TargetData.h>
|
||||||
|
+#endif
|
||||||
|
#ifdef HAVE_SUPPORT_TARGETSELECT_H
|
||||||
|
#include <llvm/Support/TargetSelect.h>
|
||||||
|
#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 <llvm/Support/IRBuilder.h>
|
||||||
|
#endif
|
||||||
|
#include <llvm/LLVMContext.h>
|
||||||
|
-#include <llvm/Target/TargetData.h>
|
||||||
|
+#ifdef HAVE_DATALAYOUT_H
|
||||||
|
+# include <llvm/DataLayout.h>
|
||||||
|
+#else
|
||||||
|
+# include <llvm/Target/TargetData.h>
|
||||||
|
+#endif
|
||||||
|
#include <sstream>
|
||||||
|
#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());
|
|
@ -2,14 +2,15 @@
|
||||||
pkgname=lightspark
|
pkgname=lightspark
|
||||||
version=0.7.0
|
version=0.7.0
|
||||||
revision=4
|
revision=4
|
||||||
|
patch_args="-Np1"
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
configure_args="-DAUDIO_BACKEND=pulse -DENABLE_CURL=1 -DCOMPILE_PLUGIN=1"
|
configure_args="-DAUDIO_BACKEND=pulse -DENABLE_CURL=1 -DCOMPILE_PLUGIN=1"
|
||||||
depends="hicolor-icon-theme desktop-file-utils"
|
depends="hicolor-icon-theme desktop-file-utils"
|
||||||
makedepends="pkg-config cmake nasm pcre-devel>=8.30 libffi-devel libX11-devel
|
makedepends="pkg-config cmake nasm pcre-devel>=8.30 libffi-devel libX11-devel
|
||||||
fontconfig-devel boost-devel SDL-devel ffmpeg-devel>=1.0.1 libcurl-devel
|
fontconfig-devel boost-devel SDL-devel ffmpeg-devel>=1.0.1 libcurl-devel
|
||||||
MesaLib-devel ftgl-devel glew-devel>=1.9.0 libxml2-devel libxml++-devel
|
MesaLib-devel ftgl-devel glew-devel>=1.9.0 libxml2-devel libxml++-devel
|
||||||
glibmm-devel gtk+-devel libjpeg-turbo-devel pulseaudio-devel llvm librtmp-devel
|
glibmm-devel gtk+-devel libjpeg-turbo-devel pulseaudio-devel llvm>=3.2
|
||||||
liblzma-devel"
|
librtmp-devel liblzma-devel"
|
||||||
conf_files="/etc/xdg/lightspark.conf"
|
conf_files="/etc/xdg/lightspark.conf"
|
||||||
short_desc="Modern, free, open-source flash player implementation"
|
short_desc="Modern, free, open-source flash player implementation"
|
||||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
|
|
Loading…
Reference in a new issue