=================================================================== RCS file: /cvs/mystuff-openscad/cad/openscad/Makefile,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- mystuff-openscad/cad/openscad/Makefile 2025/11/27 01:31:13 1.17 +++ mystuff-openscad/cad/openscad/Makefile 2025/11/29 01:28:49 1.18 @@ -6,7 +6,6 @@ CATEGORIES = cad HOMEPAGE = https://www.openscad.org/ -TEST_IS_INTERACTIVE = X11 # AGPL-3.0 PERMIT_PACKAGE = Yes @@ -35,16 +34,20 @@ # Match devel/boost COMPILER = base-clang ports-gcc -BUILD_DEPENDS = cad/clipper2 \ - devel/bison \ +BUILD_DEPENDS = devel/bison \ devel/gettext,-tools \ devel/sanitizers-cmake \ graphics/glslang \ + graphics/ImageMagick \ + graphics/shaderc \ graphics/vulkan-tools \ math/cgal \ math/eigen3 \ - shells/bash + shells/bash \ + x11/xkbcommon +TEST_DEPENDS = graphics/py-Pillow + LIB_DEPENDS = archivers/libzip \ cad/clipper2 \ cad/lib3mf \ @@ -70,20 +73,19 @@ 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} -# A test requires this -TEST_DEPENDS += shells/bash - -# The openscad script wrapper breaks debug packages -#DEBUG_PACKAGES = ${BUILD_PACKAGES} - # Make about say the "right" thing CONFIGURE_ARGS += -DOPENSCAD_VERSION=${V} +# 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. +# In post-install we add a shell script shim to provide the full path. +CONFIGURE_ARGS += -DCMAKE_INSTALL_BINDIR=${PREFIX}/libexec + # Don't use the included stuff, use ours CONFIGURE_ARGS += -DUSE_BUILTIN_CLIPPER2=OFF \ -DUSE_BUILTIN_MANIFOLD=OFF @@ -94,28 +96,20 @@ # It might be faster, but at what cost? CONFIGURE_ARGS += -DUSE_MIMALLOC=OFF -# We don't have Pillow -CONFIGURE_ARGS += -DUSE_IMAGE_COMPARE_PY=OFF - # I don't know how link in comms/libhidapi CONFIGURE_ARGS += -DENABLE_HIDAPI=OFF +# We don't have SpNav. Disable in case it get's ported. +CONFIGURE_ARGS += -DCMAKE_DISABLE_FIND_PACKAGE_SpNav=ON + +TEST_IS_INTERACTIVE = X11 + post-extract: rmdir ${WRKSRC}/libraries/MCAD cp -a ${WRKDIR}/MCAD-${MCAD_COMMIT} ${WRKSRC}/libraries/MCAD - #find ${WRKSRC} -type f -exec sed -i '1s,^#!/bin/sh,#!${PREFIX}/bin/bash,' {} + -# 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 + ${SUBST_PROGRAM} ${FILESDIR}/openscad ${PREFIX}/bin/openscad ${MODPY_COMPILEALL} ${PREFIX}/share/openscad/libraries/MCAD/ .include