Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lpsolve for openSUSE:Factory checked 
in at 2026-09-24 22:55:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lpsolve (Old)
 and      /work/SRC/openSUSE:Factory/.lpsolve.new.383539 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lpsolve"

Thu Sep 24 22:55:28 2026 rev:18 rq:1379925 version:5.5.2.14

Changes:
--------
--- /work/SRC/openSUSE:Factory/lpsolve/lpsolve.changes  2014-06-02 
07:00:16.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.lpsolve.new.383539/lpsolve.changes      
2026-09-24 22:55:43.841874492 +0200
@@ -1,0 +2,24 @@
+Sun Sep 20 15:51:18 UTC 2026 - Tomáš Chvátal <[email protected]>
+
+- Update to 5.5.2.14 (upstream moved from SourceForge to GitHub):
+  * Fix a rare case of a variable value returned as a very small
+    negative number instead of 0
+- Switch from the lpsolve_bundled_colamd-5.5.2.0.tar.xz fork tarball
+  to upstream sources (lp_solve-5.5.2.14-repackaged.tar.gz) with the
+  non-free colamd/colamd.{c,h} removed; rebase the bundled COLAMD
+  to 3.0.4 (BSD-3-Clause) and add Provides: bundled(colamd) = 3.0.4
+- Add Fedora's patches:
+  * lp_solve-5.5.2.14-Respect-CC-CFLAGS-and-LDFLAGS.patch
+  * lp_solve-5.5.2.11-Link-a-tool-to-a-shared-library.patch
+  * lp_solve-5.5.2.11-Rebase-COLAMD-to-3.0.4.patch
+  * lp_solve-5.5.2.11-Port-lp_MDO-to-colamd-3.0.4.patch
+- Add lp_solve-5.5.2.14-versioned-soname.patch to build the shared
+  library with a versioned SONAME (liblpsolve55.so.0)
+- Link the lp_solve tool against the shared library instead of
+  statically duplicating its objects
+- Correct the license tag to LGPL-2.1-or-later AND GPL-2.0-or-later
+  WITH Bison-exception-2.2 AND BSD-3-Clause
+- Add %check: solver smoke test plus building and running demo/demo.c
+- Modernize spec file
+
+-------------------------------------------------------------------

Old:
----
  lpsolve_bundled_colamd-5.5.2.0.tar.xz

New:
----
  lp_solve-5.5.2.11-Link-a-tool-to-a-shared-library.patch
  lp_solve-5.5.2.11-Port-lp_MDO-to-colamd-3.0.4.patch
  lp_solve-5.5.2.11-Rebase-COLAMD-to-3.0.4.patch
  lp_solve-5.5.2.14-Respect-CC-CFLAGS-and-LDFLAGS.patch
  lp_solve-5.5.2.14-repackaged.tar.gz
  lp_solve-5.5.2.14-versioned-soname.patch

----------(New B)----------
  New:  * lp_solve-5.5.2.14-Respect-CC-CFLAGS-and-LDFLAGS.patch
  * lp_solve-5.5.2.11-Link-a-tool-to-a-shared-library.patch
  * lp_solve-5.5.2.11-Rebase-COLAMD-to-3.0.4.patch
  New:  * lp_solve-5.5.2.11-Rebase-COLAMD-to-3.0.4.patch
  * lp_solve-5.5.2.11-Port-lp_MDO-to-colamd-3.0.4.patch
- Add lp_solve-5.5.2.14-versioned-soname.patch to build the shared
  New:  * lp_solve-5.5.2.11-Link-a-tool-to-a-shared-library.patch
  * lp_solve-5.5.2.11-Rebase-COLAMD-to-3.0.4.patch
  * lp_solve-5.5.2.11-Port-lp_MDO-to-colamd-3.0.4.patch
  New:- Add Fedora's patches:
  * lp_solve-5.5.2.14-Respect-CC-CFLAGS-and-LDFLAGS.patch
  * lp_solve-5.5.2.11-Link-a-tool-to-a-shared-library.patch
  New:  * lp_solve-5.5.2.11-Port-lp_MDO-to-colamd-3.0.4.patch
- Add lp_solve-5.5.2.14-versioned-soname.patch to build the shared
  library with a versioned SONAME (liblpsolve55.so.0)
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lpsolve.spec ++++++
--- /var/tmp/diff_new_pack.qcq1iF/_old  2026-09-24 22:55:44.513902576 +0200
+++ /var/tmp/diff_new_pack.qcq1iF/_new  2026-09-24 22:55:44.515902660 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package lpsolve
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2026 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,21 +12,41 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
-
 %define libname liblpsolve55-0
