SHA256
1
0
forked from pool/openscad

Accepting request 986708 from home:cgiboudeaux:branches:graphics

Fix build

OBS-URL: https://build.opensuse.org/request/show/986708
OBS-URL: https://build.opensuse.org/package/show/graphics/openscad?expand=0&rev=46
This commit is contained in:
Stefan Brüns 2022-07-05 00:01:41 +00:00 committed by Git OBS Bridge
parent 76ec0815d7
commit 408786492d
3 changed files with 49 additions and 30 deletions

View File

@ -4,19 +4,31 @@ Upstream: modified from upstream commits
- c32efe043a65b7fd761751c8edb56f8deb6a9ed5
- 71f2831c0484c3f35cbf44e1d1dc2c857384100b
Index: openscad-2021.01/src/cgalutils-tess.cc
===================================================================
--- openscad-2021.01.orig/src/cgalutils-tess.cc
+++ openscad-2021.01/src/cgalutils-tess.cc
@@ -6,7 +6,10 @@
diff --git a/src/cgalutils-tess.cc b/src/cgalutils-tess.cc
index ec1cc1e..fb709fc 100644
--- a/src/cgalutils-tess.cc
+++ b/src/cgalutils-tess.cc
@@ -6,10 +6,12 @@
#pragma push_macro("NDEBUG")
#undef NDEBUG
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
-#if CGAL_VERSION_NR >= CGAL_VERSION_NUMBER(4,11,0)
+#if CGAL_VERSION_NR >= CGAL_VERSION_NUMBER(5,4,0)
- #include <CGAL/Triangulation_2_projection_traits_3.h>
+#if CGAL_VERSION_NR < CGAL_VERSION_NUMBER(5, 4, 0)
+#include <CGAL/Triangulation_2_projection_traits_3.h>
+typedef CGAL::Triangulation_2_filtered_projection_traits_3<K> Projection;
#else
- #include <CGAL/Triangulation_2_filtered_projection_traits_3.h>
+#include <CGAL/Projection_traits_3.h>
+typedef CGAL::Filtered_projection_traits_3<K> Projection;
+#elif CGAL_VERSION_NR >= CGAL_VERSION_NUMBER(4,11,0)
#include <CGAL/Triangulation_2_projection_traits_3.h>
#else
#include <CGAL/Triangulation_2_filtered_projection_traits_3.h>
#endif
#include <CGAL/Triangulation_face_base_with_info_2.h>
#pragma pop_macro("NDEBUG")
@@ -19,7 +21,6 @@ struct FaceInfo {
bool in_domain() { return nesting_level%2 == 1; }
};
-typedef CGAL::Triangulation_2_filtered_projection_traits_3<K> Projection;
typedef CGAL::Triangulation_face_base_with_info_2<FaceInfo, K> Fbb;
typedef CGAL::Triangulation_data_structure_2<
CGAL::Triangulation_vertex_base_2<Projection>,

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jul 4 10:02:04 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Rebase fix_build_with_cgal-5.4.patch
- Spec cleanup
-------------------------------------------------------------------
Sun Apr 3 07:42:33 UTC 2022 - Samu Voutilainen <smar@smar.fi>

View File

@ -24,19 +24,15 @@ License: GPL-3.0-or-later
Group: Productivity/Graphics/CAD
URL: https://www.openscad.org/
Source: https://files.openscad.org/%{name}-%{version}.src.tar.gz
Patch1: fix_build_with_cgal-5.3.patch
Patch2: CVE-2022-0496.patch
Patch3: CVE-2022-0497.patch
Patch4: fix_build_with_cgal-5.4.patch
Patch5: fix_build_issue_with_overloaded_join.patch
Patch0: fix_build_with_cgal-5.3.patch
Patch1: CVE-2022-0496.patch
Patch2: CVE-2022-0497.patch
Patch3: fix_build_with_cgal-5.4.patch
Patch4: fix_build_issue_with_overloaded_join.patch
BuildRequires: bison
BuildRequires: double-conversion-devel
BuildRequires: eigen3-devel
BuildRequires: flex
BuildRequires: fontconfig-devel
BuildRequires: freetype2-devel
BuildRequires: gcc-c++
BuildRequires: harfbuzz-devel
BuildRequires: libboost_filesystem-devel
BuildRequires: libboost_program_options-devel
BuildRequires: libboost_regex-devel
@ -44,7 +40,7 @@ BuildRequires: libboost_thread-devel
# Upstream has dropped pre-cgal-5.0 support and with that, reworked
# CGAL integration fully.
# Backporting relevant patches does not make sense.
BuildRequires: libcgal-devel < 5.4
BuildRequires: libcgal-devel > 5.0
BuildRequires: libqscintilla-qt5-devel
BuildRequires: libspnav-devel
BuildRequires: memory-constraints
@ -53,10 +49,17 @@ BuildRequires: pkgconfig
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Gamepad)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Multimedia)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(cairo) > 1.14
BuildRequires: pkgconfig(eigen3)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(harfbuzz)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(libzip)
# With v2019.05, openGL is required but Arm uses openGL ES
@ -69,26 +72,24 @@ creation of, say, computer-animated movies, but instead on the CAD
aspects, e.g. modelling of machine parts.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%autosetup -p1
%build
%qmake5 PREFIX=%{_prefix} CONFIG+=qopenglwidget CONFIG+=c++14
%qmake5 PREFIX=%{_prefix} CONFIG+=qopenglwidget
# As of 08.05.2021, memoryperjob constraint is not working correctly,
# so limit memory per job here.
%limit_build -m 2500
%make_build
%install
make INSTALL_ROOT=%{buildroot} install
%qmake5_install
install -D -m 0644 doc/openscad.1 %{buildroot}%{_mandir}/man1/openscad.1
# remove bundled liberation fonts
rm -rf %{buildroot}%{_datadir}/openscad/fonts
rm -r %{buildroot}%{_datadir}/openscad/fonts
%find_lang %{name}
rm %{buildroot}%{_datadir}/openscad/libraries/MCAD/.gitignore