diff --git a/Macaulay2-configure-c99.patch b/Macaulay2-configure-c99.patch new file mode 100644 index 0000000..2cdc1c6 --- /dev/null +++ b/Macaulay2-configure-c99.patch @@ -0,0 +1,18 @@ +Avoid an implicit int, which was removed from the C99 revision of the +C language. This prevents altering the outcome of the check with +future compilers. + +Submitted upstream: + +diff -ur M2-release-1.21.orig/M2/configure.ac M2-release-1.21/M2/configure.ac +--- M2-release-1.21.orig/M2/configure.ac 2023-04-15 19:52:33.823153026 +0200 ++++ M2-release-1.21/M2/configure.ac 2023-04-15 20:00:57.701024623 +0200 +@@ -1719,7 +1719,7 @@ + #ifdef HAVE_NETDB_H + #include + #endif +- main() { ++ int main(void) { + struct addrinfo *addr; + return 0 != getaddrinfo("1.2.3.4", "80", 0, &addr) ? 99 : 0 ; + } diff --git a/Macaulay2.spec b/Macaulay2.spec index 7169b36..5f72200 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -52,7 +52,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.21 -Release: 4%{?dist} +Release: 5%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -264,6 +264,7 @@ Patch5: %{name}-1.17-configure.patch Patch6: %{name}-1.16-rightarrow.patch # Fix LTO warnings about mismatched declarations and definitions Patch7: %{name}-1.18-lto.patch +Patch8: Macaulay2-configure-c99.patch BuildRequires: 4ti2 BuildRequires: appstream @@ -445,6 +446,7 @@ ln -s %{_datadir}/factory \ %patch5 -p1 -b .configure %patch6 -p1 -b .rightarrow %patch7 -p1 -b .lto +%patch8 -p2 -b .configure-c99 # repeatable builds: inject a node name sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac @@ -613,6 +615,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Sat Apr 15 2023 Florian Weimer - 1.21-5 +- Port configure script to C99 + * Mon Feb 20 2023 Jonathan Wakely - 1.21-4 - Rebuilt for Boost 1.81