commit:     f373141b6dd59db5eaf1bce4104e5ba6085958ac
Author:     François Bissey <frp.bissey <AT> gmail <DOT> com>
AuthorDate: Mon Apr 23 08:51:16 2018 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Mon May  7 21:44:57 2018 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=f373141b

sci-biology/kat: various fixes for issue #867

  many thanks to @kiwifb and @maplesond for on fixing the package and ebuild

  ax_check_zlib is in use. A hint for zlib location has to be provided
  otherwise system zlib will be used on prefix.

  make sure zlib is a dependency. develop branch has switched to proper
  library detection.

  fixing rpath. enabling python support (but broken right now).

  make sure a suitable python3 is setup at configure time

  bump to 2.4.2

  fix typo in /DEPPEND/DEPEND/, cleanup comments

Closes: https://github.com/gentoo/sci/issues/867
Closes: https://github.com/gentoo/sci/pull/868

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 .../kat/files/kat-2.4.1-do-not-run-setup.py.patch  |  30 ------
 .../kat/files/kat-2.4.1-ignore-bundled-deps.patch  | 101 ---------------------
 .../kat/files/kat-2.4.1-make_no_pykat.patch        |  15 +++
 .../kat/files/kat-2.4.1-no_static_build.patch      |  43 +++++++++
 .../kat/files/kat-2.4.2-ignore-bundled-deps.patch  |  79 ++++++++++++++++
 .../kat/files/kat-2.4.2-no_static_build.patch      |  56 ++++++++++++
 sci-biology/kat/kat-2.4.1.ebuild                   |  69 --------------
 sci-biology/kat/kat-2.4.2.ebuild                   |  78 ++++++++++++++++
 sci-biology/kat/kat-9999.ebuild                    |  60 +++++++-----
 sci-biology/kat/metadata.xml                       |   4 -
 10 files changed, 307 insertions(+), 228 deletions(-)

diff --git a/sci-biology/kat/files/kat-2.4.1-do-not-run-setup.py.patch 
b/sci-biology/kat/files/kat-2.4.1-do-not-run-setup.py.patch
deleted file mode 100644
index a00c971a6..000000000
--- a/sci-biology/kat/files/kat-2.4.1-do-not-run-setup.py.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- scripts/Makefile.am.ori    2018-04-22 16:02:12.829046527 +0200
-+++ scripts/Makefile.am        2018-04-22 16:05:31.444532061 +0200
-@@ -1,27 +1,6 @@
- AUTOMAKE_OPTIONS = subdir-objects
- 
- 
--if MAKE_PYKAT_INSTALL
--
--install-exec-hook:
--      export PYTHONPATH=$(prefix)/lib/python$(PYTHON_VERSION)/site-packages 
&& \
--      mkdir -p $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/ && \
--      python3 setup.py install --prefix=$(prefix) --record install_files.txt
--
--uninstall-hook:
--      cat install_files.txt | xargs rm -rf
--
--else
--
--install-exec-hook:
--      mkdir -p $(prefix)/lib/python$(PYTHON_VERSION)/local/ && \
--      cp -r kat $(prefix)/lib/python$(PYTHON_VERSION)/local
--
--uninstall-hook:
--      rm -rf $(prefix)/lib/python$(PYTHON_VERSION)/local
--
--endif
--
- EXTRA_DIST = \
-       kat/distanalysis.py \
-       kat/plot/__init__.py \

