diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2021-03-07 17:31:44 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2021-03-07 19:53:20 +0100 |
commit | e7bef38a50bcb75a40e9738e75bdfc37a9ded969 (patch) | |
tree | e32623dd73c4b5abef30adad456ae62bb2836197 /sci-biology | |
parent | sci-biology/uchime: EAPI-7 bump, use cmake.eclass, https, fix HOMEPAGE (diff) | |
download | gentoo-e7bef38a50bcb75a40e9738e75bdfc37a9ded969.tar.gz gentoo-e7bef38a50bcb75a40e9738e75bdfc37a9ded969.tar.bz2 gentoo-e7bef38a50bcb75a40e9738e75bdfc37a9ded969.zip |
sci-biology/seqan: Port to EAPI-7, cmake.eclass, https
- Fix cmake config install path
- Fix pkgconfig install path
- Fix examples install path
- Fix build with BUILD_SHARED_LIBS=ON default
Package-Manager: Portage-3.0.16, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'sci-biology')
-rw-r--r-- | sci-biology/seqan/files/seqan-2.4.0-cmake-add_library-static.patch | 38 | ||||
-rw-r--r-- | sci-biology/seqan/files/seqan-2.4.0-installpaths.patch | 24 | ||||
-rw-r--r-- | sci-biology/seqan/seqan-2.4.0-r1.ebuild | 79 | ||||
-rw-r--r-- | sci-biology/seqan/seqan-2.4.0.ebuild | 27 |
4 files changed, 151 insertions, 17 deletions
diff --git a/sci-biology/seqan/files/seqan-2.4.0-cmake-add_library-static.patch b/sci-biology/seqan/files/seqan-2.4.0-cmake-add_library-static.patch new file mode 100644 index 000000000000..7617d9f9a665 --- /dev/null +++ b/sci-biology/seqan/files/seqan-2.4.0-cmake-add_library-static.patch @@ -0,0 +1,38 @@ +From 1877d143ad9f42d80692073538e3f32b37e15967 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Sun, 7 Mar 2021 19:35:44 +0100 +Subject: [PATCH] Fix linking with BUILD_SHARED_LIBS=ON default in EAPI-7 + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + apps/mason2/CMakeLists.txt | 2 +- + apps/pair_align/lib/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/apps/mason2/CMakeLists.txt b/apps/mason2/CMakeLists.txt +index 2218187..c042ea7 100644 +--- a/apps/mason2/CMakeLists.txt ++++ b/apps/mason2/CMakeLists.txt +@@ -52,7 +52,7 @@ add_definitions (-DSEQAN_REVISION="${SEQAN_REVISION}") + add_definitions (-DSEQAN_DATE="${SEQAN_DATE}") + + # We define a library for the reusable parts of Mason. +-add_library (mason_sim ++add_library (mason_sim STATIC + external_split_merge.h + external_split_merge.cpp + fragment_generation.h +diff --git a/apps/pair_align/lib/CMakeLists.txt b/apps/pair_align/lib/CMakeLists.txt +index 75faef7..3b9576e 100644 +--- a/apps/pair_align/lib/CMakeLists.txt ++++ b/apps/pair_align/lib/CMakeLists.txt +@@ -53,5 +53,5 @@ endforeach(GAPS_T) + + # This part can be used instead for cmake version greater or equal to 2.8.8. + # This requires to update the script above as well. +-add_library(pair_align_lib pair_align_lib.cpp pair_align_lib.h ${LIB_TARGETS}) ++add_library(pair_align_lib STATIC pair_align_lib.cpp pair_align_lib.h ${LIB_TARGETS}) + target_link_libraries(pair_align_lib ${SEQAN_LIBRARIES}) +-- +2.30.1 + diff --git a/sci-biology/seqan/files/seqan-2.4.0-installpaths.patch b/sci-biology/seqan/files/seqan-2.4.0-installpaths.patch new file mode 100644 index 000000000000..35f0718f9d8d --- /dev/null +++ b/sci-biology/seqan/files/seqan-2.4.0-installpaths.patch @@ -0,0 +1,24 @@ +--- a/util/cmake/SeqAnBuildSystem.cmake 2018-01-11 12:32:45.591134000 +0100 ++++ b/util/cmake/SeqAnBuildSystem.cmake 2018-01-11 12:51:55.193282581 +0100 +@@ -399,10 +399,10 @@ + # Install pkg-config file, except on Windows. + if (NOT CMAKE_SYSTEM_NAME MATCHES Windows) + configure_file("util/pkgconfig/seqan.pc.in" "${CMAKE_BINARY_DIR}/util/pkgconfig/seqan-${SEQAN_VERSION_MAJOR}.pc" @ONLY) +- install(FILES "${CMAKE_BINARY_DIR}/util/pkgconfig/seqan-${SEQAN_VERSION_MAJOR}.pc" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig) ++ install(FILES "${CMAKE_BINARY_DIR}/util/pkgconfig/seqan-${SEQAN_VERSION_MAJOR}.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + endif (NOT CMAKE_SYSTEM_NAME MATCHES Windows) + # Install FindSeqAn TODO(h-2) rename seqan-config.cmake to seqan-config${SEQAN_VERSION_MAJOR}.cmake after 2.x cycle +- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/util/cmake/seqan-config.cmake" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cmake/seqan/) ++ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/util/cmake/seqan-config.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/seqan2/) + + # Install headers + file (GLOB HEADERS +@@ -473,7 +473,7 @@ + set (CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc" CACHE STRING "Documentation root (DATAROOTDIR/doc)" FORCE) + endif () + set (SEQAN_PREFIX_SHARE "${CMAKE_INSTALL_DATADIR}/${APP_NAME}") +- set (SEQAN_PREFIX_SHARE_DOC "${CMAKE_INSTALL_DOCDIR}/${APP_NAME}") ++ set (SEQAN_PREFIX_SHARE_DOC "${CMAKE_INSTALL_DOCDIR}/examples/") + endif () + endmacro (seqan_setup_install_vars) + diff --git a/sci-biology/seqan/seqan-2.4.0-r1.ebuild b/sci-biology/seqan/seqan-2.4.0-r1.ebuild new file mode 100644 index 000000000000..76a73d759bef --- /dev/null +++ b/sci-biology/seqan/seqan-2.4.0-r1.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake multibuild toolchain-funcs + +DESCRIPTION="C++ Sequence Analysis Library" +HOMEPAGE="https://www.seqan.de/" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/seqan/seqan.git" + EGIT_BRANCH="develop" +else + SRC_URI="https://github.com/seqan/seqan/archive/seqan-v${PV}.tar.gz" + KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" + S="${WORKDIR}"/seqan-seqan-v${PV} +fi + +LICENSE="BSD GPL-3" +SLOT="0" +IUSE="cpu_flags_x86_sse4_1 tools" +REQUIRED_USE="cpu_flags_x86_sse4_1" + +RDEPEND=" + app-arch/bzip2:= + sys-libs/zlib + !!sci-biology/seqan:2.0 + !!sci-biology/seqan:2.1 + !!sci-biology/seqan:2.2" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-fix-pthread.patch + "${FILESDIR}"/${P}-installpaths.patch + "${FILESDIR}"/${P}-cmake-add_library-static.patch +) + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]]; then + use tools && tc-check-openmp + + MULTIBUILD_VARIANTS=( $(usev tools) library ) + fi +} + +src_configure() { + my_configure() { + local mycmakeargs=( + -DSEQAN_NO_DOX=ON + ) + case "${MULTIBUILD_ID}" in + tools) + mycmakeargs+=( + -DSEQAN_BUILD_SYSTEM=SEQAN_RELEASE_APPS + ) + ;; + library) + mycmakeargs+=( + -DSEQAN_BUILD_SYSTEM=SEQAN_RELEASE_LIBRARY + ) + ;; + *) + die "${MULTIBUILD_ID} is not recognized" + ;; + esac + cmake_src_configure + } + multibuild_foreach_variant my_configure +} + +src_compile() { + multibuild_foreach_variant cmake_src_compile +} + +src_install() { + multibuild_foreach_variant cmake_src_install +} diff --git a/sci-biology/seqan/seqan-2.4.0.ebuild b/sci-biology/seqan/seqan-2.4.0.ebuild index 5653a1ec94e4..cf73c6984d0e 100644 --- a/sci-biology/seqan/seqan-2.4.0.ebuild +++ b/sci-biology/seqan/seqan-2.4.0.ebuild @@ -1,14 +1,12 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} - -inherit cmake-utils multibuild toolchain-funcs +inherit cmake multibuild toolchain-funcs DESCRIPTION="C++ Sequence Analysis Library" -HOMEPAGE="http://www.seqan.de/" +HOMEPAGE="https://www.seqan.de/" if [[ ${PV} == *9999 ]]; then inherit git-r3 @@ -17,8 +15,7 @@ if [[ ${PV} == *9999 ]]; then else SRC_URI="https://github.com/seqan/seqan/archive/seqan-v${PV}.tar.gz" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" - - S=${WORKDIR}/seqan-seqan-v${PV} + S="${WORKDIR}"/seqan-seqan-v${PV} fi LICENSE="BSD GPL-3" @@ -32,8 +29,7 @@ RDEPEND=" !!sci-biology/seqan:2.0 !!sci-biology/seqan:2.1 !!sci-biology/seqan:2.2" -DEPEND=" - ${RDEPEND}" +DEPEND="${RDEPEND}" PATCHES=( "${FILESDIR}"/${PN}-2.4.0-fix-pthread.patch ) @@ -41,10 +37,7 @@ pkg_setup() { if [[ ${MERGE_TYPE} != binary ]]; then use tools && tc-check-openmp - MULTIBUILD_VARIANTS=( - $(usev tools) - library - ) + MULTIBUILD_VARIANTS=( $(usev tools) library ) fi } @@ -69,15 +62,15 @@ src_configure() { die "${MULTIBUILD_ID} is not recognized" ;; esac - cmake-utils_src_configure + cmake_src_configure } multibuild_foreach_variant my_configure } src_compile() { - multibuild_foreach_variant cmake-utils_src_compile + multibuild_foreach_variant cmake_src_compile } src_install() { - multibuild_foreach_variant cmake-utils_src_install + multibuild_foreach_variant cmake_src_install } |