commit:     e459544d4d91e198e5c5e386a2052dc2600e1286
Author:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
AuthorDate: Sun Apr 22 18:11:45 2018 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Sun Apr 22 18:11:45 2018 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=e459544d

sci-biology/kat: improve -8888 ebuild

Try call setup.py on our own so that it could receive ${DESTDIR}
contents. This still does not work.

The ebuild drops bundled boost copy but retains bundled seqan
headers and the modified copy of jellyfish. They won't interfere
with with site-wide installed packages of those tools in Gentoo.

The modified jellyfish is linked-in statically and binaries have
'kat_' prefix.

The kat-2.4.1.ebuild and -9999.ebuild should later get same logic
like appears in -8888.ebuild. Currently they stick to upstream's
approach of using bundled boost too.

All ebuilds suffer same problem: the python files do not get installed
at all.

Package-Manager: Portage-2.3.28, 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  | 127 +++++++---------
 .../kat/files/kat-2.4.1-rename-jellyfish.patch     | 159 ---------------------
 sci-biology/kat/kat-2.4.1.ebuild                   |  12 +-
 sci-biology/kat/kat-8888.ebuild                    |  50 +++++--
 sci-biology/kat/metadata.xml                       |   4 +
 6 files changed, 132 insertions(+), 250 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
new file mode 100644
index 000000000..a00c971a6
--- /dev/null
+++ b/sci-biology/kat/files/kat-2.4.1-do-not-run-setup.py.patch
@@ -0,0 +1,30 @@
+--- 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
index d1816498e..649f3ecd8 100644
--- 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
@@ -6,51 +6,56 @@
  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 scripts/setup.py 
scripts/kat/__init__.py scripts/Makefile])
-+AC_CONFIG_SUBDIRS([])
++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."
---- Makefile.am.ori    2018-04-22 12:23:58.756197763 +0200
-+++ Makefile.am        2018-04-22 12:24:21.176832618 +0200
-@@ -19,7 +19,7 @@
- dist_noinst_SCRIPTS = autogen.sh antigen.sh build_boost.sh
+--- 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 @@
  
- # SRC DIRS
--make_dirs=deps/jellyfish-2.2.0 deps/seqan-library-2.0.0 lib src tests
-+make_dirs=lib src tests
+ 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
  
- if MAKE_PYKAT
-     make_dirs += scripts
---- tests/Makefile.am.ori      2018-04-22 12:31:02.738203085 +0200
-+++ tests/Makefile.am  2018-04-22 12:34:15.043648336 +0200
-@@ -29,8 +29,7 @@
+ libkat_la_SOURCES = \
+       src/matrix_metadata_extractor.cc \
+@@ -31,7 +30,6 @@
  
- AM_CPPFLAGS = \
+ libkat_la_CPPFLAGS = \
+       -I$(top_srcdir)/deps/jellyfish-2.2.0/include \
+-      -I$(top_srcdir)/deps/boost/build/include \
        -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)/usr/include/seqan-2.2 \
-       -I$(top_srcdir)/deps/boost/build/include \
-       -DDATADIR=\"$(srcdir)/data\" \
        -DKAT_SITE_PKGS='"$(libdir)/python$(PYTHON_VERSION)/site-packages"' \
-@@ -60,7 +59,6 @@
+       @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. \
        -L../lib \
--      -L../deps/jellyfish-2.2.0 \
-       -L../deps/boost/build/lib \
+       -L../deps/jellyfish-2.2.0 \
+-      -L../deps/boost/build/lib \
        @AM_LDFLAGS@
  
-@@ -69,11 +67,11 @@
-       -lgtest \
+ 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 \
+-      ../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 \
@@ -58,36 +63,34 @@
 +      -lboost_system \
        @AM_LIBS@
  
