SHA256
1
0
forked from pool/4ti2

Accepting request 1074789 from science

- Add 0001-build-resolve-missing-includes-showing-on-gcc-13.patch

OBS-URL: https://build.opensuse.org/request/show/1074789
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/4ti2?expand=0&rev=7
This commit is contained in:
Dominique Leuenberger 2023-03-28 15:50:20 +00:00 committed by Git OBS Bridge
commit 4fdb8cbe57
5 changed files with 126 additions and 10 deletions

View File

@ -0,0 +1,27 @@
From c024db44f43593fbfe9d8d51f035db7a605d1fa6 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Tue, 28 Mar 2023 00:33:03 +0200
Subject: [PATCH] build: resolve missing includes showing on gcc-13
References: https://github.com/4ti2/4ti2/pull/40
../../src/zsolve/VectorArrayAPI.hpp: In function 'void _4ti2_zsolve_::convert(const T1&, T2&) [with T1 = long int; T2 = int]':
../../src/zsolve/VectorArrayAPI.hpp:79:14: error: 'INT32_MIN' was not declared in this scope; did you mean 'INT_MIN'?
---
src/zsolve/VectorArrayAPI.hpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/zsolve/VectorArrayAPI.hpp b/src/zsolve/VectorArrayAPI.hpp
index a5cb948..cd2ae99 100644
--- a/src/zsolve/VectorArrayAPI.hpp
+++ b/src/zsolve/VectorArrayAPI.hpp
@@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "zsolve/VectorArray.hpp"
#include "zsolve/Exception.h"
#include <fstream>
+#include <cstdint>
#include <cstdlib>
namespace _4ti2_zsolve_ {
--
2.40.0

View File

@ -6,19 +6,16 @@ Subject: [PATCH] build: stop misplacing documentation
docdir must not be statically set as it would override what the
user gave to ./configure --docdir=...
---
doc/Makefile.am | 2 --
doc/Makefile.am | 2 --
1 file changed, 2 deletions(-)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 78abbd6..ea73e88 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
Index: 4ti2-1.6.9/doc/Makefile.am
===================================================================
--- 4ti2-1.6.9.orig/doc/Makefile.am
+++ 4ti2-1.6.9/doc/Makefile.am
@@ -1,5 +1,3 @@
-docdir = $(pkgdatadir)/doc
-
doc_DATA = 4ti2_manual.pdf
## Manual sources.
--
2.19.0

72
4ti2-handle-prefix.patch Normal file
View File

@ -0,0 +1,72 @@
From 0d4518dbcf9321df4d8cad6e97e562f34f7d31f4 Mon Sep 17 00:00:00 2001
From: Alois Wohlschlager <alois1@gmx-topmail.de>
Date: Thu, 1 Jul 2021 14:37:06 +0000
Subject: [PATCH] scripts: apply realpath for $0
References: https://github.com/4ti2/4ti2/pull/31
When $0 is a symlink, program execution would fail to find the right
directory. Fix that up.
The 4ti2 program names are quite generic (e.g. "output"), and hence
openSUSE has relegated them to /usr/libexec/4ti2, offering instead
prefixed symlinks in /usr/bin, e.g. /usr/bin/4ti2_groebner ->
/usr/libexec/4ti2/groebner.
---
src/groebner/script.template | 2 +-
src/groebner/script.template.in | 2 +-
src/zsolve/graver.template | 2 +-
src/zsolve/hilbert.template | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
Index: 4ti2-1.6.9/src/groebner/script.template
===================================================================
--- 4ti2-1.6.9.orig/src/groebner/script.template
+++ 4ti2-1.6.9/src/groebner/script.template
@@ -21,7 +21,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# We locate where this script is so we can call the executables.
-SCRIPT=`which "$0"`
+SCRIPT=$(realpath $(which "$0"))
DIR=`dirname "$SCRIPT"`
FUNCTION=`basename "$SCRIPT"`
Index: 4ti2-1.6.9/src/groebner/script.template.in
===================================================================
--- 4ti2-1.6.9.orig/src/groebner/script.template.in
+++ 4ti2-1.6.9/src/groebner/script.template.in
@@ -21,7 +21,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# We locate where this script is so we can call the executables.
-SCRIPT=`which "$0"`
+SCRIPT=$(realpath $(which "$0"))
DIR=`dirname "$SCRIPT"`
FUNCTION=`basename "$SCRIPT"`
Index: 4ti2-1.6.9/src/zsolve/graver.template
===================================================================
--- 4ti2-1.6.9.orig/src/zsolve/graver.template
+++ 4ti2-1.6.9/src/zsolve/graver.template
@@ -2,7 +2,7 @@
# We locate where this script is so we can call the executable zsolve which
# should be in the same directory as this script.
-SCRIPT=`which "$0"`
+SCRIPT=$(realpath $(which "$0"))
SCRIPTDIR=`dirname "$SCRIPT"`
EXECUTABLE=zsolve
Index: 4ti2-1.6.9/src/zsolve/hilbert.template
===================================================================
--- 4ti2-1.6.9.orig/src/zsolve/hilbert.template
+++ 4ti2-1.6.9/src/zsolve/hilbert.template
@@ -2,7 +2,7 @@
# We locate where this script is so we can call the executable zsolve which
# should be in the same directory as this script.
-SCRIPT=`which "$0"`
+SCRIPT=$(realpath $(which "$0"))
SCRIPTDIR=`dirname "$SCRIPT"`
EXECUTABLE=zsolve

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Mon Mar 27 22:35:21 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
- Add 0001-build-resolve-missing-includes-showing-on-gcc-13.patch
-------------------------------------------------------------------
Thu Jul 1 20:03:41 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- Run fdupes to eliminate script copies.
-------------------------------------------------------------------
Thu Jul 1 13:39:30 UTC 2021 - Alois Wohlschlager <alois1@gmx-topmail.de>
- Add patch 4ti2-handle-prefix.patch to handle the downstream
4ti2_ executable prefix in wrapper scripts.
-------------------------------------------------------------------
Sat Aug 24 15:47:19 UTC 2019 - Jan Engelhardt <jengelh@inai.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package 4ti2
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -26,8 +26,11 @@ URL: https://4ti2.github.io/
Source: https://github.com/4ti2/4ti2/releases/download/Release_1_6_9/4ti2-1.6.9.tar.gz
Patch1: 4ti2-docdir.diff
Patch2: 4ti2-handle-prefix.patch
Patch3: 0001-build-resolve-missing-includes-showing-on-gcc-13.patch
BuildRequires: autoconf >= 2.59
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: gcc-c++ >= 4.3
BuildRequires: glpk-devel >= 4.52
BuildRequires: gmp-devel >= 4.1.4
@ -73,7 +76,7 @@ developing against 4ti2's libraries.
autoreconf -fi
%configure --enable-shared --disable-static \
--includedir="%_includedir/%name" --docdir="%_docdir/%name"
make %{?_smp_mflags}
%make_build
%install
%make_install
@ -85,6 +88,7 @@ pushd "$b/%_libexecdir/%name"
for i in *; do
ln -s "%_libexecdir/%name/$i" "$b/%_bindir/4ti2_$i"
done
%fdupes -s %buildroot/%_prefix
%post -n lib4ti2-0 -p /sbin/ldconfig
%postun -n lib4ti2-0 -p /sbin/ldconfig