=================================================================== RCS file: /cvs/mystuff-openscad/cad/openscad/Makefile,v retrieving revision 1.5 retrieving revision 1.8 diff -u -r1.5 -r1.8 --- mystuff-openscad/cad/openscad/Makefile 2025/09/24 02:08:44 1.5 +++ mystuff-openscad/cad/openscad/Makefile 2025/10/02 02:32:26 1.8 @@ -72,7 +72,8 @@ TEST_DEPENDS = graphics/ImageMagick -DEBUG_PACKAGES = ${BUILD_PACKAGES} +# The openscad script wrapper breaks debug packages +#DEBUG_PACKAGES = ${BUILD_PACKAGES} # Make about say the "right" thing CONFIGURE_ARGS += -DOPENSCAD_VERSION=${V} @@ -82,7 +83,6 @@ -DUSE_BUILTIN_MANIFOLD=OFF # It might be faster, but at what cost? -#LIB_DEPENDS += devel/mimalloc CONFIGURE_ARGS += -DUSE_MIMALLOC=OFF # We don't have Pillow @@ -95,7 +95,14 @@ rmdir ${WRKSRC}/libraries/MCAD cp -a ${WRKDIR}/MCAD-${MCAD_COMMIT} ${WRKSRC}/libraries/MCAD +# OpenSCAD uses the program_location (see patch-src_openscad_cc) to figure out +# resource paths, but on OpenBSD that doesn't work when launched from the PATH +# So, add a shell script shim to fix up argv[0] to be absolute so our patch works. post-install: + mv ${PREFIX}/bin/openscad ${PREFIX}/libexec/openscad + ${INSTALL_SCRIPT} /dev/null ${PREFIX}/bin/openscad + printf "%s\n%s\n" '#!/bin/sh' 'exec ${TRUEPREFIX}/libexec/openscad "$$@"' \ + > ${PREFIX}/bin/openscad ${MODPY_COMPILEALL} ${PREFIX}/share/openscad/libraries/MCAD/ .include