sci-biology/seqan: SLOT 1.4 and 2.1, allow for parallel installation

Gentoo-Bug: 566502
* EAPI=6

Package-Manager: portage-2.2.28
This commit is contained in:
David Seifert
2016-04-09 20:57:02 +02:00
parent e6b4be084d
commit 6cd6d4f4e0
5 changed files with 186 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
DIST seqan-1.3.1.zip 8787521 SHA256 87eebe73ace9ada2f4664a768ae212d4acc5fb3ce87702709c3d15bf2d153aeb SHA512 dafacccb4647fd0fc5a055d33390cb85f1c00ca74132e9b3839a739916acf9a2990db7db4f09e34f899b283cad8ccf6553a60cc7693164f250f08260c8ce8ae4 WHIRLPOOL 5a0a80d09e80285a4fc9fb9fb71adbea6b0b324a6a219cd7c9ef3d30e88133f5b25b3cf792b2b89e4ed07ff612f4aa347dc6f94e06974f947fe980c2e0a5d26b
DIST seqan-src-1.4.2.tar.gz 120601994 SHA256 2b2c48572ea82fc2ac6a6e46bbd4204b6f8200fde717612797426af5ff6b82c3 SHA512 dbb56167c507b70111619a414054d9e70f1db42507bbfdf9e40c5dcbbe9489ad4187d882e638a675e96551c860c08f8203c929c4c9a558b19ea7d6059f50492a WHIRLPOOL 3c7f38e35d826adad94d53d359df8b5f1fb51746f3103457b12b41bd0bf161dc463d4a1932b0b23f2274d723c796116af0940260e1922ce806bb2466445788f0
DIST seqan-src-2.0.0.tar.gz 115731415 SHA256 69cb39574e63de2f728715255ac7ffd26db6480d6ce33c8601eef05f282aed28 SHA512 9823b109c27fa770b86a72530ebb4f6ca4541f8f6cf979724730cd8c59809192c14178c01a9ec13ef0277c997c4c37f00c80bba1fef5ef57c367ae8285b0215a WHIRLPOOL afa5dd41106390f63523990ce876ef74952ce7787a2772c2116bafd564d466e588809e4c5812b5aa1137408a0291de739b70a9a1e116d212967f68f5246217f4
DIST seqan-src-2.1.1.tar.gz 110874831 SHA256 df083d5939d7e73fd00bbc6bb291ac7ea7b8d446cf89a9758fdffdc0eca9ec1c SHA512 b82eb93129921eb867785add46d63f667c07f40556cd431acc73489c1032c19ff65b49415697415bdc7b788ffb8a80ab8d9e987fa38fc39c2399ff265fdc333f WHIRLPOOL b684d14db0cf22c7d1428c589293ee69674225e5b91845532f3135950a5a6178d4434b783177b3622e8661247856a20b42a7fb9275df4324124d2b21d728790f
@@ -0,0 +1,30 @@
Add default disabled flag to enable generation of documentation.
For SeqAn 1.4.2 we generally do not want docs, as 1.4.2 is only a
support library for legacy tools.
--- seqan-1.4.2/CMakeLists.txt
+++ seqan-1.4.2/CMakeLists.txt
@@ -123,10 +123,12 @@
add_subdirectory (core)
message (STATUS "Configuring extras")
add_subdirectory (extras)
+if (NOT SEQAN_NO_DOX)
message (STATUS "Configuring docs")
add_subdirectory (docs)
message (STATUS "Configuring manual")
add_subdirectory (manual)
+endif ()
message (STATUS "Configuring sandbox")
add_subdirectory (sandbox)
message (STATUS "Configuring util/py_lib")
--- seqan-1.4.2/docs/main.py
+++ seqan-1.4.2/docs/main.py
@@ -123,7 +123,7 @@
# Done, print end message.
print 'Documentation created/updated.'
- return dddoc_html.WARNING_COUNT > 0
+ return 0
def main(argv):
+10
View File
@@ -0,0 +1,10 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
includedir=${prefix}/include
Name: @CMAKE_PROJECT_NAME@
Description: C++ library for biological sequence analysis
URL: http://www.seqan.de
Version: @SEQAN_VERSION_STRING@
Requires: zlib
Cflags: -I${includedir}
+71
View File
@@ -0,0 +1,71 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
PYTHON_COMPAT=( python2_7 )
inherit cmake-utils python-single-r1
DESCRIPTION="C++ Sequence Analysis Library"
HOMEPAGE="http://www.seqan.de/"
SRC_URI="http://packages.${PN}.de/${PN}-src/${PN}-src-${PV}.tar.gz"
SLOT="$(get_version_component_range 1-2)"
LICENSE="BSD GPL-3"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="cpu_flags_x86_sse4_1 test"
DEPEND="sys-libs/zlib
app-arch/bzip2
test? ( dev-python/nose[${PYTHON_USEDEP}] )"
REQUIRED_USE="${PYTHON_REQUIRED_USE} cpu_flags_x86_sse4_1"
#S="${WORKDIR}"/${PN}-${PN}-v${PV}
PATCHES=(
"${FILESDIR}/${P}-shared.patch"
"${FILESDIR}/${P}-include.patch"
"${FILESDIR}/${P}-buildsystem.patch"
)
src_prepare() {
# pkg-config file, taken from seqan 2.1
cp "${FILESDIR}"/${PN}.pc.in ${PN}-${SLOT}.pc || die
sed -e "s#@CMAKE_INSTALL_PREFIX@#${EPREFIX}/usr#" \
-e "s#includedir=\${prefix}/include#includedir=\${prefix}/include/${PN}-${SLOT}#" \
-e "s#@CMAKE_PROJECT_NAME@#${PN}#" \
-e "s#@SEQAN_VERSION_STRING@#${PV}#" \
-i ${PN}-${SLOT}.pc || die
rm -f util/cmake/FindZLIB.cmake || die
cmake-utils_src_prepare
}
src_configure() {
local mycmakeargs=(
-DBoost_NO_BOOST_CMAKE=ON
-DSEQAN_BUILD_SYSTEM=SEQAN_RELEASE_LIBRARY
-DSEQAN_NO_DOX=ON
)
cmake-utils_src_configure
}
src_install() {
cmake-utils_src_install
# SLOT header such that different seqan versions can be used in parallel
mkdir "${ED}"/usr/include/${PN}-${SLOT} || die
mv "${ED}"/usr/include/{${PN},${PN}-${SLOT}/} || die
# pkg-config file
insinto /usr/share/pkgconfig/
doins ${PN}-${SLOT}.pc
}
pkg_postinst() {
einfo "${CATEGORY}/${PF} is only intended as support library for older"
einfo "bioinformatics tools relying on the SeqAn 1.* API. Please develop"
einfo "any new software against the latest SeqAn release and not this one."
}
+74
View File
@@ -0,0 +1,74 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
PYTHON_COMPAT=( python2_7 )
inherit cmake-utils python-single-r1
DESCRIPTION="C++ Sequence Analysis Library"
HOMEPAGE="http://www.seqan.de/"
SRC_URI="http://packages.${PN}.de/${PN}-src/${PN}-src-${PV}.tar.gz"
SLOT="$(get_version_component_range 1-2)"
LICENSE="BSD GPL-3"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="cpu_flags_x86_sse4_1 doc test"
DEPEND="sys-libs/zlib
app-arch/bzip2
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
test? ( dev-python/nose[${PYTHON_USEDEP}] )"
REQUIRED_USE="${PYTHON_REQUIRED_USE} cpu_flags_x86_sse4_1"
S="${WORKDIR}"/${PN}-${PN}-v${PV}
src_prepare() {
# install docs in proper Gentoo structure
sed -e "s#share/doc/seqan#share/doc/${PF}#" \
-e "s#\"share/doc/\${APP_NAME}\"#\"share/doc/${PF}/\${APP_NAME}\"#" \
-i util/cmake/SeqAnBuildSystem.cmake dox/CMakeLists.txt || die
# cmake module
sed -e "s#find_path(_SEQAN_BASEDIR \"seqan\"#find_path(_SEQAN_BASEDIR \"seqan-${SLOT}\"#" \
-e 's#NO_DEFAULT_PATH)#PATHS /usr)#' \
-e "s#set(SEQAN_INCLUDE_DIRS_MAIN \${SEQAN_INCLUDE_DIRS_MAIN} \${_SEQAN_BASEDIR})#set(SEQAN_INCLUDE_DIRS_MAIN \${SEQAN_INCLUDE_DIRS_MAIN} \${_SEQAN_BASEDIR}/seqan-${SLOT})#" \
-i util/cmake/FindSeqAn.cmake || die
# pkg-config file
sed -e "s#includedir=\${prefix}/include#includedir=\${prefix}/include/${PN}-${SLOT}#" \
-i util/pkgconfig/${PN}.pc.in || die
rm -f util/cmake/FindZLIB.cmake || die
cmake-utils_src_prepare
}
src_configure() {
local mycmakeargs=(
-DBoost_NO_BOOST_CMAKE=ON
-DSEQAN_BUILD_SYSTEM=SEQAN_RELEASE_LIBRARY
-DSEQAN_NO_DOX="$(usex !doc)"
)
cmake-utils_src_configure
}
src_compile() {
cmake-utils_src_compile
cd "${BUILD_DIR}" || die
use doc && emake dox
}
src_install() {
cmake-utils_src_install
# SLOT header such that different seqan versions can be installed in parallel
mkdir "${ED}"/usr/include/${PN}-${SLOT} || die
mv "${ED}"/usr/include/{${PN},${PN}-${SLOT}/} || die
# pkg-config file
mv "${ED}"/usr/share/pkgconfig/${PN}-{$(get_version_component_range 1),${SLOT}}.pc || die
dosym /usr/share/pkgconfig/${PN}-{${SLOT},$(get_version_component_range 1)}.pc
}