5583b883884628bf8893371c65eeec0980e6 Auto-Submitted: auto-generated Date: Mon, 06 Apr 2026 08:45:16 +0000 Message-Id: <69d3729c.3f6c4.46d4c067@gitrepo.freebsd.org> The branch main has been updated by rodrigo: URL: https://cgit.FreeBSD.org/ports/commit/?id=dde75583b883884628bf8893371c65eeec0980e6 commit dde75583b883884628bf8893371c65eeec0980e6 Author: Rodrigo Osorio AuthorDate: 2026-04-05 04:19:38 +0000 Commit: Rodrigo Osorio CommitDate: 2026-04-06 08:42:58 +0000 science/fasthenry: Update build to use clang instead of gcc Also fix CFLAG usage in Makefiles and config script. Bump PORTREVISION. Reported by: gerald --- science/fasthenry/Makefile | 13 +++++--- .../files/patch-src__mk_syscfg__mk_freebsd.inc | 37 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/science/fasthenry/Makefile b/science/fasthenry/Makefile index 348d94ffe0b2..80607152dfb5 100644 --- a/science/fasthenry/Makefile +++ b/science/fasthenry/Makefile @@ -1,5 +1,6 @@ PORTNAME= fasthenry DISTVERSION= 3.0wr-031424 +PORTREVISION= 1 CATEGORIES= science cad MASTER_SITES= http://www.wrcad.com/ftp/pub/ @@ -9,23 +10,27 @@ WWW= https://www.rle.mit.edu/cpg/research_codes.htm LICENSE= MIT -USES= gmake -USE_GCC= yes +USES= gmake HAS_CONFIGURE= yes CONFIGURE_SCRIPT= config +CONFIGURE_ARGS= freebsd # Fix build with clang11 CFLAGS+= -fcommon # Use malloc CFLAGS+= -DNO_SBRK -BINARY_ALIAS= gcc=gcc${GCC_DEFAULT} make=gmake +BINARY_ALIAS= make=gmake -WRKSRC= ${WRKDIR}/fasthenry-3.0wr +WRKSRC= ${WRKDIR}/fasthenry-3.0wr OPTIONS_DEFINE= DOCS EXAMPLES +post-patch: + @${REINPLACE_CMD} -Ee '/CFLAGS =/{s/=/+=/;}' \ + ${WRKSRC}/src/sparse/Makefile + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/bin/fasthenry ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_PROGRAM} ${WRKSRC}/bin/zbuf ${STAGEDIR}${PREFIX}/bin diff --git a/science/fasthenry/files/patch-src__mk_syscfg__mk_freebsd.inc b/science/fasthenry/files/patch-src__mk_syscfg__mk_freebsd.inc new file mode 100644 index 000000000000..4cda88f7ccd5 --- /dev/null +++ b/science/fasthenry/files/patch-src__mk_syscfg__mk_freebsd.inc @@ -0,0 +1,37 @@ +--- /dev/null 2026-04-04 21:53:35.827546000 +0000 ++++ src/mk_syscfg/mk_freebsd.inc 2026-04-04 21:52:38.905644000 +0000 +@@ -0,0 +1,34 @@ ++# These CFLAGS should be fine for anything that is reasonably recent ++# except for MinGW. ++ ++# Check AVX (parallel math support), for x86_64 only. We're going to ++# assume the compiler is gcc compatible, you'll need to comment this ++# if a non-compatible compiler is used. Allow AVX if the gcc version ++# is 4.8 or later. This should also work for macOS clang on Intel ++# Macs. ++ ++ARCH := $(shell uname -m) ++ ++ifeq ($(ARCH),amd64) ++ HAVX = 1 ++endif ++ ++# If you build with AVX enabled, and run on a system that does not ++# have AVX, the program will crash. If is not likely that you would ++# want to run fasthenry on such a machine as it is probably slow, but ++# to force build without AVX comment the next three lines below. ++# There seems to be no way to accommodate the presence/absence of AVX ++# at run-time nicely. ++ ++ifeq "$(HAVX)" "1" ++ MAVX = -mavx -DWITH_AVX ++endif ++ ++CFLAGS += -O3 -DFOUR $(MAVX) ++ ++# For debugging. ++#CFLAGS = -O -g -DFOUR $(MAVX) ++ ++# For profiling. ++#CFLAGS = -pg -g -DFOUR $(MAVX) ++