]> git.pld-linux.org Git - packages/cairo.git/blobdiff - cairo.spec
- rel 1
[packages/cairo.git] / cairo.spec
index 78fd2b62d6980d4f44d80009f64b7241ae6a5aa2..3d0450af98e6b53b329065b46e3757361ea4231d 100644 (file)
@@ -1,28 +1,52 @@
+#
+# Conditional build:
+%bcond_without apidocs         # disable gtk-doc
+%bcond_with    glitz           # build with glitz backend
+%bcond_without xcb             # XCB backend
+%bcond_with    tests           # perform tests (can fail due to out of memory)
+%bcond_with    lcd             # freetype LCD filtering (instead of internal) [not ready]
+#
 Summary:       Cairo - multi-platform 2D graphics library
 Summary:       Cairo - multi-platform 2D graphics library
-Summary(pl):   Cairo - wieloplatformowa biblioteka graficzna 2D
+Summary(pl.UTF-8):     Cairo - wieloplatformowa biblioteka graficzna 2D
 Name:          cairo
 Name:          cairo
-Version:       0.2.0
+Version:       1.6.4
 Release:       1
 License:       LGPL v2.1 or MPL v1.1
 Group:         Libraries
 Release:       1
 License:       LGPL v2.1 or MPL v1.1
 Group:         Libraries
-Source0:       http://cairographics.org/snapshots/%{name}-%{version}.tar.gz
-# Source0-md5: 2ff2b3b52b862971d2baa3fede3a3d6e
+Source0:       http://cairographics.org/releases/%{name}-%{version}.tar.gz
+# Source0-md5: a198d509f9e3a35b78de8bb02174ebb9
+Patch0:                %{name}-link.patch
+Patch1:                %{name}-lt.patch
+Patch2:                %{name}-am.patch
+# Updated from http://david.freetype.org/lcd/cairo-1.2.4-lcd-filter-1.patch
+# The lcd patch is being maintained at
+# http://bugs.freedesktop.org/show_bug.cgi?id=10301
+# It is not applied upstream for political reasons (patents) and its fate has
+# not been decided yet AFAIK. -- Qrczak
+# the latest version is for some early 1.5.x and won't be applied upstream to 1.6.x series
+Patch3:                %{name}-1.2.4-lcd-filter-1.patch
 URL:           http://cairographics.org/
 URL:           http://cairographics.org/
-BuildRequires: autoconf
-BuildRequires: automake
+BuildRequires: autoconf >= 2.58
+BuildRequires: automake >= 1:1.8
 BuildRequires: fontconfig-devel
 BuildRequires: fontconfig-devel
-BuildRequires: freetype-devel >= 2.1.0
-BuildRequires: glitz-devel >= 0.2.3
-BuildRequires: libpixman-devel >= 0.1.1
+%{!?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.6}
 BuildRequires: libpng-devel
 BuildRequires: libtool
 BuildRequires: libpng-devel
 BuildRequires: libtool
+BuildRequires: pixman-devel >= 0.10.0
 BuildRequires: pkgconfig
 BuildRequires: pkgconfig
-#BuildRequires:        xcb-devel (http://freedesktop.org/software/xcb - CVS only, not released yet)
-BuildRequires: xrender-devel >= 0.6
+BuildRequires: poppler-glib-devel >= 0.8.0
+%if %{with xcb}
+BuildRequires: libxcb-devel >= 0.9.92
+BuildRequires: xcb-util-devel >= 0.2
+%endif
+BuildRequires: xorg-lib-libXrender-devel >= 0.6
 BuildRequires: zlib-devel
 BuildRequires: zlib-devel
-Requires:      freetype >= 2.1.0
-Requires:      glitz >= 0.2.3
-Requires:      libpixman >= 0.1.1
+%{!?with_lcd:Requires: freetype >= 1:2.1.10}
+%{?with_lcd:Requires:  freetype >= 1:2.3.0}
+%{?with_glitz:Requires:        glitz:Requires: glitz >= 0.5.1}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -39,73 +63,89 @@ significant addition of translucence in the imaging model). When
 complete, the API is intended to support the complete imaging model of
 PDF 1.4.
 
 complete, the API is intended to support the complete imaging model of
 PDF 1.4.
 
-Cairo relies on the Xc library for backend rendering. Xc provides an
-abstract interface for rendering to multiple target types. As of this
-writing, Xc allows Cairo to target X drawables as well as generic
-image buffers. Future backends such as PostScript, PDF, and perhaps
-OpenGL are currently being planned.
-
-%description -l pl
-Cairo obs³uguje oparty na wektorach rendering z antyaliasingiem dla X.
-¦cie¿ki sk³adaj± siê z odcinków i splajnów kubicznych, a renderowane
-mog± byæ z dowoln± grubo¶ci± i ró¿nymi stylami po³±czeñ i zakoñczeñ.
-Wszystkie kolory mog± byæ podane z opcjonaln± pó³przezroczysto¶ci±
-(podan± przez wspó³czynnik nieprzezroczysto¶ci lub alpha) i ³±czone
-przy u¿yciu rozszerzonego algorytmu mieszania Portera-Duffa, który
-mo¿na znale¼æ w rozszerzeniu X Render.
-
-Cairo eksportuje stanowe API renderuj±ce w duchu podobne do operatorów
-konstruowania ¶cie¿ek, tekstu i rysowania z PostScriptu (ze znacznym
-dodatkiem pó³przezroczysto¶ci w modelu obrazu). Kiedy API zostanie
-ukoñczone, ma obs³ugiwaæ pe³ny model obrazu z PDF w wersji 1.4.
-
-Cairo do backendowego renderowania wykorzystuje bibliotekê Xc. Xc
-dostarcza abstrakcyjny interfejs do renderowania na wiele rodzajów
-wyj¶æ. Aktualnie Xc pozwala Cairo tworzyæ obiekty X, a tak¿e ogólne
-bufory obrazu. W przysz³o¶ci planowane s± takie backendy jak
-PostScript, PDF i byæ mo¿e OpenGL.
+%description -l pl.UTF-8
+Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X.
+Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane
+mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń.
+Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością
+(podaną przez współczynnik nieprzezroczystości lub alpha) i łączone
+przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
+można znaleźć w rozszerzeniu X Render.
+
+Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów
+konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym
+dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie
+ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4.
 
 %package devel
 Summary:       Development files for Cairo library
 
 %package devel
 Summary:       Development files for Cairo library
