%define fontconfig_version 2.5.0 %define freetype_version 2.3.5 %define libpng_version 1.2.25 %define libxml2_version 2.6.31 %define libXrender_version 0.9.4 Summary: A vector graphics library Name: cairo Version: 1.8.6 Release: 1 URL: http://cairographics.org Source0: http://cairographics.org/releases/%{name}-%{version}.tar.gz Source1: http://cairographics.org/releases/%{name}-%{version}.tar.gz.sha1 Source2: http://cairographics.org/releases/%{name}-%{version}.tar.gz.sha1.asc License: LGPL/MPL Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: pkg-config BuildRequires: fontconfig-devel >= %{fontconfig_version} BuildRequires: freetype2-devel >= %{freetype_version} BuildRequires: libpng-devel >= %{libpng_version} BuildRequires: libxml2-devel >= %{libxml2_version} BuildRequires: libXrender-devel >= %{libXrender_version} BuildRequires: pixman-devel BuildRequires: zlib-devel Requires: fontconfig >= %{fontconfig_version} Requires: freetype2 >= %{freetype_version} Requires: libpng >= %{libpng_version} Requires: libxml2 >= %{libxml2_version} Requires: libXrender >= %{libXrender_version} Requires: pixman Requires: zlib %description Cairo is a vector graphics library designed to provide high-quality display and print output. Currently supported output targets include the X Window System, OpenGL (via glitz), in-memory image buffers, and image files (PDF, PostScript, and SVG). Cairo is designed to produce identical output on all output media while taking advantage of display hardware acceleration when available (e.g. through the X Render Extension or OpenGL). The library is available as 32-bit and 64-bit. %package devel Summary: Cairo developmental libraries and header files Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkg-config Requires: fontconfig-devel >= %{fontconfig_version} Requires: freetype2-devel >= %{freetype_version} Requires: libpng-devel >= %{libpng_version} Requires: libxml2-devel >= %{libxml2_version} Requires: libXrender-devel >= %{libXrender_version} Requires: zlib-devel %description devel Developmental libraries and header files required for developing or compiling software which links to the cairo graphics library, which is an open source vector graphics library. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc -q64" or "gcc -maix64". %prep %setup -q %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="xlc_r -q64" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static \ --enable-xlib=yes \ --enable-xlib-xrender=yes \ --enable-png=yes \ --enable-freetype=yes \ --enable-ps=yes \ --enable-pdf=yes \ --enable-svg=yes \ --disable-gtk-doc make %{?_smp_mflags} cp ./src/.libs/libcairo.so.2 . make distclean # now build the 32-bit version export CC="xlc_r" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static \ --enable-xlib=yes \ --enable-xlib-xrender=yes \ --enable-png=yes \ --enable-freetype=yes \ --enable-ps=yes \ --enable-pdf=yes \ --enable-svg=yes \ --disable-gtk-doc make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q ./src/.libs/libcairo.a ./libcairo.so.2 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT} for dir in include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc AUTHORS BIBLIOGRAPHY BUGS ChangeLog COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1 NEWS PORTING_GUIDE README %{_libdir}/*.a /usr/lib/*.a %files devel %defattr(-,root,system,-) %{_libdir}/*.la %{_libdir}/pkgconfig/* %{_includedir}/* %{_datadir}/gtk-doc/html/%{name} /usr/lib/*.la /usr/include/* %changelog * Wed Dec 17 2008 Michael Perzl - 1.8.6-1 - updated to version 1.8.6 * Thu Nov 20 2008 Michael Perzl - 1.8.4-1 - updated to version 1.8.4 * Sat Nov 01 2008 Michael Perzl - 1.8.2-1 - updated to version 1.8.2 * Wed Oct 22 2008 Michael Perzl - 1.8.0-1 - updated to version 1.8.0 * Fri Jul 04 2008 Michael Perzl - 1.6.4-1 - updated to version 1.6.4 * Sat Apr 05 2008 Michael Perzl - 1.4.14-1 - first version for AIX V5.1 and higher