%define fontconfig_version 2.8.0 %define freetype_version 2.3.12 %define glib2_version 2.22.5 %define libpng_version 1.2.46 %define librsvg2_version 2.26.0 %define libxml2_version 2.6.32-2 %define libXrender_version 0.9.5 %define pixman_version 0.22.0 %define _libdir64 %{_prefix}/lib64 Summary: A vector graphics library Name: cairo Version: 1.12.4 Release: 1 URL: http://cairographics.org Source0: http://cairographics.org/releases/%{name}-%{version}.tar.bz2 Source1: http://cairographics.org/releases/%{name}-%{version}.tar.xz.sha1 Source2: http://cairographics.org/releases/%{name}-%{version}.tar.xz.sha1.asc Patch0: %{name}-%{version}-aix.patch License: LGPL/MPL Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: fontconfig-devel >= %{fontconfig_version} BuildRequires: freetype2-devel >= %{freetype_version} BuildRequires: gcc >= 4.2.3-2 BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: libpng-devel >= %{libpng_version} BuildRequires: librsvg2-devel >= %{librsvg2_version} BuildRequires: libxml2-devel >= %{libxml2_version} BuildRequires: libXrender-devel >= %{libXrender_version} BuildRequires: pixman-devel >= %{pixman_version} BuildRequires: pkg-config BuildRequires: zlib-devel Requires: fontconfig >= %{fontconfig_version} Requires: freetype2 >= %{freetype_version} Requires: glib2 >= %{glib2_version} Requires: libgcc >= 4.2.3-2 Requires: libpng >= %{libpng_version} Requires: librsvg2 >= %{librsvg2_version} Requires: libxml2 >= %{libxml2_version} Requires: libXrender >= %{libXrender_version} Requires: pixman >= %{pixman_version} 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 "gcc -maix64". %prep %setup -q %patch0 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export CFLAGS="-DDISABLE_SOME_FLOATING_POINT -DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export CC="gcc -maix64" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --enable-shared --disable-static \ --enable-xlib=yes \ --enable-xlib-xrender=yes \ --enable-png=yes \ --enable-ps=yes \ --enable-pdf=yes \ --enable-svg=yes \ --enable-pthread=yes \ --disable-some-floating-point \ --disable-gtk-doc make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export CC="gcc -maix32 -D_LARGE_FILES=1" export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static \ --enable-xlib=yes \ --enable-xlib-xrender=yes \ --enable-png=yes \ --enable-ps=yes \ --enable-pdf=yes \ --enable-svg=yes \ --disable-some-floating-point \ --disable-gtk-doc make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 make install DESTDIR=${RPM_BUILD_ROOT} cd ../32bit export OBJECT_MODE=32 make install DESTDIR=${RPM_BUILD_ROOT} ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}.so.* ( cd ${RPM_BUILD_ROOT} for dir in include lib lib64 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 32bit/AUTHORS 32bit/BIBLIOGRAPHY 32bit/BUGS 32bit/ChangeLog 32bit/COPYING %doc 32bit/COPYING-LGPL-2.1 32bit/COPYING-MPL-1.1 32bit/NEWS %doc 32bit/PORTING_GUIDE 32bit/README %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system,-) %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/* %{_libdir64}/pkgconfig/* %{_datadir}/gtk-doc/html/%{name} /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Thu Oct 18 2012 Michael Perzl - 1.12.4-1 - updated to version 1.12.4 * Thu Oct 18 2012 Michael Perzl - 1.12.2-1 - updated to version 1.12.2 * Thu Oct 18 2012 Michael Perzl - 1.12.0-1 - updated to version 1.12.0 * Mon Aug 20 2012 Michael Perzl - 1.10.2-2 - had to switch from IBM XL C/C++ to GCC now as otherwise cairo is miscompiled * Sun Nov 20 2011 Michael Perzl - 1.10.2-1 - updated to version 1.10.2 * Sun Nov 20 2011 Michael Perzl - 1.10.0-1 - updated to version 1.10.0 - added RTL-style shared libraries * Fri Feb 26 2010 Michael Perzl - 1.8.10-1 - updated to version 1.8.10 * Wed Jun 24 2009 Michael Perzl - 1.8.8-1 - updated to version 1.8.8 * 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