=================================================================== RCS file: /cvs/mystuff-openscad/cad/openscad/Makefile,v retrieving revision 1.5 retrieving revision 1.7 diff -u -r1.5 -r1.7 --- mystuff-openscad/cad/openscad/Makefile 2025/09/24 02:08:44 1.5 +++ mystuff-openscad/cad/openscad/Makefile 2025/10/01 03:45:58 1.7 @@ -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} @@ -95,7 +96,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