Home | History | Annotate | Download | only in gnome-2-16
      1 #
      2 # Copyright (c) 2005 Sun Microsystems, Inc.
      3 # This file and all modifications and additions to the pristine
      4 # package are under the same license as the package itself.
      5 #
      6 # Owner: erwannc
      7 #
      8 Name:         cairo
      9 License:      LGPL
     10 Group:        System/Libraries
     11 Version:      1.2.4
     12 Release:      5
     13 Distribution: Java Desktop System
     14 Vendor:	      Sun Microsystems, Inc.
     15 Summary:      Vector graphics library
     16 Source:       http://cairographics.org/releases/%{name}-%{version}.tar.gz
     17 Patch1:       cairo-01-uninstalled-pc.diff
     18 Patch2:       cairo-02-8bit-fix.diff
     19 #owner:erwannc date:2006-11-02 type:feature 
     20 Patch3:       cairo-03-full-hinting.diff
     21 URL:          http://www.cairographics.org
     22 BuildRoot:    %{_tmppath}/%{name}-%{version}-build
     23 Docdir:       %{_defaultdocdir}
     24 Autoreqprov:  on
     25 Prereq:       /sbin/ldconfig
     26 Requires:     freetype2
     27 BuildRequires:freetype2-devel
     28 Requires:     fontconfig
     29 BuildRequires:fontconfig-devel
     30 
     31 %description
     32 Cairo is a vector graphics library with cross-device output
     33 support. Currently supported output targets include the X Window
     34 System and in-memory image buffers. Cairo is designed to produce 
     35 identical output on all output media while taking advantage of 
     36 display hardware acceleration when available (eg. through the 
     37 X Render Extension).
     38 
     39 Cairo provides a stateful user-level API with capabilities similar to
     40 the PDF 1.4 imaging model. Cairo provides operations including
     41 stroking and filling Bezier cubic splines, transforming and
     42 compositing translucent images, and antialiased text rendering.
     43 
     44 
     45 %package devel
     46 Summary:      Vector graphics library
     47 Group:        Development/Libraries
     48 Requires:     %{name} = %{version}
     49 
     50 %description devel
     51 Cairo is a vector graphics library with cross-device output
     52 support. Currently supported output targets include the X Window
     53 System and in-memory image buffers. Cairo is designed to produce
     54 identical output on all output media while taking advantage of
     55 display hardware acceleration when available (eg. through the
     56 X Render Extension).
     57 
     58 Cairo provides a stateful user-level API with capabilities similar to
     59 the PDF 1.4 imaging model. Cairo provides operations including
     60 stroking and filling Bezier cubic splines, transforming and
     61 compositing translucent images, and antialiased text rendering.
     62 
     63 
     64 %prep
     65 %setup -q
     66 %patch1 -p1
     67 %patch2 -p1
     68 %patch3 -p1
     69 
     70 %ifos solaris
     71 %ifarch amd64 sparcv9
     72 cd ..
     73 cp -rp %{name}-%{version} %{name}-%{version}-64
     74 %endif
     75 %endif
     76 
     77 %build
     78 %ifos linux
     79 if [ -x /usr/bin/getconf ]; then
     80   CPUS=`getconf _NPROCESSORS_ONLN`
     81 fi
     82 %else
     83   CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
     84 %endif
     85 if test "x$CPUS" = "x" -o $CPUS = 0; then
     86   CPUS=1
     87 fi
     88 
     89 %ifos solaris
     90 %ifarch amd64 sparcv9
     91 CPUS=$(($CPUS*4))
     92 
     93 cd ../%name-%version-64
     94 
     95 export CFLAGS="$CFLAGS64"
     96 export RPM_OPT_FLAGS="$CFLAGS"
     97 export LDFLAGS="$LDFLAGS64"
     98 export PKG_CONFIG_PATH="$PKG_CONFIG_PATH64"
     99 export CC=${CC64:-$CC}
    100 save_PATH="$PATH"
    101 ccdir=`dirname $CC`
    102 # pwd was added so the fake freetype-config created in SUNWgnome-base-libs.spec
    103 # is picked up instead of the one in /usr/sfw/bin which adds the wrong
    104 # -L and -R flags
    105 export PATH=`pwd`:$ccdir:$PATH
    106 
    107 gtkdocize
    108 automake -a -c -f
    109 autoconf
    110 CFLAGS="$RPM_OPT_FLAGS" \
    111   ./configure \
    112     --prefix=%{_prefix} \
    113     --libdir=%{_libdir}/%{_arch64} \
    114     --disable-gtk-doc
    115 
    116 make -j $CPUS
    117 
    118 cd ../%name-%version
    119 
    120 export CFLAGS="$CFLAGS32"
    121 export RPM_OPT_FLAGS="$CFLAGS"
    122 export LDFLAGS="$LDFLAGS32"
    123 export PKG_CONFIG_PATH="$PKG_CONFIG_PATH32"
    124 export CC=${CC32:-$CC}
    125 export PATH="$save_PATH"
    126 %endif
    127 %endif
    128 
    129 gtkdocize
    130 automake -a -c -f
    131 autoconf
    132 CFLAGS="$RPM_OPT_FLAGS" \
    133   ./configure \
    134     --prefix=%{_prefix} \
    135     --libdir=%{_libdir} \
    136     %{gtk_doc_option}
    137 
    138 make -j $CPUS
    139 
    140 %install
    141 %ifos solaris
    142 %ifarch amd64 sparcv9
    143 cd ../%name-%version-64
    144 make install DESTDIR=$RPM_BUILD_ROOT
    145 rm $RPM_BUILD_ROOT%{_libdir}/%{_arch64}/*.a
    146 rm $RPM_BUILD_ROOT%{_libdir}/%{_arch64}/*.la
    147 cd ../%name-%version
    148 %endif
    149 %endif
    150 
    151 make install DESTDIR=$RPM_BUILD_ROOT
    152 rm $RPM_BUILD_ROOT%{_libdir}/*.a
    153 rm $RPM_BUILD_ROOT%{_libdir}/*.la
    154 
    155 %clean
    156 rm -rf $RPM_BUILD_ROOT
    157 
    158 %post
    159 /sbin/ldconfig
    160 
    161 %postun
    162 /sbin/ldconfig
    163 
    164 %files
    165 %defattr(-,root,root)
    166 %{_libdir}/*.so.*
    167 
    168 %files devel
    169 %defattr(-,root,root)
    170 %doc AUTHORS ChangeLog COPYING NEWS README TODO
    171 %{_includedir}/*
    172 %{_libdir}/*.so
    173 %{_datadir}/gtk-doc/*
    174 %{_libdir}/pkgconfig/*
    175 
    176 %changelog
    177 * Fri Nov  3 2006 - laca@sun.com
    178 - use %gtk_doc_option in configure so that it can be disabled using
    179   --without-gtk-doc
    180 * Mon Oct 16 2006  brian.cameron@sun.com
    181 - Enable gtk-docs.  This required adding gtkdocize and automake
    182   before calling configure
    183 * Mon Aug 28 2006  harry.lu@sun.com
    184 - Bumped to 1.2.4.
    185 * Fri Aug 11 2006  damien.carbery@sun.com
    186 - Remove upstream patch, 02-buggyx. Renumber others.
    187 * Fri Aug 11 2006  damien.carbery@sun.com
    188 - Bumped to 1.2.2.
    189 * Thu Jul 20 2006  damien.carbery@sun.com
    190 - Bumped to 1.2.0.
    191 * Wed Jun 14 2006  yandong.yao@sun.com
    192 - Fix bug 6434250: cairo will crash when access 0x0 bitmap image glyph
    193   Add patch cairo-04-g11n-0x0glyph-fix.diff
    194 * Wed Oct 26 2005  damien.carbery@sun.com
    195 - Bumped to 1.0.2.
    196 * Tue Oct 25 2005  brian.cameron@sun.com
    197 - Add patch 2 to workaround the buggy Xserver shipped with
    198   Solaris 10.  This fixes the problem that the background
    199   would not get repainted when you would move an icon, view
    200   the root menu, etc.  The same workaround is used in the
    201   code to resolve this problem on other platforms using an
    202   Xorg server older than 2.8.2 (we use 2.8.0 on Solaris 10).
    203 * Tue Sep 13 2005  brian.cameron@sun.com
    204 - Bumped to 1.0.0
    205 * Fri Aug 26 2005  laca@sun.com
    206 - add 64-bit bits
    207 * Tue Aug 16 2005  laca@sun.com
    208 - add some missing dependencies
    209 * Mon Aug 15 2005  glynn.foster@sun.com
    210 - Bump to 0.9.2
    211 * Mon Feb 28 2004  brian.cameron@sun.com
    212 - Add patch 01 so that we can build libsvg and libsvg-cairo.
    213 * Tue Feb 22 2004  brian.cameron@sun.com
    214 - created
    215