On Wed Oct 01, 2025 at 08:22:20PM -0700, Andrew Hewus Fresh wrote:
> This updates OpenSCAD to a relatively recent "nightly". This is the one
> I have been testing, but should be relatively easy to watch for good
> places to pull in in he future.
>
> I haven't done significant work in it yet, but the few things I have
> tried have worked great and the new manifold renderer is _so_ much
> faster.
>
> It does use a shell script shim to make sure it gets executed with the
> full path so the application and resource paths get set up correctly.
>
> I removed the "unlink" patch, I am not sure if that is a vestigial
> script that is no longer used, but it doesn't seem to be a problem when
> building. I also removed "the" from the comment, due to portcheck(1),
> but can put it back.
>
> It still wasn't building right on my sparc64, but not a SIGILL, just
> weird compile problems. I did not get it working on any platforms other
> than amd64, but might try sparc64 again and even try my macppc.
>
> You an also see it on my cvsweb or anoncvs checkout:
>
> https://cvs.afresh1.com/cgi-bin/cvsweb/mystuff-openscad/
>
> $ cvs -d anoncvs@cvs.afresh1.com:/cvs co mystuff-openscad
>
> Comments, OK? (once the four new dependencies get imported)
Nice work, thanks!
I would welcome a switch to Qt6 (-DUSE_QT6=ON), which is the
standard at Apple, for example. Our Qt6 port is more stable than
our Qt5 port.
>
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/cad/openscad/Makefile,v
> diff -u -p -r1.56 Makefile
> --- Makefile 28 Apr 2025 07:19:19 -0000 1.56
> +++ Makefile 2 Oct 2025 02:22:29 -0000
> @@ -1,10 +1,7 @@
> -BROKEN = update to git snapshot to build with 1.87
> -COMMENT = the programmer's solid 3D CAD modeller
> -BROKEN-sparc64= SIGILL on src/cgalutils.cc with CGAL-4.6.3
> +COMMENT = programmers solid 3D CAD modeller
>
> -V = 2021.01
> +V = 2025.09.12
> DISTNAME = openscad-${V}
> -REVISION = 12
>
> CATEGORIES = cad
>
> @@ -13,58 +10,102 @@ HOMEPAGE = https://www.openscad.org/
> # GPLv2+ with CGAL exception
> PERMIT_PACKAGE = Yes
>
> -WANTLIB += ${COMPILER_LIBCXX} GL GLEW GLU Qt5Concurrent Qt5Core
> -WANTLIB += Qt5DBus Qt5Gamepad Qt5Gui Qt5Multimedia Qt5Network
> -WANTLIB += Qt5PrintSupport Qt5Widgets X11 boost_filesystem-mt
> -WANTLIB += boost_program_options-mt boost_regex-mt boost_system-mt
> -WANTLIB += boost_thread-mt c cairo double-conversion fontconfig
> -WANTLIB += freetype glib-2.0 gmp harfbuzz intl m mpfr opencsg
> -WANTLIB += qscintilla2_qt5 xml2 zip
> +GH_ACCOUNT = openscad
> +GH_PROJECT = openscad
> +GH_COMMIT = d38a6251a3c95f7455ba3b368a9dd045483e5b5b
>
> -SITES = https://files.openscad.org/
> -EXTRACT_SUFX = .src.tar.gz
> +MCAD_COMMIT = 1ea402208c3127ffb443931e9bb1681c191dacca
> +SITES.mcad = https://github.com/${GH_ACCOUNT}/MCAD/archive/
>
> -MODULES = devel/qmake \
> +DISTFILES.mcad = MCAD-${MCAD_COMMIT:C/(........).*/\1/}{${MCAD_COMMIT}}${EXTRACT_SUFX}
> +
> +MODULES = devel/cmake \
> lang/python \
> x11/qt5
>
> -BUILD_DEPENDS = devel/bison \
> +WANTLIB += ${COMPILER_LIBCXX} 3mf EGL GL GLEW GLU Qt5Concurrent
> +WANTLIB += Qt5Core Qt5DBus Qt5Gamepad Qt5Gui Qt5Multimedia Qt5Network
> +WANTLIB += Qt5OpenGL Qt5Svg Qt5Widgets boost_program_options-mt
> +WANTLIB += boost_regex-mt c cairo double-conversion fontconfig
> +WANTLIB += freetype glib-2.0 gmp gmpxx harfbuzz intl m manifold
> +WANTLIB += mpfr opencsg qscintilla2_qt5 tbb xml2 zip
> +
> +# Match devel/boost
> +COMPILER = base-clang ports-gcc
> +
> +BUILD_DEPENDS = cad/clipper2 \
> + devel/bison \
> devel/gettext,-tools \
> + devel/sanitizers-cmake \
> + graphics/glslang \
> + graphics/vulkan-tools \
> math/cgal \
> - math/eigen3
> + math/eigen3 \
> + shells/bash
>
> LIB_DEPENDS = archivers/libzip \
> + cad/manifold \
> devel/boost \
> + devel/gettext \
> + devel/glib2 \
> devel/gmp \
> - devel/harfbuzz \
> + devel/gmp,-cxx \
> + devel/lib3mf \
> devel/mpfr \
> + devel/tbb \
> editors/qscintilla \
> graphics/glew \
> graphics/opencsg \
> - math/double-conversion \
> + x11/qt5/qtbase \
> x11/qt5/qtgamepad \
> - x11/qt5/qtmultimedia
> + x11/qt5/qtmultimedia \
> + x11/qt5/qtsvg
>
> RUN_DEPENDS = devel/desktop-file-utils \
> - fonts/liberation-fonts \
> misc/shared-mime-info \
> + net/curl \
> x11/gtk+4,-guic
>
> -# virtual memory exhausted: Cannot allocate memory
> -.if ${MACHINE_ARCH:Malpha}
> -COPTS += -O1
> -CXXOPTS += -O1
> -.endif
>
> -MODQMAKE_ARGS = VERSION=${V}
> -SEPARATE_BUILD = No
> +# I didn't test fully, but it does complain
> +BUILD_DEPENDS += ${RUN_DEPENDS}
> +
> +TEST_DEPENDS = graphics/ImageMagick
> +
> +# The openscad script wrapper breaks debug packages
> +#DEBUG_PACKAGES = ${BUILD_PACKAGES}
> +
> +# 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
> +
> +# 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
>
> -NO_TEST = Yes
> +# I don't know how link in comms/libhidapi
> +CONFIGURE_ARGS += -DENABLE_HIDAPI=OFF
>
> -pre-configure:
> - ln -sf ${LOCALBASE}/bin/bison ${WRKDIR}/bin/yacc
> +post-extract:
> + 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 <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/cad/openscad/distinfo,v
> diff -u -p -r1.7 distinfo
> --- distinfo 14 Feb 2021 16:14:54 -0000 1.7
> +++ distinfo 2 Oct 2025 02:22:29 -0000
> @@ -1,2 +1,4 @@
> -SHA256 (openscad-2021.01.src.tar.gz) = 2TjCl+fl9l26sUYcrEcvxg3+qkmZ6iwZsxpBhPLXA1k=
> -SIZE (openscad-2021.01.src.tar.gz) = 15817555
> +SHA256 (MCAD-1ea40220.tar.gz) = PQQHfTaYFGOMPwGP7MOUOQEaR/VFAm9DwaRlvOF3P1c=
> +SHA256 (openscad-2025.09.12-d38a6251.tar.gz) = jtN7qirkG1Jz8K+xBradJxZWJrEBTUIrsD61MB8631s=
> +SIZE (MCAD-1ea40220.tar.gz) = 56943
> +SIZE (openscad-2025.09.12-d38a6251.tar.gz) = 24855050
> Index: patches/patch-CMakeLists_txt
> ===================================================================
> RCS file: patches/patch-CMakeLists_txt
> diff -N patches/patch-CMakeLists_txt
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-CMakeLists_txt 2 Oct 2025 02:22:29 -0000
> @@ -0,0 +1,42 @@
> +Index: CMakeLists.txt
> +--- CMakeLists.txt.orig
> ++++ CMakeLists.txt
> +@@ -388,7 +388,7 @@ else()
> + target_compile_definitions(OpenSCAD PRIVATE EIGEN_DONT_ALIGN)
> + message(STATUS "Eigen: ${EIGEN3_VERSION}")
> +
> +- find_package(Boost 1.70 REQUIRED QUIET COMPONENTS regex program_options)
> ++ find_package(Boost 1.70 REQUIRED QUIET COMPONENTS filesystem regex program_options)
> + message(STATUS "Boost: ${Boost_VERSION}")
> + target_include_directories(OpenSCAD SYSTEM PRIVATE ${Boost_INCLUDE_DIRS})
> + target_link_libraries(OpenSCAD PRIVATE ${Boost_LIBRARIES})
> +@@ -527,7 +527,7 @@ if(ENABLE_CAIRO)
> + if (CAIRO_VERSION)
> + message(STATUS "Cairo: ${CAIRO_VERSION}")
> + target_include_directories(OpenSCAD SYSTEM PRIVATE ${CAIRO_INCLUDE_DIRS})
> +- target_link_libraries(OpenSCAD PRIVATE ${CAIRO_LIBRARIES})
> ++ target_link_libraries(OpenSCAD PRIVATE ${CAIRO_LINK_LIBRARIES})
> + target_compile_definitions(OpenSCAD PRIVATE ENABLE_CAIRO)
> + else()
> + message(STATUS "Cairo: disabled")
> +@@ -749,7 +749,7 @@ elseif(UNIX)
> + if (NOT USE_GLAD)
> + target_compile_definitions(OpenSCAD PRIVATE GLEW_EGL)
> + endif()
> +- target_link_libraries(OpenSCAD PRIVATE OpenGL::EGL)
> ++ target_link_libraries(OpenSCAD PRIVATE ${OPENGL_egl_LIBRARY})
> + endif()
> + if(ENABLE_GLX AND OpenGL_GLX_FOUND)
> + target_compile_definitions(OpenSCAD PRIVATE ENABLE_GLX)
> +@@ -1064,11 +1064,6 @@ else()
> + ${GLEW_SOURCES})
> + endif()
> +
> +-
> +-if(UNIX AND (NOT APPLE) AND (NOT HEADLESS))
> +- set(PLATFORM_INPUT_DRIVER_SOURCES src/gui/input/JoystickInputDriver.cc)
> +- target_compile_definitions(OpenSCAD PRIVATE ENABLE_JOYSTICK)
> +-endif()
> +
> + set(INPUT_DRIVER_SOURCES
> + ${PLATFORM_INPUT_DRIVER_SOURCES}
> Index: patches/patch-features_boost_prf
> ===================================================================
> RCS file: patches/patch-features_boost_prf
> diff -N patches/patch-features_boost_prf
> --- patches/patch-features_boost_prf 11 Mar 2022 18:24:31 -0000 1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,12 +0,0 @@
> -Index: features/boost.prf
> ---- features/boost.prf.orig
> -+++ features/boost.prf
> -@@ -71,7 +71,7 @@ isEmpty(BOOST_LINK_FLAGS) {
> -
> - isEmpty(BOOST_LINK_FLAGS) {
> - unix|macx {
> -- BOOST_LINK_FLAGS = -lboost_thread -lboost_program_options -lboost_filesystem -lboost_system -lboost_regex
> -+ BOOST_LINK_FLAGS = -lboost_thread-mt -lboost_program_options-mt -lboost_filesystem-mt -lboost_system-mt -lboost_regex-mt
> - }
> - }
> -
> Index: patches/patch-openscad_pro
> ===================================================================
> RCS file: patches/patch-openscad_pro
> diff -N patches/patch-openscad_pro
> --- patches/patch-openscad_pro 11 Mar 2022 18:24:31 -0000 1.5
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,45 +0,0 @@
> -- remove unsupported compiler flag (that is NOT ignored)
> -- don't use bundled Liberation fonts, use RDEP on fonts/liberation-fonts instead
> -- fix manpage installation dir
> -- disable hidapi support, it doesn't compile
> -
> -Index: openscad.pro
> ---- openscad.pro.orig
> -+++ openscad.pro
> -@@ -150,7 +150,6 @@ netbsd* {
> - # See Dec 2011 OpenSCAD mailing list, re: CGAL/GCC bugs.
> - *g++* {
> - QMAKE_CXXFLAGS *= -fno-strict-aliasing
> -- QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-local-typedefs # ignored before 4.8
> -
> - # Disable attributes warnings on MSYS/MXE due to gcc bug spamming the logs: Issue #2771
> - win* | CONFIG(mingw-cross-env)|CONFIG(mingw-cross-env-shared) {
> -@@ -193,7 +192,7 @@ CONFIG += lib3mf
> - CONFIG += gettext
> - CONFIG += libxml2
> - CONFIG += libzip
> --CONFIG += hidapi
> -+#CONFIG += hidapi
> - CONFIG += spnav
> - CONFIG += double-conversion
> - CONFIG += cairo
> -@@ -721,10 +720,6 @@ libraries.path = "$$PREFIX/share/$${FULLNAME}/librarie
> - libraries.files = libraries/*
> - INSTALLS += libraries
> -
> --fonts.path = "$$PREFIX/share/$${FULLNAME}/fonts/"
> --fonts.files = fonts/*
> --INSTALLS += fonts
> --
> - colorschemes.path = "$$PREFIX/share/$${FULLNAME}/color-schemes/"
> - colorschemes.files = color-schemes/*
> - INSTALLS += colorschemes
> -@@ -757,7 +752,7 @@ icon512.path = $$PREFIX/share/icons/hicolor/512x512/ap
> - icon512.extra = test -f icons/$${FULLNAME}-512.png && cp -f icons/$${FULLNAME}-512.png \"\$(INSTALL_ROOT)$${icon512.path}/$${FULLNAME}.png\" || cp -f icons/openscad-512.png \"\$(INSTALL_ROOT)$${icon512.path}/$${FULLNAME}.png\"
> - INSTALLS += icon48 icon64 icon128 icon256 icon512
> -
> --man.path = $$PREFIX/share/man/man1
> -+man.path = $$PREFIX/man/man1
> - man.extra = cp -f doc/openscad.1 \"\$(INSTALL_ROOT)$${man.path}/$${FULLNAME}.1\"
> - INSTALLS += man
> -
> Index: patches/patch-scripts_translation-update_sh
> ===================================================================
> RCS file: patches/patch-scripts_translation-update_sh
> diff -N patches/patch-scripts_translation-update_sh
> --- patches/patch-scripts_translation-update_sh 11 Mar 2022 18:24:31 -0000 1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,14 +0,0 @@
> -OpenBSD does not have unlink in base
> -
> -Index: scripts/translation-update.sh
> ---- scripts/translation-update.sh.orig
> -+++ scripts/translation-update.sh
> -@@ -100,7 +100,7 @@ updatemo()
> -
> - # clean the mess
> - for LANGCODE in `cat locale/LINGUAS | grep -v "#"`; do
> -- unlink ./locale/$LANGCODE/LC_MESSAGES/$LANGCODE.mo
> -+ rm ./locale/$LANGCODE/LC_MESSAGES/$LANGCODE.mo
> - done
> - else
> - if [ x"$(uname -s)" = x"Linux" ]; then
> Index: patches/patch-src_cgalutils-polyhedron_cc
> ===================================================================
> RCS file: patches/patch-src_cgalutils-polyhedron_cc
> diff -N patches/patch-src_cgalutils-polyhedron_cc
> --- patches/patch-src_cgalutils-polyhedron_cc 31 Oct 2023 23:33:26 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,26 +0,0 @@
> -Backport from upstream
> -Commit: cc49ad8dac24309f5452d5dea9abd406615a52d9
> -
> -Index: src/cgalutils-polyhedron.cc
> ---- src/cgalutils-polyhedron.cc.orig
> -+++ src/cgalutils-polyhedron.cc
> -@@ -337,19 +337,6 @@ namespace CGALUtils {
> - }
> - };
> -
> -- template <typename Polyhedron>
> -- std::string printPolyhedron(const Polyhedron &p) {
> -- std::ostringstream sstream;
> -- sstream.precision(20);
> --
> -- Polyhedron_writer writer;
> -- generic_print_polyhedron(sstream, p, writer);
> --
> -- return sstream.str();
> -- }
> --
> -- template std::string printPolyhedron(const CGAL_Polyhedron &p);
> --
> - }; // namespace CGALUtils
> -
> -
No comments:
Post a Comment