=================================================================== RCS file: /cvs/mystuff-openscad/cad/openscad/Makefile,v retrieving revision 1.4 retrieving revision 1.10 diff -u -r1.4 -r1.10 --- mystuff-openscad/cad/openscad/Makefile 2025/09/24 02:04:17 1.4 +++ mystuff-openscad/cad/openscad/Makefile 2025/10/02 02:56:58 1.10 @@ -1,4 +1,4 @@ -COMMENT = the programmers solid 3D CAD modeller +COMMENT = programmers solid 3D CAD modeller V = 2025.09.12 DISTNAME = openscad-${V} @@ -30,8 +30,8 @@ WANTLIB += freetype glib-2.0 gmp gmpxx harfbuzz intl m manifold WANTLIB += mpfr opencsg qscintilla2_qt5 tbb xml2 zip -# Must match devel/boost -COMPILER = base-clang ports-gcc +# Match devel/boost +COMPILER = base-clang ports-gcc BUILD_DEPENDS = cad/clipper2 \ devel/bison \ @@ -67,20 +67,22 @@ x11/gtk+4,-guic +# I didn't test fully, but it does complain BUILD_DEPENDS += ${RUN_DEPENDS} TEST_DEPENDS = graphics/ImageMagick -DEBUG_PACKAGES = ${BUILD_PACKAGES} +# The openscad script wrapper breaks debug packages +#DEBUG_PACKAGES = ${BUILD_PACKAGES} -# Make the about say the "right" thing +# Make about say the "right" thing CONFIGURE_ARGS += -DOPENSCAD_VERSION=${V} # Don't use the included stuff, use ours CONFIGURE_ARGS += -DUSE_BUILTIN_CLIPPER2=OFF \ -DUSE_BUILTIN_MANIFOLD=OFF -#LIB_DEPENDS += devel/mimalloc +# It might be faster, but at what cost? CONFIGURE_ARGS += -DUSE_MIMALLOC=OFF # We don't have Pillow @@ -93,7 +95,17 @@ 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