aboutsummaryrefslogtreecommitdiff
path: root/academic
diff options
context:
space:
mode:
authorfourtysixandtwo <fourtysixandtwo@sliderr.net>2024-04-07 12:36:05 -0600
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-04-13 22:04:05 +0700
commitaaf377fe172506a8d1ca8c1b40d916c1416effa3 (patch)
tree74690e3ce2937e1d2c7499debb43bf326fc9ed32 /academic
parent2fba54a8b90e0087ca19baa7d21788e71a9cf5d5 (diff)
academic/scidavis: Fix building on -current.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic')
-rw-r--r--academic/scidavis/scidavis.SlackBuild8
1 files changed, 5 insertions, 3 deletions
diff --git a/academic/scidavis/scidavis.SlackBuild b/academic/scidavis/scidavis.SlackBuild
index b82649a8e7c8e..6ebdd91a519cf 100644
--- a/academic/scidavis/scidavis.SlackBuild
+++ b/academic/scidavis/scidavis.SlackBuild
@@ -90,13 +90,15 @@ 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 {} \;
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+
# Set the correct python paths - code based on scidavis.spec for Fedora by Alexander Ploumistos
-sed -i "s:set(PYTHON_SCRIPTDIR etc:set(PYTHON_SCRIPTDIR lib$LIBDIRSUFFIX/python3.9/site-packages/scidavis:" scidavis/CMakeLists.txt
+sed -i "s:set(PYTHON_SCRIPTDIR etc:set(PYTHON_SCRIPTDIR lib$LIBDIRSUFFIX/python$PYVER/site-packages/scidavis:" scidavis/CMakeLists.txt
sed -i "s:FILES scidavisrc.py \${CMAKE_CURRENT_BINARY_DIR}/\$<CONFIG>/scidavisrc.pyc DESTINATION:FILES scidavisrc.py DESTINATION:" scidavis/CMakeLists.txt
sed -i "s:FILES scidavisrc.py \${CMAKE_CURRENT_BINARY_DIR}/scidavisrc.pyc DESTINATION:FILES scidavisrc.py DESTINATION:" scidavis/CMakeLists.txt
sed -i "s:FILES scidavisUtil.py DESTINATION share/scidavis:FILES scidavisUtil.py DESTINATION \${PYTHON_SCRIPTDIR}:" scidavis/CMakeLists.txt
-sed -i "s:PYTHON_CONFIG_PATH=\"\${CMAKE_INSTALL_PREFIX}/etc\":PYTHON_CONFIG_PATH=\"/usr/lib$LIBDIRSUFFIX/python3.9/site-packages/scidavis\":" libscidavis/CMakeLists.txt
-sed -i "s:PYTHON_UTIL_PATH=\"\${CMAKE_INSTALL_PREFIX}/share/scidavis\":PYTHON_UTIL_PATH=\"/usr/lib$LIBDIRSUFFIX/python3.9/site-packages/scidavis\":" libscidavis/CMakeLists.txt
+sed -i "s:PYTHON_CONFIG_PATH=\"\${CMAKE_INSTALL_PREFIX}/etc\":PYTHON_CONFIG_PATH=\"/usr/lib$LIBDIRSUFFIX/python$PYVER/site-packages/scidavis\":" libscidavis/CMakeLists.txt
+sed -i "s:PYTHON_UTIL_PATH=\"\${CMAKE_INSTALL_PREFIX}/share/scidavis\":PYTHON_UTIL_PATH=\"/usr/lib$LIBDIRSUFFIX/python$PYVER/site-packages/scidavis\":" libscidavis/CMakeLists.txt
export PYTHON=python3