diff --git a/sci-biology/kat/files/kat-2.4.1-ignore-bundled-deps.patch 
b/sci-biology/kat/files/kat-2.4.1-ignore-bundled-deps.patch
deleted file mode 100644
index 649f3ecd8..000000000
--- a/sci-biology/kat/files/kat-2.4.1-ignore-bundled-deps.patch
+++ /dev/null
@@ -1,101 +0,0 @@
---- configure.ac.ori   2018-04-22 12:19:37.318794996 +0200
-+++ configure.ac       2018-04-22 12:20:43.310663598 +0200
-@@ -172,8 +172,8 @@
- 
- 
- AC_CONFIG_HEADERS([config.h])
--AC_CONFIG_FILES([Makefile doc/Makefile doc/source/conf.py lib/kat.pc 
lib/Makefile src/Makefile tests/Makefile tests/compat.sh 
deps/seqan-library-2.0.0/Makefile scripts/setup.py scripts/kat/__init__.py 
scripts/Makefile])
--AC_CONFIG_SUBDIRS([deps/jellyfish-2.2.0])
-+AC_CONFIG_FILES([Makefile doc/Makefile doc/source/conf.py lib/kat.pc 
lib/Makefile src/Makefile tests/Makefile tests/compat.sh 
deps/seqan-library-2.0.0/Makefile scripts/setup.py scripts/kat/__init__.py 
scripts/Makefile])
-+AC_CONFIG_SUBDIRS([deps/jellyfish-2.2.0])
- AC_OUTPUT
- 
- pystr="detected ${PYTHON_VERSION}.  Plotting and downstream analysis enabled."
---- lib/Makefile.am.ori        2018-04-22 15:30:34.983653065 +0200
-+++ lib/Makefile.am    2018-04-22 15:30:46.143961300 +0200
-@@ -7,8 +7,7 @@
- 
- libkat_la_LDFLAGS = \
-       -version-info 2:4:0 \
--      -L../deps/jellyfish-2.2.0 \
--      -L../deps/boost/build/lib
-+      -L../deps/jellyfish-2.2.0
- 
- libkat_la_SOURCES = \
-       src/matrix_metadata_extractor.cc \
-@@ -31,7 +30,6 @@
- 
- libkat_la_CPPFLAGS = \
-       -I$(top_srcdir)/deps/jellyfish-2.2.0/include \
--      -I$(top_srcdir)/deps/boost/build/include \
-       -I$(top_srcdir)/lib/include \
-       -DKAT_SITE_PKGS='"$(libdir)/python$(PYTHON_VERSION)/site-packages"' \
-       @AM_CPPFLAGS@
---- src/Makefile.am.ori        2018-04-22 15:30:46.203962959 +0200
-+++ src/Makefile.am    2018-04-22 15:31:41.385487008 +0200
-@@ -14,7 +14,6 @@
- kat_CPPFLAGS = \
-       -I$(top_srcdir)/deps/seqan-library-2.0.0/include \
-       -I$(top_srcdir)/deps/jellyfish-2.2.0/include \
--      -I$(top_srcdir)/deps/boost/build/include \
-       -I$(top_srcdir)/lib/include \
-       -DKAT_SITE_PKGS='"$(libdir)/python$(PYTHON_VERSION)/site-packages"' \
-       @AM_CPPFLAGS@
-@@ -23,17 +22,16 @@
-       -static \
-       -L../lib \
-       -L../deps/jellyfish-2.2.0 \
--      -L../deps/boost/build/lib \
-       @AM_LDFLAGS@
- 
- kat_LDADD = \
-       -lkat \
-       -lkat_jellyfish \
--      ../deps/boost/build/lib/libboost_timer.a \
--      ../deps/boost/build/lib/libboost_chrono.a \
--      ../deps/boost/build/lib/libboost_filesystem.a \
--      ../deps/boost/build/lib/libboost_program_options.a \
--      ../deps/boost/build/lib/libboost_system.a \
-+      -lboost_timer \
-+      -lboost_chrono \
-+      -lboost_filesystem \
-+      -lboost_program_options \
-+      -lboost_system \
-       @AM_LIBS@
- 
- noinst_HEADERS = \
---- tests/Makefile.am.ori      2018-04-22 15:31:41.505490322 +0200
-+++ tests/Makefile.am  2018-04-22 15:32:37.787044756 +0200
-@@ -31,7 +31,6 @@
-       -I$(top_srcdir)/lib/include \
-       -I$(top_srcdir)/deps/seqan-library-2.0.0/include \
-       -I$(top_srcdir)/deps/jellyfish-2.2.0/include \
--      -I$(top_srcdir)/deps/boost/build/include \
-       -DDATADIR=\"$(srcdir)/data\" \
-       -DKAT_SITE_PKGS='"$(libdir)/python$(PYTHON_VERSION)/site-packages"' \
-       @AM_CPPFLAGS@
-@@ -61,7 +60,6 @@
-       -L. \
-       -L../lib \
-       -L../deps/jellyfish-2.2.0 \
--      -L../deps/boost/build/lib \
-       @AM_LDFLAGS@
- 
- check_unit_tests_LDADD = \
-@@ -69,11 +67,11 @@
-       -lgtest \
-       -lkat \
-       -lkat_jellyfish \
--      ../deps/boost/build/lib/libboost_timer.a \
--    ../deps/boost/build/lib/libboost_chrono.a \
--    ../deps/boost/build/lib/libboost_filesystem.a \
--    ../deps/boost/build/lib/libboost_program_options.a \
--    ../deps/boost/build/lib/libboost_system.a \
-+      -lboost_timer \
-+      -lboost_chrono \
-+      -lboost_filesystem \
-+      -lboost_program_options \
-+      -lboost_system \
-       @AM_LIBS@
- 
- include gtest.mk

