Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Nov 2024 15:18:41 GMT
From:      Robert Clausecker <fuz@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 432f2ebe0883 - main - math/sdpa: speed up build
Message-ID:  <202411061518.4A6FIfra045164@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=432f2ebe088377708fb08514ea86f2c19a5b0ad5

commit 432f2ebe088377708fb08514ea86f2c19a5b0ad5
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2024-11-06 14:06:02 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2024-11-06 15:14:32 +0000

    math/sdpa: speed up build
    
    Sub-Makefiles of this port use make macros with lots of shell expansions
    that are expanded again and again.  Assign to these with := so that the
    shell commands are ran only once.  This fixes the port not building due
    to timeouts under high system load.
    
    Approved by:    portmgr (build fix blanket)
    MFH:            2024Q4
---
 math/sdpa/files/patch-etc_Makefile   | 48 ++++++++++++++++++++++++++++++++++++
 math/sdpa/files/patch-mumps_Makefile | 27 ++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/math/sdpa/files/patch-etc_Makefile b/math/sdpa/files/patch-etc_Makefile
new file mode 100644
index 000000000000..eb4bab9c35f0
--- /dev/null
+++ b/math/sdpa/files/patch-etc_Makefile
@@ -0,0 +1,48 @@
+--- etc/Makefile.orig	2024-11-06 14:01:05 UTC
++++ etc/Makefile
+@@ -21,26 +21,26 @@ SDPA_MAKEFILE = ../Makefile
+ # The following variables are set from 
+ # the arguments given to './configure' script for building SDPA
+ ###################################################################
+-SDPA_PACKAGE= ${shell grep "^PACKAGE_STRING =" ${SDPA_MAKEFILE} | awk '{printf("%s.%s",$$3,$$4)}'}
++SDPA_PACKAGE:= ${shell grep "^PACKAGE_STRING =" ${SDPA_MAKEFILE} | awk '{printf("%s.%s",$$3,$$4)}'}
+ 
+-SDPA_DIR    = ${shell grep "^prefix ="         ${SDPA_MAKEFILE} | cut -f2 -d= | sed 's+ ++'}
+-SDPA_LIB    = ${SDPA_DIR}/lib/libsdpa.a 
+-MUMPS_DIR   = ${shell grep "^MUMPS_DIR ="      ${SDPA_MAKEFILE} | cut -f2 -d= | sed 's+ ++'}
+-MUMPS_INCLUDE   = ${shell grep "^MUMPS_INCLUDE ="  ${SDPA_MAKEFILE} | cut -f2 -d= | sed 's+ ++'}
+-MUMPS_LIBS  = ${shell grep "^MUMPS_LIBS ="     ${SDPA_MAKEFILE} | cut -f2 -d= | sed 's+ ++'}
+-CC          = ${shell grep "^CC ="           ${SDPA_MAKEFILE} | cut -f2  -d=}
+-CFLAGS      = ${shell grep "^CFLAGS = "      ${SDPA_MAKEFILE} | cut -f2- -d=}
+-CXX         = ${shell grep "^CXX ="          ${SDPA_MAKEFILE} | cut -f2  -d=}
+-CXXFLAGS    = ${shell grep "^CXXFLAGS = "    ${SDPA_MAKEFILE} | cut -f2- -d=}
+-CPPFLAGS    = ${shell grep "^CPPFLAGS = "    ${SDPA_MAKEFILE} | cut -f2- -d=}
+-FC          = ${shell grep "^FC ="           ${SDPA_MAKEFILE} | cut -f2  -d=}
+-FCFLAGS     = ${shell grep "^FCFLAGS = "     ${SDPA_MAKEFILE} | cut -f2- -d=}
+-LAPACK_LIBS = ${shell grep "^LAPACK_LIBS = " ${SDPA_MAKEFILE} | cut -f2  -d=}
+-BLAS_LIBS   = ${shell grep "^BLAS_LIBS = "   ${SDPA_MAKEFILE} | cut -f2  -d=}
+-PTHREAD_INCLUDE= ${shell grep "^PTHREAD_INCLUDE = " ${SDPA_MAKEFILE} | cut -f2 -d=}
+-PTHREAD_LIBS= ${shell grep "^PTHREAD_LIBS = " ${SDPA_MAKEFILE} | cut -f2 -d=}
+-FCLIBS      = ${shell grep "^FCLIBS = "      ${SDPA_MAKEFILE} | cut -f2 -d=}
+-VERSION     = ${shell grep "^VERSION = "     ${SDPA_MAKEFILE} | cut -f2 -d=}
++SDPA_DIR    := ${shell grep "^prefix ="         ${SDPA_MAKEFILE} | cut -f2 -d= | sed 's+ ++'}
++SDPA_LIB    := ${SDPA_DIR}/lib/libsdpa.a 
++MUMPS_DIR   := ${shell grep "^MUMPS_DIR ="      ${SDPA_MAKEFILE} | cut -f2 -d= | sed 's+ ++'}
++MUMPS_INCLUDE   := ${shell grep "^MUMPS_INCLUDE ="  ${SDPA_MAKEFILE} | cut -f2 -d= | sed 's+ ++'}
++MUMPS_LIBS  := ${shell grep "^MUMPS_LIBS ="     ${SDPA_MAKEFILE} | cut -f2 -d= | sed 's+ ++'}
++CC          := ${shell grep "^CC ="           ${SDPA_MAKEFILE} | cut -f2  -d=}
++CFLAGS      := ${shell grep "^CFLAGS = "      ${SDPA_MAKEFILE} | cut -f2- -d=}
++CXX         := ${shell grep "^CXX ="          ${SDPA_MAKEFILE} | cut -f2  -d=}
++CXXFLAGS    := ${shell grep "^CXXFLAGS = "    ${SDPA_MAKEFILE} | cut -f2- -d=}
++CPPFLAGS    := ${shell grep "^CPPFLAGS = "    ${SDPA_MAKEFILE} | cut -f2- -d=}
++FC          := ${shell grep "^FC ="           ${SDPA_MAKEFILE} | cut -f2  -d=}
++FCFLAGS     := ${shell grep "^FCFLAGS = "     ${SDPA_MAKEFILE} | cut -f2- -d=}
++LAPACK_LIBS := ${shell grep "^LAPACK_LIBS = " ${SDPA_MAKEFILE} | cut -f2  -d=}
++BLAS_LIBS   := ${shell grep "^BLAS_LIBS = "   ${SDPA_MAKEFILE} | cut -f2  -d=}
++PTHREAD_INCLUDE:= ${shell grep "^PTHREAD_INCLUDE = " ${SDPA_MAKEFILE} | cut -f2 -d=}
++PTHREAD_LIBS:= ${shell grep "^PTHREAD_LIBS = " ${SDPA_MAKEFILE} | cut -f2 -d=}
++FCLIBS      := ${shell grep "^FCLIBS = "      ${SDPA_MAKEFILE} | cut -f2 -d=}
++VERSION     := ${shell grep "^VERSION = "     ${SDPA_MAKEFILE} | cut -f2 -d=}
+ ###################################################################
+ 
+ TARGET = make.inc
diff --git a/math/sdpa/files/patch-mumps_Makefile b/math/sdpa/files/patch-mumps_Makefile
new file mode 100644
index 000000000000..721b74eb8d7f
--- /dev/null
+++ b/math/sdpa/files/patch-mumps_Makefile
@@ -0,0 +1,27 @@
+--- mumps/Makefile.orig	2024-11-06 14:00:35 UTC
++++ mumps/Makefile
+@@ -8,15 +8,15 @@ SDPA_MAKEFILE = ../Makefile
+ # the arguments given to './configure' script for building SDPA
+ ###################################################################
+ 
+-CC          = ${shell grep "^CC ="        ${SDPA_MAKEFILE} | cut -f2 -d=}
+-CFLAGS      = ${shell grep "^CFLAGS = "   ${SDPA_MAKEFILE} | cut -f2 -d=}
+-CXX         = ${shell grep "^CXX ="       ${SDPA_MAKEFILE} | cut -f2 -d=}
+-CXXFLAGS    = ${shell grep "^CXXFLAGS = " ${SDPA_MAKEFILE} | cut -f2 -d=}
+-FC          = ${shell grep "^FC ="        ${SDPA_MAKEFILE} | cut -f2 -d=}
+-FCFLAGS     = ${shell grep "^FCFLAGS = "  ${SDPA_MAKEFILE} | cut -f2 -d=}
+-PTHREAD_INCLUDE = ${shell grep "^PTHREAD_INCLUDE = "  ${SDPA_MAKEFILE} | cut -f2 -d=}
+-AR          = ${shell grep "^AR = "       ${SDPA_MAKEFILE} | cut -f2 -d=}
+-RANLIB      = ${shell grep "^RANLIB = "  ${SDPA_MAKEFILE} | cut -f2 -d=}
++CC          := ${shell grep "^CC ="        ${SDPA_MAKEFILE} | cut -f2 -d=}
++CFLAGS      := ${shell grep "^CFLAGS = "   ${SDPA_MAKEFILE} | cut -f2 -d=}
++CXX         := ${shell grep "^CXX ="       ${SDPA_MAKEFILE} | cut -f2 -d=}
++CXXFLAGS    := ${shell grep "^CXXFLAGS = " ${SDPA_MAKEFILE} | cut -f2 -d=}
++FC          := ${shell grep "^FC ="        ${SDPA_MAKEFILE} | cut -f2 -d=}
++FCFLAGS     := ${shell grep "^FCFLAGS = "  ${SDPA_MAKEFILE} | cut -f2 -d=}
++PTHREAD_INCLUDE := ${shell grep "^PTHREAD_INCLUDE = "  ${SDPA_MAKEFILE} | cut -f2 -d=}
++AR          := ${shell grep "^AR = "       ${SDPA_MAKEFILE} | cut -f2 -d=}
++RANLIB      := ${shell grep "^RANLIB = "  ${SDPA_MAKEFILE} | cut -f2 -d=}
+ 
+ ###################################################################
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202411061518.4A6FIfra045164>