%global mingw_build_ucrt64 1 %{?mingw_package_header} # src/env/{stdc,time,tls,dlsup}.c pick their Windows code paths off __WOE__. # Upstream expects whoever drives the build to define it and the autotools path # never does, so without it the build falls into the GNU/Linux branch and fails # on gmtime_r and strerror_r, which mingw-w64 does not provide. %%{*_cflags} are # built from these, so the define reaches both CFLAGS and CPPFLAGS. %global mingw32_cppflags -D__WOE__ %global mingw64_cppflags -D__WOE__ %global ucrt64_cppflags -D__WOE__ Name: mingw-glpk Version: 5.0 Release: 1%{?dist} Summary: MinGW Windows GNU Linear Programming Kit # GPL-3.0-or-later: the project as a whole # MIT: the bundled minisat2 code License: GPL-3.0-or-later AND MIT URL: https://www.gnu.org/software/glpk/ Source0: https://ftp.gnu.org/gnu/glpk/glpk-%{version}.tar.gz # Do not define bool, true or false, which are keywords under C23. # Taken from the native Fedora glpk package. Patch0: glpk-5.0-bool.patch BuildArch: noarch BuildRequires: make BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils BuildRequires: mingw64-filesystem >= 95 BuildRequires: mingw64-gcc BuildRequires: mingw64-binutils BuildRequires: ucrt64-filesystem >= 95 BuildRequires: ucrt64-gcc BuildRequires: ucrt64-binutils %description GLPK (GNU Linear Programming Kit) solves large-scale linear programming, mixed integer programming and related problems. It provides the simplex and interior-point methods, a branch-and-cut framework, the GNU MathProg modelling language and the glpsol standalone solver. # Win32 %package -n mingw32-glpk Summary: MinGW Windows GNU Linear Programming Kit Provides: bundled(minisat) = 1.14.1 Provides: bundled(zlib) %description -n mingw32-glpk GLPK (GNU Linear Programming Kit) solves large-scale linear programming, mixed integer programming and related problems. %package -n mingw32-glpk-static Summary: Static version of the MinGW Windows GNU Linear Programming Kit Requires: mingw32-glpk = %{version}-%{release} %description -n mingw32-glpk-static Static version of the MinGW Windows GNU Linear Programming Kit. # Win64 %package -n mingw64-glpk Summary: MinGW Windows GNU Linear Programming Kit Provides: bundled(minisat) = 1.14.1 Provides: bundled(zlib) %description -n mingw64-glpk GLPK (GNU Linear Programming Kit) solves large-scale linear programming, mixed integer programming and related problems. %package -n mingw64-glpk-static Summary: Static version of the MinGW Windows GNU Linear Programming Kit Requires: mingw64-glpk = %{version}-%{release} %description -n mingw64-glpk-static Static version of the MinGW Windows GNU Linear Programming Kit. # UCRT64 %package -n ucrt64-glpk Summary: MinGW Windows GNU Linear Programming Kit Provides: bundled(minisat) = 1.14.1 Provides: bundled(zlib) %description -n ucrt64-glpk GLPK (GNU Linear Programming Kit) solves large-scale linear programming, mixed integer programming and related problems. %package -n ucrt64-glpk-static Summary: Static version of the MinGW Windows GNU Linear Programming Kit Requires: ucrt64-glpk = %{version}-%{release} %description -n ucrt64-glpk-static Static version of the MinGW Windows GNU Linear Programming Kit. %{?mingw_debug_package} %prep %autosetup -p1 -n glpk-%{version} # configure.ac still uses AC_HELP_STRING, which autoconf dropped in 2.70, so # leave the shipped configure alone. %build %mingw_configure %mingw_make_build %install %mingw_make_install find %{buildroot} -name "*.la" -delete # Win32 %files -n mingw32-glpk %license COPYING %{mingw32_bindir}/glpsol.exe %{mingw32_bindir}/libglpk-40.dll %{mingw32_includedir}/glpk.h %{mingw32_libdir}/libglpk.dll.a %files -n mingw32-glpk-static %license COPYING %{mingw32_libdir}/libglpk.a # Win64 %files -n mingw64-glpk %license COPYING %{mingw64_bindir}/glpsol.exe %{mingw64_bindir}/libglpk-40.dll %{mingw64_includedir}/glpk.h %{mingw64_libdir}/libglpk.dll.a %files -n mingw64-glpk-static %license COPYING %{mingw64_libdir}/libglpk.a # UCRT64 %files -n ucrt64-glpk %license COPYING %{ucrt64_bindir}/glpsol.exe %{ucrt64_bindir}/libglpk-40.dll %{ucrt64_includedir}/glpk.h %{ucrt64_libdir}/libglpk.dll.a %files -n ucrt64-glpk-static %license COPYING %{ucrt64_libdir}/libglpk.a %changelog * Tue Sep 08 2026 Jack Greiner - 5.0-1 - Add initial mingw glpk package