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

sci-biology/kat: ignore site-wide boost-build/site-config.jam

Introduce -8888 ebuild which zaps bundled stuff altogether and uses
system-wide boost and jellyfish2 files.

Package-Manager: Portage-2.3.28, Repoman-2.3.9

 .../kat/files/kat-2.4.1-ignore-bundled-deps.patch  | 120 ++++++++++++++++
 .../kat/files/kat-2.4.1-rename-jellyfish.patch     | 159 +++++++++++++++++++++
 sci-biology/kat/kat-2.4.1.ebuild                   |   7 +-
 .../kat/{kat-9999.ebuild => kat-8888.ebuild}       |  23 +--
 sci-biology/kat/kat-9999.ebuild                    |   7 +-
 5 files changed, 300 insertions(+), 16 deletions(-)

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
new file mode 100644
index 000000000..d1816498e
--- /dev/null
+++ b/sci-biology/kat/files/kat-2.4.1-ignore-bundled-deps.patch
@@ -0,0 +1,120 @@
+--- 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 scripts/setup.py 
scripts/kat/__init__.py scripts/Makefile])
++AC_CONFIG_SUBDIRS([])
+ 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
+ 
+ # SRC DIRS
+-make_dirs=deps/jellyfish-2.2.0 deps/seqan-library-2.0.0 lib src tests
++make_dirs=lib src tests
+ 
+ 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 @@
+ 
+ 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)/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 @@
+       -static \
+       -L. \
+       -L../lib \
+-      -L../deps/jellyfish-2.2.0 \
+       -L../deps/boost/build/lib \
+       @AM_LDFLAGS@
+ 
+@@ -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
+--- 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 \
+       -I$(top_srcdir)/lib/include \
+       -DKAT_SITE_PKGS='"$(libdir)/python$(PYTHON_VERSION)/site-packages"' \
+       @AM_CPPFLAGS@
+@@ -22,18 +20,16 @@
+ kat_LDFLAGS = \
+       -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 = \
+--- 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@

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
new file mode 100644
index 000000000..81d4f7d18
--- /dev/null
+++ b/sci-biology/kat/files/kat-2.4.1-rename-jellyfish.patch
@@ -0,0 +1,159 @@
+--- 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 1df9f4430..f1635e9e8 100644
--- a/sci-biology/kat/kat-2.4.1.ebuild
+++ b/sci-biology/kat/kat-2.4.1.ebuild
@@ -41,7 +41,7 @@ src_prepare(){
 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
+       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[@]}
 }
 
@@ -49,7 +49,8 @@ src_compile(){
        # build_boost.sh
        cd deps/boost || die
        ./bootstrap.sh --prefix=build 
--with-libraries=chrono,exception,program_options,timer,filesystem,system,stacktrace
 || die
-       ./b2 headers || die
-       ./b2 install || die
+       # https://github.com/TGAC/KAT/issues/92#issuecomment-383373418
+       ./b2 headers --ignore-site-config || die
+       ./b2 install --ignore-site-config || die
        cd ../.. || die
 }

diff --git a/sci-biology/kat/kat-9999.ebuild b/sci-biology/kat/kat-8888.ebuild
similarity index 67%
copy from sci-biology/kat/kat-9999.ebuild
copy to sci-biology/kat/kat-8888.ebuild
index d46f6d3e8..c59669fc5 100644
--- a/sci-biology/kat/kat-9999.ebuild
+++ b/sci-biology/kat/kat-8888.ebuild
@@ -30,9 +30,12 @@ RDEPEND="${DEPEND}"
 
 src_prepare(){
        default
+       rm -rf deps || die "Failed to zap bundled seqan-library-2.0.0 
jellyfish-2.2.0 boost"
+       epatch "${FILESDIR}"/kat-2.4.1-ignore-bundled-deps.patch
+       epatch "${FILESDIR}"/kat-2.4.1-rename-jellyfish.patch
        # autogen.sh
-       test -n "$srcdir" || local srcdir=`dirname "$0"`
-       test -n "$srcdir" || local srcdir=.
+       #test -n "$srcdir" || local srcdir=`dirname "$0"`
+       #test -n "$srcdir" || local srcdir=.
        eautoreconf --force --install --verbose "$srcdir"
 }
 
@@ -43,11 +46,11 @@ src_configure(){
        PYTHON_VERSION=3 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
-       ./b2 headers || die
-       ./b2 install || die
-       cd ../.. || die
-}
+#src_compile(){
+#      # build_boost.sh
+#      cd deps/boost || die
+#      ./bootstrap.sh --prefix=build 
--with-libraries=chrono,exception,program_options,timer,filesystem,system,stacktrace
 || die
+#      ./b2 headers --prefix=build || die
+#      ./b2 install --prefix=build || die
+#      cd ../.. || die
+#}

diff --git a/sci-biology/kat/kat-9999.ebuild b/sci-biology/kat/kat-9999.ebuild
index d46f6d3e8..8fe79a34b 100644
--- a/sci-biology/kat/kat-9999.ebuild
+++ b/sci-biology/kat/kat-9999.ebuild
@@ -39,7 +39,7 @@ src_prepare(){
 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
+       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[@]}
 }
 
@@ -47,7 +47,8 @@ src_compile(){
        # build_boost.sh
        cd deps/boost || die
        ./bootstrap.sh --prefix=build 
--with-libraries=chrono,exception,program_options,timer,filesystem,system,stacktrace
 || die
-       ./b2 headers || die
-       ./b2 install || die
+       # https://github.com/TGAC/KAT/issues/92#issuecomment-383373418
+       ./b2 headers --ignore-site-config || die
+       ./b2 install --ignore-site-config || die
        cd ../.. || die
 }

Reply via email to