aboutsummaryrefslogtreecommitdiffstats
path: root/main/clang
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-05-08 01:01:54 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-05-08 01:04:31 +0200
commitb3dfe7548c17e23f4a34494667b4d7f0bb0097be (patch)
tree0683f670579c63a0d60c93e77a343b843baea9a8 /main/clang
parentd0fb67cd309640d77f5c8009dcc8e232f3aa20ae (diff)
downloadaports-b3dfe7548c17e23f4a34494667b4d7f0bb0097be.tar.bz2
aports-b3dfe7548c17e23f4a34494667b4d7f0bb0097be.tar.xz
main/clang: fix ClangConfig.cmake to look for LLVM on correct path
Diffstat (limited to 'main/clang')
-rw-r--r--main/clang/0008-Fix-ClangConfig-cmake-LLVM-path.patch25
-rw-r--r--main/clang/APKBUILD6
2 files changed, 29 insertions, 2 deletions
diff --git a/main/clang/0008-Fix-ClangConfig-cmake-LLVM-path.patch b/main/clang/0008-Fix-ClangConfig-cmake-LLVM-path.patch
new file mode 100644
index 0000000000..f1c1c24499
--- /dev/null
+++ b/main/clang/0008-Fix-ClangConfig-cmake-LLVM-path.patch
@@ -0,0 +1,25 @@
+From: Adeel <adeelbm@outlook.com>
+Date: Sun, 6 May 2018 10:22:00 +0200
+Subject: [PATCH] Fix ClangConfig.cmake to look for LLVM-Config.cmake in correct location
+
+This results in the following change in the generated ClangConfig.cmake:
+
+ find_package(LLVM REQUIRED CONFIG
+ - HINTS "${CLANG_INSTALL_PREFIX}/lib/cmake/llvm")
+ + HINTS "/usr/lib/llvm5/lib/cmake/llvm")
+
+This is needed e.g. for building lldb.
+
+See https://github.com/alpinelinux/aports/pull/2342 for more information.
+
+--- a/cmake/modules/CMakeLists.txt
++++ b/cmake/modules/CMakeLists.txt
+@@ -39,7 +39,7 @@ foreach(p ${_count})
+ get_filename_component(CLANG_INSTALL_PREFIX \"\${CLANG_INSTALL_PREFIX}\" PATH)")
+ endforeach(p)
+ set(CLANG_CONFIG_CMAKE_DIR "\${CLANG_INSTALL_PREFIX}/${CLANG_INSTALL_PACKAGE_DIR}")
+-set(CLANG_CONFIG_LLVM_CMAKE_DIR "\${CLANG_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")
++set(CLANG_CONFIG_LLVM_CMAKE_DIR "${llvm_cmake_builddir}")
+ set(CLANG_CONFIG_EXPORTS_FILE "\${CLANG_CMAKE_DIR}/ClangTargets.cmake")
+ set(CLANG_CONFIG_INCLUDE_DIRS
+ "\${CLANG_INSTALL_PREFIX}/include"
diff --git a/main/clang/APKBUILD b/main/clang/APKBUILD
index bc204a6291..454397bded 100644
--- a/main/clang/APKBUILD
+++ b/main/clang/APKBUILD
@@ -3,7 +3,7 @@
pkgname=clang
# Note: Update together with llvm.
pkgver=5.0.1
-pkgrel=0
+pkgrel=1
_llvmver=${pkgver%%.*}
pkgdesc="A C language family front-end for LLVM"
arch="all"
@@ -31,6 +31,7 @@ source="https://llvm.org/releases/$pkgver/cfe-$pkgver.src.tar.xz
0005-Enable-PIE-by-default-for-Alpine-Linux.patch
0006-Link-with-z-now-by-default-for-Alpine-Linux.patch
0007-Enable-stack-protector-by-default-for-Alpine-Linux.patch
+ 0008-Fix-ClangConfig-cmake-LLVM-path.patch
"
builddir="$srcdir/cfe-$pkgver.src"
@@ -107,4 +108,5 @@ ca551fb4e8a844424c63e381c4e1e1239ee95548c7561d46d4e8ae01c65b5e46ece7c51021f152ad
0ba4e6cb6d6854ef627f7f6d60f9f6843490e6c8f91dba7e238742574aecf3c07b1f5928850ce755fca9eac07ef3ce814728da58aa1ed9afb03a397ce4c30562 0004-Add-musl-targets.patch
08486325536871346b190b4af3a7b80b58a0066028e6268b06714eb00b29925b3b414ea62fa5ec4ff908763aeec4257536e04275b40c3d55e0a6c5b433625b5c 0005-Enable-PIE-by-default-for-Alpine-Linux.patch
fe5927b7851a97a5223d5b698c5dd01a47ef2fa23d9556cfee976aa7bda639af922785cbe34169e121aab79b38bbb1704aebaf11b1f4f41bcd448947f6e9562b 0006-Link-with-z-now-by-default-for-Alpine-Linux.patch
-609ebc1c6cbccd43f8b08e6b653e6da996a09cdcf008744a56af7d8846f1e7a9fc6945d3cc68fba0d06071b6f8de796747606a34d1d5008e0dc620dc0812e3e0 0007-Enable-stack-protector-by-default-for-Alpine-Linux.patch"
+609ebc1c6cbccd43f8b08e6b653e6da996a09cdcf008744a56af7d8846f1e7a9fc6945d3cc68fba0d06071b6f8de796747606a34d1d5008e0dc620dc0812e3e0 0007-Enable-stack-protector-by-default-for-Alpine-Linux.patch
+9485fe4fd6182df543735ed8f4ce618693d0faeafa86d3f9574a6c7abf50978e2d56e0a94be3ed94d515cc937c388d66ceff1bbc9bb120d371b6d3e95340da00 0008-Fix-ClangConfig-cmake-LLVM-path.patch"