Skip to content

Commit ef81beb

Browse files
authored
viennarna 2.7.0 (#2139)
1 parent fda88f8 commit ef81beb

File tree

1 file changed

+58
-35
lines changed

1 file changed

+58
-35
lines changed

Formula/viennarna.rb

Lines changed: 58 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@ class Viennarna < Formula
22
# cite Lorenz_2011: "https://doi.org/10.1186/1748-7188-6-26"
33
desc "Prediction and comparison of RNA secondary structures"
44
homepage "https://www.tbi.univie.ac.at/~ronny/RNA/"
5-
url "https://github.com/ViennaRNA/ViennaRNA/archive/refs/tags/v2.6.4.tar.gz"
6-
sha256 "2f9b5ac8a8175b7485ec5e3b773210afce130d6ce0a3b111457c78c4466ad1c7"
7-
8-
bottle do
9-
root_url "https://ghcr.io/v2/brewsci/bio"
10-
sha256 cellar: :any, arm64_sonoma: "8b6df1b73b8f0df52d391c94fbe27e17838dacc525415a2976a04f4038bbcf53"
11-
sha256 cellar: :any, ventura: "621dc4aa92b99fb3c0d30fb6377b2d0007b116164398d88ccec2bf442ed92e31"
12-
sha256 cellar: :any_skip_relocation, x86_64_linux: "72ddd1730d2d720566c5a59465a9b43dd5aa1834e771db452fd7b8ca4618edbe"
13-
end
5+
url "https://www.tbi.univie.ac.at/RNA/download/sourcecode/2_7_x/ViennaRNA-2.7.0.tar.gz"
6+
sha256 "9a99fd68ed380894defb4d5e6a8a2871629270028cdf7f16f0a05da6e8c71473"
7+
license :cannot_represent
8+
head "https://github.com/ViennaRNA/ViennaRNA.git", branch: "master"
149

1510
depends_on "autoconf" => :build
1611
depends_on "automake" => :build
@@ -26,8 +21,8 @@ class Viennarna < Formula
2621
depends_on "gsl"
2722
depends_on "mpfr"
2823
depends_on "openblas"
29-
depends_on "perl" # for EXTERN.h
30-
depends_on "python@3.12"
24+
depends_on "perl"
25+
depends_on "python@3.14"
3126

3227
uses_from_macos "flex" => :build
3328
uses_from_macos "zlib"
@@ -36,40 +31,34 @@ class Viennarna < Formula
3631
depends_on "libomp"
3732
end
3833

34+
patch do
35+
url "https://raw.githubusercontent.com/bioconda/bioconda-recipes/871a0e5a3b9af8bb0b8e033620aae08f32390bd0/recipes/viennarna/fix_python_module_copy.patch"
36+
sha256 "8ff562202871a56ec163e5d805bd1e312bfe984b430d4e24f9e4ece2d0987ef5"
37+
end
38+
39+
patch :DATA
40+
3941
def python3
40-
which("python3.12")
42+
which("python3.14")
4143
end
4244

4345
def install
4446
ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version if OS.mac?
4547
ENV.append "CXXFLAGS", "-std=c++17" # for Kinwalker
46-
inreplace "src/RNAlocmin/hash_util.h", "register ", "" # c++17 deprecated register
47-
48+
# Fix dlib build with newer compilers
49+
inreplace "src/dlib-19.24/dlib/global_optimization/find_max_global.h",
50+
"::template go(std::forward<T>(f),a))",
51+
"::go(std::forward<T>(f),a))"
4852
# regenerate configure file
4953
system "autoreconf", "-fvi"
5054

51-
inreplace "src/RNAxplorer/interfaces/Python/Makefile.in",
52-
"pkgpycache_DATA = RNAxplorer/__pycache__/__init__.@PYTHON3_CACHE_TAG@.pyc \\",
53-
"pkgpycache_DATA = "
54-
inreplace "src/RNAxplorer/interfaces/Python/Makefile.in",
55-
"RNAxplorer/__pycache__/__init__.@PYTHON3_CACHE_OPT1_EXT@",
56-
""
57-
58-
# unpack libsvm and dlib
59-
cd "src" do
60-
system "tar", "zxf", "libsvm-3.31.tar.gz"
61-
system "tar", "jxf", "dlib-19.24.tar.bz2"
62-
end
55+
ENV.append "LDFLAGS", "-Wl,-headerpad_max_install_names"
6356
args = %W[
64-
--disable-debug
65-
--disable-dependency-tracking
66-
--disable-silent-rules
67-
--enable-openmp
68-
--without-python
69-
--with-cluster
70-
--with-kinwalker
71-
--disable-check-python2
7257
--prefix=#{prefix}
58+
--with-kinwalker
59+
--with-cluster
60+
--disable-lto
61+
--without-cla
7362
]
7463
if OS.mac?
7564
# Work around "checking for OpenMP flag of C compiler... unknown"
@@ -93,11 +82,45 @@ def install
9382

9483
system "./configure", *args
9584
system "make"
96-
ENV.deparallelize
9785
system "make", "install"
9886
end
9987

10088
test do
10189
assert_match "-1.30 MEA=21.31", pipe_output("#{bin}/RNAfold --MEA", "CGACGUAGAUGCUAGCUGACUCGAUGC")
90+
text = "GGGCACCCCCCUUCGGGGGGUCACCUCGCGUAGCUAGCUACGCGAGGGUUAAAGCGCCUUUCUCCCUCGCGUAGC"
91+
assert_match "-43.30", pipe_output("#{bin}/RNAxplorer -M RSH -n 10 --sequence #{text}")
92+
system python3, "-c", "import RNA; print(RNA.__doc__)"
93+
system python3, "-c", "import RNAxplorer"
10294
end
10395
end
96+
97+
__END__
98+
diff --git a/interfaces/Python/Makefile.am b/interfaces/Python/Makefile.am
99+
--- a/interfaces/Python/Makefile.am
100+
+++ b/interfaces/Python/Makefile.am
101+
@@ -38,11 +38,7 @@ pkgpyexec_DATA = \
102+
pkgpyexec_DATA = \
103+
RNA/__init__.py \
104+
RNA/RNA.py
105+
-pkgpycache_DATA = \
106+
- RNA/__pycache__/__init__.@PYTHON3_CACHE_TAG@.pyc \
107+
- RNA/__pycache__/__init__.@PYTHON3_CACHE_OPT1_EXT@ \
108+
- RNA/__pycache__/RNA.@PYTHON3_CACHE_TAG@.pyc \
109+
- RNA/__pycache__/RNA.@PYTHON3_CACHE_OPT1_EXT@
110+
+pkgpycache_DATA =
111+
112+
pkgpyvrnaexecdir = $(py3execdir)/ViennaRNA
113+
pkgpyvrnaexec_DATA = \
114+
diff --git a/src/RNAxplorer/interfaces/Python/Makefile.am b/src/RNAxplorer/interfaces/Python/Makefile.am
115+
--- a/src/RNAxplorer/interfaces/Python/Makefile.am
116+
+++ b/src/RNAxplorer/interfaces/Python/Makefile.am
117+
@@ -7,8 +7,7 @@ pkgpyexec_DATA = RNAxplorer/__init__.py
118+
119+
pkgpyexec_LTLIBRARIES = _RNAxplorer.la
120+
pkgpyexec_DATA = RNAxplorer/__init__.py
121+
-pkgpycache_DATA = RNAxplorer/__pycache__/__init__.@PYTHON3_CACHE_TAG@.pyc \
122+
- RNAxplorer/__pycache__/__init__.@PYTHON3_CACHE_OPT1_EXT@
123+
+pkgpycache_DATA =
124+
125+
_RNAxplorer_la_SOURCES = $(INTERFACE_FILES) \
126+
$(SWIG_wrapper)

0 commit comments

Comments
 (0)