diff --git a/science/FreeSOLID/Portfile b/science/FreeSOLID/Portfile index a46a4f71bdd..2eb7a2da90c 100644 --- a/science/FreeSOLID/Portfile +++ b/science/FreeSOLID/Portfile @@ -7,7 +7,6 @@ version 2.1.2 revision 3 categories science -platforms darwin license LGPL-2 maintainers nomaintainer @@ -17,7 +16,7 @@ long_description FreeSOLID is a library for collision detection of three-dime to be used in interactive 3D graphics applications. homepage https://sourceforge.net/projects/freesolid/ -master_sites sourceforge:freesolid +master_sites sourceforge:project/freesolid checksums rmd160 0f7134913dc5a74d7a8508f43d98e5d4006b3603 \ sha256 89edc6afdd9d60c8020b2b865b61558c86a8928dc6f1773b9f4708b5c28eb873 @@ -26,6 +25,17 @@ use_zip yes depends_lib port:qhull +# Update config.guess and config.sub to be able to build on arm64. +depends_build-append port:automake +post-patch { + set automake_dirs [glob -directory ${prefix}/share automake-*] + set automake_dir [lindex [lsort -command vercmp $automake_dirs] end] + copy -force ${automake_dir}/config.guess ${automake_dir}/config.sub \ + ${worksrcpath} +} + +patchfiles configure.patch + post-extract { system "chmod +x ${worksrcpath}/configure" } diff --git a/science/FreeSOLID/files/configure.patch b/science/FreeSOLID/files/configure.patch new file mode 100644 index 00000000000..cd1ee4dfb1d --- /dev/null +++ b/science/FreeSOLID/files/configure.patch @@ -0,0 +1,40 @@ +Fix implicit declaration errors. + +--- configure.orig 2015-04-24 13:54:36 ++++ configure 2025-09-11 11:43:14 +@@ -5065,14 +5065,14 @@ + + #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) + int +-main () ++main (void) + { + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return (2); ++ return (0); + } + _ACEOF + rm -f conftest$ac_exeext +@@ -19498,14 +19498,14 @@ + + #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) + int +-main () ++main (void) + { + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return (2); ++ return (0); + } + _ACEOF + rm -f conftest$ac_exeext