]>
Commit | Line | Data |
---|---|---|
70b8ddd8 AM |
1 | Summary: Library for Constructive Solid Geometry using OpenGL |
2 | Name: opencsg | |
3 | Version: 1.4.0 | |
e0b38126 | 4 | Release: 5 |
70b8ddd8 | 5 | # license.txt contains a linking exception for CGAL |
7b8520f7 ER |
6 | License: GPL v2 with exceptions |
7 | Group: Libraries | |
70b8ddd8 AM |
8 | Source0: http://www.opencsg.org/OpenCSG-%{version}.tar.gz |
9 | # Source0-md5: e7fe5fa2bfa1b466f470699da41eb0a2 | |
7b8520f7 | 10 | URL: http://www.opencsg.org/ |
70b8ddd8 AM |
11 | Patch0: %{name}-build.patch |
12 | BuildRequires: dos2unix | |
70b8ddd8 | 13 | BuildRequires: glew-devel |
d46bdf3d | 14 | BuildRequires: libstdc++-devel |
7b8520f7 ER |
15 | BuildRequires: qt4-qmake |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
70b8ddd8 AM |
17 | |
18 | %description | |
19 | OpenCSG is a library that does image-based CSG rendering using OpenGL. | |
20 | ||
21 | CSG is short for Constructive Solid Geometry and denotes an approach | |
22 | to model complex 3D-shapes using simpler ones. I.e., two shapes can be | |
23 | combined by taking the union of them, by intersecting them, or by | |
24 | subtracting one shape of the other. The most basic shapes, which are | |
25 | not result of such a CSG operation, are called primitives. Primitives | |
26 | must be solid, i.e., they must have a clearly defined interior and | |
27 | exterior. By construction, a CSG shape is also solid then. | |
28 | ||
29 | Image-based CSG rendering (also z-buffer CSG rendering) is a term that | |
30 | denotes algorithms for rendering CSG shapes without an explicit | |
31 | calculation of the geometric boundary of a CSG shape. Such algorithms | |
32 | use frame-buffer settings of the graphics hardware, e.g., the depth | |
33 | and stencil buffer, to compose CSG shapes. OpenCSG implements a | |
34 | variety of those algorithms, namely the Goldfeather algorithm and the | |
35 | SCS algorithm, both of them in several variants. | |
36 | ||
37 | %package devel | |
38 | Summary: OpenCSG development files | |
39 | Group: Development/Libraries | |
7b8520f7 | 40 | Requires: %{name} = %{version}-%{release} |
70b8ddd8 AM |
41 | |
42 | %description devel | |
43 | Development files for OpenCSG. | |
44 | ||
45 | %prep | |
46 | %setup -q -n OpenCSG-%{version} | |
47 | %patch0 -p1 | |
48 | ||
49 | rm src/Makefile RenderTexture/Makefile Makefile example/Makefile | |
50 | dos2unix license.txt | |
51 | # New FSF Address | |
7b8520f7 ER |
52 | for FILE in src/*.h src/*.cpp include/opencsg.h; do |
53 | sed -i s/"59 Temple Place, Suite 330, Boston, MA 02111-1307 USA"/"51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"/ $FILE | |
70b8ddd8 AM |
54 | done |
55 | ||
7b8520f7 ER |
56 | # no bundled glew |
57 | rm -rf glew | |
70b8ddd8 AM |
58 | |
59 | %build | |
60 | qmake-qt4 | |
61 | %{__make} | |
62 | ||
7b8520f7 ER |
63 | rm lib/libopencsg.so.1.4 |
64 | chmod g-w lib/* | |
65 | ||
70b8ddd8 AM |
66 | %install |
67 | rm -rf $RPM_BUILD_ROOT | |
7b8520f7 ER |
68 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}} |
69 | cp -pP lib/* $RPM_BUILD_ROOT%{_libdir} | |
70 | cp -p include/opencsg.h $RPM_BUILD_ROOT%{_includedir} | |
70b8ddd8 | 71 | |
7b8520f7 ER |
72 | %post -p /sbin/ldconfig |
73 | %postun -p /sbin/ldconfig | |
74 | ||
75 | %clean | |
76 | rm -rf $RPM_BUILD_ROOT | |
70b8ddd8 AM |
77 | |
78 | %files | |
79 | %defattr(644,root,root,755) | |
80 | %doc changelog.txt doc license.txt | |
7b8520f7 | 81 | %attr(755,root,root) %{_libdir}/libopencsg.so.*.*.* |
70b8ddd8 AM |
82 | %attr(755,root,root) %ghost %{_libdir}/libopencsg.so.1 |
83 | ||
84 | %files devel | |
85 | %defattr(644,root,root,755) | |
7b8520f7 | 86 | %{_includedir}/opencsg.h |
70b8ddd8 | 87 | %attr(755,root,root) %{_libdir}/libopencsg.so |