Created attachment 246258 [details] Patch for dsfmt - Use DISTVERSION when utilizing USE_GITHUB https://docs.freebsd.org/en/books/porters-handbook/book/#makefile-master_sites-github Remove USES= compiler as its functionality isn't utilized Change CSTD= to USE_CSTD Add -DNDEBUG and -DDSFMT_DO_NOT_USE_OLD_NAMES to closer match other repos Remove -msse2, it's a requirement for amd64 Respect CFLAGS, utilize a common toggle for optimization https://docs.freebsd.org/en/books/porters-handbook/book/#dads-cflags https://cgit.freebsd.org/ports/tree/Mk/bsd.options.desc.mk#n396 Compact do-* sections and make use of RLN macro
Remark: -msse2 is only set for amd64. This the point of CFLAGS_amd64. No problem with your other points.
All amd64 CPUs have SSE2, it's mandatory so you don't need to specify it (-msse2).
Anyway, we need CFLAGS_amd64 to define HAVE_SSE2. Actually, when writing this port, I just copied what was defined by Julia to make the bundled part, in order to keep it as-is.
Indeed, that is still being kept
OK, just a last point: if you prefer add an option for the OPTIMIZED_CFLAGS, it should be set to default, in order to keep the same behaviour as the previous Julia’s bundle.
Sure, I'll fix that
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0e851e515db85671a196c382a2cbfc0e3f32ec14 commit 0e851e515db85671a196c382a2cbfc0e3f32ec14 Author: Daniel Engberg <diizzy@FreeBSD.org> AuthorDate: 2023-11-17 19:30:06 +0000 Commit: Daniel Engberg <diizzy@FreeBSD.org> CommitDate: 2023-11-18 09:24:49 +0000 math/dsfmt: Improve port * Rearrange Makefile to follow Porters Handbook more closely * Use USE_CSTD helper * Adjust CFLAGS * Use OPTIMIZED_CFLAGS option PR: 275042 Reviewed by: thierry (maintainer) math/dsfmt/Makefile | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-)
Thanks!