]>
Commit | Line | Data |
---|---|---|
ab30c910 | 1 | # TODO |
81af62ee | 2 | # - optflags |
65399283 | 3 | # - move qt stuff to subpackages? |
81af62ee JB |
4 | # |
5 | # Conditional build: | |
6 | %bcond_with examples # demo+examples build | |
7 | %bcond_with qt3 # CGAL_Qt3 library | |
ab30c910 | 8 | |
81af62ee JB |
9 | %define boost_ver 1.48 |
10 | %define qt5_ver 5.3 | |
d4e9703c | 11 | Summary: Computational Geometry Algorithms Library |
e82f90c6 | 12 | Summary(pl.UTF-8): Computational Geometry Algorithms Library - biblioteka algorytmów geometrii obliczeniowej |
d4e9703c | 13 | Name: CGAL |
9acf2884 | 14 | Version: 4.7 |
9a0c4f68 | 15 | Release: 9 |
81af62ee | 16 | License: GPL v3+ and LGPL v3+ |
d4e9703c | 17 | Group: Libraries |
9acf2884 JR |
18 | Source0: https://github.com/CGAL/releases/archive/%{name}-%{version}.tar.gz |
19 | # Source0-md5: 50b29d3f3372cd93aaa31d01f0e45036 | |
68d6bebe | 20 | Patch0: %{name}-buildtype.patch |
fcd3e9d3 | 21 | URL: http://www.cgal.org/ |
ab30c910 | 22 | BuildRequires: OpenGL-GLU-devel |
81af62ee JB |
23 | BuildRequires: Qt5Core-devel >= %{qt5_ver} |
24 | BuildRequires: Qt5Gui-devel >= %{qt5_ver} | |
25 | BuildRequires: Qt5OpenGL-devel >= %{qt5_ver} | |
26 | BuildRequires: Qt5Svg-devel >= %{qt5_ver} | |
27 | BuildRequires: Qt5Widgets-devel >= %{qt5_ver} | |
28 | BuildRequires: boost-devel >= %{boost_ver} | |
29 | BuildRequires: cmake >= 2.8.11 | |
30 | BuildRequires: gmp-devel >= 4.1.4 | |
31 | BuildRequires: libstdc++-devel | |
32 | BuildRequires: mpfr-devel >= 2.2.1 | |
33 | BuildRequires: qt5-build >= %{qt5_ver} | |
34 | BuildRequires: qt5-qmake >= %{qt5_ver} | |
63aecd1f | 35 | BuildRequires: rpmbuild(macros) >= 1.605 |
23c63792 | 36 | BuildRequires: sed >= 4.0 |
d4e9703c | 37 | BuildRequires: zlib-devel |
81af62ee JB |
38 | %if %{with qt3} |
39 | BuildRequires: qt-devel >= 3 | |
40 | BuildRequires: xorg-lib-libX11-devel | |
41 | BuildRequires: xorg-lib-libXext-devel | |
42 | %endif | |
43 | %if %{with examples} | |
44 | BuildRequires: blas-devel | |
45 | BuildRequires: eigen3 >= 3.1.91 | |
46 | BuildRequires: gmp-c++-devel >= 4.1.4 | |
47 | BuildRequires: lapack-devel | |
48 | BuildRequires: tbb | |
49 | #TODO: mpfi QGLViewer ipelib | |
50 | %endif | |
d4e9703c | 51 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
52 | ||
53 | %description | |
54 | Libraries for CGAL applications. CGAL is a collaborative effort of | |
55 | several sites in Europe and Israel. The goal is to make the most | |
56 | important of the solutions and methods developed in computational | |
57 | geometry available to users in industry and academia in a C++ library. | |
58 | The goal is to provide easy access to useful, reliable geometric | |
59 | algorithms. | |
60 | ||
e82f90c6 JB |
61 | %description -l pl.UTF-8 |
62 | Biblioteka dla aplikacji CGAL (Computational Geometry Algorithms | |
63 | Library). CGAL to wspólny projekt kilku placówek w Europie i Izraelu. | |
64 | Celem jest udostępnienie najważniejszych rozwiązań i metod powstałych | |
65 | w geometrii obliczeniowej dla użytkowników przemysłowych i naukowych w | |
66 | postaci biblioteki C++. Ma ona za zadanie zapewniać łatwy dostęp do | |
67 | przydatnych, wiarygodnych algorytmów geometrycznych. | |
68 | ||
d4e9703c | 69 | %package devel |
70 | Summary: Development files and tools for CGAL applications | |
e82f90c6 | 71 | Summary(pl.UTF-8): Pliki i narzędzia programistyczne dla aplikacji CGAL |
d4e9703c | 72 | Group: Development/Libraries |
d4e9703c | 73 | Requires: %{name} = %{version}-%{release} |
81af62ee JB |
74 | Requires: boost-devel >= %{boost_ver} |
75 | Requires: libstdc++-devel | |
76 | # for Qt5 component | |
77 | Requires: Qt5Core-devel >= %{qt5_ver} | |
78 | Requires: Qt5Gui-devel >= %{qt5_ver} | |
79 | Requires: Qt5OpenGL-devel >= %{qt5_ver} | |
80 | Requires: Qt5Widgets-devel >= %{qt5_ver} | |
81 | # for Qt3 component | |
82 | %if %{with qt3} | |
83 | Requires: qt-devel >= 3 | |
84 | %endif | |
85 | # CGAL header interfaces for (using their headers) - use Suggests? | |
86 | Requires: gmp-c++-devel >= 4.1.4 | |
87 | Requires: gmp-devel >= 4.1.4 | |
88 | Requires: mpfr-devel >= 2.2.1 | |
89 | #Suggests: eigen3 >= 3.1 gsl-devel tbb-devel vtk-devel | |
90 | #Suggests(TODO): <rs_exports.h> <rs3_fncts.h> <taucs.h> <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh> <NTL/ZZX.h> <mpfi.h> <LEDA/*.h> <ipelib.h> | |
91 | Requires: zlib-devel | |
92 | # CGAL header interfaces for (without using their headers) - use Suggests? | |
d4e9703c | 93 | Requires: blas-devel |
94 | Requires: lapack-devel | |
23c63792 | 95 | |
d4e9703c | 96 | %description devel |
e82f90c6 JB |
97 | This package provides the header files and tools you may need to |
98 | develop applications using CGAL. | |
99 | ||
100 | %description devel -l pl.UTF-8 | |
101 | Ten pakiet zawiera pliki nagłówkowe i narzędzia potrzebne do tworzenia | |
102 | aplikacji wykorzystujących CGAL. | |
d4e9703c | 103 | |
d4e9703c | 104 | %package demos-source |
105 | Summary: Examples and demos of CGAL algorithms | |
e82f90c6 | 106 | Summary(pl.UTF-8): Przykłady i programy demonstracyjne do algorytmów CGAL |
d4e9703c | 107 | Group: Documentation |
108 | Requires: %{name}-devel = %{version}-%{release} | |
109 | ||
110 | %description demos-source | |
e82f90c6 JB |
111 | This package provides the sources of examples and demos of CGAL |
112 | algorithms. | |
113 | ||
114 | %description demos-source -l pl.UTF-8 | |
115 | Ten pakiet zawiera kod źrodłowy programów przykładowych i | |
116 | demonstracyjnych do algorytmów CGAL. | |
d4e9703c | 117 | |
d4e9703c | 118 | %prep |
9acf2884 | 119 | %setup -q -n releases-%{name}-%{version} |
68d6bebe | 120 | %patch0 -p1 |
d4e9703c | 121 | |
122 | %build | |
b2d9afe8 AM |
123 | install -d build |
124 | cd build | |
f7efb94b ER |
125 | # override build type, because: |
126 | # PLD is not a valid build type: only Release or Debug is allowed | |
81af62ee | 127 | %cmake .. \ |
68d6bebe JP |
128 | -DCGAL_CXX_FLAGS="%{rpmcxxflags} %{rpmcppflags}" \ |
129 | -DCGAL_SHARED_LINKER_FLAGS="%{rpmldflags}" \ | |
b2d9afe8 | 130 | -DCGAL_INSTALL_LIB_DIR=%{_lib} \ |
81af62ee JB |
131 | -DCGAL_INSTALL_DOC_DIR= \ |
132 | %{?with_qt3:-DWITH_CGAL_Qt3=ON} \ | |
133 | %if %{with examples} | |
134 | -DWITH_demos=ON \ | |
135 | -DWITH_examples=ON | |
136 | %endif | |
b2d9afe8 AM |
137 | |
138 | %{__make} | |
d4e9703c | 139 | |
140 | %install | |
141 | rm -rf $RPM_BUILD_ROOT | |
b2d9afe8 AM |
142 | %{__make} -C build install \ |
143 | DESTDIR=$RPM_BUILD_ROOT | |
d4e9703c | 144 | |
81af62ee JB |
145 | # useless in binary package |
146 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{cgal_create_CMakeLists,cgal_create_cmake_script,cgal_make_macosx_app} | |
147 | ||
d4e9703c | 148 | %clean |
149 | rm -rf $RPM_BUILD_ROOT | |
150 | ||
23c63792 ER |
151 | %post -p /sbin/ldconfig |
152 | %postun -p /sbin/ldconfig | |
d4e9703c | 153 | |
154 | %files | |
155 | %defattr(644,root,root,755) | |
81af62ee | 156 | %doc AUTHORS CHANGES LICENSE LICENSE.BSL LICENSE.FREE_USE LICENSE.LGPL |
b2d9afe8 AM |
157 | %attr(755,root,root) %{_libdir}/libCGAL.so.*.*.* |
158 | %attr(755,root,root) %ghost %{_libdir}/libCGAL.so.11 | |
159 | %attr(755,root,root) %{_libdir}/libCGAL_Core.so.*.*.* | |
160 | %attr(755,root,root) %ghost %{_libdir}/libCGAL_Core.so.11 | |
161 | %attr(755,root,root) %{_libdir}/libCGAL_ImageIO.so.*.*.* | |
162 | %attr(755,root,root) %ghost %{_libdir}/libCGAL_ImageIO.so.11 | |
81af62ee JB |
163 | %if %{with qt3} |
164 | %attr(755,root,root) %{_libdir}/libCGAL_Qt3.so.*.*.* | |
165 | %attr(755,root,root) %ghost %{_libdir}/libCGAL_Qt3.so.11 | |
166 | %endif | |
9acf2884 JR |
167 | %attr(755,root,root) %{_libdir}/libCGAL_Qt5.so.*.*.* |
168 | %attr(755,root,root) %ghost %{_libdir}/libCGAL_Qt5.so.11 | |
d4e9703c | 169 | |
170 | %files devel | |
171 | %defattr(644,root,root,755) | |
81af62ee JB |
172 | %attr(755,root,root) %{_libdir}/libCGAL.so |
173 | %attr(755,root,root) %{_libdir}/libCGAL_Core.so | |
174 | %attr(755,root,root) %{_libdir}/libCGAL_ImageIO.so | |
175 | %if %{with qt3} | |
176 | %attr(755,root,root) %{_libdir}/libCGAL_Qt3.so | |
177 | %endif | |
178 | %attr(755,root,root) %{_libdir}/libCGAL_Qt5.so | |
d4e9703c | 179 | %{_includedir}/CGAL |
b2d9afe8 | 180 | %{_libdir}/CGAL |
b2d9afe8 | 181 | %{_mandir}/man1/cgal_create_cmake_script.1* |