- include gtest.mk
---- src/Makefile.am.ori        2018-04-22 12:34:41.874408065 +0200
-+++ src/Makefile.am    2018-04-22 12:36:33.567570728 +0200
-@@ -12,9 +12,7 @@
-       @AM_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/usr/include/seqan-2.2 \
+ 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@
-@@ -22,18 +20,16 @@
- kat_LDFLAGS = \
-       -static \
+@@ -61,7 +60,6 @@
+       -L. \
        -L../lib \
--      -L../deps/jellyfish-2.2.0 \
+       -L../deps/jellyfish-2.2.0 \
 -      -L../deps/boost/build/lib \
        @AM_LDFLAGS@
  
- kat_LDADD = \
+ 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 \
+-    ../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 \
@@ -95,26 +98,4 @@
 +      -lboost_system \
        @AM_LIBS@
  
- noinst_HEADERS = \
---- lib/Makefile.am.ori        2018-04-22 12:38:29.680858551 +0200
-+++ lib/Makefile.am    2018-04-22 12:38:58.401671799 +0200
-@@ -6,9 +6,7 @@
- lib_LTLIBRARIES = libkat.la
- 
- libkat_la_LDFLAGS = \
--      -version-info 2:4:0 \
--      -L../deps/jellyfish-2.2.0 \
--      -L../deps/boost/build/lib
-+      -version-info 2:4:0
- 
- libkat_la_SOURCES = \
-       src/matrix_metadata_extractor.cc \
-@@ -30,8 +28,6 @@
-                           $(KI)/comp_counters.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='"$(libdir)/python$(PYTHON_VERSION)/site-packages"' \
-       @AM_CPPFLAGS@
+ include gtest.mk

