openscad/openscad.spec

236 lines
6.4 KiB
RPMSpec
Raw Permalink Normal View History

2012-12-11 01:07:34 +00:00
Name: openscad
Version: 2021.01
%global upversion %{version}
Release: %autorelease
2012-12-11 01:07:34 +00:00
Summary: The Programmers Solid 3D CAD Modeller
# COPYING contains a linking exception for CGAL
# Appdata file is CC0
# Examples are CC0
2013-12-28 00:17:24 +00:00
License: GPLv2 with exceptions and CC0
2015-03-17 17:39:47 +00:00
URL: http://www.%{name}.org/
Source0: http://files.%{name}.org/%{name}-%{upversion}.src.tar.gz
2015-02-22 15:02:27 +00:00
Patch0: %{name}-polyclipping.patch
2021-08-02 14:38:52 +00:00
# CGAL 5.3 fixes from https://github.com/openscad/openscad/pull/3844
Patch1: %{name}-cgal5.3.patch
# Upstream backports:
%global github https://github.com/openscad/openscad
# https://github.com/openscad/openscad/commit/9b79576c1ee9d57d0f4a5de5c1365bb87c548f36
Patch2: %{name}-2021.01-fix-overloaded-join.patch
# https://github.com/openscad/openscad/commit/71f2831c0484c3f35cbf44e1d1dc2c857384100b
Patch3: %{name}-2021.01-cgal-build-fix.patch
# https://github.com/openscad/openscad/commit/770e3234cbfe66edbc0333f796b46d36a74aa652
Patch4: CVE-2022-0496.patch
# https://github.com/openscad/openscad/commit/84addf3c1efbd51d8ff424b7da276400bbfa1a4b
Patch5: CVE-2022-0497.patch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
BuildRequires: CGAL-devel >= 3.6
BuildRequires: ImageMagick
BuildRequires: Xvfb
2012-12-11 01:07:34 +00:00
BuildRequires: bison >= 2.4
BuildRequires: boost-devel >= 1.35
BuildRequires: cairo-devel
BuildRequires: desktop-file-utils
BuildRequires: double-conversion-devel
2014-03-09 23:38:37 +00:00
BuildRequires: eigen3-devel
BuildRequires: flex >= 2.5.35
BuildRequires: freetype-devel >= 2.4
BuildRequires: fontconfig-devel >= 2.10
2018-02-20 15:12:52 +00:00
BuildRequires: gcc-c++
BuildRequires: gettext
BuildRequires: git-core
2012-12-11 01:07:34 +00:00
BuildRequires: glew-devel >= 1.6
BuildRequires: glib2-devel
BuildRequires: gmp-devel >= 5.0.0
BuildRequires: harfbuzz-devel >= 0.9.19
BuildRequires: libspnav-devel
2019-02-15 21:06:34 +00:00
BuildRequires: libxml2-devel
BuildRequires: make
BuildRequires: mesa-dri-drivers
BuildRequires: mpfr-devel >= 3.0.0
2012-12-11 01:07:34 +00:00
BuildRequires: opencsg-devel >= 1.3.2
2015-03-17 17:39:47 +00:00
BuildRequires: polyclipping-devel >= 6.1.3
BuildRequires: procps-ng
2019-02-15 21:06:34 +00:00
BuildRequires: python3-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtgamepad-devel
BuildRequires: qt5-qtmultimedia-devel
BuildRequires: qscintilla-qt5-devel
2019-02-15 21:06:34 +00:00
BuildRequires: pkgconfig(libzip)
Requires: font(liberationmono)
Requires: font(liberationsans)
Requires: font(liberationserif)
Requires: hicolor-icon-theme
2016-09-18 13:01:01 +00:00
Recommends: %{name}-MCAD = %{version}-%{release}
2012-12-11 01:07:34 +00:00
%bcond_without 3mf
2020-05-05 16:07:20 +00:00
%if %{with 3mf}
BuildRequires: lib3mf-devel
%endif
2012-12-11 01:07:34 +00:00
%description
OpenSCAD is a software for creating solid 3D CAD objects.
Unlike most free software for creating 3D models (such as the famous
application Blender) it does not focus on the artistic aspects of 3D
modeling but instead on the CAD aspects. Thus it might be the application
you are looking for when you are planning to create 3D models of machine
parts but pretty sure is not what you are looking for when you are more
interested in creating computer-animated movies.
###############################################
%package MCAD
Summary: OpenSCAD Parametric CAD Library
License: LGPLv2+ and LGPLv2 and LGPLv3+ and (GPLv3 or LGPLv2) and (GPLv3+ or LGPLv2) and (CC-BY-SA or LGPLv2+) and (CC-BY-SA or LGPLv2) and CC-BY and BSD and MIT and Public Domain
URL: https://www.github.com/openscad/MCAD
2015-02-22 16:09:47 +00:00
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description MCAD
This library contains components commonly used in designing and moching up
mechanical designs. It is currently unfinished and you can expect some API
changes, however many things are already working.
### LICENSES:
## LGPLv2+:
# 2Dshapes.scad
# 3d_triangle.scad
# fonts.scad
# gridbeam.scad
# hardware.scad
# libtriangles.scad
# multiply.scad
# shapes.scad
# screw.scad
## LGPLv2:
# gears.scad
# involute_gears.scad
# servos.scad
# transformations.scad
# triangles.scad
# unregular_shapes.scad
# bitmap/letter_necklace.scad
## LGPLv3+:
# teardrop.scad
## GPLv3 or LGPLv2:
# motors.scad
# nuts_and_bolts.scad
## GPLv3+ or LGPLv2:
# metric_fastners.scad
# regular_shapes.scad
## CC-BY-SA or LGPLv2+:
# bearing.scad
# materials.scad
# stepper.scad
# utilities.scad
## CC-BY-SA or LGPLv2:
# units.scad
## CC-BY:
# polyholes.scad
# bitmap/alphabet_block.scad
# bitmap/bitmap.scad
# bitmap/height_map.scad
# bitmap/name_tag.scad
## BSD
# boxes.scad
## MIT
# constants.scad
# curves.scad
# math.scad
## Public Domain
# lego_compatibility.scad
# trochoids.scad
###############################################
2012-12-11 01:07:34 +00:00
%prep
%autosetup -n %{name}-%{upversion} -p1 -S git
2012-12-11 01:07:34 +00:00
2015-02-22 15:02:27 +00:00
# Unbundle polyclipping
2019-02-15 21:06:34 +00:00
rm src/ext/polyclipping -rf
2015-02-22 15:02:27 +00:00
# Remove unwanted things from MCAD, such as nonworking Python tests
pushd libraries/MCAD
2019-02-15 21:06:34 +00:00
for FILE in *.py; do
rm -r $FILE
done
mv bitmap/README bitmap-README
popd
# Tests cmake check for MCAD by probing libraries/MCAD/__init__.py
# But we've just removed it
sed -i 's@MCAD/__init__.py@MCAD/gears.scad@' tests/CMakeLists.txt
2012-12-11 01:07:34 +00:00
%build
%{qmake_qt5} PREFIX=%{_prefix} VERSION=%{upversion} CONFIG-=debug
2019-02-12 20:20:10 +00:00
%make_build
2012-12-11 01:07:34 +00:00
2013-01-27 22:22:03 +00:00
# tests
cd tests
cmake -DPYTHON_EXECUTABLE:STRING=%{python3} .
2019-02-12 20:20:10 +00:00
%make_build
2013-01-27 22:22:03 +00:00
cd -
2012-12-11 01:07:34 +00:00
%install
2013-01-27 21:37:18 +00:00
make install INSTALL_ROOT=%{buildroot}
rm -rf %{buildroot}%{_datadir}/%{name}/fonts
%find_lang %{name}
for FILE in .gitignore lgpl-2.1.txt README.markdown TODO bitmap-README; do
rm %{buildroot}%{_datadir}/%{name}/libraries/MCAD/$FILE
done
2013-06-19 16:16:06 +00:00
2012-12-11 01:07:34 +00:00
%check
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
2013-01-27 21:37:18 +00:00
# tests
cd tests
ctest %{?_smp_mflags} || : # let the tests fail, as they probably won't work in Koji
2013-01-27 21:37:18 +00:00
cd -
%files -f %{name}.lang
%license COPYING
2019-02-15 21:06:34 +00:00
%doc README.md RELEASE_NOTES.md
2012-12-11 01:07:34 +00:00
%attr(755,root,root) %{_bindir}/%{name}
2019-02-15 21:06:34 +00:00
%{_datadir}/metainfo/*.xml
2012-12-11 01:07:34 +00:00
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/mime/packages/%{name}.xml
2012-12-11 01:07:34 +00:00
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/examples/
%{_datadir}/%{name}/color-schemes/
%dir %{_datadir}/%{name}/locale
2012-12-11 01:07:34 +00:00
%dir %{_datadir}/%{name}/libraries
%{_datadir}/%{name}/templates/
2012-12-11 01:07:34 +00:00
%{_mandir}/man1/*
%files MCAD
%license libraries/MCAD/lgpl-2.1.txt
%doc libraries/MCAD/README.markdown
%doc libraries/MCAD/TODO
%doc libraries/MCAD/bitmap-README
%dir %{_datadir}/%{name}/libraries/MCAD
%dir %{_datadir}/%{name}/libraries/MCAD/bitmap
%{_datadir}/%{name}/libraries/MCAD/*.scad
%{_datadir}/%{name}/libraries/MCAD/bitmap/*.scad
2012-12-11 01:07:34 +00:00
%changelog
%autochangelog