+
 Name:           lpsolve
-Version:        5.5.2.0
+Version:        5.5.2.14
 Release:        0
 Summary:        A Mixed Integer Linear Programming (MILP) Solver
-License:        LGPL-2.0+
-Group:          Productivity/Scientific/Math
-Url:            http://sourceforge.net/projects/lpsolve
-Source:         
http://dev.gentooexperimental.org/~scarabeus/%{name}_bundled_colamd-%{version}.tar.xz
-BuildRequires:  xz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+# Per-file license audit (same conclusion as Fedora's):
+#   most sources, README.txt and LICENSE: LGPL-2.1-or-later
+#   lp_rlp.c (Bison-generated parser): GPL-2.0-or-later WITH 
Bison-exception-2.2
+#   colamd/ (re-added by the Rebase-COLAMD patch): BSD-3-Clause
+License:        LGPL-2.1-or-later AND GPL-2.0-or-later WITH 
Bison-exception-2.2 AND BSD-3-Clause
+URL:            https://lp-solve.github.io/
+# Repackaged from 
https://github.com/lp-solve/lp_solve/releases/download/%%{version}/lp_solve_%%{version}_source.tar.gz
+# with the non-free colamd/colamd.{c,h} removed; COLAMD 3.0.4 sources are
+# added back by lp_solve-5.5.2.11-Rebase-COLAMD-to-3.0.4.patch.
+Source0:        lp_solve-%{version}-repackaged.tar.gz
+# Use system-wide compiler and linker flags
+Patch0:         lp_solve-5.5.2.14-Respect-CC-CFLAGS-and-LDFLAGS.patch
+# Link the lp_solve tool against the shared library instead of
+# statically duplicating all of its objects
+Patch1:         lp_solve-5.5.2.11-Link-a-tool-to-a-shared-library.patch
+# Rebase bundled COLAMD to 3.0.4 (1/2)
+Patch2:         lp_solve-5.5.2.11-Rebase-COLAMD-to-3.0.4.patch
+# Rebase bundled COLAMD to 3.0.4 (2/2): port lp_MDO to the new API
+Patch3:         lp_solve-5.5.2.11-Port-lp_MDO-to-colamd-3.0.4.patch
+# Build the shared library with a versioned SONAME (shlib policy)
+Patch4:         lp_solve-5.5.2.14-versioned-soname.patch
+BuildRequires:  binutils
+BuildRequires:  gcc
+BuildRequires:  grep
+# The lp_solve tool links against the shared library
+Requires:       %{libname} = %{version}
 
 %description
 Mixed Integer Linear Programming (MILP) solver lpsolve solves pure
@@ -35,52 +55,72 @@
 
 %package -n %{libname}
 Summary:        A Mixed Integer Linear Programming (MILP) Solver Library
-Group:          Productivity/Scientific/Math
-Provides:       liblpsolve55 = %{version}
-Obsoletes:      liblpsolve55 < %{version}
+License:        LGPL-2.1-or-later AND GPL-2.0-or-later WITH 
Bison-exception-2.2 AND BSD-3-Clause
+# The library keeps its historic subpackage name; libreoffice and
+# mccs link against it. SONAME is liblpsolve55.so.0, the unversioned
+# linker symlink ships in -devel.
+Provides:       bundled(colamd) = 3.0.4
 
 %description -n %{libname}
 Mixed Integer Linear Programming (MILP) solver library lpsolve solves
 pure linear, (mixed) integer/binary, semi-continuous and special
 ordered sets (SOS) models.
 
+%ldconfig_scriptlets -n %{libname}
+
 %package devel
-Summary:        Files for Developing with lpsolve
-Group:          Development/Libraries/C and C++
+Summary:        Development files for lpsolve
+License:        LGPL-2.1-or-later
 Requires:       %{libname} = %{version}
 
 %description devel
-Includes and definitions for developing with the lpsolve library.
+Header files for developing with the lpsolve library.
 
 %prep
-%setup -q
+%autosetup -p1 -n lp_solve
+mv colamd/License.txt colamd/colamd_license
 
 %build
