diff options
-rw-r--r-- | main/llvm5/APKBUILD | 6 | ||||
-rw-r--r-- | main/llvm5/fix-LLVMConfig-cmake-install-prefix.patch | 24 |
2 files changed, 28 insertions, 2 deletions
diff --git a/main/llvm5/APKBUILD b/main/llvm5/APKBUILD index a9f5950076..ba362be2b8 100644 --- a/main/llvm5/APKBUILD +++ b/main/llvm5/APKBUILD @@ -6,7 +6,7 @@ _pkgname=llvm pkgver=5.0.1 _majorver=${pkgver%%.*} pkgname=$_pkgname$_majorver -pkgrel=1 +pkgrel=2 pkgdesc="Low Level Virtual Machine compiler system, version $_majorver" arch="all" url="http://llvm.org/" @@ -21,6 +21,7 @@ source="https://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.xz fix-CheckAtomic.cmake.patch dynamiclibrary-fix-build-musl.patch fix-memory-mf_exec-on-aarch64.patch + fix-LLVMConfig-cmake-install-prefix.patch " builddir="$srcdir/$_pkgname-$pkgver.src" options="!checkroot" @@ -260,4 +261,5 @@ sha512sums="bee1d45fca15ce725b1f2b1339b13eb6f750a3a321cfd099075477ec25835a8ca55b 695502bd3b5454c2f5630c59a8cf5f8aeb0deac16a76a8a4df34849e1e35c12ed4234572a320fe4c7e96f974f572f429eb816c5aa3dcfb17057f550eac596495 0001-Disable-dynamic-lib-tests-for-musl-s-dlclose-is-noop.patch 3bcfeccc1f14567f99029a131b1289290226d48855857f2eb6a251e041981a8b8b2d7965099df16ebf0a406e48130679f97235ef3f3524577413bb51cf40e613 fix-CheckAtomic.cmake.patch 5e61bbeafa64dd858cde2e85d3001f3abc0379f7ca057e9f49684eeabc8b4663f79136d688aff8a83a480b3e7cde76823d381e9dd6933187a36ff59da85532b2 dynamiclibrary-fix-build-musl.patch -e6d925ddc71f9f2ce8a859ac519dad51cba99c07129e378a5388bb1dd2f7d5b9d5ed392e85267fd20043789c7460a7d705eb8f970b2d130edbf5a934e9505ac4 fix-memory-mf_exec-on-aarch64.patch" +e6d925ddc71f9f2ce8a859ac519dad51cba99c07129e378a5388bb1dd2f7d5b9d5ed392e85267fd20043789c7460a7d705eb8f970b2d130edbf5a934e9505ac4 fix-memory-mf_exec-on-aarch64.patch +7e45cc4323e4fbcd6bce871893859acc2e14aea4b915d6132e7fd5242486b63e6476e09686b29274a0004276d6ed0b738e9d38e2b28148ec83d4c08dd1661583 fix-LLVMConfig-cmake-install-prefix.patch" diff --git a/main/llvm5/fix-LLVMConfig-cmake-install-prefix.patch b/main/llvm5/fix-LLVMConfig-cmake-install-prefix.patch new file mode 100644 index 0000000000..cb93745fb4 --- /dev/null +++ b/main/llvm5/fix-LLVMConfig-cmake-install-prefix.patch @@ -0,0 +1,24 @@ +Fix LLVMConfig.cmake being generated to use correct LLVM_INSTALL_PREFIX +(e.g. /usr/lib/llvm5). + +This is needed e.g. for building lldb. + +--- a/cmake/modules/CMakeLists.txt ++++ b/cmake/modules/CMakeLists.txt +@@ -75,15 +75,7 @@ + + # Generate LLVMConfig.cmake for the install tree. + set(LLVM_CONFIG_CODE " +-# Compute the installation prefix from this LLVMConfig.cmake file location. +-get_filename_component(LLVM_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)") +-# Construct the proper number of get_filename_component(... PATH) +-# calls to compute the installation prefix. +-string(REGEX REPLACE "/" ";" _count "${LLVM_INSTALL_PACKAGE_DIR}") +-foreach(p ${_count}) +- set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE} +-get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PATH)") +-endforeach(p) ++set(LLVM_INSTALL_PREFIX, \"${CMAKE_INSTALL_PREFIX}\")") + set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/include") + set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}") + set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}") |