aboutsummaryrefslogtreecommitdiff
path: root/academic
diff options
context:
space:
mode:
authorbrobr <sborg63@disroot.org>2024-07-27 17:05:40 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-07-28 07:47:01 +0700
commita31f117413dc0c7271dd151e95c387fe75d66801 (patch)
tree68974928ae7de160699d171c8f2c876e8bb3c630 /academic
parenteb4b9071e646d182d178a1bb1f29daf77085a0f3 (diff)
academic/ViennaRNA: patch to compile against swig_4.2
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic')
-rw-r--r--academic/ViennaRNA/ViennaRNA.SlackBuild3
-rw-r--r--academic/ViennaRNA/swig_4.2.0.txt22
2 files changed, 25 insertions, 0 deletions
diff --git a/academic/ViennaRNA/ViennaRNA.SlackBuild b/academic/ViennaRNA/ViennaRNA.SlackBuild
index 42ae76bbd743..aecfae4f2090 100644
--- a/academic/ViennaRNA/ViennaRNA.SlackBuild
+++ b/academic/ViennaRNA/ViennaRNA.SlackBuild
@@ -82,6 +82,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# https://github.com/ViennaRNA/ViennaRNA/issues/243
+patch -p1 < $CWD/swig_4.2.0.txt
+
# 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
# passing variables to the script (VAR=yes/no ./ViennaRNA.SlackBuild).
diff --git a/academic/ViennaRNA/swig_4.2.0.txt b/academic/ViennaRNA/swig_4.2.0.txt
new file mode 100644
index 000000000000..80c1ba2b822f
--- /dev/null
+++ b/academic/ViennaRNA/swig_4.2.0.txt
@@ -0,0 +1,22 @@
+Description: rewriting code to build against swig 4.2.0
+Author: Pierre Gruet <pgt@debian.org>
+Forwarded: no
+Last-Update: 2024-07-26
+
+--- a/interfaces/inverse.i
++++ b/interfaces/inverse.i
+@@ -78,7 +78,14 @@
+ #ifdef SWIGPYTHON
+ %typemap(varin) char * symbolset {
+ free(symbolset);
++
++#if SWIG_VERSION >= 0x040200
++ PyObject *pbytes = NULL;
++ symbolset = strdup(SWIG_PyUnicode_AsUTF8AndSize($input, NULL, &pbytes));
++ Py_XDECREF(pbytes);
++#else
+ symbolset = strdup(SWIG_Python_str_AsChar($input));
++#endif
+ }
+
+ %typemap(varout) char * symbolset {