-export CFLAGS="%{optflags} -Icolamd/"
-%configure \
-       --disable-static \
-       --docdir="%{_docdir}/%{name}"
-make %{?_smp_mflags}
+export CFLAGS="%{optflags}"
+pushd lpsolve55
+sh -x ccc
+rm bin/ux*/liblpsolve55.a
+popd
+pushd lp_solve
+sh -x ccc
+popd
 
 %install
-make DESTDIR=%{buildroot} install %{?_smp_mflags}
-find %{buildroot} -type f -name "*.la" -delete -print
-
-%post -n %{libname} -p /sbin/ldconfig
-
-%postun -n %{libname} -p /sbin/ldconfig
+install -d %{buildroot}%{_bindir} %{buildroot}%{_libdir} 
%{buildroot}%{_includedir}/lpsolve
+install -p -m 755 lp_solve/bin/ux*/lp_solve %{buildroot}%{_bindir}/
+install -p -m 755 lpsolve55/bin/ux*/liblpsolve55.so.0 %{buildroot}%{_libdir}/
+ln -s liblpsolve55.so.0 %{buildroot}%{_libdir}/liblpsolve55.so
+install -p -m 644 lp*.h yacc_read.h %{buildroot}%{_includedir}/lpsolve/
+
+%check
+LP_PATH="$(echo lpsolve55/bin/ux*)"
+# The library must carry the versioned SONAME and the tool must
+# record it as NEEDED (shlib packaging policy)
+readelf -d "$LP_PATH/liblpsolve55.so.0" | grep -q 
'SONAME.*\[liblpsolve55.so.0\]'
+readelf -d lp_solve/bin/ux*/lp_solve | grep -q 'NEEDED.*\[liblpsolve55.so.0\]'
+# Verify the lp_solve tool works
+echo 'max: x; x < 42;' | \
+    LD_LIBRARY_PATH="$LP_PATH" ./lp_solve/bin/ux*/lp_solve -S1 | \
+    grep -e ': 42\.0*$'
+# Verify a demo program builds and runs against the shared library
+cc %{optflags} -I. demo/demo.c -L"$LP_PATH" -llpsolve55
+LD_LIBRARY_PATH="$LP_PATH" ./a.out </dev/null
 
 %files
-%defattr(-,root,root,-)
-%doc ./bfp/bfp_LUSOL/LUSOL/LUSOL_LGPL.txt 
./bfp/bfp_LUSOL/LUSOL/LUSOL_README.txt ./bfp/bfp_LUSOL/LUSOL/LUSOL-overview.txt 
README.txt
-%{_bindir}/*
+%license colamd/colamd_license LICENSE
+%doc README.txt
+%{_bindir}/lp_solve
 
 %files -n %{libname}
-%defattr(-,root,root,-)
-%{_libdir}/*.so.0*
+%{_libdir}/liblpsolve55.so.0*
 
 %files devel
-%defattr(-,root,root,-)
-%{_includedir}/%{name}
-%{_libdir}/*.so
+%doc demo/demo.c
+%{_includedir}/lpsolve
+%{_libdir}/liblpsolve55.so
 

++++++ lp_solve-5.5.2.11-Link-a-tool-to-a-shared-library.patch ++++++
>From 11c6cd491bd192e0e3fef9fd2652297797e0fef1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]>
Date: Thu, 8 Jun 2023 16:11:00 +0200
Subject: [PATCH] Link a tool to a shared library
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Build first lpsolve55 (the library), then lp_solve (the tool). It will
save time and space.

Signed-off-by: Petr Písař <[email protected]>
---
 lp_solve/ccc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lp_solve/ccc b/lp_solve/ccc
index f86be81..d3aaba8 100644
--- a/lp_solve/ccc
+++ b/lp_solve/ccc
@@ -1,5 +1,5 @@
 :
-src='../lp_MDO.c ../shared/commonlib.c ../colamd/colamd.c ../shared/mmio.c 
../shared/myblas.c ../ini.c ../fortify.c ../lp_rlp.c ../lp_crash.c 
../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c 
../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c 
../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c 
../lp_simplex.c lp_solve.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
+src='../lp_MDO.c ../shared/commonlib.c ../colamd/colamd.c ../shared/mmio.c 
../shared/myblas.c ../ini.c ../fortify.c ../lp_rlp.c ../lp_crash.c 
../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c 
../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c 
../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c 
../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
 c=${CC:-cc}
 CFLAGS=${CFLAGS:--O3}
 
@@ -34,11 +34,14 @@ rm "$MYTMP"/isnan.c "$MYTMP"/isnan >/dev/null 2>&1
 rmdir "$MYTMP"
 
 def=
+LIBS=
 if [ "$PLATFORM" = "SCO_UNIX" ]
 then CFLAGS="${CFLAGS} -O0"
      def='-dy -K PIC -DLLONG=long'
      dl=-ldl
 else dl=-ldl
+     LIBS="-L../lpsolve55/bin/$PLATFORM -llpsolve55"
+     src=''
 fi
 
-$c $CFLAGS -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL 
-I../colamd -I../shared $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP 
-DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src $LDFLAGS -o 
bin/$PLATFORM/lp_solve $math $dl
+$c $CFLAGS -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL 
-I../colamd -I../shared $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP 
-DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src lp_solve.c 
$LDFLAGS -o bin/$PLATFORM/lp_solve $math $dl $LIBS
-- 
2.40.1


++++++ lp_solve-5.5.2.11-Port-lp_MDO-to-colamd-3.0.4.patch ++++++
>From a826560622624aefbe1df965a4887c35051de9d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]>
Date: Tue, 27 Jun 2023 14:58:25 +0200
Subject: [PATCH 2/2] Port lp_MDO to colamd-3.0.4
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The port was done intentionally without modifying the COLAMD sources.
That should ease any future rebases, or building against
a system-provided COLAMD library.

Signed-off-by: Petr Písař <[email protected]>
---
 lp_MDO.c | 27 +++++++++++++++++++++++----
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/lp_MDO.c b/lp_MDO.c
index 1217229..a617cf0 100644
--- a/lp_MDO.c
+++ b/lp_MDO.c
@@ -18,6 +18,7 @@
    
----------------------------------------------------------------------------------
 
 */
 