diff --git a/sci-biology/kat/files/kat-2.4.1-make_no_pykat.patch 
b/sci-biology/kat/files/kat-2.4.1-make_no_pykat.patch
new file mode 100644
index 000000000..7ba08010c
--- /dev/null
+++ b/sci-biology/kat/files/kat-2.4.1-make_no_pykat.patch
@@ -0,0 +1,15 @@
+diff --git a/Makefile.am b/Makefile.am
+index 5f0f42e..4da6c05 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -21,10 +21,6 @@ dist_noinst_SCRIPTS = autogen.sh antigen.sh build_boost.sh
+ # SRC DIRS
+ make_dirs=deps/jellyfish-2.2.0 deps/seqan-library-2.0.0 lib src tests
+ 
+-if MAKE_PYKAT
+-    make_dirs += scripts
+-endif
+-
+ if MAKE_DOCS
+     make_dirs += doc
+ endif

diff --git a/sci-biology/kat/files/kat-2.4.1-no_static_build.patch 
b/sci-biology/kat/files/kat-2.4.1-no_static_build.patch
new file mode 100644
index 000000000..c8ac6c901
--- /dev/null
+++ b/sci-biology/kat/files/kat-2.4.1-no_static_build.patch
@@ -0,0 +1,43 @@
+diff --git a/configure.ac b/configure.ac
+index b68c514..00c8a2e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -159,11 +159,11 @@ if [[ "${make_pykat}" == "yes" ]]; then
+     AM_CPPFLAGS="${ZLIB_CPPFLAGS} ${PYTHON_CPPFLAGS}"
+     AM_LIBS="${PTHREAD_CFLAGS} ${ZLIB_LIB} ${RT_LIB} ${PYTHON_EXTRA_LIBS} 
${PYTHON_LIBS}"
+     #AM_LDFLAGS="${ZLIB_LDFLAGS} ${PYTHON_EXTRA_LDFLAGS} ${PYTHON_RPATH} 
-static-libstdc++"
+-    AM_LDFLAGS="${ZLIB_LDFLAGS} -static-libstdc++ ${PYTHON_RPATH}"
++    AM_LDFLAGS="${ZLIB_LDFLAGS} ${PYTHON_RPATH}"
+ else
+     AM_CPPFLAGS="${ZLIB_CPPFLAGS}"
+     AM_LIBS="${PTHREAD_CFLAGS} ${ZLIB_LIB} ${RT_LIB}"
+-    AM_LDFLAGS="${ZLIB_LDFLAGS} -static-libstdc++"
++    AM_LDFLAGS="${ZLIB_LDFLAGS}"
+ fi
+ 
+ AC_SUBST([AM_CPPFLAGS])
+diff --git a/deps/jellyfish-2.2.0/Makefile.am 
b/deps/jellyfish-2.2.0/Makefile.am
+index 8f6fffd..d6e0a3d 100644
+--- a/deps/jellyfish-2.2.0/Makefile.am
++++ b/deps/jellyfish-2.2.0/Makefile.am
+@@ -7,7 +7,7 @@ man1_MANS = doc/kat_jellyfish.man
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = kat_jellyfish.pc
+ 
+-AM_LDFLAGS = $(ZLIB_LDFLAGS) $(ZLIB_LIB) -lpthread -static-libstdc++ # 
$(VALGRIND_LIBS)
++AM_LDFLAGS = $(ZLIB_LDFLAGS) $(ZLIB_LIB) -lpthread # $(VALGRIND_LIBS)
+ AM_CPPFLAGS = $(ZLIB_CPPFLAGS) -I$(top_srcdir) -I$(top_srcdir)/include # 
$(VALGRIND_CFLAGS)
+ AM_CXXFLAGS = $(ALL_CXXFLAGS) -Wall -Wnon-virtual-dtor 
-Wno-deprecated-declarations
+ 
+diff --git a/src/Makefile.am b/src/Makefile.am
+index a2ae071..71def5c 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -19,7 +19,6 @@ kat_CPPFLAGS = \
+       @AM_CPPFLAGS@
+ 
+ kat_LDFLAGS = \
+-      -static \
+       @AM_LDFLAGS@
+ 
+ kat_LDADD = \