diff --git a/sci-biology/kat/files/kat-2.4.1-rename-jellyfish.patch 
b/sci-biology/kat/files/kat-2.4.1-rename-jellyfish.patch
deleted file mode 100644
index 81d4f7d18..000000000
--- a/sci-biology/kat/files/kat-2.4.1-rename-jellyfish.patch
+++ /dev/null
@@ -1,159 +0,0 @@
---- lib/include/kat/jellyfish_helper.hpp.ori   2018-04-22 12:47:42.296506217 
+0200
-+++ lib/include/kat/jellyfish_helper.hpp       2018-04-22 12:49:22.209335310 
+0200
-@@ -41,18 +41,18 @@
- using boost::lexical_cast;
- using boost::timer::auto_cpu_timer;
- 
--#include <jellyfish/err.hpp>
--#include <jellyfish/file_header.hpp>
--#include <jellyfish/hash_counter.hpp>
--#include <jellyfish/mapped_file.hpp>
--#include <jellyfish/mer_dna.hpp>
--#include <jellyfish/jellyfish.hpp>
--#include <jellyfish/large_hash_array.hpp>
--#include <jellyfish/large_hash_iterator.hpp>
--#include <jellyfish/mer_iterator.hpp>
--#include <jellyfish/mer_overlap_sequence_parser.hpp>
--#include <jellyfish/storage.hpp>
--#include <jellyfish/stream_manager.hpp>
-+#include <jellyfish2/err.hpp>
-+#include <jellyfish2/file_header.hpp>
-+#include <jellyfish2/hash_counter.hpp>
-+#include <jellyfish2/mapped_file.hpp>
-+#include <jellyfish2/mer_dna.hpp>
-+#include <jellyfish2/jellyfish.hpp>
-+#include <jellyfish2/large_hash_array.hpp>
-+#include <jellyfish2/large_hash_iterator.hpp>
-+#include <jellyfish2/mer_iterator.hpp>
-+#include <jellyfish2/mer_overlap_sequence_parser.hpp>
-+#include <jellyfish2/storage.hpp>
-+#include <jellyfish2/stream_manager.hpp>
- using jellyfish::mer_dna;
- using jellyfish::file_header;
- using jellyfish::mapped_file;
---- lib/src/jellyfish_helper.cc.ori    2018-04-22 12:47:50.166729065 +0200
-+++ lib/src/jellyfish_helper.cc        2018-04-22 12:49:28.379510022 +0200
-@@ -35,15 +35,15 @@
- using boost::lexical_cast;
- using boost::timer::auto_cpu_timer;
- 
--#include <jellyfish/binary_dumper.hpp>
--#include <jellyfish/err.hpp>
--#include <jellyfish/file_header.hpp>
--#include <jellyfish/mapped_file.hpp>
--#include <jellyfish/mer_dna.hpp>
--#include <jellyfish/jellyfish.hpp>
--#include <jellyfish/large_hash_array.hpp>
--#include <jellyfish/large_hash_iterator.hpp>
--#include <jellyfish/storage.hpp>
-+#include <jellyfish2/binary_dumper.hpp>
-+#include <jellyfish2/err.hpp>
-+#include <jellyfish2/file_header.hpp>
-+#include <jellyfish2/mapped_file.hpp>
-+#include <jellyfish2/mer_dna.hpp>
-+#include <jellyfish2/jellyfish.hpp>
-+#include <jellyfish2/large_hash_array.hpp>
-+#include <jellyfish2/large_hash_iterator.hpp>
-+#include <jellyfish2/storage.hpp>
- using jellyfish::large_hash::reprobe_limit_t;
- using jellyfish::Offsets;
- using jellyfish::quadratic_reprobes;
---- src/sect.cc.ori    2018-04-22 12:47:57.906948236 +0200
-+++ src/sect.cc        2018-04-22 12:49:33.479654437 +0200
-@@ -53,7 +53,7 @@
- using bfs::path;
- using boost::lexical_cast;
- 
--#include <jellyfish/mer_dna.hpp>
-+#include <jellyfish2/mer_dna.hpp>
- 
- #include <kat/jellyfish_helper.hpp>
- #include <kat/matrix_metadata_extractor.hpp>
---- src/histogram.cc.ori       2018-04-22 12:48:06.427189490 +0200
-+++ src/histogram.cc   2018-04-22 12:49:37.719774498 +0200
-@@ -44,7 +44,7 @@
- using bfs::path;
- using boost::lexical_cast;
- 
--#include <jellyfish/mer_dna.hpp>
-+#include <jellyfish2/mer_dna.hpp>
- 
- #include <kat/matrix_metadata_extractor.hpp>
- #include <kat/jellyfish_helper.hpp>
---- src/sect.hpp.ori   2018-04-22 12:48:13.167380343 +0200
-+++ src/sect.hpp       2018-04-22 12:49:41.549882951 +0200
-@@ -45,7 +45,7 @@
- using bfs::path;
- using boost::lexical_cast;
- 
--#include <jellyfish/mer_dna.hpp>
-+#include <jellyfish2/mer_dna.hpp>
- 
- #include <kat/matrix_metadata_extractor.hpp>
- #include <kat/jellyfish_helper.hpp>
---- src/gcp.cc.ori     2018-04-22 12:48:20.457586772 +0200
-+++ src/gcp.cc 2018-04-22 12:49:45.469993952 +0200
-@@ -44,7 +44,7 @@
- using bfs::path;
- using boost::lexical_cast;
- 
--#include <jellyfish/mer_dna.hpp>
-+#include <jellyfish2/mer_dna.hpp>
- 
- #include <kat/jellyfish_helper.hpp>
- #include <kat/sparse_matrix.hpp>
---- src/comp.cc.ori    2018-04-22 12:48:28.447813020 +0200
-+++ src/comp.cc        2018-04-22 12:49:50.720142612 +0200
-@@ -48,7 +48,7 @@
- namespace bfs = boost::filesystem;
- using bfs::path;
- 
--#include <jellyfish/large_hash_iterator.hpp>
-+#include <jellyfish2/large_hash_iterator.hpp>
- 
- #include <kat/matrix_metadata_extractor.hpp>
- #include <kat/sparse_matrix.hpp>
---- src/cold.cc.ori    2018-04-22 12:27:18.151843779 +0200
-+++ src/cold.cc        2018-04-22 12:27:35.482334502 +0200
-@@ -53,7 +53,7 @@
- using bfs::path;
- using boost::lexical_cast;
- 
--#include <jellyfish/mer_dna.hpp>
-+#include <jellyfish2/mer_dna.hpp>
- 
- #include <kat/jellyfish_helper.hpp>
- #include <kat/matrix_metadata_extractor.hpp>
---- src/comp.hpp.ori   2018-04-22 12:27:53.022831172 +0200
-+++ src/comp.hpp       2018-04-22 12:28:10.173316799 +0200
-@@ -33,7 +33,7 @@
- namespace bfs = boost::filesystem;
- using bfs::path;
- 
--#include <jellyfish/large_hash_iterator.hpp>
-+#include <jellyfish2/large_hash_iterator.hpp>
- 
- #include <kat/matrix_metadata_extractor.hpp>
- #include <kat/sparse_matrix.hpp>
---- src/cold.hpp.ori   2018-04-22 12:29:23.725399473 +0200
-+++ src/cold.hpp       2018-04-22 12:29:33.885687168 +0200
-@@ -45,7 +45,7 @@
- using bfs::path;
- using boost::lexical_cast;
- 
--#include <jellyfish/mer_dna.hpp>
-+#include <jellyfish2/mer_dna.hpp>
- 
- #include <kat/matrix_metadata_extractor.hpp>
- #include <kat/jellyfish_helper.hpp>
---- src/gcp.hpp.ori    2018-04-22 12:30:06.576612834 +0200
-+++ src/gcp.hpp        2018-04-22 12:30:13.056796324 +0200
-@@ -36,7 +36,7 @@
- using bfs::path;
- using boost::lexical_cast;
- 
--#include <jellyfish/mer_dna.hpp>
-+#include <jellyfish2/mer_dna.hpp>
- 
- #include <kat/pyhelper.hpp>
- #include <kat/jellyfish_helper.hpp>

