From ff8ce32f1cf8e129d2ee9a7fd62adfb7478fe61d Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Thu, 12 Jan 2017 11:35:39 +0100 Subject: sys-devel/llvm: Stop using custom build type in -9999 Switch -9999 to use standard CMAKE_BUILD_TYPE=RelWithDebInfo following the eclass and sys-devel/cmake changes to make it non-intrusive and Gentoo-friendly. This lets us skip hacking custom build type support in, and get a more well-defined behavior upstream. --- ...ake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch | 28 ++++++++++++++++++++++ ...ake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch | 28 ---------------------- sys-devel/llvm/llvm-3.8.1-r2.ebuild | 2 +- sys-devel/llvm/llvm-3.8.1.ebuild | 2 +- sys-devel/llvm/llvm-3.9.0-r1.ebuild | 2 +- sys-devel/llvm/llvm-3.9.1.ebuild | 2 +- sys-devel/llvm/llvm-9999.ebuild | 10 ++++---- 7 files changed, 37 insertions(+), 37 deletions(-) create mode 100644 sys-devel/llvm/files/3.9.1/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch delete mode 100644 sys-devel/llvm/files/9999/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch (limited to 'sys-devel/llvm') diff --git a/sys-devel/llvm/files/3.9.1/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch b/sys-devel/llvm/files/3.9.1/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch new file mode 100644 index 000000000000..8a2c091edfbf --- /dev/null +++ b/sys-devel/llvm/files/3.9.1/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch @@ -0,0 +1,28 @@ +From a2ecd4815d285281cb816e06b25dc0dc2a933073 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sun, 21 Aug 2016 23:13:45 +0200 +Subject: [PATCH 06/10] cmake: Remove the CMAKE_BUILD_TYPE assertion + +--- + CMakeLists.txt | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 894bc8c..453fcb8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -232,11 +232,6 @@ endif() + + string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) + +-if (CMAKE_BUILD_TYPE AND +- NOT uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$") +- message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") +-endif() +- + set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) + + set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')") +-- +2.9.3 + diff --git a/sys-devel/llvm/files/9999/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch b/sys-devel/llvm/files/9999/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch deleted file mode 100644 index 8a2c091edfbf..000000000000 --- a/sys-devel/llvm/files/9999/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch +++ /dev/null @@ -1,28 +0,0 @@ -From a2ecd4815d285281cb816e06b25dc0dc2a933073 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= -Date: Sun, 21 Aug 2016 23:13:45 +0200 -Subject: [PATCH 06/10] cmake: Remove the CMAKE_BUILD_TYPE assertion - ---- - CMakeLists.txt | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 894bc8c..453fcb8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -232,11 +232,6 @@ endif() - - string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) - --if (CMAKE_BUILD_TYPE AND -- NOT uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$") -- message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") --endif() -- - set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) - - set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')") --- -2.9.3 - diff --git a/sys-devel/llvm/llvm-3.8.1-r2.ebuild b/sys-devel/llvm/llvm-3.8.1-r2.ebuild index 9eff8cd66726..5ba7822d0e65 100644 --- a/sys-devel/llvm/llvm-3.8.1-r2.ebuild +++ b/sys-devel/llvm/llvm-3.8.1-r2.ebuild @@ -174,7 +174,7 @@ src_prepare() { eapply "${FILESDIR}"/3.8.1/0005-cmake-Do-not-install-libgtest.patch # Allow custom cmake build types (like 'Gentoo') - eapply "${FILESDIR}"/9999/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch + eapply "${FILESDIR}"/3.9.1/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch # Fix llvm-config for shared linking and sane flags # https://bugs.gentoo.org/show_bug.cgi?id=565358 diff --git a/sys-devel/llvm/llvm-3.8.1.ebuild b/sys-devel/llvm/llvm-3.8.1.ebuild index fb0575f21520..dcc83531c0d2 100644 --- a/sys-devel/llvm/llvm-3.8.1.ebuild +++ b/sys-devel/llvm/llvm-3.8.1.ebuild @@ -175,7 +175,7 @@ src_prepare() { eapply "${FILESDIR}"/3.8.1/0005-cmake-Do-not-install-libgtest.patch # Allow custom cmake build types (like 'Gentoo') - eapply "${FILESDIR}"/9999/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch + eapply "${FILESDIR}"/3.9.1/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch # Fix llvm-config for shared linking and sane flags # https://bugs.gentoo.org/show_bug.cgi?id=565358 diff --git a/sys-devel/llvm/llvm-3.9.0-r1.ebuild b/sys-devel/llvm/llvm-3.9.0-r1.ebuild index 905de6cef1f2..814931bd5b3b 100644 --- a/sys-devel/llvm/llvm-3.9.0-r1.ebuild +++ b/sys-devel/llvm/llvm-3.9.0-r1.ebuild @@ -181,7 +181,7 @@ src_prepare() { eapply "${FILESDIR}"/3.9.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch # Allow custom cmake build types (like 'Gentoo') - eapply "${FILESDIR}"/9999/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch + eapply "${FILESDIR}"/3.9.1/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch # Fix llvm-config for shared linking and sane flags # https://bugs.gentoo.org/show_bug.cgi?id=565358 diff --git a/sys-devel/llvm/llvm-3.9.1.ebuild b/sys-devel/llvm/llvm-3.9.1.ebuild index 72baa968b1e2..6fbfcd881720 100644 --- a/sys-devel/llvm/llvm-3.9.1.ebuild +++ b/sys-devel/llvm/llvm-3.9.1.ebuild @@ -181,7 +181,7 @@ src_prepare() { eapply "${FILESDIR}"/3.9.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch # Allow custom cmake build types (like 'Gentoo') - eapply "${FILESDIR}"/9999/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch + eapply "${FILESDIR}"/3.9.1/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch # Fix llvm-config for shared linking and sane flags # https://bugs.gentoo.org/show_bug.cgi?id=565358 diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild index 94c3a7d6e596..16e670ce14e0 100644 --- a/sys-devel/llvm/llvm-9999.ebuild +++ b/sys-devel/llvm/llvm-9999.ebuild @@ -5,8 +5,8 @@ EAPI=6 : ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to lib32 find_library fix) -CMAKE_MIN_VERSION=3.6.1-r1 +# (needed due to CMAKE_BUILD_TYPE != Gentoo) +CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python2_7 ) inherit check-reqs cmake-utils flag-o-matic git-r3 \ @@ -63,6 +63,9 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE} || ( ${ALL_LLVM_TARGETS[*]} ) multitarget? ( ${ALL_LLVM_TARGETS[*]} )" +# least intrusive of all +CMAKE_BUILD_TYPE=RelWithDebInfo + python_check_deps() { ! use test \ || has_version "dev-python/lit[${PYTHON_USEDEP}]" @@ -110,9 +113,6 @@ src_prepare() { # Python is needed to run tests using lit python_setup - # Allow custom cmake build types (like 'Gentoo') - eapply "${FILESDIR}"/9999/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch - # Fix llvm-config for shared linking and sane flags # https://bugs.gentoo.org/show_bug.cgi?id=565358 eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch -- cgit v1.2.3-65-gdbad