[packages/openscad] - update to Nov 2024 snapshot

baggins baggins at pld-linux.org
Wed Nov 6 23:07:31 CET 2024


commit feb23718df2d9bb10f749608aa235cde1eb08b09
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Wed Nov 6 23:06:56 2024 +0100

    - update to Nov 2024 snapshot

 localedir.patch             |  24 +++++------
 openscad-polyclipping.patch | 102 +++++++++++++++++++++++---------------------
 openscad.spec               |  44 ++++++++++---------
 3 files changed, 89 insertions(+), 81 deletions(-)
---
diff --git a/openscad.spec b/openscad.spec
index c9161d9..31ce3cc 100644
--- a/openscad.spec
+++ b/openscad.spec
@@ -1,21 +1,23 @@
 #
 # Conditional build:
-%bcond_without	tests		# build with tests
+%bcond_with	tests		# build with tests (need external MCAD)
 
 %ifarch x32
 %undefine	with_tests
 %endif
 Summary:	The Programmers Solid 3D CAD Modeller
 Name:		openscad
-Version:	2021.01
-Release:	3
+%define	hash	fd3a9aa
+Version:	2024.11.03
+Release:	1
 # COPYING contains a linking exception for CGAL
 # Appdata file is CC0
 # Examples are CC0
 License:	GPLv2 with exceptions and CC0
 Group:		Applications/Engineering
-Source0:	http://files.openscad.org/%{name}-%{version}.src.tar.gz
-# Source0-md5:	79f8e3a42bcfeeb3ddde9e5bc2311f76
+#Source0:	http://files.openscad.org/%{name}-%{version}.src.tar.gz
+Source0:	https://github.com/openscad/openscad/archive/%{hash}/%{name}-%{version}.tar.gz
+# Source0-md5:	0eebc48f5fc493d3f57896dec43e5ba1
 Patch0:		%{name}-polyclipping.patch
 Patch1:		localedir.patch
 Patch2:		tests.patch
@@ -46,17 +48,22 @@ BuildRequires:	harfbuzz-devel >= 0.9.19
 BuildRequires:	lib3mf-devel >= 1.8.1
 BuildRequires:	libxml2-devel
 BuildRequires:	libzip-devel
+BuildRequires:	manifold-devel
+BuildRequires:	mimalloc-devel
 BuildRequires:	mpfr-devel >= 3.0.0
 BuildRequires:	opencsg-devel >= 1.3.2
 BuildRequires:	pkgconfig
 BuildRequires:	polyclipping-devel >= 6.1.3
 BuildRequires:	procps
-BuildRequires:	python
+BuildRequires:	python3
 BuildRequires:	qscintilla2-qt5-devel >= 2.11.2
 BuildRequires:	qt5-build
 BuildRequires:	rpm-build >= 4.6
 BuildRequires:	rpmbuild(macros) >= 2.016
+BuildRequires:	tbb-devel
 %{?with_tests:BuildRequires:	xorg-xserver-Xvfb}
+# Library may have new symbols without soname change
+%requires_eq	tbb
 Requires:	font(liberationmono)
 Requires:	font(liberationsans)
 Requires:	font(liberationserif)
@@ -148,18 +155,20 @@ moching up mechanical designs. It is currently unfinished and you can
 expect some API changes, however many things are already working.
 
 %prep
-%setup -q
+%setup -q -n openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 
 # use system package
 %{__rm} -r src/ext/polyclipping
 
 %build
-%{qmake_qt5} \
-	PREFIX=%{_prefix} \
-	CONFIG+=experimental
+mkdir -p build
+cd build
+%cmake ../ \
+	-DUSE_BUILTIN_MANIFOLD=OFF \
+	%{cmake_on_off tests ENABLE_TESTS}
+
 %{__make}
 
 %if %{with tests}
@@ -172,12 +181,9 @@ cd tests
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} install \
-	INSTALL_ROOT=$RPM_BUILD_ROOT
+%{__make} -C build install \
+	DESTDIR=$RPM_BUILD_ROOT
 
-%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/libraries/MCAD/lgpl-2.1.txt
-%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/libraries/MCAD/README.markdown
-%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/libraries/MCAD/TODO
 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}/fonts
 
 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{%{name},}/locale
@@ -199,10 +205,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/%{name}/examples
 %{_datadir}/%{name}/color-schemes
 %dir %{_datadir}/%{name}/libraries
+%{_datadir}/%{name}/shaders
 %{_datadir}/%{name}/templates
 %{_mandir}/man1/*
-
-%files MCAD
-%defattr(644,root,root,755)
-%doc libraries/MCAD/README.markdown libraries/MCAD/TODO
-%{_datadir}/%{name}/libraries/MCAD
diff --git a/localedir.patch b/localedir.patch
index e052447..1ee207d 100644
--- a/localedir.patch
+++ b/localedir.patch
@@ -4,18 +4,18 @@
   * files.
   */
  void localization_init() {
--	fs::path po_dir(PlatformUtils::resourcePath("locale"));
--	std::string locale_path(po_dir.string());
+-  fs::path po_dir(PlatformUtils::resourcePath("locale"));
+-  const std::string& locale_path(po_dir.string());
 -
--	if (fs::is_directory(locale_path)) {
- 		setlocale(LC_ALL, "");
--		bindtextdomain("openscad", locale_path.c_str());
-+		bindtextdomain("openscad", "/usr/share/locale");
- 		bind_textdomain_codeset("openscad", "UTF-8");
- 		textdomain("openscad");
--	} else {
--		LOG(message_group::None,Location::NONE,"","Could not initialize localization.");
--	}
+-  if (fs::is_directory(locale_path)) {
+     setlocale(LC_ALL, "");
+-    bindtextdomain("openscad", locale_path.c_str());
++    bindtextdomain("openscad", "/usr/share/locale");
+     bind_textdomain_codeset("openscad", "UTF-8");
+     textdomain("openscad");
+-  } else {
+-    LOG("Could not initialize localization (application path is '%1$s').", PlatformUtils::applicationPath());
+-  }
  }
  
- Camera get_camera(const po::variables_map &vm)
+ Camera get_camera(const po::variables_map& vm)
diff --git a/openscad-polyclipping.patch b/openscad-polyclipping.patch
index 907430f..a565fbc 100644
--- a/openscad-polyclipping.patch
+++ b/openscad-polyclipping.patch
@@ -1,57 +1,63 @@
-diff --git a/openscad.pro b/openscad.pro
-index a2eefe6..20b1864 100644
---- a/openscad.pro
-+++ b/openscad.pro
-@@ -440,8 +440,7 @@ SOURCES += src/version_check.cc \
- HEADERS += src/ext/lodepng/lodepng.h
-            
- # ClipperLib
--SOURCES += src/ext/polyclipping/clipper.cpp
--HEADERS += src/ext/polyclipping/clipper.hpp
-+LIBS += -lpolyclipping
- 
- # libtess2
- INCLUDEPATH += src/ext/libtess2/Include
-diff --git a/src/clipper-utils.h b/src/clipper-utils.h
-index 0dc7cd0..c98cda0 100644
---- a/src/clipper-utils.h
-+++ b/src/clipper-utils.h
-@@ -1,6 +1,6 @@
+diff -ur openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f.orig/CMakeLists.txt openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f/CMakeLists.txt
+--- openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f.orig/CMakeLists.txt	2024-11-03 14:01:44.000000000 +0100
++++ openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f/CMakeLists.txt	2024-11-05 22:30:51.409115362 +0100
+@@ -794,7 +794,6 @@
+   src/ext/libtess2/Source/sweep.c
+   src/ext/libtess2/Source/tess.c
+   src/ext/lodepng/lodepng.cpp
+-  src/ext/polyclipping/clipper.cpp
+   src/geometry/ClipperUtils.cc
+   src/geometry/Geometry.cc
+   src/geometry/GeometryCache.cc
+@@ -1177,10 +1176,8 @@
+     src/gui/parameter/ParameterWidget.ui
+ )
+ 
+-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+-  # Ignore specific warning on external lib
+-  set_source_files_properties("src/ext/polyclipping/clipper.cpp" PROPERTIES COMPILE_FLAGS "-Wno-class-memaccess")
+-endif()
++pkg_check_modules(polyclipping REQUIRED polyclipping)
++target_link_libraries(OpenSCAD PRIVATE ${polyclipping_LIBRARIES})
+ 
+ if (ENABLE_MANIFOLD)
+   target_compile_definitions(OpenSCAD PRIVATE ENABLE_MANIFOLD)
+Only in openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f: CMakeLists.txt~
+diff -ur openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f.orig/src/core/OffsetNode.h openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f/src/core/OffsetNode.h
+--- openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f.orig/src/core/OffsetNode.h	2024-11-03 14:01:44.000000000 +0100
++++ openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f/src/core/OffsetNode.h	2024-11-05 22:26:57.833523910 +0100
+@@ -1,7 +1,7 @@
  #pragma once
  
--#include "ext/polyclipping/clipper.hpp"
+ #include "core/node.h"
+-#include "polyclipping/clipper.hpp"
 +#include <polyclipping/clipper.hpp>
- #include "Polygon2d.h"
  
- namespace ClipperUtils {
---- openscad-openscad-2019.01-RC4/src/libsvg/shape.h~	2019-03-17 02:57:25.000000000 +0100
-+++ openscad-openscad-2019.01-RC4/src/libsvg/shape.h	2019-04-19 14:37:29.511178262 +0200
-@@ -34,7 +34,7 @@
- #include <Eigen/Geometry>
+ #include <string>
+ 
+Only in openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f/src/core: OffsetNode.h~
+diff -ur openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f.orig/src/geometry/ClipperUtils.h openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f/src/geometry/ClipperUtils.h
+--- openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f.orig/src/geometry/ClipperUtils.h	2024-11-03 14:01:44.000000000 +0100
++++ openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f/src/geometry/ClipperUtils.h	2024-11-05 22:27:27.884243264 +0100
+@@ -1,6 +1,6 @@
+ #pragma once
  
- #include "util.h"
--#include "ext/polyclipping/clipper.hpp"
+-#include "polyclipping/clipper.hpp"
 +#include <polyclipping/clipper.hpp>
+ #include "geometry/Polygon2d.h"
  
- namespace libsvg {
+ #include <memory>
+Only in openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f/src/geometry: ClipperUtils.h~
+diff -ur openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f.orig/src/libsvg/shape.h openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f/src/libsvg/shape.h
+--- openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f.orig/src/libsvg/shape.h	2024-11-03 14:01:44.000000000 +0100
++++ openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f/src/libsvg/shape.h	2024-11-05 22:27:49.318089688 +0100
+@@ -38,7 +38,7 @@
  
---- openscad-2021.01/CMakeLists.txt.orig	2021-01-31 21:17:41.000000000 +0100
-+++ openscad-2021.01/CMakeLists.txt	2022-06-07 21:45:07.303640010 +0200
-@@ -403,6 +403,9 @@
-   endif()
- endif()
+ #include <boost/optional.hpp>
  
-+pkg_check_modules(polyclipping REQUIRED polyclipping)
-+list(APPEND COMMON_LIBRARIES ${polyclipping_LIBRARIES})
-+
- include_directories("src/ext/libtess2/Include")
- 
- # NOTE: To keep HEADLESS builds working, do NOT add Qt-dependent sources here,
-@@ -495,7 +497,6 @@
-   src/UserModule.cc
-   src/Tree.cc
-   src/ext/lodepng/lodepng.cpp
--  src/ext/polyclipping/clipper.cpp
-   src/ext/libtess2/Source/bucketalloc.c
-   src/ext/libtess2/Source/dict.c
-   src/ext/libtess2/Source/geom.c
+-#include "polyclipping/clipper.hpp"
++#include <polyclipping/clipper.hpp>
+ 
+ namespace libsvg {
+ class shape;
+Only in openscad-fd3a9aad2bcd913ac1830e11670f0a422231e43f/src/libsvg: shape.h~
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/openscad.git/commitdiff/feb23718df2d9bb10f749608aa235cde1eb08b09



More information about the pld-cvs-commit mailing list