[med-svn] [jellyfish1] 01/01: Imported Upstream version 2.2.4

Andreas Tille tille at debian.org
Tue Nov 17 07:42:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to annotated tag upstream/2.2.4
in repository jellyfish1.

commit efe89ccd3080fca7ce5609ba6e113a20297ab243
Author: Andreas Tille <tille at debian.org>
Date:   Tue Nov 10 21:54:21 2015 +0100

    Imported Upstream version 2.2.4
---
 .gitmod                     |  1 +
 Makefile.am                 |  8 ++++--
 configure.ac                | 19 ++++----------
 m4/m4-ax_perl_ext.m4        |  6 ++++-
 m4/m4-ax_python_devel.m4    | 13 ++++++++--
 m4/m4-ax_ruby_ext.m4        | 33 +++++++++++++++++++------
 swig/Makefile.am            | 60 ++++++++++++++++++++++-----------------------
 swig/jellyfish.i            |  5 ++++
 swig/ruby/test_mer_file.rb  |  4 +--
 tests/swig_perl.sh          |  2 +-
 unit_tests/test_mer_heap.cc |  2 +-
 11 files changed, 91 insertions(+), 62 deletions(-)

diff --git a/.gitmod b/.gitmod
new file mode 100644
index 0000000..6563189
--- /dev/null
+++ b/.gitmod
@@ -0,0 +1 @@
+develop
diff --git a/Makefile.am b/Makefile.am
index a31b91f..a28d848 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,3 @@
-SUBDIRS = . $(MAYBE_SWIG)
 ACLOCAL_AMFLAGS = -I m4
 
 EXTRA_DIST = doc/jellyfish.pdf doc/jellyfish.man README LICENSE # jellyfish.spec
@@ -203,12 +202,17 @@ bin_test_all_SOURCES = unit_tests/test_main.cc				\
 	               unit_tests/test_stdio_filebuf.cc
 bin_test_all_SOURCES += jellyfish/backtrace.cc
 
-bin_test_all_CPPFLAGS = -Dprotected=public -Dprivate=public -DJSON_IS_AMALGAMATION=1
+bin_test_all_CPPFLAGS = -DJSON_IS_AMALGAMATION=1
 bin_test_all_CXXFLAGS = $(AM_CXXFLAGS) -I$(srcdir)/unit_tests/gtest/include -I$(srcdir)/unit_tests -I$(srcdir)/include
 bin_test_all_LDADD = libgtest.la $(LDADD)
 YAGGO_SOURCES += unit_tests/test_main_cmdline.hpp
 noinst_HEADERS += unit_tests/test_main.hpp
 
+#################
+# SWIG bindings #
+#################
+include swig/Makefile.am
+
 include gtest.mk
 -include $(srcdir)/development.mk
 
diff --git a/configure.ac b/configure.ac
index 575f8f2..e067893 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([jellyfish], [2.2.3], [gmarcais at umd.edu])
+AC_INIT([jellyfish], [2.2.4], [gmarcais at umd.edu])
 AC_CANONICAL_HOST
 AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE([subdir-objects foreign parallel-tests color-tests])
@@ -108,35 +108,26 @@ AC_ARG_ENABLE([swig],
 AS_IF([test x$enable_swig = xyes],
       [AX_PKG_SWIG([3.0.0], [], [AC_MSG_ERROR([SWIG version 3 is required])])])
 AS_IF([test -n "$SWIG"],
-      [SWIG_ENABLE_CXX]
-      [maybe_swig=swig])
+      [SWIG_ENABLE_CXX])
 AM_CONDITIONAL([HAVE_SWIG], [test -n "$SWIG"])
 
 # Python binding setup
 AM_CONDITIONAL(PYTHON_BINDING, [test -n "$enable_python_binding" -a x$enable_python_binding != xno])
 AM_COND_IF([PYTHON_BINDING],
            [AS_IF([test x$enable_python_binding != xyes], [PYTHON_SITE_PKG=$enable_python_binding])]
-           [AX_PYTHON_DEVEL]
-           [maybe_swig=swig])
+           [AX_PYTHON_DEVEL([], [$prefix])])
 
 # Ruby binding setup
 AM_CONDITIONAL([RUBY_BINDING], [test -n "$enable_ruby_binding" -a x$enable_ruby_binding != xno])
 AM_COND_IF([RUBY_BINDING],
            [AS_IF([test x$enable_ruby_binding != xyes], [RUBY_EXT_LIB=$enable_ruby_binding])]
-           [AX_RUBY_EXT]
-           [maybe_swig=swig])
+           [AX_RUBY_EXT([$prefix])])
 
 # Perl binding setup
 AM_CONDITIONAL([PERL_BINDING], [test -n "$enable_perl_binding" -a x$enable_perl_binding != xno])
 AM_COND_IF([PERL_BINDING],
            [AS_IF([test x$enable_perl_binding != xyes], [PERL_EXT_LIB=$enable_perl_binding])]
-           [AX_PERL_EXT]
-           [maybe_swig=swig])
-
-# Enable compilation of SWIG and bindings
-AC_SUBST([MAYBE_SWIG], [$maybe_swig])
-AS_IF([test -n "$maybe_swig"],
-      [AC_CONFIG_FILES([swig/Makefile])])
+           [AX_PERL_EXT([$prefix])])
 
 AC_OUTPUT
 
