commit: 57485834b37ce2b2da440ee2befb0c92abc725d5 Author: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> AuthorDate: Sun Apr 22 23:04:03 2018 +0000 Commit: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> CommitDate: Sun Apr 22 23:04:03 2018 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=57485834
sci-biology/kat: properly install python files Thanks to kiwifb. Drop -8888, update -9999 and -2.4.1 to link against system-wide boost. No ebuilds left which would let the bundled boost slip in as a static library. See: https://github.com/TGAC/KAT/issues/94#issuecomment-383385701 Closes: https://github.com/gentoo/sci/issues/867 Package-Manager: Portage-2.3.31, Repoman-2.3.9 sci-biology/kat/kat-2.4.1.ebuild | 44 ++++++++++++++++--------- sci-biology/kat/kat-8888.ebuild | 70 ---------------------------------------- sci-biology/kat/kat-9999.ebuild | 50 +++++++++++++++++----------- 3 files changed, 59 insertions(+), 105 deletions(-) diff --git a/sci-biology/kat/kat-2.4.1.ebuild b/sci-biology/kat/kat-2.4.1.ebuild index 86dd7b5a8..3bd8b7dde 100644 --- a/sci-biology/kat/kat-2.4.1.ebuild +++ b/sci-biology/kat/kat-2.4.1.ebuild @@ -6,15 +6,15 @@ EAPI=6 PYTHON_COMPAT=( python3_{5,6} ) # requires python >= 3.1 but more features with >=3.5 # https://github.com/Ensembl/Bio-DB-HTS/issues/30 -inherit python-r1 eutils flag-o-matic +inherit eutils flag-o-matic autotools distutils-r1 DESCRIPTION="K-mer Analysis Toolkit (histogram, filter, compare sets, plot)" HOMEPAGE="https://github.com/TGAC/KAT" -SRC_URI="https://github.com/TGAC/KAT/archive/Release-${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI="https://github.com/TGAC/KAT/archive/Release-2.4.1.tar.gz -> ${P}.tar.gz" LICENSE="GPL-3+" SLOT="0" -KEYWORDS="" +KEYWORDS="~amd64 ~x86" IUSE="cpu_flags_x86_sse doc tex" DEPEND=" @@ -26,32 +26,44 @@ DEPEND=" doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) tex? ( dev-tex/latexmk dev-texlive/texlive-formatsextra )" RDEPEND="${DEPEND}" -# contains bundled *modified* version of jellyfish-2.2 which should install under different filenames +# contains bundled a *modified* version of jellyfish-2.2.0 (libkat_jellyfish.{a,so}) # contains embedded sci-biology/seqan S="${WORKDIR}"/KAT-Release-"${PV}" src_prepare(){ default - # autogen.sh - test -n "$srcdir" || local srcdir=`dirname "$0"` - test -n "$srcdir" || local srcdir=. - eautoreconf --force --install --verbose "$srcdir" + # keep bundled seqan-library-2.0.0 jellyfish-2.2.0 + # seqan header do not hurt + # jellyfish-2.2.0 is a modified version, "kat_" prefixes are added to all binaries + # https://github.com/TGAC/KAT/issues/93#issuecomment-383377666 + rm -rf deps/boost || die "Failed to zap bundled boost" + epatch "${FILESDIR}"/kat-2.4.1-ignore-bundled-deps.patch + epatch "${FILESDIR}"/kat-2.4.1-do-not-run-setup.py.patch + eautoreconf + pushd scripts >/dev/null || die + distutils-r1_src_prepare + popd > /dev/null || die } src_configure(){ local myconf=() myconf+=( --disable-gnuplot ) # python3 does better image rendering, no need for gnuplot use cpu_flags_x86_sse && myconf+=( $(use_with cpu_flags_x86_sse sse) ) # pass down to jellyfish-2.2.0/configure - PYTHON_VERSION=3 econf ${myconf[@]} + econf ${myconf[@]} } src_compile(){ - # build_boost.sh - cd deps/boost || die - ./bootstrap.sh --prefix=build --with-libraries=chrono,exception,program_options,timer,filesystem,system,stacktrace || die - # https://github.com/TGAC/KAT/issues/92#issuecomment-383373418 - ./b2 headers --ignore-site-config || die - ./b2 install --ignore-site-config || die - cd ../.. || die + emake + cd doc && make latexpdf && cd .. || die + pushd scripts >/dev/null || die + distutils-r1_src_compile + popd > /dev/null || die +} + +src_install(){ + default + pushd scripts >/dev/null || die + distutils-r1_src_install + popd > /dev/null || die } diff --git a/sci-biology/kat/kat-8888.ebuild b/sci-biology/kat/kat-8888.ebuild deleted file mode 100644 index 07c3f57d2..000000000 --- a/sci-biology/kat/kat-8888.ebuild +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python3_{5,6} ) # requires python >= 3.1 but more features with >=3.5 -# https://github.com/Ensembl/Bio-DB-HTS/issues/30 - -inherit git-r3 eutils flag-o-matic autotools distutils-r1 - -DESCRIPTION="K-mer Analysis Toolkit (histogram, filter, compare sets, plot)" -HOMEPAGE="https://github.com/TGAC/KAT" -EGIT_REPO_URI="https://github.com/TGAC/KAT.git" - -LICENSE="GPL-3+" -SLOT="0" -KEYWORDS="" -IUSE="cpu_flags_x86_sse doc tex" - -DEPEND=" - >=dev-libs/boost-1.52[${PYTHON_USEDEP}] - dev-python/tabulate[${PYTHON_USEDEP}] - dev-python/matplotlib[${PYTHON_USEDEP}] - dev-python/numpy[${PYTHON_USEDEP}] - sci-libs/scipy[${PYTHON_USEDEP}] - doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) - tex? ( dev-tex/latexmk dev-texlive/texlive-formatsextra )" -RDEPEND="${DEPEND}" -# contains bundled a *modified* version of jellyfish-2.2.0 (libkat_jellyfish.{a,so}) -# contains embedded sci-biology/seqan - -src_prepare(){ - default - # keep bundled seqan-library-2.0.0 jellyfish-2.2.0 - # seqan header do not hurt - # jellyfish-2.2.0 is a modified version, "kat_" prefixes are added to all binaries - # https://github.com/TGAC/KAT/issues/93#issuecomment-383377666 - rm -rf deps/boost || die "Failed to zap bundled boost" - epatch "${FILESDIR}"/kat-2.4.1-ignore-bundled-deps.patch - epatch "${FILESDIR}"/kat-2.4.1-do-not-run-setup.py.patch - eautoreconf -} - -src_configure(){ - local myconf=() - myconf+=( --disable-gnuplot ) # python3 does better image rendering, no need for gnuplot - use cpu_flags_x86_sse && myconf+=( $(use_with cpu_flags_x86_sse sse) ) # pass down to jellyfish-2.20/configure - econf ${myconf[@]} -} - -src_compile(){ - emake - cd doc && make latexpdf || die -} - -src_install(){ - # emake install - default - # install python files (the "${FILESDIR}"/kat-2.4.1-do-not-run-setup.py.patch - # removed code which ignored ${DESTDIR}) - # https://github.com/TGAC/KAT/issues/94#issuecomment-383385701 - cd scripts || die - esetup.py install --record install_files.txt -} - -# probably the below is not needed (does not seem to work) -python_install_all() { - cd scripts || die - distutils-r1_python_install_all -} diff --git a/sci-biology/kat/kat-9999.ebuild b/sci-biology/kat/kat-9999.ebuild index 403a0df59..0ccec1481 100644 --- a/sci-biology/kat/kat-9999.ebuild +++ b/sci-biology/kat/kat-9999.ebuild @@ -6,7 +6,7 @@ EAPI=6 PYTHON_COMPAT=( python3_{5,6} ) # requires python >= 3.1 but more features with >=3.5 # https://github.com/Ensembl/Bio-DB-HTS/issues/30 -inherit git-r3 eutils flag-o-matic autotools +inherit git-r3 eutils flag-o-matic autotools distutils-r1 DESCRIPTION="K-mer Analysis Toolkit (histogram, filter, compare sets, plot)" HOMEPAGE="https://github.com/TGAC/KAT" @@ -18,12 +18,12 @@ KEYWORDS="" IUSE="cpu_flags_x86_sse doc tex" DEPEND=" - >=dev-libs/boost-1.52 - dev-python/tabulate - dev-python/matplotlib - dev-python/numpy - sci-libs/scipy - doc? ( dev-python/sphinx ) + >=dev-libs/boost-1.52[${PYTHON_USEDEP}] + dev-python/tabulate[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + sci-libs/scipy[${PYTHON_USEDEP}] + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) tex? ( dev-tex/latexmk dev-texlive/texlive-formatsextra )" RDEPEND="${DEPEND}" # contains bundled a *modified* version of jellyfish-2.2.0 (libkat_jellyfish.{a,so}) @@ -31,25 +31,37 @@ RDEPEND="${DEPEND}" src_prepare(){ default - # autogen.sh - test -n "$srcdir" || local srcdir=`dirname "$0"` - test -n "$srcdir" || local srcdir=. - eautoreconf --force --install --verbose "$srcdir" + # keep bundled seqan-library-2.0.0 jellyfish-2.2.0 + # seqan header do not hurt + # jellyfish-2.2.0 is a modified version, "kat_" prefixes are added to all binaries + # https://github.com/TGAC/KAT/issues/93#issuecomment-383377666 + rm -rf deps/boost || die "Failed to zap bundled boost" + epatch "${FILESDIR}"/kat-2.4.1-ignore-bundled-deps.patch + epatch "${FILESDIR}"/kat-2.4.1-do-not-run-setup.py.patch + eautoreconf + pushd scripts >/dev/null || die + distutils-r1_src_prepare + popd > /dev/null || die } src_configure(){ local myconf=() myconf+=( --disable-gnuplot ) # python3 does better image rendering, no need for gnuplot use cpu_flags_x86_sse && myconf+=( $(use_with cpu_flags_x86_sse sse) ) # pass down to jellyfish-2.2.0/configure - PYTHON_VERSION=3 econf ${myconf[@]} + econf ${myconf[@]} } src_compile(){ - # build_boost.sh - cd deps/boost || die - ./bootstrap.sh --prefix=build --with-libraries=chrono,exception,program_options,timer,filesystem,system,stacktrace || die - # https://github.com/TGAC/KAT/issues/92#issuecomment-383373418 - ./b2 headers --ignore-site-config || die - ./b2 install --ignore-site-config || die - cd ../.. || die + emake + cd doc && make latexpdf && cd .. || die + pushd scripts >/dev/null || die + distutils-r1_src_compile + popd > /dev/null || die +} + +src_install(){ + default + pushd scripts >/dev/null || die + distutils-r1_src_install + popd > /dev/null || die }