cairo.spec
author hh150184
Tue, 24 Jan 2006 11:56:37 +0000
branchgnome-2-12
changeset 19207 b59a653a3329
parent 6186 9c7b302cef1a
child 7421 d6ca71648198
permissions -rw-r--r--
* evolution-jescs.spec: Bump to 2.4.4, Remove unused define evolution_imagesdir and evolution_libsdir, Remove hard code 1.2, 2.4. * Solaris/SUNWevolution-jescs.spec: Remove *.la under /usr/lib when install, s/evolution-data-server-1.2/evolution-data-server-*/g.

#
# Copyright (c) 2005 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

Name:         cairo
License:      LGPL
Group:        System/Libraries
Version:      1.0.2
Release:      4
Distribution: Java Desktop System
Vendor:	      Sun Microsystems, Inc.
Summary:      Vector graphics library
Source:       http://cairographics.org/releases/%{name}-%{version}.tar.gz
Patch1:       cairo-01-uninstalled-pc.diff
Patch2:       cairo-02-buggyx.diff
URL:          http://www.cairographics.org
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
Docdir:       %{_defaultdocdir}
Autoreqprov:  on
Prereq:       /sbin/ldconfig
Requires:     freetype2
BuildRequires:freetype2-devel
Requires:     fontconfig
BuildRequires:fontconfig-devel

%description
Cairo is a vector graphics library with cross-device output
support. Currently supported output targets include the X Window
System and in-memory image buffers. Cairo is designed to produce 
identical output on all output media while taking advantage of 
display hardware acceleration when available (eg. through the 
X Render Extension).

Cairo provides a stateful user-level API with capabilities similar to
the PDF 1.4 imaging model. Cairo provides operations including
stroking and filling Bezier cubic splines, transforming and
compositing translucent images, and antialiased text rendering.


%package devel
Summary:      Vector graphics library
Group:        Development/Libraries
Requires:     %{name} = %{version}

%description devel
Cairo is a vector graphics library with cross-device output
support. Currently supported output targets include the X Window
System and in-memory image buffers. Cairo is designed to produce
identical output on all output media while taking advantage of
display hardware acceleration when available (eg. through the
X Render Extension).

Cairo provides a stateful user-level API with capabilities similar to
the PDF 1.4 imaging model. Cairo provides operations including
stroking and filling Bezier cubic splines, transforming and
compositing translucent images, and antialiased text rendering.


%prep
%setup -q
%patch1 -p1
%patch2 -p1

%ifos solaris
%ifarch amd64 sparcv9
cd ..
cp -rp %{name}-%{version} %{name}-%{version}-64
%endif
%endif

%build
%ifos linux
if [ -x /usr/bin/getconf ]; then
  CPUS=`getconf _NPROCESSORS_ONLN`
fi
%else
  CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
%endif
if test "x$CPUS" = "x" -o $CPUS = 0; then
  CPUS=1
fi

%ifos solaris
%ifarch amd64 sparcv9
CPUS=$(($CPUS*4))

cd ../%name-%version-64

export CFLAGS="$CFLAGS64"
export RPM_OPT_FLAGS="$CFLAGS"
export LDFLAGS="$LDFLAGS64"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH64"
export CC=${CC64:-$CC}
save_PATH="$PATH"
ccdir=`dirname $CC`
# pwd was added so the fake freetype-config created in SUNWgnome-base-libs.spec
# is picked up instead of the one in /usr/sfw/bin which adds the wrong
# -L and -R flags
export PATH=`pwd`:$ccdir:$PATH

autoconf
CFLAGS="$RPM_OPT_FLAGS" \
  ./configure \
    --prefix=%{_prefix} \
    --libdir=%{_libdir}/%{_arch64} \
    --disable-gtk-doc

make -j $CPUS

cd ../%name-%version

export CFLAGS="$CFLAGS32"
export RPM_OPT_FLAGS="$CFLAGS"
export LDFLAGS="$LDFLAGS32"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH32"
export CC=${CC32:-$CC}
export PATH="$save_PATH"
%endif
%endif

autoconf
CFLAGS="$RPM_OPT_FLAGS" \
  ./configure \
    --prefix=%{_prefix} \
    --libdir=%{_libdir}

make -j $CPUS

%install
%ifos solaris
%ifarch amd64 sparcv9
cd ../%name-%version-64
make install DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT%{_libdir}/%{_arch64}/*.a
rm $RPM_BUILD_ROOT%{_libdir}/%{_arch64}/*.la
cd ../%name-%version
%endif
%endif

make install DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT%{_libdir}/*.a
rm $RPM_BUILD_ROOT%{_libdir}/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files
%defattr(-,root,root)
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_includedir}/*
%{_libdir}/*.so
%{_datadir}/gtk-doc/*
%{_libdir}/pkgconfig/*

%changelog
* Wed Oct 26 2005  [email protected]
- Bumped to 1.0.2.

* Tue Oct 25 2005  [email protected]
- Add patch 2 to workaround the buggy Xserver shipped with
  Solaris 10.  This fixes the problem that the background
  would not get repainted when you would move an icon, view
  the root menu, etc.  The same workaround is used in the
  code to resolve this problem on other platforms using an
  Xorg server older than 2.8.2 (we use 2.8.0 on Solaris 10).

* Tue Sep 13 2005  [email protected]
- Bumped to 1.0.0

* Fri Aug 26 2005  [email protected]
- add 64-bit bits

* Tue Aug 16 2005  [email protected]
- add some missing dependencies

* Mon Aug 15 2005  [email protected]
- Bump to 0.9.2

* Mon Feb 28 2004  [email protected]
- Add patch 01 so that we can build libsvg and libsvg-cairo.

* Tue Feb 22 2004  [email protected]
- created