diff --git a/sci-biology/kat/kat-2.4.1.ebuild b/sci-biology/kat/kat-2.4.1.ebuild
index f1635e9e8..29f11c9f6 100644
--- a/sci-biology/kat/kat-2.4.1.ebuild
+++ b/sci-biology/kat/kat-2.4.1.ebuild
@@ -18,12 +18,12 @@ KEYWORDS=""
 IUSE="cpu_flags_x86_sse doc"
 
 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}] )"
 RDEPEND="${DEPEND}"
 # contains bundled *modified* version of jellyfish-2.2 which should install 
under different filenames
 # contains embedded sci-biology/seqan

diff --git a/sci-biology/kat/kat-8888.ebuild b/sci-biology/kat/kat-8888.ebuild
index 2c88b2a25..a8a776c29 100644
--- a/sci-biology/kat/kat-8888.ebuild
+++ b/sci-biology/kat/kat-8888.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";
@@ -15,30 +15,56 @@ EGIT_REPO_URI="https://github.com/TGAC/KAT.git";
 LICENSE="GPL-3+"
 SLOT="0"
 KEYWORDS=""
-IUSE="cpu_flags_x86_sse doc"
+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 )"
 RDEPEND="${DEPEND}"
 # contains bundled a *modified* version of jellyfish-2.2.0 
(libkat_jellyfish.{a,so})
 # contains embedded sci-biology/seqan
 
 src_prepare(){
        default
-       rm -rf deps || die "Failed to zap bundled seqan-library-2.0.0 
jellyfish-2.2.0 boost"
+       # 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-rename-jellyfish.patch
-       eautoreconf --force --install --verbose "$srcdir"
+       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
-       PYTHON_VERSION=3 econf ${myconf[@]}
+       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/metadata.xml b/sci-biology/kat/metadata.xml
index 6810aabae..eb95c0c06 100644
--- a/sci-biology/kat/metadata.xml
+++ b/sci-biology/kat/metadata.xml
@@ -12,4 +12,8 @@
        <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