From aa29c50dd3e0e75ddac0d405c7bc7ed2fda3edaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 26 Feb 2018 09:39:03 +0000 Subject: [PATCH] Resolves: rhbz#1548689 use fedora compile/link flags --- lpsolve-5.5.0.11.cflags.patch | 34 ++++++++++++++++------------------ lpsolve.spec | 10 +++++----- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/lpsolve-5.5.0.11.cflags.patch b/lpsolve-5.5.0.11.cflags.patch index d8f6567..7bc0f0f 100644 --- a/lpsolve-5.5.0.11.cflags.patch +++ b/lpsolve-5.5.0.11.cflags.patch @@ -1,24 +1,22 @@ -diff -ru lp_solve_5.5.orig/lp_solve/ccc lp_solve_5.5/lp_solve/ccc ---- lp_solve_5.5.orig/lp_solve/ccc 2009-02-23 16:31:18.000000000 +0000 -+++ lp_solve_5.5/lp_solve/ccc 2009-02-23 16:31:29.000000000 +0000 -@@ -28,7 +28,7 @@ +--- lp_solve_5.5/lpsolve55/ccc.orig 2018-02-26 09:27:51.074682302 +0000 ++++ lp_solve_5.5/lpsolve55/ccc 2018-02-26 09:36:36.329990782 +0000 +@@ -35,16 +35,14 @@ + so=y fi - rm /tmp/isnan.c /tmp/isnan >/dev/null 2>&1 -opts='-O3' -+opts=$RPM_OPT_FLAGS +- +-$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 - def= - if [ "$PLATFORM" = "SCO_UNIX" ] -diff -ru lp_solve_5.5.orig/lpsolve55/ccc lp_solve_5.5/lpsolve55/ccc ---- lp_solve_5.5.orig/lpsolve55/ccc 2009-02-23 16:31:18.000000000 +0000 -+++ lp_solve_5.5/lpsolve55/ccc 2009-02-23 16:31:29.000000000 +0000 -@@ -35,7 +35,7 @@ - so=y + 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 --opts='-O3' -+opts=$RPM_OPT_FLAGS - - $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 - ar rv bin/$PLATFORM/liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` + rm *.o 2>/dev/null diff --git a/lpsolve.spec b/lpsolve.spec index 373f1e3..cdeea9a 100644 --- a/lpsolve.spec +++ b/lpsolve.spec @@ -1,7 +1,7 @@ Name: lpsolve Summary: A Mixed Integer Linear Programming (MILP) solver Version: 5.5.2.0 -Release: 17%{?dist} +Release: 18%{?dist} Source: http://downloads.sourceforge.net/lpsolve/lp_solve_%{version}_source.tar.gz Group: System Environment/Libraries URL: http://sourceforge.net/projects/lpsolve @@ -26,12 +26,9 @@ Includes and definitions for developing with lpsolve %setup -q -n lp_solve_5.5 %patch0 -p1 -b .cflags.patch %patch1 -p1 -b .defines.patch -#sparc and s390 need -fPIC lets sed it -%ifarch sparcv9 sparc64 s390 s390x -sed -i -e 's|-fpic|-fPIC|g' lpsolve55/ccc -%endif %build +%set_build_flags cd lpsolve55 sh -x ccc rm bin/ux*/liblpsolve55.a @@ -63,6 +60,9 @@ install -p -m 644 \ %{_includedir}/lpsolve %changelog +* Mon Feb 26 2018 Caolán McNamara - 5.5.2.0-18 +- Resolves: rhbz#1548689 use fedora compile/link flags + * Thu Feb 08 2018 Fedora Release Engineering - 5.5.2.0-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild