X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=cairo.spec;h=c26cf22c998ac54715aa2b140d89c4aa35be6141;hb=eca05c24be87e5f38e0917a82e4d5a63dcd8b0b3;hp=19fc7eea9a50bf2a42f33418c315fc587369d15d;hpb=8452c4118cd3beab7eae6718215cea6488bc5556;p=packages%2Fcairo.git diff --git a/cairo.spec b/cairo.spec index 19fc7ee..c26cf22 100644 --- a/cairo.spec +++ b/cairo.spec @@ -1,45 +1,92 @@ # # Conditional build: %bcond_without apidocs # disable gtk-doc -%bcond_with glitz # build with glitz backend +%bcond_with cogl # Cogl surface backend [incompatible with cogl 1.12.x] +%bcond_with directfb # DirectFB surface backend +%bcond_with drm # DRM surface backend +%bcond_without gl # OpenGL surface backend +%bcond_with glesv2 # OpenGLESv2 surface backend (mutually exclusive with gl) +%bcond_with openvg # OpenVG surface backend +%bcond_without pdf # PDF surface backend +%bcond_without ps # PS surface backend +%bcond_without svg # SVG surface backend (disable to boostrap librsvg) +%bcond_with qt # Qt surface backend [expects qt_draw_glyphs() API in Qt 4.7+] +%if "%{pld_release}" == "ac" +%bcond_with xcb # XCB backend +%else %bcond_without xcb # XCB backend +%endif %bcond_with tests # perform tests (can fail due to out of memory) -%bcond_without lcd # use own LCD filtering instead of freetype's -# + +%if %{with glesv2} +%undefine with_gl +%endif Summary: Cairo - multi-platform 2D graphics library Summary(pl.UTF-8): Cairo - wieloplatformowa biblioteka graficzna 2D Name: cairo -Version: 1.4.14 -Release: 1 +Version: 1.14.0 +Release: 2 License: LGPL v2.1 or MPL v1.1 Group: Libraries -Source0: http://cairographics.org/releases/%{name}-%{version}.tar.gz -# Source0-md5: e8c442ff821c0719a69508fecba9038f +Source0: http://cairographics.org/releases/%{name}-%{version}.tar.xz +# Source0-md5: fc3a5edeba703f906f2241b394f0cced Patch0: %{name}-link.patch -# updated from http://david.freetype.org/lcd/cairo-1.2.4-lcd-filter-1.patch -# NOTE: this patch wasn't applied upstream, is unmaintained by its author for -# about a year and becomes more and more ugly => it's subject to drop soon --q -Patch1: %{name}-1.2.4-lcd-filter-1.patch +Patch1: %{name}-gobject-deps.patch URL: http://cairographics.org/ -BuildRequires: autoconf >= 2.54 -BuildRequires: automake >= 1:1.7 -BuildRequires: fontconfig-devel -%{!?with_lcd:BuildRequires: freetype-devel >= 1:2.1.10} -%{?with_lcd:BuildRequires: freetype-devel >= 1:2.3.0} -%{?with_glitz:BuildRequires: glitz-devel >= 0.5.1} -%{?with_apidocs:BuildRequires: gtk-doc >= 1.3} -BuildRequires: libpng-devel -BuildRequires: libtool -BuildRequires: pkgconfig -%if %{with xcb} -BuildRequires: libxcb-devel >= 0.9.92 -BuildRequires: xcb-util-devel >= 0.2 +%{?with_directfb:BuildRequires: DirectFB-devel} +%if %{with gl} || %{with glesv2} || %{with openvg} +BuildRequires: EGL-devel >= 1.1 +%endif +%if %{with gl} || %{with openvg} +BuildRequires: OpenGL-GLX-devel +%endif +%{?with_gl:BuildRequires: OpenGL-devel} +%{?with_glesv2:BuildRequires: OpenGLESv2-devel >= 2.0} +%{?with_openvg:BuildRequires: OpenVG-devel} +%{?with_qt:BuildRequires: QtGui-devel >= 4.4.0} +BuildRequires: autoconf >= 2.63 +BuildRequires: automake >= 1:1.11 +BuildRequires: binutils-devel +%{?with_cogl:BuildRequires: cogl-devel} +BuildRequires: fontconfig-devel >= 2.2.95 +BuildRequires: freetype-devel >= 1:2.3.0 +BuildRequires: glib2-devel >= 1:2.14 +%{?with_apidocs:BuildRequires: gtk-doc >= 1.15} +%{?with_drm:BuildRequires: libdrm-devel} +BuildRequires: libpng-devel >= 2:1.4.0 +%if %{with svg} && %{with tests} +BuildRequires: librsvg-devel >= 2.35.0 %endif +%if %{with ps} && %{with tests} +BuildRequires: libspectre-devel >= 0.2.0 +%endif +BuildRequires: libtool >= 2:2.2 +%{?with_xcb:BuildRequires: libxcb-devel >= 1.6} +BuildRequires: lzo-devel >= 2 +BuildRequires: pixman-devel >= 0.30.0 +BuildRequires: pkgconfig >= 1:0.18 +%if %{with pdf} && %{with tests} +BuildRequires: poppler-glib-devel >= 0.17.4 +%endif +BuildRequires: rpm >= 4.4.9-56 +BuildRequires: sed >= 4.0 +BuildRequires: tar >= 1:1.22 +%{?with_drm:BuildRequires: udev-devel >= 1:136} +%if "%{pld_release}" == "ac" +BuildRequires: xrender-devel >= 0.6 +%else +BuildRequires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1} +BuildRequires: xorg-lib-libXext-devel BuildRequires: xorg-lib-libXrender-devel >= 0.6 +%endif +BuildRequires: xz BuildRequires: zlib-devel -%{!?with_lcd:Requires: freetype >= 1:2.1.10} -%{?with_lcd:Requires: freetype >= 1:2.3.0} -%{?with_glitz:Requires: glitz >= 0.5.1} +%{?with_qt:Requires: QtGui >= 4.4.0} +Requires: fontconfig-libs >= 2.2.95 +Requires: freetype >= 1:2.3.0 +%{?with_xcb:Requires: libxcb >= 1.6} +Requires: pixman >= 0.30.0 +%{?with_drm:Requires: udev-libs >= 1:136} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -75,13 +122,31 @@ Summary: Development files for Cairo library Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo Group: Development/Libraries Requires: %{name} = %{version}-%{release} -Requires: fontconfig-devel -Requires: freetype-devel >= 1:2.1.10 -%{?with_glitz:Requires: glitz-devel >= 0.5.1} -Requires: libpng-devel -%{?with_xcb:Requires: libxcb-devel >= 0.9.92} -%{?with_xcb:Requires: xcb-util-devel >= 0.2} +%{?with_directfb:Requires: DirectFB-devel} +%if %{with gl} || %{with glesv2} || %{with openvg} +Requires: EGL-devel >= 1.1 +%endif +%{?with_gl:Requires: OpenGL-devel} +%{?with_glesv2:Requires: OpenGLESv2-devel >= 2.0} +%{?with_openvg:Requires: OpenVG-devel} +%{?with_qt:Requires: QtGui-devel >= 4.4.0} +%{?with_cogl:Requires: cogl-devel} +Requires: fontconfig-devel >= 2.2.95 +Requires: freetype-devel >= 1:2.3.0 +%{?with_drm:Requires: libdrm-devel} +Requires: libpng-devel >= 2:1.4.0 +%{?with_xcb:Requires: libxcb-devel >= 1.6} +Requires: lzo-devel >= 2 +Requires: pixman-devel >= 0.30.0 +%{?with_drm:Requires: udev-devel >= 1:136} +%if "%{pld_release}" == "ac" +Requires: xrender-devel >= 0.6 +%else +Requires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1} +Requires: xorg-lib-libXext-devel Requires: xorg-lib-libXrender-devel >= 0.6 +%endif +Requires: zlib-devel %description devel Development files for Cairo library. @@ -101,11 +166,66 @@ Static Cairo library. %description static -l pl.UTF-8 Statyczna biblioteka Cairo. +%package gobject +Summary: GObject functions library for Cairo graphics library +Summary(pl.UTF-8): Biblioteka funkcji GObject dla biblioteki graficznej Cairo +Group: Libraries +Requires: %{name} = %{version}-%{release} +Requires: glib2 >= 1:2.14 + +%description gobject +GObject functions library for Cairo graphics library. + +%description gobject -l pl.UTF-8 +Biblioteka funkcji GObject dla biblioteki graficznej Cairo. + +%package gobject-devel +Summary: Header files for Cairo GObject library +Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Cairo GObject +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} +Requires: %{name}-gobject = %{version}-%{release} +Requires: glib2-devel >= 1:2.14 + +%description gobject-devel +Header files for Cairo GObject library. + +%description gobject-devel -l pl.UTF-8 +Pliki nagłówkowe biblioteki Cairo GObject. + +%package gobject-static +Summary: Static Cairo GObject library +Summary(pl.UTF-8): Statyczna biblioteka Cairo GObject +Group: Development/Libraries +Requires: %{name}-gobject-devel = %{version}-%{release} + +%description gobject-static +Static Cairo GObject library. + +%description gobject-static -l pl.UTF-8 +Statyczna biblioteka Cairo GObject. + +%package trace +Summary: Cairo calls tracing utilities +Summary(pl.UTF-8): Narzędzia do śledzenia wywołań Cairo +Group: Development/Tools +Requires: %{name} = %{version}-%{release} +Requires: binutils-libs >= 2.21.53 + +%description trace +Cairo calls tracing utilities. + +%description trace -l pl.UTF-8 +Narzędzia do śledzenia wywołań Cairo. + %package apidocs Summary: Cairo API documentation Summary(pl.UTF-8): Dokumentacja API Cairo Group: Documentation Requires: gtk-doc-common +%if "%{_rpmversion}" >= "5" +BuildArch: noarch +%endif %description apidocs Cairo API documentation. @@ -116,22 +236,34 @@ Dokumentacja API Cairo. %prep %setup -q %patch0 -p1 -%{?with_lcd:%patch1 -p1} +%patch1 -p1 %build %{?with_apidocs:%{__gtkdocize}} %{__libtoolize} -%{__aclocal} +%{__aclocal} -I build %{__autoheader} %{__autoconf} %{__automake} %configure \ + --disable-silent-rules \ + %{?with_cogl:--enable-cogl} \ + %{?with_directfb:--enable-directfb} \ + --enable-ft \ + %{?with_gl:--enable-gl} \ + %{?with_glesv2:--enable-glesv2} \ %{?with_apidocs:--enable-gtk-doc} \ + %{?with_pdf:--enable-pdf} \ + --enable-png \ + %{?with_ps:--enable-ps} \ + %{?with_qt:--enable-qt} \ + %{!?with_svg:--disable-svg} \ + --enable-tee \ + %{?with_openvg:--enable-vg} \ %{?with_xcb:--enable-xcb} \ - %{?with_glitz:--enable-glitz} \ - --enable-ps \ - --enable-pdf \ + --enable-xml \ --with-html-dir=%{_gtkdocdir} + %{__make} %{?with_tests:%{__make} check} @@ -141,7 +273,12 @@ rm -rf $RPM_BUILD_ROOT %{__make} install \ DESTDIR=$RPM_BUILD_ROOT -%{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo} +# LD_PRELOADable library +%{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/libcairo-trace.{la,a} +# LD_PRELOADable modules(?) +%{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/cairo-{fdr,sphinx}.{la,a} + +%{!?with_apidocs:%{__rm} -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo} %clean rm -rf $RPM_BUILD_ROOT @@ -149,31 +286,80 @@ rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig +%post gobject -p /sbin/ldconfig +%postun gobject -p /sbin/ldconfig + %files %defattr(644,root,root,755) # COPYING contains only notes, not LGPL/MPL texts -%doc AUTHORS COPYING ChangeLog NEWS README TODO +%doc AUTHORS COPYING ChangeLog NEWS README %attr(755,root,root) %{_libdir}/libcairo.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2 +%attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libcairo-script-interpreter.so.2 %files devel %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libcairo.so +%attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so %{_libdir}/libcairo.la +%{_libdir}/libcairo-script-interpreter.la %{_includedir}/cairo +%exclude %{_includedir}/cairo/cairo-gobject.h %{_pkgconfigdir}/cairo.pc +%{?with_directfb:%{_pkgconfigdir}/cairo-directfb.pc} +%if %{with gl} || %{with glesv2} || %{with openvg} +%{_pkgconfigdir}/cairo-egl.pc +%endif +%{_pkgconfigdir}/cairo-fc.pc %{_pkgconfigdir}/cairo-ft.pc -%{_pkgconfigdir}/cairo-pdf.pc +%{?with_gl:%{_pkgconfigdir}/cairo-gl.pc} +%if %{with gl} || %{with openvg} +%{_pkgconfigdir}/cairo-glx.pc +%endif +%{?with_pdf:%{_pkgconfigdir}/cairo-pdf.pc} %{_pkgconfigdir}/cairo-png.pc -%{_pkgconfigdir}/cairo-ps.pc -%{_pkgconfigdir}/cairo-svg.pc +%{?with_ps:%{_pkgconfigdir}/cairo-ps.pc} +%{?with_qt:%{_pkgconfigdir}/cairo-qt.pc} +%{_pkgconfigdir}/cairo-script.pc +%{?with_svg:%{_pkgconfigdir}/cairo-svg.pc} +%{_pkgconfigdir}/cairo-tee.pc +%{?with_openvg:%{_pkgconfigdir}/cairo-vg.pc} %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc} +%{?with_xcb:%{_pkgconfigdir}/cairo-xcb-shm.pc} %{_pkgconfigdir}/cairo-xlib.pc %{_pkgconfigdir}/cairo-xlib-xrender.pc +%{_pkgconfigdir}/cairo-xml.pc %files static %defattr(644,root,root,755) %{_libdir}/libcairo.a +%{_libdir}/libcairo-script-interpreter.a + +%files gobject +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libcairo-gobject.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libcairo-gobject.so.2 + +%files gobject-devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libcairo-gobject.so +%{_libdir}/libcairo-gobject.la +%{_includedir}/cairo/cairo-gobject.h +%{_pkgconfigdir}/cairo-gobject.pc + +%files gobject-static +%defattr(644,root,root,755) +%{_libdir}/libcairo-gobject.a + +%files trace +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/cairo-sphinx +%attr(755,root,root) %{_bindir}/cairo-trace +%dir %{_libdir}/cairo +%attr(755,root,root) %{_libdir}/cairo/cairo-fdr.so* +%attr(755,root,root) %{_libdir}/cairo/cairo-sphinx.so* +%attr(755,root,root) %{_libdir}/cairo/libcairo-trace.so* %if %{with apidocs} %files apidocs