+#include <limits.h> /* for INT_MAX */
 #include <string.h>
 #include "commonlib.h"
 #include "lp_lib.h"
@@ -28,6 +29,18 @@
 # include "lp_fortify.h"
 #endif
 
+/* COLAMD has explicit 32-bit and 64-bit interfaces. To keep polymorphic int
+ * type in this code, alias the functions here. */
+#if INT_MAX == (1<<31) - 1
+  /* Use default names. */
+#elif INT_MAX == (1<<63) - 1
+# define colamd colamd_l
+# define colamd_recommended colamd_l_recommended
+# define symamd symamd_l
+#else
+# error "Only 32-bit and 64-bit int types are supported"
+#endif
+
 STATIC MYBOOL includeMDO(MYBOOL *usedpos, int item)
 {
 /*  Legend:   TRUE            => A basic slack variable already in the basis
@@ -160,7 +173,8 @@ int __WINAPI getMDO(lprec *lp, MYBOOL *usedpos, int 
*colorder, int *size, MYBOOL
   int    nrows = lp->rows+1, ncols = colorder[0];
   int    i, j, kk, n;
   int    *col_end, *row_map = NULL;
-  int    Bnz, Blen, *Brows = NULL;
+  int    Bnz, *Brows = NULL;
+  size_t Blen;
   int    stats[COLAMD_STATS];
   double knobs[COLAMD_KNOBS];
 
@@ -187,7 +201,12 @@ int __WINAPI getMDO(lprec *lp, MYBOOL *usedpos, int 
*colorder, int *size, MYBOOL
 
  /* Store row indeces of non-zero values in the basic columns */
   Blen = colamd_recommended(Bnz, nrows, ncols);
-  allocINT(lp, &Brows, Blen, FALSE);
+  if (Blen == 0 || Blen > INT_MAX) {
+    error = TRUE;
+    stats[COLAMD_STATUS] = COLAMD_ERROR_out_of_memory;
+    goto Transfer;
+  }
+  allocINT(lp, &Brows, (int)Blen, FALSE);
   prepareMDO(lp, usedpos, colorder, Brows, row_map);
 #ifdef Paranoia
   verifyMDO(lp, col_end, Brows, nrows, ncols);
@@ -203,14 +222,14 @@ int __WINAPI getMDO(lprec *lp, MYBOOL *usedpos, int 
*colorder, int *size, MYBOOL
     error = !symamd(nrows, colorder, col_end, Brows, knobs, stats, mdo_calloc, 
mdo_free);
   }
   else
-    error = !colamd(nrows, ncols, Blen, Brows, col_end, knobs, stats);
+    error = !colamd(nrows, ncols, (int)Blen, Brows, col_end, knobs, stats);
 #else
   if(symmetric && (nrows == ncols)) {
     MEMCOPY(colorder, Brows, ncols + 1);
     error = !symamd(nrows, colorder, col_end, Brows, knobs, stats, mdo_calloc, 
mdo_free);
   }
   else
-    error = !colamd(nrows, ncols, Blen, Brows, col_end, (double *) NULL, 
stats);
+    error = !colamd(nrows, ncols, (int)Blen, Brows, col_end, (double *) NULL, 
stats);
 #endif
 
  /* Transfer the estimated optimal ordering, adjusting for index offsets */
-- 
2.41.0


++++++ lp_solve-5.5.2.11-Rebase-COLAMD-to-3.0.4.patch ++++++
++++ 3914 lines (skipped)

++++++ lp_solve-5.5.2.14-Respect-CC-CFLAGS-and-LDFLAGS.patch ++++++
>From 75d44ac410ae74a9087e89b1981ec25d662abdfd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]>
Date: Wed, 7 Jun 2023 17:16:50 +0200
Subject: [PATCH] Respect CC, CFLAGS, and LDFLAGS
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The distributions use these environment variables to compile their
software uniformly. This patch modifies the ccc scripts to respect
them.