diff --git a/sci-biology/kat/files/kat-2.4.2-ignore-bundled-deps.patch 
b/sci-biology/kat/files/kat-2.4.2-ignore-bundled-deps.patch
new file mode 100644
index 000000000..46d343294
--- /dev/null
+++ b/sci-biology/kat/files/kat-2.4.2-ignore-bundled-deps.patch
@@ -0,0 +1,79 @@
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index ac23917..0ca4be9 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -6,7 +6,6 @@ pkgconfig_DATA = kat.pc
+ lib_LTLIBRARIES = libkat.la
+ 
+ libkat_la_LDFLAGS = \
+-      -L$(top_builddir)/deps/boost/build/lib/ \
+       -version-info 2:4:2
+ 
+ LIBS = \
+@@ -41,7 +40,6 @@ library_include_HEADERS =   $(KI)/distance_metrics.hpp \
+ 
+ libkat_la_CPPFLAGS = \
+       -I$(top_srcdir)/deps/jellyfish-2.2.0/include \
+-      -I$(top_srcdir)/deps/boost/build/include \
+       -I$(top_srcdir)/lib/include \
+       -DKAT_SITE_PKGS='"$(prefix)/lib/python$(PYTHON_VERSION)/site-packages"' 
\
+       @AM_CPPFLAGS@
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 1cdf7e0..dfa878b 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -14,7 +14,6 @@ kat_CXXFLAGS = \
+ kat_CPPFLAGS = \
+       -I$(top_srcdir)/deps/seqan-library-2.0.0/include \
+       -I$(top_srcdir)/deps/jellyfish-2.2.0/include \
+-      -I$(top_srcdir)/deps/boost/build/include \
+       -I$(top_srcdir)/lib/include \
+       -DKAT_SCRIPTS='"$(datarootdir)/scripts"' \
+       -DKAT_SITE_PKGS='"$(prefix)/lib/python$(PYTHON_VERSION)/site-packages"' 
\
+@@ -25,13 +24,13 @@ kat_LDFLAGS = \
+       @AM_LDFLAGS@
+ 
+ kat_LDADD = \
+-      $(top_builddir)/deps/boost/build/lib/libboost_timer.a \
+-      $(top_builddir)/deps/boost/build/lib/libboost_chrono.a \
+-      $(top_builddir)/deps/boost/build/lib/libboost_filesystem.a \
+-      $(top_builddir)/deps/boost/build/lib/libboost_program_options.a \
+-      $(top_builddir)/deps/boost/build/lib/libboost_system.a \
+-      $(top_builddir)/deps/jellyfish-2.2.0/.libs/libkat_jellyfish.la \
+       $(top_builddir)/lib/libkat.la \
++      $(top_builddir)/deps/jellyfish-2.2.0/.libs/libkat_jellyfish.la \
++      -lboost_timer \
++      -lboost_chrono \
++      -lboost_filesystem \
++      -lboost_program_options \
++      -lboost_system \
+       @AM_LIBS@
+ 
+ noinst_HEADERS = \
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index eee4e8b..dec2a5f 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -31,7 +31,6 @@ AM_CPPFLAGS = \
+       -I$(top_srcdir)/lib/include \
+       -I$(top_srcdir)/deps/seqan-library-2.0.0/include \
+       -I$(top_srcdir)/deps/jellyfish-2.2.0/include \
+-      -I$(top_srcdir)/deps/boost/build/include \
+       -DDATADIR=\"$(srcdir)/data\" \
+       -DKAT_SITE_PKGS='"$(prefix)/lib/python$(PYTHON_VERSION)/site-packages"' 
\
+       @AM_CPPFLAGS@
+@@ -58,13 +57,11 @@ check_unit_tests_SOURCES = \
+ 
+ check_unit_tests_LDFLAGS = \
+       -static \
+-      -L$(top_builddir)/deps/boost/build/lib \
+-      -Wl,-rpath $(top_builddir)/deps/boost/build/lib \
+       @AM_LDFLAGS@
+ 
+ check_unit_tests_LDADD = \
+       libgtest.la \
+-    $(top_builddir)/lib/libkat.la \
++      $(top_builddir)/lib/libkat.la \
+       -lboost_timer \
+       -lboost_chrono \
+       -lboost_filesystem \

