diff options
author | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2012-12-22 21:15:39 +0000 |
---|---|---|
committer | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2012-12-22 21:15:39 +0000 |
commit | 62f4727698dc144330290c025e3efee8437c9c48 (patch) | |
tree | e98c97127bcdbc9022cbe3641ce47d74b8093ff4 /www-plugins/lightspark | |
parent | Version bump. (diff) | |
download | gentoo-2-62f4727698dc144330290c025e3efee8437c9c48.tar.gz gentoo-2-62f4727698dc144330290c025e3efee8437c9c48.tar.bz2 gentoo-2-62f4727698dc144330290c025e3efee8437c9c48.zip |
Fix building against llvm-3.2, bug #447962.
(Portage version: 2.1.11.31/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'www-plugins/lightspark')
-rw-r--r-- | www-plugins/lightspark/ChangeLog | 6 | ||||
-rw-r--r-- | www-plugins/lightspark/files/lightspark-0.7.0-llvm-3.2.patch | 110 | ||||
-rw-r--r-- | www-plugins/lightspark/lightspark-0.7.0.ebuild | 3 |
3 files changed, 117 insertions, 2 deletions
diff --git a/www-plugins/lightspark/ChangeLog b/www-plugins/lightspark/ChangeLog index 8a2273e81734..4a7e3fcebebf 100644 --- a/www-plugins/lightspark/ChangeLog +++ b/www-plugins/lightspark/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for www-plugins/lightspark # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-plugins/lightspark/ChangeLog,v 1.49 2012/12/15 16:14:58 hasufell Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-plugins/lightspark/ChangeLog,v 1.50 2012/12/22 21:15:39 chithanh Exp $ + + 22 Dec 2012; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> + +files/lightspark-0.7.0-llvm-3.2.patch, lightspark-0.7.0.ebuild: + Fix building against llvm-3.2, bug #447962. 15 Dec 2012; Julian Ospald <hasufell@gentoo.org> lightspark-0.7.0.ebuild: error out on unsupported gcc version wrt #441564 diff --git a/www-plugins/lightspark/files/lightspark-0.7.0-llvm-3.2.patch b/www-plugins/lightspark/files/lightspark-0.7.0-llvm-3.2.patch new file mode 100644 index 000000000000..0db5901b0cc6 --- /dev/null +++ b/www-plugins/lightspark/files/lightspark-0.7.0-llvm-3.2.patch @@ -0,0 +1,110 @@ +From 9a9a270423820ae87d54935d60dcb35ac2bf9ea5 Mon Sep 17 00:00:00 2001 +From: Antti Ajanki <antti.ajanki@iki.fi> +Date: Tue, 20 Nov 2012 21:50:44 +0200 +Subject: [PATCH] Fix compilation on LLVM 3.2 + +LP #1080123 +--- + conf/FindLLVM.cmake | 17 +++++++++++++++++ + src/scripting/abc.cpp | 10 +++++++++- + src/scripting/abc_codesynt.cpp | 18 +++++++++++++++--- + 3 files changed, 41 insertions(+), 4 deletions(-) + +diff --git a/conf/FindLLVM.cmake b/conf/FindLLVM.cmake +index 32d32b4..7bd52e2 100644 +--- a/conf/FindLLVM.cmake ++++ b/conf/FindLLVM.cmake +@@ -156,6 +156,23 @@ 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) ++ ++ 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 962cb0e..3fef0aa 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 +@@ -1459,7 +1463,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 d00521b..83c1d5f 100644 +--- a/src/scripting/abc_codesynt.cpp ++++ b/src/scripting/abc_codesynt.cpp +@@ -29,10 +29,18 @@ + #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> ++#ifdef HAVE_DATALAYOUT_H ++# include <llvm/DataLayout.h> ++#else ++# include <llvm/Target/TargetData.h> ++#endif + #include <sstream> + #include "scripting/abc.h" + #include "swftypes.h" +@@ -271,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()); +-- +1.7.10 + diff --git a/www-plugins/lightspark/lightspark-0.7.0.ebuild b/www-plugins/lightspark/lightspark-0.7.0.ebuild index 07260fa8c26e..afd09234b6a7 100644 --- a/www-plugins/lightspark/lightspark-0.7.0.ebuild +++ b/www-plugins/lightspark/lightspark-0.7.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-plugins/lightspark/lightspark-0.7.0.ebuild,v 1.3 2012/12/15 16:14:58 hasufell Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-plugins/lightspark/lightspark-0.7.0.ebuild,v 1.4 2012/12/22 21:15:39 chithanh Exp $ EAPI=4 inherit cmake-utils nsplugins multilib toolchain-funcs @@ -55,6 +55,7 @@ S=${WORKDIR}/${P/_rc*/} PATCHES=( "${FILESDIR}"/${P}-libxmlpp-gles.patch + "${FILESDIR}"/${P}-llvm-3.2.patch ) pkg_pretend() { |