Signed-off-by: Petr Písař <[email protected]>
---
 bfp/bfp_LUSOL/ccc | 18 ++++++++----------
 demo/ccc          |  5 ++---
 lp_solve/ccc      | 11 +++++------
 lpsolve55/ccc     | 13 ++++++-------
 4 files changed, 21 insertions(+), 26 deletions(-)

diff --git a/bfp/bfp_LUSOL/ccc b/bfp/bfp_LUSOL/ccc
index 9f628bf..e367564 100644
--- a/bfp/bfp_LUSOL/ccc
+++ b/bfp/bfp_LUSOL/ccc
@@ -2,6 +2,7 @@
 src='../../shared/commonlib.c ../../colamd/colamd.c lp_LUSOL.c 
../../lp_utils.c ../../shared/myblas.c LUSOL/lusol.c'
 
 c=${CC:-cc}
+CFLAGS=${CFLAGS:--O3}
 
 MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX`
 
@@ -10,30 +11,27 @@ MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX`
 echo '#include <stdlib.h>'>>"$MYTMP"/platform.c
 echo '#include <stdio.h>'>>"$MYTMP"/platform.c
 echo 'int main(){printf("ux%d", (int) (sizeof(void *)*8)); return 
0;}'>>"$MYTMP"/platform.c
-$c "$MYTMP"/platform.c -o "$MYTMP"/platform
+$c $CFLAGS "$MYTMP"/platform.c $LDFLAGS -o "$MYTMP"/platform
 PLATFORM=`"$MYTMP"/platform`
 rm "$MYTMP"/platform "$MYTMP"/platform.c >/dev/null 2>&1
 
 mkdir bin bin/$PLATFORM >/dev/null 2>&1
 
-opts='-O3'
-#opts=''
-
 if [ "$PLATFORM" = "RS6000" ]
-then opts="$opts"
+then
      so="-bM:SRE -bE:../bfp_lpsolve.exp"
      #so="$so -e _nostart"
      so="$so -bnoentry"
 elif [ "$PLATFORM" = "SCO_UNIX" ]
 then
-     opts='-O0'
      so="-G -dy"
-     opts="$opts -DNOLONGLONG $so"
-else opts="$opts -fpic"
+     CFLAGS="${CFLAGS} -O0 -DNOLONGLONG $so"
+else
+     CFLAGS="${CFLAGS} -fpic"
      so="-shared -Wl,-Bsymbolic -Wl,-soname,libbfp_LUSOL.so"
 fi
 