diff --git a/m4/m4-ax_perl_ext.m4 b/m4/m4-ax_perl_ext.m4
index 1316f7c..32dae48 100644
--- a/m4/m4-ax_perl_ext.m4
+++ b/m4/m4-ax_perl_ext.m4
@@ -4,7 +4,7 @@
 #
 # SYNOPSIS
 #
-#   AX_PERL_EXT
+#   AX_PERL_EXT([prefix])
 #
 # DESCRIPTION
 #
@@ -96,7 +96,11 @@ AC_DEFUN([AX_PERL_EXT],[
                 AC_ARG_VAR(PERL_EXT_LIB, [Directory to install perl files into])
                 AC_MSG_CHECKING([for Perl extension target directory])
                 if test -z "$PERL_EXT_LIB" ; then
+                   if test -z "$1" -o "x$1" = xNONE ; then
                         [PERL_EXT_LIB=`$PERL -MConfig -e 'print $Config{sitearch};'`];
+                   else
+                        [PERL_EXT_LIB=`$PERL -MConfig -e 'print $ARGV.shift, "/lib/perl/", $Config{api_versionstring};' $1`]
+                   fi
                 fi
                 AC_MSG_RESULT([$PERL_EXT_LIB])
                 AC_SUBST(PERL_EXT_LIB)
diff --git a/m4/m4-ax_python_devel.m4 b/m4/m4-ax_python_devel.m4
index 59a2ff0..b3f1406 100644
--- a/m4/m4-ax_python_devel.m4
+++ b/m4/m4-ax_python_devel.m4
@@ -4,7 +4,7 @@
 #
 # SYNOPSIS
 #
-#   AX_PYTHON_DEVEL([version])
+#   AX_PYTHON_DEVEL([version], [prefix])
 #
 # DESCRIPTION
 #
@@ -132,6 +132,12 @@ variable to configure. See ``configure --help'' for reference.
 		fi
 	fi
 
+        if test -n "$2" -a "x$2" != xNONE; then
+           prefix=$2
+        else
+           prefix=
+        fi
+
 	#
 	# Check if you have distutils, else fail
 	#
@@ -253,7 +259,10 @@ EOD`
 	AC_MSG_CHECKING([for Python site-packages path])
 	if test -z "$PYTHON_SITE_PKG"; then
 		PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
-			print (distutils.sysconfig.get_python_lib(0,0));"`
+                        import sys; \
+                        pref=sys.argv.pop(); \
+                        pref=pref if len(pref) > 0 and pref != '-c' else None; \
+                        print(distutils.sysconfig.get_python_lib(0,0,pref));" $prefix`
 	fi
 	AC_MSG_RESULT([$PYTHON_SITE_PKG])
 	AC_SUBST([PYTHON_SITE_PKG])
diff --git a/m4/m4-ax_ruby_ext.m4 b/m4/m4-ax_ruby_ext.m4
index af668ef..0207772 100644
--- a/m4/m4-ax_ruby_ext.m4
+++ b/m4/m4-ax_ruby_ext.m4
@@ -4,7 +4,7 @@
 #
 # SYNOPSIS
 #
-#   AX_RUBY_EXT
+#   AX_RUBY_EXT([prefix])
 #
 # DESCRIPTION
 #
@@ -70,26 +70,43 @@ AC_DEFUN([AX_RUBY_EXT],[
                 # Check Ruby version.
                 #
                 AC_MSG_CHECKING([for Ruby version])
-                [RUBY_VERSION=`$RUBY -e 'puts RUBY_VERSION'`];
+                [RUBY_VERSION=`$RUBY -e 'print RUBY_VERSION'`];
                 AC_MSG_RESULT([$RUBY_VERSION])
                 AC_SUBST(RUBY_VERSION)
 
                 #
-                # Get CFLAGS and LIBS from pkg-config
-                #
-                PKG_CHECK_MODULES([RUBY_EXT], [ruby-1.9 >= 1.9.1])
-
-                #
                 # Check for the extensions target directory.
                 #
                 AC_MSG_CHECKING([for Ruby extensions target directory])
                 AS_IF([test -z "$RUBY_EXT_LIB"],
-                      [RUBY_EXT_LIB=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG.values_at("sitearchdir")'`])
+                      AS_IF([test -z "$1" -o "x$1" = xNONE], [RUBY_EXT_LIB=`$RUBY -rrbconfig -e 'print RbConfig::expand(RbConfig::CONFIG.fetch("sitearchdir"))'`],
+                            [RUBY_EXT_LIB=`$RUBY -rrbconfig -e 'print(ARGV.fetch(0), "/lib/ruby/", RbConfig::CONFIG.fetch("ruby_version"))' $1`]))
                 AC_MSG_RESULT([$RUBY_EXT_LIB])
                 AC_SUBST(RUBY_EXT_LIB)
 
+                #
+                # Check for include flags
+                #
+                AC_MSG_CHECKING([for Ruby include directory])
+                AS_IF([test -z "$RUBY_EXT_CFLAGS"],
+                      [RUBY_EXT_CFLAGS="-I`$RUBY -rrbconfig -e 'print RbConfig::expand(RbConfig::CONFIG.fetch("rubyhdrdir"))'`"]
+                      [RUBY_EXT_CFLAGS="$RUBY_EXT_CFLAGS -I`$RUBY -rrbconfig -e 'print RbConfig::CONFIG.has_key?("rubyarchhdrdir") ? RbConfig::expand(RbConfig::CONFIG.fetch("rubyarchhdrdir")) : File.join(RbConfig::expand(RbConfig::CONFIG.fetch("rubyhdrdir")), RbConfig::CONFIG.fetch("arch"))'`"])
+                AC_MSG_RESULT([$RUBY_EXT_CFLAGS])
+                AC_SUBST(RUBY_EXT_CFLAGS)
+
+                #
+                # Check for lib flags
+                #
+                AC_MSG_CHECKING([for Ruby libs])
+                AS_IF([test -z "$RUBY_EXT_LIBS"],
+                      [RUBY_EXT_LIBS="`$RUBY -rrbconfig -e 'print RbConfig::expand(RbConfig::CONFIG.fetch("LIBRUBYARG_SHARED"))'` `$RUBY -rrbconfig -e 'print RbConfig::expand(RbConfig::CONFIG.fetch("LIBS"))'`"])
+                AC_MSG_RESULT([$RUBY_EXT_LIBS])
+                AC_SUBST(RUBY_EXT_LIBS)
+
+
                 # Fix LDFLAGS for OS X.  We don't want any -arch flags here, otherwise
                 # linking might fail.  We also including the proper flags to create a bundle.
+                AC_MSG_CHECKING([for Ruby extra LDFLAGS])
                 case "$host" in
                 *darwin*)
                         RUBY_EXT_LDFLAGS=`echo ${RUBY_EXT_LDFLAGS} | sed -e "s,-arch [[^ ]]*,,g"`
diff --git a/swig/Makefile.am b/swig/Makefile.am
index 63bbb1e..aaf32b8 100644
--- a/swig/Makefile.am
+++ b/swig/Makefile.am
@@ -1,15 +1,13 @@
 # SWIG
-BUILT_SOURCES =
-CLEANFILES =
-EXTRA_DIST =
-SWIG_SRC = jellyfish.i hash_counter.i hash_set.i mer_dna.i mer_file.i string_mers.i
+SWIG_SRC = swig/jellyfish.i swig/hash_counter.i swig/hash_set.i	\
+           swig/mer_dna.i swig/mer_file.i swig/string_mers.i
 
 if HAVE_SWIG
 SWIG_V_GEN = $(swig_v_GEN_$(V))
 swig_v_GEN_ = $(swig_v_GEN_$(AM_DEFAULT_VERBOSITY))
 swig_v_GEN_0 = @echo "  SWIG    " $@;
 %/swig_wrap.cpp: $(SWIG_SRC)
-	$(SWIG_V_GEN)$(SWIG) -$* -I$(top_srcdir)/include -o $@ $<
+	$(SWIG_V_GEN)$(SWIG) -$(notdir $*) -I$(srcdir)/../include -o $@ $<
 else
 %/swig_wrap.cc:
 	@echo >&2 SWIG >= 3.x.x not found. Make sure it is install and rerun configure
@@ -18,51 +16,51 @@ endif
 
 # Python support
 if PYTHON_BINDING
-PYTHON_BUILT = python/swig_wrap.cpp python/jellyfish.py
+PYTHON_BUILT = swig/python/swig_wrap.cpp swig/python/jellyfish.py
 BUILT_SOURCES += $(PYTHON_BUILT)
 
 pythonextdir = $(PYTHON_SITE_PKG)/jellyfish
-pythonext_SCRIPTS = python/__init__.pyc
-pythonext_LTLIBRARIES = python/_jellyfish.la
-python__jellyfish_la_SOURCES = python/swig_wrap.cpp $(SWIG_SRC)
-python__jellyfish_la_CPPFLAGS = $(PYTHON_CPPFLAGS) -I$(top_srcdir)/include
-python__jellyfish_la_LDFLAGS = -module $(PYTHON_LDFLAGS)
-python__jellyfish_la_LIBADD = ../libjellyfish-2.0.la
-CLEANFILES += $(PYTHON_BUILT) $(dist_pythonext_DATA) python/jellyfish.py
+pythonext_SCRIPTS = swig/python/__init__.pyc
+pythonext_LTLIBRARIES = swig/python/_jellyfish.la
+swig_python__jellyfish_la_SOURCES = swig/python/swig_wrap.cpp $(SWIG_SRC)
+swig_python__jellyfish_la_CPPFLAGS = $(PYTHON_CPPFLAGS) -I$(srcdir)/include
+swig_python__jellyfish_la_LDFLAGS = -module
+swig_python__jellyfish_la_LIBADD = libjellyfish-2.0.la
+CLEANFILES += $(PYTHON_BUILT) $(pythonext_SCRIPTS)
 PYTHONC_V_GEN = $(pythonc_v_GEN_$(V))
 pythonc_v_GEN_ = $(pythonc_v_GEN_$(AM_DEFAULT_VERBOSITY))
 pythonc_v_GEN_0 = @echo "  PYTHONC " $@;
 %/__init__.pyc: %/jellyfish.py
 	$(PYTHONC_V_GEN)$(PYTHON) -c 'import py_compile, sys; py_compile.compile(sys.argv[1], sys.argv[2])' $< $@
-python/jellyfish.py: python/swig_wrap.cpp
-EXTRA_DIST += python/jellyfish.py
+swig/python/jellyfish.py: swig/python/swig_wrap.cpp
+EXTRA_DIST += $(PYTHON_BUILT)
 endif
 
 # Ruby support
 if RUBY_BINDING
-RUBY_BUILT = ruby/swig_wrap.cpp
+RUBY_BUILT = swig/ruby/swig_wrap.cpp
 BUILT_SOURCES += $(RUBY_BUILT)
 rubyextdir = $(RUBY_EXT_LIB)
-rubyext_LTLIBRARIES = ruby/jellyfish.la
-ruby_jellyfish_la_SOURCES = ruby/swig_wrap.cpp $(SWIG_SRC)
-ruby_jellyfish_la_CPPFLAGS = $(RUBY_EXT_CFLAGS) -I$(top_srcdir)/include
-ruby_jellyfish_la_LDFLAGS = -module $(RUBY_EXT_LIBS)
-ruby_jellyfish_la_LIBADD = ../libjellyfish-2.0.la
+rubyext_LTLIBRARIES = swig/ruby/jellyfish.la
+swig_ruby_jellyfish_la_SOURCES = swig/ruby/swig_wrap.cpp $(SWIG_SRC)
+swig_ruby_jellyfish_la_CPPFLAGS = $(RUBY_EXT_CFLAGS) -I$(srcdir)/include
+swig_ruby_jellyfish_la_LDFLAGS = -module
+swig_ruby_jellyfish_la_LIBADD = libjellyfish-2.0.la
 CLEANFILES += $(RUBY_BUILT)
 endif
 
 # Perl5 support
 if PERL_BINDING
-PERL_BUILT = perl5/swig_wrap.cpp perl5/jellyfish.pm
+PERL_BUILT = swig/perl5/swig_wrap.cpp swig/perl5/jellyfish.pm
 BUILT_SOURCES += $(PERL_BUILT)
 perlextdir = $(PERL_EXT_LIB)
-perlext_SCRIPTS = perl5/jellyfish.pm
-perlext_LTLIBRARIES = perl5/jellyfish.la
-perl5_jellyfish_la_SOURCES = perl5/swig_wrap.cpp $(SWIG_SRC)
-perl5_jellyfish_la_CPPFLAGS = $(PERL_EXT_CPPFLAGS) -I$(PERL_EXT_INC) -I$(top_srcdir)/include
-perl5_jellyfish_la_LDFLAGS = -module $(PERL5_EXT_LDFLAGS)
-perl5_jellyfish_la_LIBADD = ../libjellyfish-2.0.la
-CLEANFILES += $(PERL5_BUILT) perl5/jellyfish.pm
-perl5/jellyfish.pm: perl5/swig_wrap.cpp
-EXTRA_DIST += perl5/jellyfish.pm
+perlext_SCRIPTS = swig/perl5/jellyfish.pm
+perlext_LTLIBRARIES = swig/perl5/jellyfish.la
+swig_perl5_jellyfish_la_SOURCES = swig/perl5/swig_wrap.cpp $(SWIG_SRC)
+swig_perl5_jellyfish_la_CPPFLAGS = $(PERL_EXT_CPPFLAGS) -I$(PERL_EXT_INC) -I$(srcdir)/include
+swig_perl5_jellyfish_la_LDFLAGS = -module
+swig_perl5_jellyfish_la_LIBADD = libjellyfish-2.0.la
+CLEANFILES += $(PERL_BUILT)
+swig/perl5/jellyfish.pm: swig/perl5/swig_wrap.cpp
+EXTRA_DIST += $(PERL_BUILT)
 endif
diff --git a/swig/jellyfish.i b/swig/jellyfish.i
index 90a446b..167a0be 100644
--- a/swig/jellyfish.i
+++ b/swig/jellyfish.i
@@ -11,6 +11,11 @@
 #define SWIG_FILE_WITH_INIT
 #endif
 
+#ifdef SWIGPERL
+#undef seed
+#undef random
+#endif
+
 #include <fstream>
 #include <stdexcept>
 #undef die
diff --git a/swig/ruby/test_mer_file.rb b/swig/ruby/test_mer_file.rb
index 1a80ca4..d185f89 100644
--- a/swig/ruby/test_mer_file.rb
+++ b/swig/ruby/test_mer_file.rb
@@ -14,7 +14,7 @@ class TestMerFile < MiniTest::Unit::TestCase
 
     jf_histo = []
     open(File.join($data, "swig_ruby.histo")) { |f|
-      f.lines.each { |l|
+      f.each_line.each { |l|
         freq, count = l.split.map {|x| x.to_i }
         jf_histo[freq] = count
       }
@@ -38,7 +38,7 @@ class TestMerFile < MiniTest::Unit::TestCase
 
   def test_dump
     open(File.join($data, "swig_ruby.dump")) { |f|
-      f.lines.each { |l|
+      f.each_line.each { |l|
         mer, count = l.split
         assert @mf.next_mer
         assert_equal(mer, @mf.mer.to_s)
diff --git a/tests/swig_perl.sh b/tests/swig_perl.sh
index 306541e..5aa9252 100644
--- a/tests/swig_perl.sh
+++ b/tests/swig_perl.sh
@@ -13,5 +13,5 @@ $JF histo ${pref}.jf > ${pref}.histo
 
 for i in test_mer_file.t test_hash_counter.t; do
     echo Test $i
-    $PERL "-I$LOADPATH/.libs" "-I$LOADPATH" "$SRCDIR/swig/perl5/t/$i" .
+    $PERL "-I$LOADPATH/.libs" "-I$LOADPATH" "-I$SRCDIR/swig/perl5" "$SRCDIR/swig/perl5/t/$i" .
 done
diff --git a/unit_tests/test_mer_heap.cc b/unit_tests/test_mer_heap.cc
index 44cf91a..ceeb54a 100644
--- a/unit_tests/test_mer_heap.cc
+++ b/unit_tests/test_mer_heap.cc
@@ -16,7 +16,7 @@ static const uint16_t mer_len  = 50;
 static const size_t   nb_mers  = ary_size / 2;
 
 class MerHeapTest : public ::testing::TestWithParam<size_t> {
-protected:
+public:
   static void SetUpTestCase() {
     mer_dna::k(mer_len);
     shared_ary = new large_array(ary_size, mer_len * 2, 0, 63);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/jellyfish1.git



More information about the debian-med-commit mailing list