]> git.pld-linux.org Git - packages/openscad.git/blob - openscad.spec
boost rebuild
[packages/openscad.git] / openscad.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build with tests
4
5 %ifarch x32
6 %undefine       with_tests
7 %endif
8 Summary:        The Programmers Solid 3D CAD Modeller
9 Name:           openscad
10 Version:        2021.01
11 Release:        3
12 # COPYING contains a linking exception for CGAL
13 # Appdata file is CC0
14 # Examples are CC0
15 License:        GPLv2 with exceptions and CC0
16 Group:          Applications/Engineering
17 Source0:        http://files.openscad.org/%{name}-%{version}.src.tar.gz
18 # Source0-md5:  79f8e3a42bcfeeb3ddde9e5bc2311f76
19 Patch0:         %{name}-polyclipping.patch
20 Patch1:         localedir.patch
21 Patch2:         tests.patch
22 URL:            http://www.openscad.org/
23 BuildRequires:  CGAL-devel >= 4.9
24 %{?with_tests:BuildRequires:    ImageMagick}
25 %{?with_tests:BuildRequires:    ImageMagick-coder-png}
26 %{?with_tests:BuildRequires:    Mesa-dri-driver-swrast}
27 BuildRequires:  Qt5Concurrent-devel
28 BuildRequires:  Qt5DBus-devel
29 BuildRequires:  Qt5Multimedia-devel
30 BuildRequires:  Qt5Network-devel
31 BuildRequires:  Qt5PrintSupport-devel
32 BuildRequires:  bison >= 2.4
33 BuildRequires:  boost-devel >= 1.35
34 BuildRequires:  cmake >= 3.3
35 BuildRequires:  desktop-file-utils
36 BuildRequires:  double-conversion-devel
37 BuildRequires:  eigen3
38 BuildRequires:  flex >= 2.5.35
39 BuildRequires:  fontconfig-devel >= 2.10
40 BuildRequires:  freetype-devel >= 2.4
41 BuildRequires:  gettext
42 BuildRequires:  glew-devel >= 1.6
43 BuildRequires:  glib2-devel
44 BuildRequires:  gmp-devel >= 5.0.0
45 BuildRequires:  harfbuzz-devel >= 0.9.19
46 BuildRequires:  lib3mf-devel >= 1.8.1
47 BuildRequires:  libxml2-devel
48 BuildRequires:  libzip-devel
49 BuildRequires:  mpfr-devel >= 3.0.0
50 BuildRequires:  opencsg-devel >= 1.3.2
51 BuildRequires:  pkgconfig
52 BuildRequires:  polyclipping-devel >= 6.1.3
53 BuildRequires:  procps
54 BuildRequires:  python
55 BuildRequires:  qscintilla2-qt5-devel >= 2.11.2
56 BuildRequires:  qt5-build
57 BuildRequires:  rpm-build >= 4.6
58 BuildRequires:  rpmbuild(macros) >= 2.016
59 %{?with_tests:BuildRequires:    xorg-xserver-Xvfb}
60 Requires:       font(liberationmono)
61 Requires:       font(liberationsans)
62 Requires:       font(liberationserif)
63 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
65 ### LICENSES:
66
67 ##  LGPLv2+:
68 #   2Dshapes.scad
69 #   3d_triangle.scad
70 #   fonts.scad
71 #   gridbeam.scad
72 #   hardware.scad
73 #   libtriangles.scad
74 #   multiply.scad
75 #   shapes.scad
76 #   screw.scad
77
78 ##  LGPLv2:
79 #   gears.scad
80 #   involute_gears.scad
81 #   servos.scad
82 #   transformations.scad
83 #   triangles.scad
84 #   unregular_shapes.scad
85 #   bitmap/letter_necklace.scad
86
87 ##  LGPLv3+:
88 #   teardrop.scad
89
90 ##  GPLv3 or LGPLv2:
91 #   motors.scad
92 #   nuts_and_bolts.scad
93
94
95 ##  GPLv3+ or LGPLv2:
96 #   metric_fastners.scad
97 #   regular_shapes.scad
98
99 ##  CC-BY-SA or LGPLv2+:
100 #   bearing.scad
101 #   materials.scad
102 #   stepper.scad
103 #   utilities.scad
104
105 ##  CC-BY-SA or LGPLv2:
106 #   units.scad
107
108 ##  CC-BY:
109 #   polyholes.scad
110 #   bitmap/alphabet_block.scad
111 #   bitmap/bitmap.scad
112 #   bitmap/height_map.scad
113 #   bitmap/name_tag.scad
114
115 ## BSD
116 #   boxes.scad
117
118 ## MIT
119 #   constants.scad
120 #   curves.scad
121 #   math.scad
122
123 ## Public Domain
124 #   lego_compatibility.scad
125 #   trochoids.scad
126
127 ###############################################
128
129 %description
130 OpenSCAD is a software for creating solid 3D CAD objects. Unlike most
131 free software for creating 3D models (such as the famous application
132 Blender) it does not focus on the artistic aspects of 3D modeling but
133 instead on the CAD aspects. Thus it might be the application you are
134 looking for when you are planning to create 3D models of machine parts
135 but pretty sure is not what you are looking for when you are more
136 interested in creating computer-animated movies.
137
138 %package MCAD
139 Summary:        OpenSCAD Parametric CAD Library
140 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
141 URL:            https://www.github.com/openscad/MCAD
142 Requires:       %{name} = %{version}-%{release}
143 BuildArch:      noarch
144
145 %description    MCAD
146 This library contains components commonly used in designing and
147 moching up mechanical designs. It is currently unfinished and you can
148 expect some API changes, however many things are already working.
149
150 %prep
151 %setup -q
152 %patch0 -p1
153 %patch1 -p1
154 %patch2 -p1
155
156 # use system package
157 %{__rm} -r src/ext/polyclipping
158
159 %build
160 %{qmake_qt5} \
161         PREFIX=%{_prefix} \
162         CONFIG+=experimental
163 %{__make}
164
165 %if %{with tests}
166 export OPENSCAD_BINARY=$(pwd)/openscad
167 cd tests
168 %cmake .
169 %{__make}
170 %{__make} -j1 test
171 %endif
172
173 %install
174 rm -rf $RPM_BUILD_ROOT
175 %{__make} install \
176         INSTALL_ROOT=$RPM_BUILD_ROOT
177
178 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/libraries/MCAD/lgpl-2.1.txt
179 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/libraries/MCAD/README.markdown
180 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/libraries/MCAD/TODO
181 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}/fonts
182
183 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{%{name},}/locale
184
185 %find_lang %{name}
186
187 %clean
188 rm -rf $RPM_BUILD_ROOT
189
190 %files -f %{name}.lang
191 %defattr(644,root,root,755)
192 %doc README.md RELEASE_NOTES.md
193 %attr(755,root,root) %{_bindir}/%{name}
194 %{_datadir}/metainfo/*.xml
195 %{_desktopdir}/%{name}.desktop
196 %{_iconsdir}/hicolor/*x*/apps/openscad.png
197 %{_datadir}/mime/packages/%{name}.xml
198 %dir %{_datadir}/%{name}
199 %{_datadir}/%{name}/examples
200 %{_datadir}/%{name}/color-schemes
201 %dir %{_datadir}/%{name}/libraries
202 %{_datadir}/%{name}/templates
203 %{_mandir}/man1/*
204
205 %files MCAD
206 %defattr(644,root,root,755)
207 %doc libraries/MCAD/README.markdown libraries/MCAD/TODO
208 %{_datadir}/%{name}/libraries/MCAD
This page took 0.156829 seconds and 4 git commands to generate.