-$c -s -c $opts -I.. -I../.. -I../../colamd -I../../shared -ILUSOL -I. 
-DRoleIsExternalInvEngine -DINVERSE_ACTIVE=INVERSE_LUSOL $src
-$c $so -o bin/$PLATFORM/libbfp_LUSOL.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ 
]*\///g'` -lc -lm -ldl
+$c $CFLAGS -c -I.. -I../.. -I../../colamd -I../../shared -ILUSOL -I. 
-DRoleIsExternalInvEngine -DINVERSE_ACTIVE=INVERSE_LUSOL $src
+$c $LDFLAGS $so -o bin/$PLATFORM/libbfp_LUSOL.so `echo $src|sed 
s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm -ldl
 
 rm *.o >/dev/null
diff --git a/demo/ccc b/demo/ccc
index 5af379e..154b898 100644
--- a/demo/ccc
+++ b/demo/ccc
@@ -1,5 +1,6 @@
 src='../lp_MDO.c ../shared/commonlib.c ../colamd/colamd.c ../shared/mmio.c 
../shared/myblas.c ../ini.c ../lp_rlp.c ../lp_crash.c 
../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c 
../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c 
../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c 
../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
 c=${CC:-cc}
+CFLAGS=${CFLAGS:--O3}
 
 math=-lm
 
@@ -10,6 +11,4 @@ then def='-dy -K PIC -DNOLONGLONG'
 else dl=-ldl
 fi
 
-opts='-O3'
-
-$c -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd 
-I../shared $opts $def -DYY_NEVER_INTERACTIVE -DPARSER_LP 
-DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine demo.c $src -o demo 
$math $dl
+$c $CFLAGS -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL 
-I../colamd -I../shared $def -DYY_NEVER_INTERACTIVE -DPARSER_LP 
-DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine demo.c $src $LDFLAGS 
-o demo $math $dl
diff --git a/lp_solve/ccc b/lp_solve/ccc
index 16b2348..f327db7 100644
--- a/lp_solve/ccc
+++ b/lp_solve/ccc
@@ -1,6 +1,7 @@
 :
 src='../lp_MDO.c ../shared/commonlib.c ../colamd/colamd.c ../shared/mmio.c 
../shared/myblas.c ../ini.c ../fortify.c ../lp_rlp.c ../lp_crash.c 
../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c 
../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c 
../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c 
../lp_simplex.c lp_solve.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
 c=${CC:-cc}
+CFLAGS=${CFLAGS:--O3}
 
 MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX`
 
@@ -9,7 +10,7 @@ MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX`
 echo '#include <stdlib.h>'>>"$MYTMP"/platform.c
 echo '#include <stdio.h>'>>"$MYTMP"/platform.c
 echo 'int main(){printf("ux%d", (int) (sizeof(void *)*8)); return 
0;}'>>"$MYTMP"/platform.c
-$c "$MYTMP"/platform.c -o "$MYTMP"/platform
+$c $CFLAGS "$MYTMP"/platform.c $LDFLAGS -o "$MYTMP"/platform
 PLATFORM=`"$MYTMP"/platform`
 rm "$MYTMP"/platform "$MYTMP"/platform.c >/dev/null 2>&1
 
@@ -23,23 +24,21 @@ echo '#include <stdio.h>'>>"$MYTMP"/isnan.c
 echo '#include <stdlib.h>'>>"$MYTMP"/isnan.c
 echo '#include <math.h>'>>"$MYTMP"/isnan.c
 echo 'int main(){isnan(0.0);return 0;}'>>"$MYTMP"/isnan.c
-$c "$MYTMP"/isnan.c -o "$MYTMP"/isnan $math >/dev/null 2>&1
+$c $CFLAGS "$MYTMP"/isnan.c $LDFLAGS -o "$MYTMP"/isnan $math >/dev/null 2>&1
 if [ $? = 0 ]
 then NOISNAN=
 else NOISNAN=-DNOISNAN
 fi
 rm "$MYTMP"/isnan.c "$MYTMP"/isnan >/dev/null 2>&1
 
-opts='-O3'
-
 rmdir "$MYTMP"
 
 def=
 if [ "$PLATFORM" = "SCO_UNIX" ]
-then opts='-O0'
+then CFLAGS="${CFLAGS} -O0"
      def='-dy -K PIC -DLLONG=long'
      dl=-ldl
 else dl=-ldl
 fi
 
-$c -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd 
-I../shared $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP 
-DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src -o 
bin/$PLATFORM/lp_solve $math $dl
+$c $CFLAGS -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL 
-I../colamd -I../shared $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP 
-DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src $LDFLAGS -o 
bin/$PLATFORM/lp_solve $math $dl
diff --git a/lpsolve55/ccc b/lpsolve55/ccc
index bf24703..715f619 100644
--- a/lpsolve55/ccc
+++ b/lpsolve55/ccc
@@ -2,6 +2,7 @@
 src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c 
../ini.c ../fortify.c ../colamd/colamd.c ../lp_rlp.c ../lp_crash.c 
../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c 
../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c 
../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c 
../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
 c=${CC:-cc}
 
+
 MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX`
 
 #determine platform (32/64 bit)
