diff options
-rw-r--r-- | academic/ViennaRNA/README | 13 | ||||
-rw-r--r-- | academic/ViennaRNA/ViennaRNA.SlackBuild | 26 | ||||
-rw-r--r-- | academic/ViennaRNA/ViennaRNA.info | 6 | ||||
-rw-r--r-- | academic/ViennaRNA/swig4.patch | 203 |
4 files changed, 235 insertions, 13 deletions
diff --git a/academic/ViennaRNA/README b/academic/ViennaRNA/README index 84581ebcf2fff..a8fb799e7974b 100644 --- a/academic/ViennaRNA/README +++ b/academic/ViennaRNA/README @@ -26,3 +26,16 @@ They are not maintained any more and not built by default. The code very rarely uses static arrays, and all programs should work for sequences up to a length of 32,700 (if you have huge amounts of memory that is). + +For those who wish to link the Vienna package their own C, perl or python programs, +the RNAlib Reference Manual can be assessed at: + +https://www.tbi.univie.ac.at/RNA/ViennaRNA/doc/html/index.html + +or downloaded from: + +https://www.tbi.univie.ac.at/RNA/ViennaRNA/doc/RNAlib-$VERSION.pdf + +For further info see: + +https://www.tbi.univie.ac.at/RNA/documentation.html diff --git a/academic/ViennaRNA/ViennaRNA.SlackBuild b/academic/ViennaRNA/ViennaRNA.SlackBuild index 2165d6da28327..9de92bfa6e872 100644 --- a/academic/ViennaRNA/ViennaRNA.SlackBuild +++ b/academic/ViennaRNA/ViennaRNA.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=ViennaRNA -VERSION=${VERSION:-2.4.11} +VERSION=${VERSION:-2.4.12} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -68,6 +68,11 @@ find . \ -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; + +patch -p 1 < $CWD/swig4.patch + +#needed to make patches compile +autoreconf # You can configure some ViennaRNA features that are (not) compiled by default. # See the README.md for details. You can enable/disable a these features by @@ -95,19 +100,20 @@ find . \ # - SVM Z-score filter in RNALfold # - GNU Scientific Library for RNApvmin -cluster="" ; [ "${CLUS:-no}" != "no" ] && cluster="--with-cluster" -kinwalker="" ; [ "${KINW:-no}" != "no" ] && kinwalker="--with-kinwalker" -forester="" ; [ "${FORE:-yes}" != "yes" ] && forester="--without-forester" -kinfold="" ; [ "${KINF:-yes}" != "yes" ] && kinwalk="--without-kinfold" -rnalocmin="" ; [ "${RLOC:-yes}" != "yes" ] && rnalocmin="--without-rnalocmin" +cluster="" ; [ "${CLUSTER:-yes}" != "no" ] && cluster="--with-cluster" +kinwalker="" ; [ "${KINWALKER:-yes}" != "no" ] && kinwalker="--with-kinwalker" +# Default enabled features: +forester="" ; [ "${FORESTER:-yes}" != "yes" ] && forester="--without-forester" +kinfold="" ; [ "${KINFOLD:-yes}" != "yes" ] && kinwalk="--without-kinfold" +rnalocmin="" ; [ "${RNALOCMIN:-yes}" != "yes" ] && rnalocmin="--without-rnalocmin" perl="" ; [ "${PERL:-yes}" != "yes" ] && perl="--without-perl" -python="" ; [ "${PYTH:-yes}" != "yes" ] && python="--without-python" -python3="" ; [ "${PYT3:-yes}" != "yes" ] && python3="--without-python3" +python="" ; [ "${PYTHON:-yes}" != "yes" ] && python="--without-python" +python3="" ; [ "${PYTHON3:-yes}" != "yes" ] && python3="--without-python3" swig="" ; [ "${SWIG:-yes}" != "yes" ] && swig="--without-swig" simd="" ; [ "${SIMD:-yes}" != "yes" ] && simd="--disable-simd" lto="" ; [ "${LTO:-yes}" != "yes" ] && lto="--disable-lto" -openmp="" ; [ "${OMP:-yes}" != "yes" ] && openmp="--disable-openmp" -pthreads="" ; [ "${PTHR:-yes}" != "yes" ] && pthreads="--disable-pthreads" +openmp="" ; [ "${OPENMP:-yes}" != "yes" ] && openmp="--disable-openmp" +pthreads="" ; [ "${PTHREADS:-yes}" != "yes" ] && pthreads="--disable-pthreads" svm="" ; [ "${SVM:-yes}" != "yes" ] && svm="--without-svm" gsl="" ; [ "${GSL:-yes}" != "yes" ] && gsl="--without-gsl" diff --git a/academic/ViennaRNA/ViennaRNA.info b/academic/ViennaRNA/ViennaRNA.info index ffde773320486..1432a46dc11da 100644 --- a/academic/ViennaRNA/ViennaRNA.info +++ b/academic/ViennaRNA/ViennaRNA.info @@ -1,8 +1,8 @@ PRGNAM="ViennaRNA" -VERSION="2.4.11" +VERSION="2.4.12" HOMEPAGE="https://www.tbi.univie.ac.at/RNA" -DOWNLOAD="https://www.tbi.univie.ac.at/RNA/download/sourcecode/2_4_x/ViennaRNA-2.4.11.tar.gz" -MD5SUM="114ea7450ef994404754abdc6cb45353" +DOWNLOAD="https://www.tbi.univie.ac.at/RNA/download/sourcecode/2_4_x/ViennaRNA-2.4.12.tar.gz" +MD5SUM="db37ca5c863375d61488e6d7248c7176" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="grace gri" diff --git a/academic/ViennaRNA/swig4.patch b/academic/ViennaRNA/swig4.patch new file mode 100644 index 0000000000000..88df2eb933001 --- /dev/null +++ b/academic/ViennaRNA/swig4.patch @@ -0,0 +1,203 @@ +commit c8a867dc017f58a4ffbfb2d3d976506947e5d9d6 +Author: Ronny Lorenz <ronny@tbi.univie.ac.at> +Date: Mon May 13 08:22:42 2019 +0200 + + SWIG: Fix install for wrappers generated by swig 4 + + - We now default to install _RNA.*so files for Python2/3 into the RNA/ + subdirectory. This seems necessary to avoid problems when importing + the RNA package, where the underlying loader changed from swig 3 to + swig 4. + - We also require swig 3.0.0 or later from now on to generate the + wrapper code, and we drop the -modern flag + +diff --git a/interfaces/Python/Makefile.am b/interfaces/Python/Makefile.am +index df279501..41be4c08 100644 +--- a/interfaces/Python/Makefile.am ++++ b/interfaces/Python/Makefile.am +@@ -16,9 +16,8 @@ INTERFACE_FILES = $(SWIG_src) \ + $(LANG_SPECIFIC_INTERFACE_FILES) + + pkgpy2execdir = $(py2execdir)/RNA +-pkgpy2cmoddir = $(py2execdir) + +-pkgpy2cmod_LTLIBRARIES = _RNA.la ++pkgpy2exec_LTLIBRARIES = _RNA.la + pkgpy2exec_DATA = RNA/__init__.py + + _RNA_la_SOURCES = $(INTERFACE_FILES) \ +@@ -73,7 +72,7 @@ $(SWIG_wrapper): $(SWIG_src) $(INTERFACE_FILES) + $(swig_verbose)$(SWIG) -I$(top_srcdir)/src \ + -I$(srcdir) -I$(builddir) \ + $(RNA_CPPFLAGS) \ +- -python -modern -c++ \ ++ -python -c++ \ + -o $(SWIG_wrapper) \ + $(SWIG_main_src) + +@@ -87,27 +86,33 @@ RNA/__init__.py: $(SWIG_module_name).py + $(AM_V_GEN)( test -d RNA || $(MKDIR_P) RNA ) && \ + cp `test -f RNA.py || echo '$(srcdir)/'`RNA.py RNA/__init__.py + +-_RNA$(PYTHON2_SO): _RNA.la +- $(AM_V_GEN)( $(LIBTOOL) --config > libtoolconfig.tmp ) && \ +- ( . ./libtoolconfig.tmp; cp $$objdir/_RNA$(PYTHON2_SO) . ) && \ ++RNA/_RNA$(PYTHON2_SO): _RNA.la ++ $(AM_V_GEN)( test -d RNA || $(MKDIR_P) RNA ) && \ ++ ( $(LIBTOOL) --config > libtoolconfig.tmp ) && \ ++ ( . ./libtoolconfig.tmp; cp $$objdir/_RNA$(PYTHON2_SO) RNA ) && \ + rm -f libtoolconfig.tmp + +-all-local: _RNA$(PYTHON2_SO) ++CLEANFILES = \ ++ RNA/_RNA$(PYTHON2_SO) \ ++ RNA/__init__.py \ ++ RNA/__init__.pyc ++ ++all-local: RNA/_RNA$(PYTHON2_SO) + + clean-local: +- -rm -rf RNA _RNA$(PYTHON2_SO) ++ -rm -rf RNA + + # Remove the .la file - RNA.la is never linked against (it's a module) + # and Python doesn't use libltdl. Note that the library gets installed by + # install-data, so that's where we need to hook. + install-data-hook: +- rm -f $(DESTDIR)$(pkgpy2cmoddir)/_RNA.la ++ rm -f $(DESTDIR)$(pkgpy2execdir)/_RNA.la + + # Because we don't install the .la file, "make uninstall" doesn't work and + # we need to remove the file ourselves. + uninstall-local: +- eval `grep '^dlname=' $(pkgpy2cmod_LTLIBRARIES)` ; \ +- rm -f $(DESTDIR)$(pkgpy2cmoddir)/"$$dlname" ++ eval `grep '^dlname=' $(pkgpy2exec_LTLIBRARIES)` ; \ ++ rm -f $(DESTDIR)$(pkgpy2execdir)/"$$dlname" + + ## remove all generated content + maintainer-clean-local: +diff --git a/interfaces/Python3/Makefile.am b/interfaces/Python3/Makefile.am +index de9b049e..67824a99 100644 +--- a/interfaces/Python3/Makefile.am ++++ b/interfaces/Python3/Makefile.am +@@ -17,10 +17,9 @@ INTERFACE_FILES = $(SWIG_src) \ + $(LANG_SPECIFIC_INTERFACE_FILES) + + pkgpyexecdir = $(py3execdir)/RNA +-pkgpycmoddir = $(py3execdir) + pkgpycachedir = $(pkgpyexecdir)/__pycache__ + +-pkgpycmod_LTLIBRARIES = _RNA.la ++pkgpyexec_LTLIBRARIES = _RNA.la + pkgpyexec_DATA = RNA/__init__.py + pkgpycache_DATA = RNA/__pycache__/__init__.@PYTHON3_CACHE_TAG@.pyc \ + RNA/__pycache__/__init__.@PYTHON3_CACHE_OPT1_EXT@ +@@ -75,7 +74,7 @@ $(SWIG_wrapper): $(SWIG_src) $(INTERFACE_FILES) + -I$(srcdir) -I$(builddir) \ + -DPY3 \ + $(RNA_CPPFLAGS) \ +- -python -modern -py3 -c++ \ ++ -python -py3 -c++ \ + -o $(SWIG_wrapper) \ + $(SWIG_main_src) + +@@ -91,42 +90,43 @@ RNA/__init__.py: $(SWIG_module_name).py + + # We "import _RNA" first so that if we fail to import the glue library + # we don't generate a broken .pyc or .pyo. +-RNA/__pycache__/__init__.@PYTHON3_CACHE_TAG@.pyc: RNA/__init__.py _RNA$(PYTHON3_SO) ++RNA/__pycache__/__init__.@PYTHON3_CACHE_TAG@.pyc: RNA/__init__.py RNA/_RNA$(PYTHON3_SO) + $(AM_V_GEN)( PYTHONPATH="RNA:$$PYTHONPATH" $(PYTHON3) -c "import _RNA" ; \ + PYTHONPATH=".:$$PYTHONPATH" $(PYTHON3) -c "import RNA" ) + +-RNA/__pycache__/__init__.@PYTHON3_CACHE_OPT1_EXT@: RNA/__init__.py _RNA$(PYTHON3_SO) ++RNA/__pycache__/__init__.@PYTHON3_CACHE_OPT1_EXT@: RNA/__init__.py RNA/_RNA$(PYTHON3_SO) + $(AM_V_GEN)( PYTHONPATH="RNA:$$PYTHONPATH" $(PYTHON3) -O -c "import _RNA" ; \ + PYTHONPATH=".:$$PYTHONPATH" $(PYTHON3) -O -c "import RNA" ) + +-_RNA$(PYTHON3_SO): _RNA.la +- $(AM_V_GEN)( $(LIBTOOL) --config > libtoolconfig.tmp ) && \ +- ( . ./libtoolconfig.tmp; cp $$objdir/_RNA$(PYTHON3_SO) . ) && \ ++RNA/_RNA$(PYTHON3_SO): _RNA.la ++ $(AM_V_GEN)( test -d RNA || $(MKDIR_P) RNA ) && \ ++ ( $(LIBTOOL) --config > libtoolconfig.tmp ) && \ ++ ( . ./libtoolconfig.tmp; cp $$objdir/_RNA$(PYTHON3_SO) RNA ) && \ + rm -f libtoolconfig.tmp + + CLEANFILES = \ +- _RNA$(PYTHON3_SO) \ ++ RNA/_RNA$(PYTHON3_SO) \ + RNA/__init__.py \ + RNA/__pycache__/__init__.@PYTHON3_CACHE_TAG@.pyc \ + RNA/__pycache__/__init__.@PYTHON3_CACHE_OPT1_EXT@\ + $(srcdir)/*.pyc + +-all-local: _RNA$(PYTHON3_SO) ++all-local: RNA/_RNA$(PYTHON3_SO) + + clean-local: +- -rm -rf RNA _RNA$(PYTHON3_SO) ++ -rm -rf RNA + + # Remove the .la file - RNA.la is never linked against (it's a module) + # and Python doesn't use libltdl. Note that the library gets installed by + # install-data, so that's where we need to hook. + install-data-hook: +- rm -f $(DESTDIR)$(pkgpycmoddir)/_RNA.la ++ rm -f $(DESTDIR)$(pkgpyexecdir)/_RNA.la + + # Because we don't install the .la file, "make uninstall" doesn't work and + # we need to remove the file ourselves. + uninstall-local: +- eval `grep '^dlname=' $(pkgpycmod_LTLIBRARIES)` ; \ +- rm -f $(DESTDIR)$(pkgpycmoddir)/"$$dlname" ++ eval `grep '^dlname=' $(pkgpyexec_LTLIBRARIES)` ; \ ++ rm -f $(DESTDIR)$(pkgpyexecdir)/"$$dlname" + + ## remove all generated content + maintainer-clean-local: +diff --git a/interfaces/RNA.i b/interfaces/RNA.i +index fb2260d6..6ae86641 100644 +--- a/interfaces/RNA.i ++++ b/interfaces/RNA.i +@@ -1,4 +1,9 @@ ++#ifdef SWIGPYTHON ++%module(moduleimport="from . import _RNA") RNA ++#else + %module RNA ++#endif ++ + //%pragma(perl5) modulecode="@EXPORT=qw(fold);" + %pragma(perl5) include="RNA.pod" + +diff --git a/m4/ac_rna_swig.m4 b/m4/ac_rna_swig.m4 +index 98583bed..29ea398f 100644 +--- a/m4/ac_rna_swig.m4 ++++ b/m4/ac_rna_swig.m4 +@@ -9,13 +9,12 @@ AC_DEFUN([RNA_ENABLE_SWIG_INTERFACES],[ + + AS_IF([test "x$with_swig" != "xno"],[ + wants_swig="yes" +- AX_PKG_SWIG(2.0.0, [has_swig="yes"], [has_swig="no"]) ++ AX_PKG_SWIG(3.0.0, [has_swig="yes"], [has_swig="no"]) + ],[ + wants_swig="no" + ]) + + AM_CONDITIONAL(HAS_SWIG, test "x$has_swig" != "xno") +- + RNA_ENABLE_SWIG_PERL + RNA_ENABLE_SWIG_PYTHON + RNA_ENABLE_SWIG_PYTHON3 +@@ -55,10 +54,6 @@ AC_DEFUN([RNA_ENABLE_SWIG_PERL],[ + AC_MSG_ERROR([Perl is required to build.]) + [enable_perl_status="Perl is required to build."] + fi +-# AX_PERL_EXT_FLAGS([PERLXS_CFLAGS], [PERLXS_LDFLAGS]) +-# AX_PERL_EXT_LINK_CHECK([with_perl]) +-# AC_SUBST([PERLXS_CFLAGS]) +-# AC_SUBST([PERLXS_LDFLAGS]) + ]) + + # prepare all files for perl interface |