Date: Tue, 11 Feb 2025 13:30:40 GMT From: Robert Clausecker <fuz@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org Subject: git: f5f8a753df92 - 2025Q1 - math/lp_solve: honor CFLAGS Message-ID: <202502111330.51BDUege076426@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch 2025Q1 has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=f5f8a753df9221182c7c4baec1ae594163ca69e2 commit f5f8a753df9221182c7c4baec1ae594163ca69e2 Author: Eric Camachat <eric@camachat.org> AuthorDate: 2025-02-05 16:05:42 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2025-02-11 13:29:52 +0000 math/lp_solve: honor CFLAGS Honor CFLAGS when compiling platform.c. PR: 270851 MFH: 2025Q1 Approved by: mayo@oyam.ca (maintainer timeout) (cherry picked from commit bd63a46daaeeb4f4cabb87892555f180a6e44fa9) --- math/lp_solve/Makefile | 7 ++++--- math/lp_solve/files/patch-respect-TMPDIR | 31 +++++++++++++++++++++------- math/lp_solve/files/patch-shared+commonlib.c | 6 +++--- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/math/lp_solve/Makefile b/math/lp_solve/Makefile index 8e30f685b212..902f608fa846 100644 --- a/math/lp_solve/Makefile +++ b/math/lp_solve/Makefile @@ -1,8 +1,9 @@ PORTNAME= lp_solve -PORTVERSION= 5.5.2.5 +DISTVERSION= 5.5.2.5 +PORTREVISION= 1 CATEGORIES= math -MASTER_SITES= SF/lpsolve/lpsolve/${PORTVERSION} -DISTNAME= ${PORTNAME}_${PORTVERSION}_source +MASTER_SITES= SF/lpsolve/lpsolve/${DISTVERSION} +DISTNAME= ${PORTNAME}_${DISTVERSION}_source MAINTAINER= mayo@oyam.ca COMMENT= Linear Programming Solver diff --git a/math/lp_solve/files/patch-respect-TMPDIR b/math/lp_solve/files/patch-respect-TMPDIR index 870da18d87cd..244a48ef9680 100644 --- a/math/lp_solve/files/patch-respect-TMPDIR +++ b/math/lp_solve/files/patch-respect-TMPDIR @@ -1,8 +1,10 @@ --- lp_solve/ccc.orig 2009-01-25 18:39:03 UTC +++ lp_solve/ccc -@@ -2,31 +2,33 @@ +@@ -1,34 +1,35 @@ + : 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 ++opts='-O3' +tmp="${TMPDIR:-/tmp}" + @@ -18,7 +20,7 @@ +echo '#include <stdlib.h>'>>"${tmp}"/platform.c +echo '#include <stdio.h>'>>"${tmp}"/platform.c +echo 'main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>"${tmp}"/platform.c -+$c "${tmp}"/platform.c -o "${tmp}"/platform ++$c $opts "${tmp}"/platform.c -o "${tmp}"/platform +PLATFORM=`"${tmp}"/platform` +rm "${tmp}"/platform "${tmp}"/platform.c >/dev/null 2>&1 @@ -38,21 +40,25 @@ +echo '#include <stdlib.h>'>>"${tmp}"/isnan.c +echo '#include <math.h>'>>"${tmp}"/isnan.c +echo 'main(){isnan(0);}'>>"${tmp}"/isnan.c -+$c "${tmp}"/isnan.c -o "${tmp}"/isnan $math >/dev/null 2>&1 ++$c $opts "${tmp}"/isnan.c -o "${tmp}"/isnan $math >/dev/null 2>&1 if [ $? = 0 ] then NOISNAN= else NOISNAN=-DNOISNAN fi -rm /tmp/isnan.c /tmp/isnan >/dev/null 2>&1 +- +-opts='-O3' +rm "${tmp}"/isnan.c "${tmp}"/isnan >/dev/null 2>&1 - opts='-O3' - + def= + if [ "$PLATFORM" = "SCO_UNIX" ] --- lpsolve55/ccc.orig 2009-03-25 00:27:18 UTC +++ lpsolve55/ccc -@@ -2,29 +2,31 @@ +@@ -1,30 +1,33 @@ + : 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 ++opts='-O3' +tmp="${TMPDIR:-/tmp}" + @@ -68,7 +74,7 @@ +echo '#include <stdlib.h>'>>"${tmp}"/platform.c +echo '#include <stdio.h>'>>"${tmp}"/platform.c +echo 'main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>"${tmp}"/platform.c -+$c "${tmp}"/platform.c -o "${tmp}"/platform ++$c $opts "${tmp}"/platform.c -o "${tmp}"/platform +PLATFORM=`"${tmp}"/platform` +rm "${tmp}"/platform "${tmp}"/platform.c >/dev/null 2>&1 @@ -86,7 +92,7 @@ +echo '#include <stdlib.h>'>>"${tmp}"/isnan.c +echo '#include <math.h>'>>"${tmp}"/isnan.c +echo 'main(){isnan(0);}'>>"${tmp}"/isnan.c -+$c "${tmp}"/isnan.c -o "${tmp}"/isnan $math >/dev/null 2>&1 ++$c $opts "${tmp}"/isnan.c -o "${tmp}"/isnan $math >/dev/null 2>&1 if [ $? = 0 ] then NOISNAN= else NOISNAN=-DNOISNAN @@ -96,3 +102,12 @@ def= so= +@@ -34,8 +37,6 @@ then def='-dy -K PIC -DNOLONGLONG' + 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 + ar rv bin/$PLATFORM/liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` diff --git a/math/lp_solve/files/patch-shared+commonlib.c b/math/lp_solve/files/patch-shared+commonlib.c index 7f6322a4ac33..2d21d13829e1 100644 --- a/math/lp_solve/files/patch-shared+commonlib.c +++ b/math/lp_solve/files/patch-shared+commonlib.c @@ -16,12 +16,12 @@ - struct timeb buf; + struct timeval tv; + struct timezone tz; -+ -+ gettimeofday(&tv, &tz); -+ return((double)tv.tv_sec+((double)tv.tv_usec)/1000000.0); - ftime(&buf); - return((double)buf.time+((double) buf.millitm)/1000.0); ++ gettimeofday(&tv, &tz); ++ return((double)tv.tv_sec+((double)tv.tv_usec)/1000000.0); ++ #endif }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502111330.51BDUege076426>