@@ -9,7 +10,7 @@ MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX`
 echo '#include <stdlib.h>'>>"$MYTMP"/platform.c
 echo '#include <stdio.h>'>>"$MYTMP"/platform.c
 echo 'int main(){printf("ux%d", (int) (sizeof(void *)*8)); return 
0;}'>>"$MYTMP"/platform.c
-$c "$MYTMP"/platform.c -o "$MYTMP"/platform
+$c $CFLAGS "$MYTMP"/platform.c $LDFLAGS -o "$MYTMP"/platform
 PLATFORM=`"$MYTMP"/platform`
 rm "$MYTMP"/platform "$MYTMP"/platform.c >/dev/null 2>&1
 
@@ -21,7 +22,7 @@ echo '#include <stdio.h>'>>"$MYTMP"/isnan.c
 echo '#include <stdlib.h>'>>"$MYTMP"/isnan.c
 echo '#include <math.h>'>>"$MYTMP"/isnan.c
 echo 'int main(){isnan(0.0);return 0;}'>>"$MYTMP"/isnan.c
-$c "$MYTMP"/isnan.c -o "$MYTMP"/isnan $math >/dev/null 2>&1
+$c $CFLAGS "$MYTMP"/isnan.c $LDFLAGS -o "$MYTMP"/isnan $math >/dev/null 2>&1
 if [ $? = 0 ]
 then NOISNAN=
 else NOISNAN=-DNOISNAN
@@ -39,16 +40,14 @@ else dl=-ldl
      so=y
 fi
 
-opts='-O3'
-
-$c -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL 
-I../colamd $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP 
-DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
+$c $CFLAGS -fPIC -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL 
-I../bfp/bfp_LUSOL/LUSOL -I../colamd $def $NOISNAN -DYY_NEVER_INTERACTIVE 
-DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
 ar rv bin/$PLATFORM/liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ 
]*\///g'`
 ranlib bin/$PLATFORM/liblpsolve55.a
 
 if [ "$so" != "" ]
 then
-  $c -fpic -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL 
-I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $opts $NOISNAN -DYY_NEVER_INTERACTIVE 
-DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
-  $c -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o 
bin/$PLATFORM/liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` 
-lc -lm -ldl
+  $c $CFLAGS -fPIC -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL 
-I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $NOISNAN -DYY_NEVER_INTERACTIVE 
-DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
+  $c $LDFLAGS -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o 
bin/$PLATFORM/liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` 
-lc -lm -ldl
 fi
 
 rm *.o 2>/dev/null
-- 
2.52.0


++++++ lp_solve-5.5.2.14-versioned-soname.patch ++++++
>From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <[email protected]>
Date: Sun, 20 Sep 2026 16:55:00 +0000
Subject: [PATCH] Build the shared library with a versioned SONAME

The openSUSE shared library packaging policy requires the
SONAME-versioned file (liblpsolve55.so.0) in the shlib subpackage
and the unversioned linker symlink (liblpsolve55.so) in -devel.
Upstream's ccc script links the library with an unversioned SONAME,
so set -soname to liblpsolve55.so.0 and name the output file
accordingly.  Also create the liblpsolve55.so linker symlink in the
build tree so that the lp_solve tool, which links with -llpsolve55,
keeps building.

---
 lpsolve55/ccc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lpsolve55/ccc b/lpsolve55/ccc
@@ -47,7 +47,8 @@
 if [ "$so" != "" ]
 then
   $c $CFLAGS -fPIC -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL 
-I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $NOISNAN -DYY_NEVER_INTERACTIVE 
-DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
-  $c $LDFLAGS -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o 
bin/$PLATFORM/liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` 
-lc -lm -ldl
+  $c $LDFLAGS -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so.0 -o 
bin/$PLATFORM/liblpsolve55.so.0 `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` 
-lc -lm -ldl
+  ln -sf liblpsolve55.so.0 bin/$PLATFORM/liblpsolve55.so
 fi
 
 rm *.o 2>/dev/null
-- 
2.52.0

Reply via email to