]> git.pld-linux.org Git - packages/cogl.git/blob - cogl.spec
793655d17a70a59856861174c329a0995166c8e2
[packages/cogl.git] / cogl.spec
1 #
2 # Conditional build
3 %bcond_without  static_libs     # static libraries
4 %bcond_without  gdkpixbuf       # gdk-pixbuf for image loading [instead of stb_image]
5 %bcond_without  gles1           # OpenGL-ES 1.1 driver support
6 %bcond_without  gles2           # OpenGL-ES 2.0 driver support
7 %bcond_without  kms             # KMS EGL platform support
8 %bcond_without  gstreamer       # GStreamer support
9 %bcond_with     mir             # Mir EGL platform support (conflicts with wayland)
10 %bcond_with     sdl1            # SDL 1.x winsys support (conflicts with sdl2)
11 %bcond_with     sdl2            # SDL2 winsys support (conflicts with sdl1)
12 %bcond_without  wayland         # Wayland EGL platform and server support
13
14 Summary:        A library for using 3D graphics hardware to draw pretty pictures
15 Summary(pl.UTF-8):      Biblioteka do rysowania ładnych obrazków przy użyciu sprzętowej grafiki 3D
16 Name:           cogl
17 Version:        1.22.6
18 Release:        1
19 License:        LGPL v2+
20 Group:          Libraries
21 Source0:        http://ftp.gnome.org/pub/GNOME/sources/cogl/1.22/%{name}-%{version}.tar.xz
22 # Source0-md5:  7bcc01edb5462d4d08d01bf893feddb0
23 Patch0:         %{name}-link.patch
24 # https://gitlab.gnome.org/GNOME/cogl/-/commit/ff5dfc658042115392d9215a40afab3636b8461a.diff
25 Patch1:         %{name}-egl.patch
26 URL:            http://www.clutter-project.org/
27 %{?with_wayland:BuildRequires:  EGL-devel}
28 %{?with_kms:BuildRequires:      Mesa-libgbm-devel}
29 BuildRequires:  OpenGL-GLX-devel
30 %{?with_gles1:BuildRequires:    OpenGLESv1-devel >= 1.1}
31 %{?with_sdl1:BuildRequires:     SDL-devel >= 1.2}
32 %{?with_sdl2:BuildRequires:     SDL2-devel >= 2}
33 BuildRequires:  autoconf >= 2.59
34 BuildRequires:  automake >= 1:1.14
35 BuildRequires:  cairo-devel >= 1.10
36 %{?with_gdkpixbuf:BuildRequires:        gdk-pixbuf2-devel >= 2.0}
37 BuildRequires:  gettext-tools >= 0.19
38 BuildRequires:  glib2-devel >= 1:2.32.0
39 BuildRequires:  gobject-introspection-devel >= 0.9.5
40 %{?with_gstreamer:BuildRequires:        gstreamer-devel >= 1.0}
41 %{?with_gstreamer:BuildRequires:        gstreamer-plugins-base-devel >= 1.0}
42 BuildRequires:  gtk-doc >= 1.13
43 BuildRequires:  libdrm-devel
44 BuildRequires:  libtool >= 2:2.2.6
45 # pkgconfig(mirclient)
46 %{?with_mir:BuildRequires:      mir-devel >= 0.9.0}
47 BuildRequires:  pango-devel >= 1:1.20
48 BuildRequires:  pkgconfig
49 BuildRequires:  tar >= 1:1.22
50 # wayland-client >= 1.0.0, wayland-server >= 1.1.90
51 %{?with_wayland:BuildRequires:  wayland-devel >= 1.2.0}
52 %{?with_wayland:BuildRequires:  wayland-egl-devel >= 1.0.0}
53 BuildRequires:  xorg-lib-libX11-devel
54 BuildRequires:  xorg-lib-libXcomposite-devel >= 0.4
55 BuildRequires:  xorg-lib-libXdamage-devel
56 BuildRequires:  xorg-lib-libXext-devel
57 BuildRequires:  xorg-lib-libXfixes-devel >= 3
58 BuildRequires:  xorg-lib-libXrandr-devel >= 1.2
59 BuildRequires:  xz
60 Requires:       cairo >= 1.10
61 Requires:       glib2 >= 1:2.32.0
62 Requires:       pango >= 1:1.20
63 %{?with_wayland:Requires:       wayland >= 1.2.0}
64 Requires:       xorg-lib-libXcomposite >= 0.4
65 Requires:       xorg-lib-libXfixes >= 3
66 Requires:       xorg-lib-libXrandr >= 1.2
67 Suggests:       OpenGL
68 %{?with_gles1:Provides: cogl(gles1) = %{version}-%{release}}
69 %{?with_gles2:Provides: cogl(gles2) = %{version}-%{release}}
70 %{?with_kms:Provides:   cogl(kms) = %{version}-%{release}}
71 %{?with_wayland:Provides:       cogl(wayland) = %{version}-%{release}}
72 Conflicts:      clutter < 1.8.0
73 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74
75 %description
76 Cogl is a small open source library for using 3D graphics hardware to
77 draw pretty pictures. The API departs from the flat state machine
78 style of OpenGL and is designed to make it easy to write orthogonal
79 components that can render without stepping on each others toes.
80
81 %description -l pl.UTF-8
82 Cogl to mała biblioteka o otwartych źródłach, pozwalająca na rysowanie
83 ładnych rysunków przy użyciu sprzętu graficznego 3D. API wywodzi się z
84 automatu skończonego w stylu OpenGL i zostało tak zaprojektowane, aby
85 ułatwić pisanie ortogonalnych komponentów, potrafiących renderować bez
86 przeszkadzania sobie nawzajem.
87
88 %package devel
89 Summary:        Header files for cogl library
90 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki cogl
91 Group:          Development/Libraries
92 Requires:       %{name} = %{version}-%{release}
93 %{?with_wayland:Requires:       EGL-devel}
94 %{?with_kms:Requires:   Mesa-libgbm-devel}
95 %{?with_wayland:Requires:       wayland-egl-devel >= 1.0.0}
96 Requires:       cairo-devel >= 1.10
97 %{?with_gdkpixbuf:Requires:     gdk-pixbuf2-devel >= 2.0}
98 Requires:       glib2-devel >= 1:2.32.0
99 Requires:       gobject-introspection-devel >= 0.9.5
100 Requires:       libdrm-devel
101 Requires:       pango-devel >= 1:1.20
102 %{?with_wayland:Requires:       wayland-devel >= 1.2.0}
103 Requires:       xorg-lib-libXcomposite-devel >= 0.4
104 Requires:       xorg-lib-libXdamage-devel
105 Requires:       xorg-lib-libXext-devel
106 Requires:       xorg-lib-libXfixes-devel >= 3
107 Requires:       xorg-lib-libXrandr-devel >= 1.2
108 %{?with_gles1:Provides: cogl-devel(gles1) = %{version}-%{release}}
109 %{?with_gles2:Provides: cogl-devel(gles2) = %{version}-%{release}}
110 %{?with_kms:Provides:   cogl-devel(kms) = %{version}-%{release}}
111 %{?with_wayland:Provides:       cogl-devel(wayland) = %{version}-%{release}}
112 Conflicts:      clutter-devel < 1.8.0
113
114 %description devel
115 Header files for building and developing applications with cogl.
116
117 %description devel -l pl.UTF-8
118 Pliki nagłówkowe do tworzenia aplikacji z użyciem biblioteki cogl.
119
120 %package static
121 Summary:        Static cogl libraries
122 Summary(pl.UTF-8):      Statyczne biblioteki cogl
123 Group:          Development/Libraries
124 Requires:       %{name}-devel = %{version}-%{release}
125 %{?with_gles1:Provides: cogl-static(gles1) = %{version}-%{release}}
126 %{?with_gles2:Provides: cogl-static(gles2) = %{version}-%{release}}
127 %{?with_kms:Provides:   cogl-static(kms) = %{version}-%{release}}
128 %{?with_wayland:Provides:       cogl-static(wayland) = %{version}-%{release}}
129 Conflicts:      clutter-static < 1.8.0
130
131 %description static
132 Static cogl libraries.
133
134 %description static -l pl.UTF-8
135 Statyczne biblioteki cogl.
136
137 %package doc
138 Summary:        API documentation for cogl
139 Summary(pl.UTF-8):      Dokumentacja API cogl
140 Group:          Documentation
141
142 %description doc
143 This package contains API documentation for cogl.
144
145 %description doc -l pl.UTF-8
146 Ten pakiet zawiera dokumentację API cogl.
147
148 %package gles2
149 Summary:        Cogl frontend library for OpenGL-ES 2.0
150 Summary(pl.UTF-8):      Biblioteka frontendowa Cogl dla OpenGL-ES 2.0
151 Group:          Libraries
152 Requires:       %{name}(gles2) = %{version}-%{release}
153
154 %description gles2
155 Cogl frontend library for OpenGL-ES 2.0.
156
157 %description gles2 -l pl.UTF-8
158 Biblioteka frontendowa Cogl dla OpenGL-ES 2.0.
159
160 %package gles2-devel
161 Summary:        Header files for cogl-gles2 library
162 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki cogl-gles2
163 Group:          Development/Libraries
164 Requires:       %{name}-devel(gles2) = %{version}-%{release}
165 Requires:       %{name}-gles2 = %{version}-%{release}
166
167 %description gles2-devel
168 Header files for cogl-gles2 library.
169
170 %description gles2-devel -l pl.UTF-8
171 Pliki nagłówkowe biblioteki cogl-gles2.
172
173 %package gles2-static
174 Summary:        Static cogl-gles2 library
175 Summary(pl.UTF-8):      Statyczna biblioteka cogl-gles2
176 Group:          Development/Libraries
177 Requires:       %{name}-gles2-devel = %{version}-%{release}
178
179 %description gles2-static
180 Static cogl-gles2 library.
181
182 %description gles2-static -l pl.UTF-8
183 Statyczna biblioteka cogl-gles2.
184
185 %package gst
186 Summary:        GStreamer integration library for Cogl
187 Summary(pl.UTF-8):      Biblioteka integrująca GStreamera z Cogl
188 Group:          Libraries
189 Requires:       %{name} = %{version}-%{release}
190
191 %description gst
192 GStreamer integration library for Cogl.
193
194 %description gst -l pl.UTF-8
195 Biblioteka integrująca GStreamera z Cogl.
196
197 %package gst-devel
198 Summary:        Header files for cogl-gst library
199 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki cogl-gst
200 Group:          Development/Libraries
201 Requires:       %{name}-devel = %{version}-%{release}
202 Requires:       %{name}-gst = %{version}-%{release}
203 Requires:       gstreamer-devel >= 1.0
204 Requires:       gstreamer-plugins-base-devel >= 1.0
205
206 %description gst-devel
207 Header files for cogl-gst library.
208
209 %description gst-devel -l pl.UTF-8
210 Pliki nagłówkowe biblioteki cogl-gst.
211
212 %package gst-static
213 Summary:        Static cogl-gst library
214 Summary(pl.UTF-8):      Statyczna biblioteka cogl-gst
215 Group:          Development/Libraries
216 Requires:       %{name}-gst-devel = %{version}-%{release}
217
218 %description gst-static
219 Static cogl-gst library.
220
221 %description gst-static -l pl.UTF-8
222 Statyczna biblioteka cogl-gst.
223
224 %package gst-apidocs
225 Summary:        API documentation for cogl-gst library
226 Summary(pl.UTF-8):      Dokumentacja API biblioteki cogl-gst
227 Group:          Documentation
228 %if "%{_rpmversion}" >= "5"
229 BuildArch:      noarch
230 %endif
231
232 %description gst-apidocs
233 API documentation for cogl-gst library.
234
235 %description gst-apidocs -l pl.UTF-8
236 Dokumentacja API biblioteki cogl-gst.
237
238 %prep
239 %setup -q
240 %patch0 -p1
241 %patch1 -p1
242
243 %build
244 %{__gettextize}
245 %{__libtoolize}
246 %{__aclocal} -I build/autotools
247 %{__autoconf}
248 %{__autoheader}
249 %{__automake}
250 %configure \
251         %{!?with_gdkpixbuf:--disable-gdk-pixbuf} \
252         --disable-silent-rules \
253         --enable-cairo \
254         %{?with_gstreamer:--enable-cogl-gst} \
255         --enable-cogl-pango \
256         %{?with_gles1:--enable-gles1 --with-gles1-libname=libGLESv1_CM.so.1} \
257         %{?with_gles2:--enable-gles2 --with-gles2-libname=libGLESv2.so.2} \
258         --enable-glx \
259         --enable-gtk-doc \
260         --enable-introspection \
261         --enable-kms-egl-platform \
262         %{?with_mir:--enable-mir-egl-platform} \
263         %{?with_sdl1:--enable-sdl} \
264         %{?with_sdl2:--enable-sdl2} \
265         %{?with_static_libs:--enable-static} \
266         %{?with_wayland:--enable-wayland-egl-platform} \
267         %{?with_wayland:--enable-wayland-egl-server} \
268         --enable-xlib-egl-platform \
269         --with-html-dir=%{_gtkdocdir}
270 %{__make}
271
272 %install
273 rm -rf $RPM_BUILD_ROOT
274
275 %{__make} -j1 install \
276         DESTDIR=$RPM_BUILD_ROOT
277
278 %if %{with gstreamer}
279 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstcogl.la
280 %if %{with static_libs}
281 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstcogl.a
282 %endif
283 %endif
284 # obsoleted by pkg-config
285 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcogl*.la
286
287 %find_lang %{name}
288
289 %clean
290 rm -rf $RPM_BUILD_ROOT
291
292 %post   -p /sbin/ldconfig
293 %postun -p /sbin/ldconfig
294
295 %post   gles2 -p /sbin/ldconfig
296 %postun gles2 -p /sbin/ldconfig
297
298 %post   gst -p /sbin/ldconfig
299 %postun gst -p /sbin/ldconfig
300
301 %files -f %{name}.lang
302 %defattr(644,root,root,755)
303 %doc ChangeLog NEWS README
304 %attr(755,root,root) %{_libdir}/libcogl.so.*.*.*
305 %attr(755,root,root) %ghost %{_libdir}/libcogl.so.20
306 %attr(755,root,root) %{_libdir}/libcogl-pango.so.*.*.*
307 %attr(755,root,root) %ghost %{_libdir}/libcogl-pango.so.20
308 %attr(755,root,root) %{_libdir}/libcogl-path.so.*.*.*
309 %attr(755,root,root) %ghost %{_libdir}/libcogl-path.so.20
310 %{_libdir}/girepository-1.0/Cogl-1.0.typelib
311 %{_libdir}/girepository-1.0/CoglPango-1.0.typelib
312 %{_libdir}/girepository-1.0/Cogl-2.0.typelib
313 %{_libdir}/girepository-1.0/CoglPango-2.0.typelib
314
315 %files devel
316 %defattr(644,root,root,755)
317 %attr(755,root,root) %{_libdir}/libcogl.so
318 %attr(755,root,root) %{_libdir}/libcogl-pango.so
319 %attr(755,root,root) %{_libdir}/libcogl-path.so
320 %dir %{_includedir}/cogl
321 %{_includedir}/cogl/cogl
322 %{_includedir}/cogl/cogl-pango
323 %{_includedir}/cogl/cogl-path
324 %{_pkgconfigdir}/cogl-1.0.pc
325 %{_pkgconfigdir}/cogl-2.0-experimental.pc
326 %{_pkgconfigdir}/cogl-gl-1.0.pc
327 %{_pkgconfigdir}/cogl-pango-1.0.pc
328 %{_pkgconfigdir}/cogl-pango-2.0-experimental.pc
329 %{_pkgconfigdir}/cogl-path-1.0.pc
330 %{_pkgconfigdir}/cogl-path-2.0-experimental.pc
331 %{_datadir}/gir-1.0/Cogl-1.0.gir
332 %{_datadir}/gir-1.0/CoglPango-1.0.gir
333 %{_datadir}/gir-1.0/Cogl-2.0.gir
334 %{_datadir}/gir-1.0/CoglPango-2.0.gir
335
336 %if %{with static_libs}
337 %files static
338 %defattr(644,root,root,755)
339 %{_libdir}/libcogl.a
340 %{_libdir}/libcogl-pango.a
341 %{_libdir}/libcogl-path.a
342 %endif
343
344 %files doc
345 %defattr(644,root,root,755)
346 %{_gtkdocdir}/cogl
347 %{_gtkdocdir}/cogl-2.0-experimental
348
349 %if %{with gles2}
350 %files gles2
351 %defattr(644,root,root,755)
352 %attr(755,root,root) %{_libdir}/libcogl-gles2.so.*.*.*
353 %attr(755,root,root) %ghost %{_libdir}/libcogl-gles2.so.20
354
355 %files gles2-devel
356 %defattr(644,root,root,755)
357 %attr(755,root,root) %{_libdir}/libcogl-gles2.so
358 %{_includedir}/cogl/cogl-gles2
359 %{_pkgconfigdir}/cogl-gles2-1.0.pc
360 %{_pkgconfigdir}/cogl-gles2-2.0-experimental.pc
361
362 %if %{with static_libs}
363 %files gles2-static
364 %defattr(644,root,root,755)
365 %{_libdir}/libcogl-gles2.a
366 %endif
367 %endif
368
369 %if %{with gstreamer}
370 %files gst
371 %defattr(644,root,root,755)
372 %attr(755,root,root) %{_libdir}/libcogl-gst.so.*.*.*
373 %attr(755,root,root) %ghost %{_libdir}/libcogl-gst.so.20
374 %attr(755,root,root) %{_libdir}/gstreamer-1.0/libgstcogl.so
375 %{_libdir}/girepository-1.0/CoglGst-2.0.typelib
376
377 %files gst-devel
378 %defattr(644,root,root,755)
379 %attr(755,root,root) %{_libdir}/libcogl-gst.so
380 %{_includedir}/cogl/cogl-gst
381 %{_pkgconfigdir}/cogl-gst-1.0.pc
382 %{_pkgconfigdir}/cogl-gst-2.0-experimental.pc
383 %{_datadir}/gir-1.0/CoglGst-2.0.gir
384
385 %if %{with static_libs}
386 %files gst-static
387 %defattr(644,root,root,755)
388 %{_libdir}/libcogl-gst.a
389 %endif
390
391 %files gst-apidocs
392 %defattr(644,root,root,755)
393 %{_gtkdocdir}/cogl-gst
394 %endif
This page took 0.078047 seconds and 2 git commands to generate.