sys-cluster/hpx: Fix (all) cmake options, drop unused
authorAndreas Sturmlechner <asturm@gentoo.org>
Wed, 15 May 2019 14:29:41 +0000 (16:29 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Wed, 15 May 2019 14:53:25 +0000 (16:53 +0200)
Closes: https://bugs.gentoo.org/678778
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
sys-cluster/hpx/hpx-1.2.1.ebuild

index e4605b1b99ce76a49b5ebf7059ab3cb7baa2bb53..a57d12d298d17ee98fa6e0d0bd84975a631e10c0 100644 (file)
@@ -46,22 +46,22 @@ pkg_setup() {
 }
 
 src_configure() {
-       CMAKE_BUILD_TYPE=Release
        local mycmakeargs=(
-               -DHPX_BUILD_EXAMPLES=OFF
-               -DHPX_MALLOC=system
-               -DLIB=$(get_libdir)
-               -Dcmake_dir=cmake
-               -DHPX_BUILD_DOCUMENTATION=$(usex doc)
-               -DHPX_JEMALLOC=$(usex jemalloc)
+               -DHPX_WITH_EXAMPLES=OFF
+               -DHPX_WITH_DOCUMENTATION=$(usex doc)
+               -DHPX_WITH_PAPI=$(usex papi)
+               -DHPX_WITH_GOOGLE_PERFTOOLS=$(usex perftools)
                -DBUILD_TESTING=$(usex test)
-               -DHPX_GOOGLE_PERFTOOLS=$(usex perftools)
-               -DHPX_PAPI=$(usex papi)
        )
-
-       use jemalloc && mycmakeargs+=( -DHPX_MALLOC=jemalloc )
-       use perftools && mycmakeargs+=( -DHPX_MALLOC=tcmalloc )
-       use tbb && mycmakeargs+=( -DHPX_MALLOC=tbbmalloc )
+       if use jemalloc; then
+               mycmakeargs+=( -DHPX_WITH_MALLOC=jemalloc )
+       elif use perftools; then
+               mycmakeargs+=( -DHPX_WITH_MALLOC=tcmalloc )
+       elif use tbb; then
+               mycmakeargs+=( -DHPX_WITH_MALLOC=tbbmalloc )
+       else
+               mycmakeargs+=( -DHPX_WITH_MALLOC=system )
+       fi
 
        cmake-utils_src_configure
 }
@@ -73,8 +73,8 @@ src_test() {
 
 src_install() {
        cmake-utils_src_install
-       mv "${D}/usr/bin/spin" "${D}/usr/bin/hpx_spin" || die
        if use examples; then
+               mv "${D}/usr/bin/spin" "${D}/usr/bin/hpx_spin" || die
                insinto /usr/share/doc/${PF}
                doins -r examples
        fi