SHA256
1
0
forked from pool/4ti2

Rewrite pathing in 4ti2-handle-prefix.patch

References: https://bugzilla.opensuse.org/1233672
This commit is contained in:
Jan Engelhardt 2025-01-24 22:05:27 +01:00
parent c3d39a3717
commit d910ab2447
3 changed files with 39 additions and 25 deletions

View File

@ -12,42 +12,50 @@ openSUSE has relegated them to /usr/libexec/4ti2, offering instead
prefixed symlinks in /usr/bin, e.g. /usr/bin/4ti2_groebner -> prefixed symlinks in /usr/bin, e.g. /usr/bin/4ti2_groebner ->
/usr/libexec/4ti2/groebner. /usr/libexec/4ti2/groebner.
--- ---
src/groebner/script.template | 2 +- src/groebner/script.template | 5 +++--
src/groebner/script.template.in | 2 +- src/groebner/script.template.in | 5 +++--
src/zsolve/graver.template | 2 +- src/zsolve/graver.template | 2 +-
src/zsolve/hilbert.template | 2 +- src/zsolve/hilbert.template | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-) 4 files changed, 8 insertions(+), 6 deletions(-)
Index: 4ti2-1.6.9/src/groebner/script.template Index: 4ti2-1.6.10/src/groebner/script.template
=================================================================== ===================================================================
--- 4ti2-1.6.9.orig/src/groebner/script.template --- 4ti2-1.6.10.orig/src/groebner/script.template
+++ 4ti2-1.6.9/src/groebner/script.template +++ 4ti2-1.6.10/src/groebner/script.template
@@ -21,7 +21,7 @@ @@ -21,9 +21,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# We locate where this script is so we can call the executables. # We locate where this script is so we can call the executables.
-SCRIPT=`which "$0"` -SCRIPT=`which "$0"`
+SCRIPT=$(realpath $(which "$0")) +FUNCTION="${0##*/}"
+FUNCTION="${FUNCTION#4ti2_}"
+SCRIPT=$(realpath "$(which "$0")")
DIR=`dirname "$SCRIPT"` DIR=`dirname "$SCRIPT"`
FUNCTION=`basename "$SCRIPT"` -FUNCTION=`basename "$SCRIPT"`
Index: 4ti2-1.6.9/src/groebner/script.template.in # The default executable.
EXECUTABLE=4ti2int64
Index: 4ti2-1.6.10/src/groebner/script.template.in
=================================================================== ===================================================================
--- 4ti2-1.6.9.orig/src/groebner/script.template.in --- 4ti2-1.6.10.orig/src/groebner/script.template.in
+++ 4ti2-1.6.9/src/groebner/script.template.in +++ 4ti2-1.6.10/src/groebner/script.template.in
@@ -21,7 +21,7 @@ @@ -21,9 +21,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# We locate where this script is so we can call the executables. # We locate where this script is so we can call the executables.
-SCRIPT=`which "$0"` -SCRIPT=`which "$0"`
+SCRIPT=$(realpath $(which "$0")) +FUNCTION="${0##*/}"
+FUNCTION="${FUNCTION#4ti2_}"
+SCRIPT=$(realpath "$(which "$0")")
DIR=`dirname "$SCRIPT"` DIR=`dirname "$SCRIPT"`
FUNCTION=`basename "$SCRIPT"` -FUNCTION=`basename "$SCRIPT"`
Index: 4ti2-1.6.9/src/zsolve/graver.template # The default executable.
EXECUTABLE=@GROEBNER_DEFAULT_EXECUTABLE@
Index: 4ti2-1.6.10/src/zsolve/graver.template
=================================================================== ===================================================================
--- 4ti2-1.6.9.orig/src/zsolve/graver.template --- 4ti2-1.6.10.orig/src/zsolve/graver.template
+++ 4ti2-1.6.9/src/zsolve/graver.template +++ 4ti2-1.6.10/src/zsolve/graver.template
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
# We locate where this script is so we can call the executable zsolve which # We locate where this script is so we can call the executable zsolve which
@ -57,10 +65,10 @@ Index: 4ti2-1.6.9/src/zsolve/graver.template
SCRIPTDIR=`dirname "$SCRIPT"` SCRIPTDIR=`dirname "$SCRIPT"`
EXECUTABLE=zsolve EXECUTABLE=zsolve
Index: 4ti2-1.6.9/src/zsolve/hilbert.template Index: 4ti2-1.6.10/src/zsolve/hilbert.template
=================================================================== ===================================================================
--- 4ti2-1.6.9.orig/src/zsolve/hilbert.template --- 4ti2-1.6.10.orig/src/zsolve/hilbert.template
+++ 4ti2-1.6.9/src/zsolve/hilbert.template +++ 4ti2-1.6.10/src/zsolve/hilbert.template
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
# We locate where this script is so we can call the executable zsolve which # We locate where this script is so we can call the executable zsolve which

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Jan 24 21:01:47 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- Edit 4ti2-handle-prefix.diff [boo#1233672]
* Avoid eagerly following %fdupes-created symlinks when
determining what final program to call.
* Handle being called as /usr/bin/4ti2_circuits.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Apr 26 08:33:12 UTC 2023 - Jan Engelhardt <jengelh@inai.de> Wed Apr 26 08:33:12 UTC 2023 - Jan Engelhardt <jengelh@inai.de>

View File

@ -84,10 +84,8 @@ for i in *; do
done done
%fdupes -s %buildroot/%_prefix %fdupes -s %buildroot/%_prefix
%post -n lib4ti2-0 -p /sbin/ldconfig %ldconfig_scriptlets -n lib4ti2-0
%postun -n lib4ti2-0 -p /sbin/ldconfig %ldconfig_scriptlets -n libzsolve0
%post -n libzsolve0 -p /sbin/ldconfig
%postun -n libzsolve0 -p /sbin/ldconfig
%files %files
%license COPYING %license COPYING