On Sun, 07 Feb 2021, Paco Esteban wrote:

> Hi ports@,
> 
> This is an update of cad/openscad to its latest version 2021.01
> 
> Here are the changes for this new version:
> https://www.openscad.org/news.html#20210131
> 
> On the port side, I only added cairo to WANTLIB because
> port-lib-depends-check was complaining about it.  It also says:
> 
> Extra:  CGAL.2
> 
> But this is an actual dependency and it's being used as far as I see, so
> I left it there.
> 
> Comments ? ok to commit ?

Find an updated diff at the end (tracey@'s work, thank you !) that
actually works and does not have the port-lib-depends-check problem.

As some of you have noticed, the program segfaults on exit if one uses
the 'File > Quit' menu or Ctrl+q.  It does not when killing the window on cwm
(which we both use, so we have not tested on any other window manager).

Here's what gdb says about this:

    (gdb) bt
    #0  0x00000be0ce5d99d2 in QHashData::nextNode(QHashData::Node*) () from 
/usr/local/lib/libQt5Core.so.3.0
    #1  0x00000bdeb4c13308 in gui(std::__1::vector<std::__1::basic_string<char, 
std::__1::char_traits<char>, std::__1::allocator<char> >, 
std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, 
std::__1::allocator<char> > > >&, boost::filesystem::path const&, int, char**) 
()
    #2  0x00000bdeb4c175a6 in main ()

The current version we have in ports also segfaults on exit, so this is
not new.

Any help from more c++/Qt savvy people is welcome.

Other than that, any comments/ok for this diff ?  (it can go in with or
without the DEBUG_PACKAGES, as you prefer).

Index: Makefile
===================================================================
RCS file: /cvs/ports/cad/openscad/Makefile,v
retrieving revision 1.38
diff -u -p -u -r1.38 Makefile
--- Makefile    6 May 2020 08:12:17 -0000       1.38
+++ Makefile    9 Feb 2021 15:11:44 -0000
@@ -3,9 +3,8 @@
 COMMENT =              the programmer's solid 3D CAD modeller#'
 BROKEN-sparc64=        SIGILL on src/cgalutils.cc with CGAL-4.6.3
 
-V =                    2019.05
+V =                    2021.01
 DISTNAME =             openscad-${V}
-REVISION =             5
 
 CATEGORIES =           cad
 
@@ -13,22 +12,28 @@ HOMEPAGE =          https://www.openscad.org/
 
 # GPLv2+ with CGAL exception
 PERMIT_PACKAGE =       Yes
+DEBUG_PACKAGES =       ${BUILD_PACKAGES}
 
-WANTLIB += ${COMPILER_LIBCXX} CGAL GL GLEW GLU Qt5Concurrent Qt5Core
+WANTLIB += ${COMPILER_LIBCXX} GL GLEW GLU Qt5Concurrent Qt5Core
 WANTLIB += Qt5DBus Qt5Gui Qt5Multimedia Qt5Network Qt5PrintSupport
 WANTLIB += Qt5Widgets X11 boost_filesystem-mt boost_program_options-mt
-WANTLIB += boost_regex-mt boost_system-mt boost_thread-mt c double-conversion
-WANTLIB += fontconfig freetype glib-2.0 gmp harfbuzz intl m mpfr
-WANTLIB += opencsg qscintilla2_qt5 xml2 z zip
+WANTLIB += boost_regex-mt boost_system-mt boost_thread-mt c cairo
+WANTLIB += double-conversion fontconfig freetype glib-2.0 gmp
+WANTLIB += harfbuzz intl m mpfr opencsg qscintilla2_qt5 xml2 z
+WANTLIB += zip
 
 MASTER_SITES =         https://files.openscad.org/
 EXTRACT_SUFX =         .src.tar.gz
 
 MODULES =              devel/qmake \
+                       lang/python \
                        x11/qt5
 
+MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
+
 BUILD_DEPENDS =                devel/bison \
                        devel/gettext,-tools \
+                       math/cgal \
                        math/eigen3
 
 LIB_DEPENDS =          archivers/libzip \
@@ -39,12 +44,13 @@ LIB_DEPENDS =               archivers/libzip \
                        editors/qscintilla \
                        graphics/glew \
                        graphics/opencsg \
-                       math/cgal \
                        math/double-conversion \
                        x11/qt5/qtmultimedia
 
 RUN_DEPENDS =          devel/desktop-file-utils \
