dev/llvm: cleanup FHS on CMake files

Mon, 14 Oct 2019 11:52:11 +0000

author
David Demelier <markand@malikania.fr>
date
Mon, 14 Oct 2019 11:52:11 +0000
changeset 1171
4beb14cb5714
parent 1170
ee9a3ed0343b
child 1172
6c57eafaa842

dev/llvm: cleanup FHS on CMake files

dev/llvm/llvm.sh file | annotate | diff | comparison | revisions
dev/llvm/patch-fhs.patch file | annotate | diff | comparison | revisions
--- a/dev/llvm/llvm.sh	Fri Oct 11 08:36:11 2019 +0000
+++ b/dev/llvm/llvm.sh	Mon Oct 14 11:52:11 2019 +0000
@@ -109,6 +109,7 @@
 	tar xvf $PKGNAME-$PKGVERSION.src.tar.xz
 	cd $PKGNAME-$PKGVERSION.src
 
+	patch -p0 < ../patch-fhs.patch
 	mkdir build && cd build
 	cmake .. \
 		-DCMAKE_BUILD_TYPE=Release \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dev/llvm/patch-fhs.patch	Mon Oct 14 11:52:11 2019 +0000
@@ -0,0 +1,19 @@
+--- cmake/modules/CMakeLists.txt.orig	2019-10-14 13:50:28.147182824 +0200
++++ cmake/modules/CMakeLists.txt	2019-10-14 13:50:44.335183321 +0200
+@@ -86,16 +86,6 @@
+   )
+ 
+ # 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_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/include")
+ set(LLVM_CONFIG_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")
+ set(LLVM_CONFIG_MAIN_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")

mercurial