diff --git a/sci-biology/kat/files/kat-2.4.2-no_static_build.patch 
b/sci-biology/kat/files/kat-2.4.2-no_static_build.patch
new file mode 100644
index 000000000..48ad6d562
--- /dev/null
+++ b/sci-biology/kat/files/kat-2.4.2-no_static_build.patch
@@ -0,0 +1,56 @@
+diff --git a/configure.ac b/configure.ac
+index 9acc141..24a4b14 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -178,8 +178,6 @@ define([PC_FILE], lib/kat-2.2.pc)
+ 
+ AM_CXXFLAGS="-g -O2 -std=c++11"
+ AC_SUBST([AM_CXXFLAGS])
+-AM_LDFLAGS="-static-libstdc++"
+-AC_SUBST([AM_LDFLAGS])
+ 
+ if [[ "${make_pykat}" == "yes" ]]; then
+     AM_CPPFLAGS="${PYTHON_CPPFLAGS}"
+diff --git a/deps/jellyfish-2.2.0/Makefile.am 
b/deps/jellyfish-2.2.0/Makefile.am
+index 83192d9..e3b1694 100644
+--- a/deps/jellyfish-2.2.0/Makefile.am
++++ b/deps/jellyfish-2.2.0/Makefile.am
+@@ -7,7 +7,7 @@ man1_MANS = doc/kat_jellyfish.man
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = kat_jellyfish.pc
+ 
+-AM_LDFLAGS = -lz -lpthread -static-libstdc++ # $(VALGRIND_LIBS)
++AM_LDFLAGS = -lz -lpthread # $(VALGRIND_LIBS)
+ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include # $(VALGRIND_CFLAGS)
+ AM_CXXFLAGS = $(ALL_CXXFLAGS) -Wall -Wnon-virtual-dtor 
-Wno-deprecated-declarations
+ 
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 2d5cd72..cb5cb0e 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -18,10 +18,6 @@ kat_CPPFLAGS = \
+       -DKAT_SCRIPTS='"$(datadir)/scripts"' \
+       @AM_CPPFLAGS@
+ 
+-kat_LDFLAGS = \
+-      -static \
+-      @AM_LDFLAGS@
+-
+ kat_LDADD = \
+       $(top_builddir)/lib/libkat.la \
+       $(top_builddir)/deps/jellyfish-2.2.0/.libs/libkat_jellyfish.la \
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index d96363a..90e4f61 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -54,10 +54,6 @@ check_unit_tests_SOURCES = \
+       check_compcounters.cc \
+       check_main.cc
+ 
+-check_unit_tests_LDFLAGS = \
+-      -static \
+-      @AM_LDFLAGS@
+-
+ check_unit_tests_LDADD = \
+       libgtest.la \
+       $(top_builddir)/lib/libkat.la \

diff --git a/sci-biology/kat/kat-2.4.1.ebuild b/sci-biology/kat/kat-2.4.1.ebuild
deleted file mode 100644
index 3bd8b7dde..000000000
--- a/sci-biology/kat/kat-2.4.1.ebuild
+++ /dev/null
@@ -1,69 +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 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-2.4.1.tar.gz -> 
${P}.tar.gz"
-
-LICENSE="GPL-3+"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-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
-
-S="${WORKDIR}"/KAT-Release-"${PV}"
-
-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
-       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
-       econf ${myconf[@]}
-}
-
-src_compile(){
-       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-2.4.2.ebuild b/sci-biology/kat/kat-2.4.2.ebuild
new file mode 100644
index 000000000..9d3981439
--- /dev/null
+++ b/sci-biology/kat/kat-2.4.2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{5,6} )
+# https://github.com/Ensembl/Bio-DB-HTS/issues/30
+
+inherit 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"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cpu_flags_x86_sse static-libs test"
+
+CDEPEND="
+       >=dev-libs/boost-1.52[${PYTHON_USEDEP}]
+       sys-libs/zlib
+       dev-python/tabulate[${PYTHON_USEDEP}]
+       dev-python/matplotlib[${PYTHON_USEDEP}]
+       dev-python/numpy[${PYTHON_USEDEP}]
+       sci-libs/scipy[${PYTHON_USEDEP}]"
+DEPEND="${CDEPEND}
+       dev-python/sphinx
+       test? ( sys-process/time )"
+RDEPEND="${CDEPEND}"
+# contains bundled and *modified* version of jellyfish-2.2.0
+#   (libkat_jellyfish.{a,so} and "kat_" prefixes are added to all binaries)
+#   https://github.com/TGAC/KAT/issues/93#issuecomment-383377666
+# contains embedded sci-biology/seqan headers
+
+PATCHES=(
+       "${FILESDIR}"/kat-2.4.2-ignore-bundled-deps.patch
+       "${FILESDIR}"/kat-2.4.2-no_static_build.patch
+       )
+
+S="${WORKDIR}"/KAT-Release-"${PV}"
+
+src_prepare(){
+       default
+       rm -rf deps/boost || die "Failed to zap bundled boost"
+       eautoreconf
+}
+
+src_configure(){
+       python_setup
+       local myconf=()
+       myconf+=(
+               --disable-gnuplot
+               --disable-pykat-install
+               $(use_enable static-libs static)
+               ) # python3 does better image rendering, no need for gnuplot
+       # pass down to jellyfish-2.2.0/configure
+       use cpu_flags_x86_sse && myconf+=( $(use_with cpu_flags_x86_sse sse) )
+       econf ${myconf[@]}
+}
+
+src_compile(){
+       default
+       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
+}
+
+src_test(){
+       default
+}

