summaryrefslogtreecommitdiff
path: root/packaging/cairo.spec
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/cairo.spec')
-rw-r--r--[-rwxr-xr-x]packaging/cairo.spec270
1 files changed, 200 insertions, 70 deletions
diff --git a/packaging/cairo.spec b/packaging/cairo.spec
index fc35b6c52..da4469b48 100755..100644
--- a/packaging/cairo.spec
+++ b/packaging/cairo.spec
@@ -1,102 +1,232 @@
-#sbs-git:slp/unmodified/cairo cairo 1.11.3 076a40b95caaadbc4a05b92a1a1d7840427e05b7
-Name: cairo
-Summary: A vector graphics library
-Version: 1.12.14
-Release: 10
-Group: System/Libraries
-License: LGPL-2.1+ or MPL-1.1
-URL: http://www.cairographics.org
-Source0: http://cairographics.org/releases/%{name}-%{version}.tar.gz
-Source1001: packaging/cairo.manifest
-
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
-#BuildRequires: pkgconfig(xrender)
-#BuildRequires: pkgconfig(x11)
-#BuildRequires: pkgconfig(xext)
+%bcond_without cairo_xcb_backend
+%bcond_without cairo_gl_backend
+%bcond_with wayland
+%bcond_with x
+%bcond_with desktop
+
+
+Name: cairo
+#Version: 1.12.16
+Version: 1.12.14
+Release: 0
+License: LGPL-2.1+ or MPL-1.1
+Summary: Vector Graphics Library with Cross-Device Output Support
+Url: http://cairographics.org/
+Group: Graphics/Libraries
+Source: http://cairographics.org/releases/%{name}-%{version}.tar.xz
+Source99: baselibs.conf
+Source1001: cairo.manifest
+#BuildRequires: libtool
+BuildRequires: pkg-config
+BuildRequires: xz
+BuildRequires: pkgconfig(fontconfig)
+BuildRequires: pkgconfig(freetype2)
+BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(libpng)
-BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(pixman-1)
-BuildRequires: pkgconfig(freetype2)
-BuildRequires: pkgconfig(fontconfig)
-BuildRequires: pkgconfig(glib-2.0)
-BuildRequires: pkgconfig(sm)
-#BuildRequires: pkgconfig(xt)
-#BuildRequires: pkgconfig(xcb)
-#BuildRequires: pkgconfig(xcb-render)
-#BuildRequires: pkgconfig(xcb-renderutil)
-#BuildRequires: pkgconfig(xcb-shm)
-BuildRequires: pkgconfig(gles20)
-#BuildRequires: pkgconfig(wayland-egl)
-BuildRequires: pkgconfig(ecore)
-BuildRequires: pkgconfig(evas)
-BuildRequires: pkgconfig(elementary)
-#BuildRequires: pkgconfig(librsvg-2.0)
-BuildRequires: binutils-devel
BuildRequires: which
-BuildRequires: autoconf
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(evas)
+%if %{with cairo_gl_backend}
+%if %{with x} && %{with desktop}
+BuildRequires: pkgconfig(gl)
+%endif
+BuildRequires: pkgconfig(glesv2)
+%if %{with wayland}
+BuildRequires: pkgconfig(wayland-egl)
+%endif
+%endif
+%if %{with x}
+BuildRequires: pkgconfig(xext)
+BuildRequires: pkgconfig(x11)
+BuildRequires: pkgconfig(xrender)
+%if %{with cairo_xcb_backend}
+BuildRequires: pkgconfig(xcb)
+BuildRequires: pkgconfig(xcb-shm)
+%endif
+%endif
+
%description
-Cairo is a 2D graphics library with support for multiple output devices.
+Cairo is a vector graphics library with cross-device output support.
+Currently supported output targets include the X Window System,
+in-memory image buffers, and PostScript. Cairo is designed to produce
+identical output on all output media while taking advantage of display
+hardware acceleration when available.
+
+%package -n libcairo
+License: LGPL-2.1+ or MPL-1.1
+Summary: Vector Graphics Library with Cross-Device Output Support
+Group: Graphics/Libraries
+Provides: cairo = %{version}
+#Obsoletes: cairo < %{version}
+
+%description -n libcairo
+Cairo is a vector graphics library with cross-device output support.
+Currently supported output targets include the X Window System,
+in-memory image buffers, and PostScript. Cairo is designed to produce
+identical output on all output media while taking advantage of display
+hardware acceleration when available.
+
+%package -n libcairo-gobject
+License: LGPL-2.1+ or MPL-1.1
+Summary: Vector Graphics Library with Cross-Device Output Support
+Group: Graphics/Libraries
+
+%description -n libcairo-gobject
+Cairo is a vector graphics library with cross-device output support.
+Currently supported output targets include the X Window System,
+in-memory image buffers, and PostScript. Cairo is designed to produce
+identical output on all output media while taking advantage of display
+hardware acceleration when available.
+
+This library contains GType declarations for Cairo types. It is also
+meant to support gobject-introspection binding creation.
+
+%package -n libcairo-script-interpreter
+License: LGPL-2.1+ or MPL-1.1
+Summary: Vector Graphics Library with Cross-Device Output Support
+Group: Graphics/Libraries
+
+%description -n libcairo-script-interpreter
+Cairo is a vector graphics library with cross-device output support.
+Currently supported output targets include the X Window System,
+in-memory image buffers, and PostScript. Cairo is designed to produce
+identical output on all output media while taking advantage of display
+hardware acceleration when available.
+
+#%package tools
+#License: GPL-3.0+
+#Summary: Vector Graphics Library with Cross-Device Output Support -- Utilities
+#Group: Development/Libraries
+# We need an explicit requires since nothing links to the cairo library
+#Requires: libcairo = %{version}
+
+#%description tools
+#Cairo is a vector graphics library with cross-device output support.
+#Currently supported output targets include the X Window System,
+#in-memory image buffers, and PostScript. Cairo is designed to produce
+#identical output on all output media while taking advantage of display
+#hardware acceleration when available.
+
+This package contains various cairo utilities.
%package devel
-Summary: Development components for the cairo library
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-Requires: pixman-devel
+License: LGPL-2.1+ or MPL-1.1
+Summary: Development environment for cairo
+Group: Development/Libraries
+Requires: libcairo = %{version}
+Requires: libcairo-gobject = %{version}
+Requires: libcairo-script-interpreter = %{version}
+Requires: pixman_devel
%description devel
-cairo development libraries and head files
+This package contains all files necessary to build binaries using
+cairo.
%prep
-%setup -q -n %{name}-%{version}
+%setup -q
+cp %{SOURCE1001} .
%build
-cp %{SOURCE1001} .
+# Disable Atom optimizations in order to make binaries executable in buildroot
+export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed s'/atom/i686/g'`
+export CFLAGS=`echo $CFLAGS | sed s'/atom/i686/g'`
+export CXXFLAGS=`echo $CXXFLAGS | sed s'/atom/i686/g'`
+
+export CFLAGS+=" -ffat-lto-objects"
+export CXXFLAGS+=" -ffat-lto-objects"
+
+%ifarch aarch64
+export CFLAGS="$CFLAGS -fno-lto"
+export CXXFLAGS="$CXXFLAGS -fno-lto"
+%endif
+
+# Needed by patch0
NOCONFIGURE=1 ./autogen.sh
-%configure --disable-static \
- --disable-win32 \
- --enable-directfb=no \
- --enable-xlib=no \
- --with-x=no \
- --x-includes=%{_includedir} \
- --x-libraries=%{_libdir} \
- --disable-gtk-doc \
+%configure \
+ --with-pic \
+ --enable-fc \
+ --enable-ft \
+%if %{with cairo_gl_backend}
%ifarch %ix86
- --enable-xcb=no \
--enable-egl=no \
--enable-glesv2=no \
--enable-evasgl=yes \
%else
- --enable-xcb=no \
--enable-egl=yes \
--enable-glesv2=yes \
- --enable-evasgl=yes
+ --enable-evasgl=yes \
%endif
-
-make %{?jobs:-j%jobs}
+%endif
+ --enable-ps \
+ --enable-pdf \
+ --enable-script \
+ --enable-svg \
+ --enable-tee \
+%if %{with wayland} && !%{with x}
+ --disable-xlib \
+ --disable-xcb \
+%else
+ --enable-xlib \
+%if %{with cairo_xcb_backend}
+ --enable-xcb=yes \
+%endif
+%endif
+# --disable-gtk-doc \
+# --disable-static
+make %{?_smp_mflags} V=1
%install
-rm -rf %{buildroot}
%make_install
-rm -rf $RPM_BUILD_ROOT/usr/share/gtk-doc
-mkdir -p %{buildroot}/usr/share/license
-cat COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1 > %{buildroot}/usr/share/license/%{name}
-%post -p /sbin/ldconfig
+%post -n libcairo -p /sbin/ldconfig
+
+%postun -n libcairo -p /sbin/ldconfig
+
+%post -n libcairo-gobject -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%postun -n libcairo-gobject -p /sbin/ldconfig
-%files
-%manifest cairo.manifest
+%post -n libcairo-script-interpreter -p /sbin/ldconfig
+
+%postun -n libcairo-script-interpreter -p /sbin/ldconfig
+
+%files -n libcairo
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%license COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
%{_libdir}/libcairo.so.*
-/usr/share/license/%{name}
-%exclude %{_libdir}/libcairo-*.so.*
+
+%files -n libcairo-gobject
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%{_libdir}/libcairo-gobject.so.2*
+
+%files -n libcairo-script-interpreter
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%license util/cairo-script/COPYING
+%{_libdir}/libcairo-script-interpreter.so.*
+
+#%files tools
+#%manifest %{name}.manifest
+#%defattr(-, root, root)
+#%license util/cairo-trace/COPYING util/cairo-trace/COPYING-GPL-3
+#%{_bindir}/cairo-sphinx
+#%{_bindir}/cairo-trace
+#%dir %{_libdir}/cairo
+#%{_libdir}/cairo/cairo-fdr.so
+#%{_libdir}/cairo/cairo-sphinx.so
+#%{_libdir}/cairo/libcairo-trace.so
%files devel
-%manifest cairo.manifest
-%{_includedir}/*
-%{_libdir}/libcairo*.so
-%{_libdir}/libcairo-*.so.*
-%{_libdir}/pkgconfig/*
+%manifest %{name}.manifest
+%defattr(-, root, root)
+#%doc PORTING_GUIDE
+%{_includedir}/cairo/
+#%doc %{_datadir}/gtk-doc/html/cairo
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/*.pc
+%changelog