Compare commits
2 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| be7b1b6c53 | |||
| f51ac569e5 |
33
bool.patch
Normal file
33
bool.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
From: Jan Engelhardt <ej@inai.de>
|
||||
Date: 2025-12-17 16:29:06.321837113 +0100
|
||||
References: https://lists.gnu.org/archive/html/bug-glpk/2025-08/msg00001.html
|
||||
|
||||
In C99, ``_Bool`` was added as a keyword, and ``bool`` was made a
|
||||
convenience macro that could be redefined.
|
||||
In C23 now, ``bool`` was added as a keyword, which means
|
||||
``#undef bool`` stops working.
|
||||
|
||||
minisat.h is not exposed, so it only affects glpk internally.
|
||||
Let's *hope* nobody used bool and treated like it had 4 bytes.
|
||||
(Compile-test only. glpk is archived on github - dead package?)
|
||||
|
||||
---
|
||||
src/minisat/minisat.h | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
Index: glpk-5.0/src/minisat/minisat.h
|
||||
===================================================================
|
||||
--- glpk-5.0.orig/src/minisat/minisat.h
|
||||
+++ glpk-5.0/src/minisat/minisat.h
|
||||
@@ -34,10 +34,7 @@
|
||||
/*====================================================================*/
|
||||
/* Simple types: */
|
||||
|
||||
-typedef int bool;
|
||||
-
|
||||
-#define true 1
|
||||
-#define false 0
|
||||
+#include <stdbool.h>
|
||||
|
||||
typedef int lit;
|
||||
#if 0 /* by mao */
|
||||
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 5 12:43:30 UTC 2026 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Add bool.patch to fix compile error with gcc15/16 and C23 mode.
|
||||
- Compact %files list.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 27 11:03:29 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
|
||||
33
glpk.spec
33
glpk.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package glpk
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2026 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -29,6 +29,7 @@ Source0: https://ftp.gnu.org/gnu/glpk/%{name}-%{version}.tar.gz
|
||||
Source1: https://ftp.gnu.org/gnu/glpk/%{name}-%{version}.tar.gz.sig
|
||||
Source2: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=%{name}&download=1#/%{name}.keyring
|
||||
Patch0: glpk-no_random_return.patch
|
||||
Patch1: bool.patch
|
||||
BuildRequires: ghostscript
|
||||
BuildRequires: gmp-devel
|
||||
BuildRequires: libiodbc-devel
|
||||
@@ -87,12 +88,12 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
--enable-mysql \
|
||||
--disable-static
|
||||
%if %{do_profiling}
|
||||
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}" V=1
|
||||
make check %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}"
|
||||
make %{?_smp_mflags} clean
|
||||
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}" V=1
|
||||
%make_build CFLAGS="%{optflags} %{cflags_profile_generate}" V=1
|
||||
%make_build check CFLAGS="%{optflags} %{cflags_profile_generate}"
|
||||
%make_build clean
|
||||
%make_build CFLAGS="%{optflags} %{cflags_profile_feedback}" V=1
|
||||
%else
|
||||
make %{?_smp_mflags} V=1
|
||||
%make_build V=1
|
||||
%endif
|
||||
|
||||
%install
|
||||
@@ -101,24 +102,23 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
# creates support file for pkg-config
|
||||
mkdir -p %{buildroot}/%{_libdir}/pkgconfig
|
||||
tee %{buildroot}/%{_libdir}/pkgconfig/%{name}.pc << "EOF"
|
||||
cat >%{buildroot}/%{_libdir}/pkgconfig/%{name}.pc <<-EOF
|
||||
prefix=%{_prefix}
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/%{_lib}
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: %{name}
|
||||
Name: %{name}
|
||||
Description: GNU Linear Programming Kit
|
||||
Version: %{version}
|
||||
Version: %{version}
|
||||
Libs: -lglpk
|
||||
Cflags: -I${includedir}
|
||||
EOF
|
||||
|
||||
%check
|
||||
make %{?_smp_mflags} check
|
||||
%make_build check
|
||||
|
||||
%post -n %{lname} -p /sbin/ldconfig
|
||||
%postun -n %{lname} -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets -n %{lname}
|
||||
|
||||
%files
|
||||
%{_bindir}/glpsol
|
||||
@@ -133,12 +133,7 @@ make %{?_smp_mflags} check
|
||||
%{_libdir}/pkgconfig/%{name}.pc
|
||||
|
||||
%files doc
|
||||
%doc ChangeLog NEWS README
|
||||
%doc doc/*.txt doc/*.pdf
|
||||
%doc examples/*.mod
|
||||
%doc examples/*.c
|
||||
%doc examples/*.dat
|
||||
%doc examples/*.mps
|
||||
%doc examples/*.lp
|
||||
%doc ChangeLog NEWS README doc/*.txt doc/*.pdf
|
||||
%doc examples/*.mod examples/*.c examples/*.dat examples/*.mps examples/*.lp
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user