diff --git a/sci-biology/kat/kat-9999.ebuild b/sci-biology/kat/kat-9999.ebuild
index 0ccec1481..aaf8842ba 100644
--- a/sci-biology/kat/kat-9999.ebuild
+++ b/sci-biology/kat/kat-9999.ebuild
@@ -3,57 +3,65 @@
 
 EAPI=6
 
-PYTHON_COMPAT=( python3_{5,6} ) # requires python >= 3.1 but more features 
with >=3.5
+PYTHON_COMPAT=( python3_{5,6} )
 # https://github.com/Ensembl/Bio-DB-HTS/issues/30
 
-inherit git-r3 eutils flag-o-matic autotools distutils-r1
+inherit flag-o-matic autotools distutils-r1 git-r3
 
 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";
+EGIT_CHECKOUT_DIR="${WORKDIR}"/KAT-Release-"${PV}"
 
 LICENSE="GPL-3+"
 SLOT="0"
-KEYWORDS=""
-IUSE="cpu_flags_x86_sse doc tex"
+KEYWORDS="~amd64 ~x86"
+IUSE="cpu_flags_x86_sse static-libs test"
 
-DEPEND="
+CDEPEND="
        >=dev-libs/boost-1.52[${PYTHON_USEDEP}]
+       sys-libs/zlib
        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
+       sci-libs/scipy[${PYTHON_USEDEP}]"
+DEPEND="${CDEPEND}
+       dev-python/sphinx
+       test? ( sys-process/time )"
+RDEPEND="${CDEPEND}"
+# contains bundled and *modified* version of jellyfish-2.2.0
+#   (libkat_jellyfish.{a,so} and "kat_" prefixes are added to all binaries)
+#   https://github.com/TGAC/KAT/issues/93#issuecomment-383377666
+# contains embedded sci-biology/seqan headers
+
+PATCHES=(
+       "${FILESDIR}"/kat-2.4.2-ignore-bundled-deps.patch
+       "${FILESDIR}"/kat-2.4.2-no_static_build.patch
+       )
+
+S="${WORKDIR}"/KAT-Release-"${PV}"
 
 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
-       pushd scripts >/dev/null || die
-       distutils-r1_src_prepare
-       popd > /dev/null || die
 }
 
 src_configure(){
+       python_setup
        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
+       myconf+=(
+               --disable-gnuplot
+               --disable-pykat-install
+               $(use_enable static-libs static)
+               ) # python3 does better image rendering, no need for gnuplot
+       # pass down to jellyfish-2.2.0/configure
+       use cpu_flags_x86_sse && myconf+=( $(use_with cpu_flags_x86_sse sse) )
        econf ${myconf[@]}
 }
 
 src_compile(){
-       emake
-       cd doc && make latexpdf && cd .. || die
+       default
        pushd scripts >/dev/null || die
        distutils-r1_src_compile
        popd > /dev/null || die
@@ -65,3 +73,7 @@ src_install(){
        distutils-r1_src_install
        popd > /dev/null || die
 }
+
+src_test(){
+       default
+}

diff --git a/sci-biology/kat/metadata.xml b/sci-biology/kat/metadata.xml
index eb95c0c06..6810aabae 100644
--- a/sci-biology/kat/metadata.xml
+++ b/sci-biology/kat/metadata.xml
@@ -12,8 +12,4 @@
        <upstream>
                <remote-id type="github">TGAC/KAT</remote-id>
        </upstream>
-       <use>
-               <flag name="doc">Enable building of .html from .rst 
documentation</flag>
-               <flag name="tex">Enable building of .pdf documentation from 
.rst via .tex intermediate</flag>
-       </use>
 </pkgmetadata>

Reply via email to