-                       fonts/liberation-fonts
+                       fonts/liberation-fonts \
+                       misc/shared-mime-info \
+                       x11/gtk+3,-guic
 
 # virtual memory exhausted: Cannot allocate memory
 .if ${MACHINE_ARCH:Malpha}
@@ -59,5 +65,9 @@ NO_TEST =             Yes
 
 pre-configure:
        ln -sf ${LOCALBASE}/bin/bison ${WRKDIR}/bin/yacc
+
+post-install:
+       ${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py \
+               ${PREFIX}/share/openscad/libraries/MCAD/
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/cad/openscad/distinfo,v
retrieving revision 1.6
diff -u -p -u -r1.6 distinfo
--- distinfo    17 Oct 2019 20:04:04 -0000      1.6
+++ distinfo    9 Feb 2021 15:11:44 -0000
@@ -1,2 +1,2 @@
-SHA256 (openscad-2019.05.src.tar.gz) = 
ChbEJjzlI4CBndkcYJpxnTjxL2uMTaDoKNy+W3CZb1k=
-SIZE (openscad-2019.05.src.tar.gz) = 14604881
+SHA256 (openscad-2021.01.src.tar.gz) = 
2TjCl+fl9l26sUYcrEcvxg3+qkmZ6iwZsxpBhPLXA1k=
+SIZE (openscad-2021.01.src.tar.gz) = 15817555
Index: patches/patch-openscad_pro
===================================================================
RCS file: /cvs/ports/cad/openscad/patches/patch-openscad_pro,v
retrieving revision 1.3
diff -u -p -u -r1.3 patch-openscad_pro
--- patches/patch-openscad_pro  6 Nov 2019 13:21:51 -0000       1.3
+++ patches/patch-openscad_pro  9 Feb 2021 15:11:44 -0000
@@ -8,7 +8,7 @@ $OpenBSD: patch-openscad_pro,v 1.3 2019/
 Index: openscad.pro
 --- openscad.pro.orig
 +++ openscad.pro
-@@ -149,7 +149,6 @@ netbsd* {
+@@ -150,7 +150,6 @@ netbsd* {
  # See Dec 2011 OpenSCAD mailing list, re: CGAL/GCC bugs.
  *g++* {
    QMAKE_CXXFLAGS *= -fno-strict-aliasing
@@ -16,7 +16,7 @@ Index: openscad.pro
  
    # 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) {
-@@ -192,7 +191,7 @@ CONFIG += lib3mf
+@@ -193,7 +192,7 @@ CONFIG += lib3mf
  CONFIG += gettext
  CONFIG += libxml2
  CONFIG += libzip
@@ -24,8 +24,8 @@ Index: openscad.pro
 +#CONFIG += hidapi
  CONFIG += spnav
  CONFIG += double-conversion
- 
-@@ -716,10 +715,6 @@ libraries.path = "$$PREFIX/share/$${FULLNAME}/librarie
+ CONFIG += cairo
+@@ -721,10 +720,6 @@ libraries.path = "$$PREFIX/share/$${FULLNAME}/librarie
  libraries.files = libraries/*
  INSTALLS += libraries
  
@@ -36,9 +36,9 @@ Index: openscad.pro
  colorschemes.path = "$$PREFIX/share/$${FULLNAME}/color-schemes/"
  colorschemes.files = color-schemes/*
  INSTALLS += colorschemes
-@@ -740,7 +735,7 @@ icons.path = $$PREFIX/share/pixmaps
- icons.extra = test -f icons/$${FULLNAME}.png && cp -f icons/$${FULLNAME}.png 
\"\$(INSTALL_ROOT)$${icons.path}/\" || cp -f icons/openscad.png 
\"\$(INSTALL_ROOT)$${icons.path}/$${FULLNAME}.png\"
- INSTALLS += icons
+@@ -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
Index: patches/patch-src_import_cc
===================================================================
RCS file: patches/patch-src_import_cc
diff -N patches/patch-src_import_cc
--- patches/patch-src_import_cc 13 Dec 2020 20:40:55 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-src_import_cc,v 1.1 2020/12/13 20:40:55 sthen Exp $
-
-Fix build with newer Boost.
-
-Index: src/import.cc
---- src/import.cc.orig
-+++ src/import.cc
-@@ -50,7 +50,6 @@ namespace fs = boost::filesystem;
- #include <boost/assign/std/vector.hpp>
- using namespace boost::assign; // bring 'operator+=()' into scope
- 
--#include <boost/detail/endian.hpp>
- #include <cstdint>
- 
- extern PolySet * import_amf(std::string, const Location &loc);
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/cad/openscad/pkg/PLIST,v
retrieving revision 1.10
diff -u -p -u -r1.10 PLIST
--- pkg/PLIST   6 May 2020 08:12:17 -0000       1.10
+++ pkg/PLIST   9 Feb 2021 15:11:44 -0000
@@ -2,6 +2,11 @@
 @bin bin/openscad
 @man man/man1/openscad.1
 share/applications/openscad.desktop
+share/icons/hicolor/128x128/apps/openscad.png
+share/icons/hicolor/256x256/apps/openscad.png
+share/icons/hicolor/48x48/apps/openscad.png
+share/icons/hicolor/512x512/apps/openscad.png
+share/icons/hicolor/64x64/apps/openscad.png
 share/metainfo/
 share/metainfo/org.openscad.OpenSCAD.appdata.xml
 share/mime/packages/openscad.xml
@@ -97,11 +102,18 @@ share/openscad/examples/Parametric/sign.
 share/openscad/examples/examples.json
 share/openscad/libraries/
 share/openscad/libraries/MCAD/
+share/openscad/libraries/MCAD/.gitignore
 share/openscad/libraries/MCAD/2Dshapes.scad
 share/openscad/libraries/MCAD/3d_triangle.scad
 share/openscad/libraries/MCAD/README.markdown
 share/openscad/libraries/MCAD/TODO
 share/openscad/libraries/MCAD/__init__.py
+${MODPY_COMMENT}share/openscad/libraries/MCAD/${MODPY_PYCACHE}/
+share/openscad/libraries/MCAD/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
+share/openscad/libraries/MCAD/${MODPY_PYCACHE}openscad_testing.${MODPY_PYC_MAGIC_TAG}pyc
+share/openscad/libraries/MCAD/${MODPY_PYCACHE}openscad_utils.${MODPY_PYC_MAGIC_TAG}pyc
+share/openscad/libraries/MCAD/${MODPY_PYCACHE}test_docs.${MODPY_PYC_MAGIC_TAG}pyc
+share/openscad/libraries/MCAD/${MODPY_PYCACHE}test_mcad.${MODPY_PYC_MAGIC_TAG}pyc
 share/openscad/libraries/MCAD/bearing.scad
 share/openscad/libraries/MCAD/bitmap/
 share/openscad/libraries/MCAD/bitmap/README
@@ -158,6 +170,9 @@ share/openscad/locale/es/LC_MESSAGES/ope
 share/openscad/locale/fr/
 share/openscad/locale/fr/LC_MESSAGES/
 share/openscad/locale/fr/LC_MESSAGES/openscad.mo
+share/openscad/locale/hy/
+share/openscad/locale/hy/LC_MESSAGES/
+share/openscad/locale/hy/LC_MESSAGES/openscad.mo
 share/openscad/locale/pl/
 share/openscad/locale/pl/LC_MESSAGES/
 share/openscad/locale/pl/LC_MESSAGES/openscad.mo
@@ -167,7 +182,19 @@ share/openscad/locale/ru/LC_MESSAGES/ope
 share/openscad/locale/uk/
 share/openscad/locale/uk/LC_MESSAGES/
 share/openscad/locale/uk/LC_MESSAGES/openscad.mo
-share/pixmaps/
-share/pixmaps/openscad.png
 @tag update-desktop-database
 @tag update-mime-database
+share/openscad/locale/zh_CN/
+share/openscad/locale/zh_CN/LC_MESSAGES/
+share/openscad/locale/zh_CN/LC_MESSAGES/openscad.mo
+share/openscad/locale/zh_TW/
+share/openscad/locale/zh_TW/LC_MESSAGES/
+share/openscad/locale/zh_TW/LC_MESSAGES/openscad.mo
+share/openscad/templates/
+share/openscad/templates/difference.json
+share/openscad/templates/for.json
+share/openscad/templates/function.json
+share/openscad/templates/module.json
+share/openscad/templates/rotate.json
+share/openscad/templates/translate.json
+@tag gtk-update-icon-cache %D/share/icons/hicolor

-- 
Paco Esteban.
0x5818130B8A6DBC03

Reply via email to