-Summary(pl):   Pliki programistyczne biblioteki Cairo
+Summary(pl.UTF-8):     Pliki programistyczne biblioteki Cairo
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 Requires:      fontconfig-devel
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 Requires:      fontconfig-devel
-Requires:      freetype-devel >= 2.1.0
-Requires:      glitz-devel >= 0.2.3
-Requires:      libpixman-devel >= 0.1.1
+Requires:      freetype-devel >= 1:2.1.10
+%{?with_glitz:Requires:        glitz-devel >= 0.5.1}
 Requires:      libpng-devel
 Requires:      libpng-devel
-Requires:      xrender-devel >= 0.6
+%{?with_xcb:Requires:  libxcb-devel >= 0.9.92}
+Requires:      pixman-devel >= 0.10.0
+%{?with_xcb:Requires:  xcb-util-devel >= 0.2}
+Requires:      xorg-lib-libXrender-devel >= 0.6
 
 %description devel
 Development files for Cairo library.
 
 
 %description devel
 Development files for Cairo library.
 
-%description devel -l pl
+%description devel -l pl.UTF-8
 Pliki programistyczne biblioteki Cairo.
 
 %package static
 Summary:       Static Cairo library
 Pliki programistyczne biblioteki Cairo.
 
 %package static
 Summary:       Static Cairo library
-Summary(pl):   Statyczna biblioteka Cairo
+Summary(pl.UTF-8):     Statyczna biblioteka Cairo
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 Static Cairo library.
 
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 Static Cairo library.
 
-%description static -l pl
+%description static -l pl.UTF-8
 Statyczna biblioteka Cairo.
 
 Statyczna biblioteka Cairo.
 
+%package apidocs
+Summary:       Cairo API documentation
+Summary(pl.UTF-8):     Dokumentacja API Cairo
+Group:         Documentation
+Requires:      gtk-doc-common
+
+%description apidocs
+Cairo API documentation.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API Cairo.
+
 %prep
 %setup -q
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%{?with_lcd:%patch3 -p1}
 
 %build
 
 %build
+%{?with_apidocs:%{__gtkdocize}}
 %{__libtoolize}
 %{__aclocal}
 %{__autoheader}
 %{__autoconf}
 %{__automake}
 %{__libtoolize}
 %{__aclocal}
 %{__autoheader}
 %{__autoconf}
 %{__automake}
-%configure
+%configure \
+       %{?with_apidocs:--enable-gtk-doc} \
+       %{?with_xcb:--enable-xcb} \
+       %{?with_glitz:--enable-glitz} \
+       --enable-ps \
+       --enable-pdf \
+       --enable-png \
+       --enable-freetype \
+       --with-html-dir=%{_gtkdocdir}
 %{__make}
 %{__make}
+%{?with_tests:%{__make} check}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -113,6 +153,8 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+%{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -122,16 +164,31 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 # COPYING contains only notes, not LGPL/MPL texts
 %files
 %defattr(644,root,root,755)
 # COPYING contains only notes, not LGPL/MPL texts
-%doc AUTHORS COPYING ChangeLog NEWS README TODO
-%attr(755,root,root) %{_libdir}/lib*.so.*.*.*
+%doc AUTHORS COPYING ChangeLog NEWS README
+%attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
 
 %files devel
 %defattr(644,root,root,755)
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*.so
-%{_libdir}/lib*.la
-%{_includedir}/*
-%{_pkgconfigdir}/*.pc
+%attr(755,root,root) %{_libdir}/libcairo.so
+%{_libdir}/libcairo.la
+%{_includedir}/cairo
+%{_pkgconfigdir}/cairo.pc
+%{_pkgconfigdir}/cairo-ft.pc
+%{_pkgconfigdir}/cairo-pdf.pc
+%{_pkgconfigdir}/cairo-png.pc
+%{_pkgconfigdir}/cairo-ps.pc
+%{_pkgconfigdir}/cairo-svg.pc
+%{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
+%{_pkgconfigdir}/cairo-xlib.pc
+%{_pkgconfigdir}/cairo-xlib-xrender.pc
 
 %files static
 %defattr(644,root,root,755)
 
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/libcairo.a
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%{_gtkdocdir}/cairo
+%endif
This page took 0.079712 seconds and 4 git commands to generate.