Accepting request 63072 from home:vuntz:branches:GNOME:Factory

Forwarding to openSUSE:Factory

OBS-URL: https://build.opensuse.org/request/show/63072
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/pango?expand=0&rev=61
This commit is contained in:
Vincent Untz
2011-03-01 08:00:04 +00:00
committed by Git OBS Bridge
parent 8a36a60d2d
commit 5d7a22114a
8 changed files with 492 additions and 117 deletions

View File

@@ -1,5 +1,5 @@
#
# spec file for package pango (Version 1.28.1)
# spec file for package pango (Version 1.28.3)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -15,10 +15,27 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
# When updating the binary version, do not forget to also update baselibs.conf
%define pango_binary_version 1.6.0
Name: pango
License: LGPLv2.1+
Group: System/Libraries
Version: 1.28.3
Release: 1
# NOTE: on upgrade to a new upstream version, change the Obsoletes from <= to < (here and in baselibs.conf)
Summary: Library for Layout and Rendering of Text
Source: ftp://ftp.gnome.org/pub/GNOME/sources/pango/1.18/%{name}-%{version}.tar.bz2
Source1: README.SuSE
Source2: macros.pango
Source99: baselibs.conf
# PATCH-FIX-UPSTREAM pango64.patch bgo129534 -- needed for biarch. Unfortunately, this is not good enough for usptream.
Patch0: pango64.patch
# PATCH-FIX-UPSTREAM pango-CVE-2011-0020.patch bnc#666101 CVE-2011-0020 vuntz@opensuse.org -- heap corruption in font parsing with FreeType2 backend
Patch1: pango-CVE-2011-0020.patch
# PATCH-FIX-UPSTREAM pango-CVE-2011-0064.patch bnc#672502 CVE-2011-0064. vuntz@opensuse.org -- handle realloc failure in the buffer
Patch2: pango-CVE-2011-0064.patch
BuildRequires: gcc-c++
BuildRequires: gtk-doc
BuildRequires: pkg-config
@@ -30,60 +47,67 @@ BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(libthai)
BuildRequires: pkgconfig(xft)
BuildRequires: pkgconfig(xrender)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Pango is a library for layout and rendering of text, with an emphasis
on internationalization. It can be used anywhere that text layout
is needed.
Pango forms the core of text and font handling for GTK+.
%package -n libpango-1_0-0
License: LGPLv2.1+
Summary: Library for Layout and Rendering of Text
Group: System/Libraries
Requires(post): %{name}-tools
Provides: %{name} = %{version}
# Note: we keep <= (and a rpmlint warning...) until we get a version higher than 1.28.3 (when this provides/obsoletes was introduced)
Obsoletes: %{name} <= %{version}
# bug437293
%ifarch ppc64
Obsoletes: pango-64bit
%endif
#
Version: 1.28.1
Release: 2
Summary: System for Layout and Rendering of Internationalised Text
Source: ftp://ftp.gnome.org/pub/GNOME/sources/pango/1.18/%{name}-%{version}.tar.bz2
Source1: README.SuSE
Source99: baselibs.conf
# PATCH-FIX-UPSTREAM pango64.patch bgo129534 -- needed for biarch. Unfortunately, this is not good enough for usptream.
Patch0: pango64.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: xorg-x11-libXrender xorg-x11-libX11 xorg-x11-libXdmcp
%description
%description -n libpango-1_0-0
Pango is a library for layout and rendering of text, with an emphasis
on internationalisation. It forms the core of text and font handling in
GTK+ 2.0.
on internationalization. It can be used anywhere that text layout
is needed.
Pango forms the core of text and font handling for GTK+.
%package tools
License: LGPLv2.1+
Summary: Library for Layout and Rendering of Text -- Tools
Group: System/Libraries
Authors:
--------
Owen Taylor <otaylor@redhat.com>
Changwoo Ryu <cwryu@adam.kaist.ac.kr>
Sivaraj Doddannan <sivaraj@intelligroup.com>
%description tools
Pango is a library for layout and rendering of text, with an emphasis
on internationalization. It can be used anywhere that text layout
is needed.
Pango forms the core of text and font handling for GTK+.
%package module-thai-lang
License: LGPLv2.1+
Summary: System for Layout and Rendering of Internationalised Text
Summary: Library for Layout and Rendering of Text -- Module for the Thai Language
Group: System/Libraries
Requires(post): %{name}-tools
Requires(postun): %{name}-tools
Provides: locale(pango:th_TH)
%description module-thai-lang
Pango is a library for layout and rendering of text, with an emphasis
on internationalisation. It forms the core of text and font handling in
GTK+ 2.0.
on internationalization. It can be used anywhere that text layout
is needed.
Authors:
--------
Owen Taylor <otaylor@redhat.com>
Changwoo Ryu <cwryu@adam.kaist.ac.kr>
Sivaraj Doddannan <sivaraj@intelligroup.com>
Pango forms the core of text and font handling for GTK+.
%package devel
License: LGPLv2.1+
Requires: %{name} = %{version} cairo-devel fontconfig-devel freetype2-devel glib2-devel %(rpm -q --whatprovides XFree86-devel --queryformat '%{NAME}')
Summary: Include files and libraries mandatory for development
Requires: libpango-1_0-0 = %{version}
Summary: Library for Layout and Rendering of Text -- Development Files
Group: Development/Libraries/GNOME
# bug437293
%ifarch ppc64
@@ -93,23 +117,23 @@ Obsoletes: pango-doc <= %{version}
Provides: pango-doc = %{version}
%description devel
Pango is a library for layout and rendering of text, with an emphasis
on internationalization. It can be used anywhere that text layout
is needed.
Pango forms the core of text and font handling for GTK+.
This package contains all necessary include files and libraries needed
to develop applications that require these.
Authors:
--------
Owen Taylor <otaylor@redhat.com>
Changwoo Ryu <cwryu@adam.kaist.ac.kr>
Sivaraj Doddannan <sivaraj@intelligroup.com>
%prep
%setup -q
%if "%_lib" == "lib64"
cp -a %{S:1} .
%patch0 -p0
%endif
%patch1 -p1
%patch2 -p1
%build
%configure --disable-static --with-pic
@@ -117,96 +141,98 @@ make %{?jobs:-j%jobs}
%install
%makeinstall
touch $RPM_BUILD_ROOT%{_sysconfdir}/pango/pango.modules
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
touch %{buildroot}%{_sysconfdir}/pango/pango.modules
%if "%_lib" == "lib64"
mv $RPM_BUILD_ROOT%{_bindir}/pango-querymodules\
$RPM_BUILD_ROOT%{_bindir}/pango-querymodules-64
mv $RPM_BUILD_ROOT%{_sysconfdir}/pango/pango.modules\
$RPM_BUILD_ROOT%{_sysconfdir}/pango/pango64.modules
mv %{buildroot}%{_bindir}/pango-querymodules %{buildroot}%{_bindir}/pango-querymodules-64
mv %{buildroot}%{_sysconfdir}/pango/pango.modules %{buildroot}%{_sysconfdir}/pango/pango64.modules
%endif
rm $RPM_BUILD_ROOT%{_libdir}/*/*/*/*.*a
rm $RPM_BUILD_ROOT%{_libdir}/*.la
# Install rpm macros
mkdir -p %{buildroot}%{_sysconfdir}/rpm
cp %{S:2} %{buildroot}%{_sysconfdir}/rpm
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
%post
/sbin/ldconfig
###########################################################################
# Note: when updating scriptlets, don't forget to also update baselibs.conf
###########################################################################
# Convenient %define for the scriplets
%if "%_lib" == "lib64"
# it is not fatal if execution fails on 32bit systems
LD_LIBRARY_PATH=usr/%{_lib}\
usr/bin/pango-querymodules-64\
> etc/pango/pango64.modules || echo "pango-querymodules-64 did not run properly in postin."
%define _pango_querymodules %{_bindir}/pango-querymodules-64
%define _pango_querymodules_update_cache %{_pango_querymodules} > %{_sysconfdir}/pango/pango64.modules
%else
LD_LIBRARY_PATH=usr/%{_lib}\
usr/bin/pango-querymodules\
> etc/pango/pango.modules
%define _pango_querymodules %{_bindir}/pango-querymodules
%define _pango_querymodules_update_cache %{_pango_querymodules} > %{_sysconfdir}/pango/pango.modules
%endif
%postun
%post -n libpango-1_0-0
/sbin/ldconfig
%if "%_lib" == "lib64"
if [ -x usr/bin/pango-querymodules-64 ] ; then
# it is not fatal if execution fails on 32bit systems
LD_LIBRARY_PATH=usr/%{_lib}\
usr/bin/pango-querymodules-64\
> etc/pango/pango64.modules || echo "pango-querymodules-64 did not run properly in postun."
fi
%else
if [ -x usr/bin/pango-querymodules ] ; then
LD_LIBRARY_PATH=usr/%{_lib}\
usr/bin/pango-querymodules\
> etc/pango/pango.modules
fi
%if 0
# In case libpango-1_0-0 gets installed before pango-tools, we don't want to
# fail. So we make the call to pango-querymodules dependent on the existence of
# the binary. This is why we also have a %post for pango-tools.
%endif
if test -f %{_pango_querymodules}; then
%{_pango_querymodules_update_cache}
fi
%if 0
# No need to call pango-querymodules in postun:
# - if it's an upgrade, it will have been called in post
# - if it's an uninstall, we don't care about this anymore
%endif
%postun -n libpango-1_0-0 -p /sbin/ldconfig
%post module-thai-lang
%if "%_lib" == "lib64"
# it is not fatal if execution fails on 32bit systems
LD_LIBRARY_PATH=usr/%{_lib}\
usr/bin/pango-querymodules-64\
> etc/pango/pango64.modules || echo "pango-querymodules-64 did not run properly in postin."
%else
LD_LIBRARY_PATH=usr/%{_lib}\
usr/bin/pango-querymodules\
> etc/pango/pango.modules
%endif
%{_pango_querymodules_update_cache}
%postun module-thai-lang
%if "%_lib" == "lib64"
if [ -x usr/bin/pango-querymodules-64 ] ; then
# it is not fatal if execution fails on 32bit systems
LD_LIBRARY_PATH=usr/%{_lib}\
usr/bin/pango-querymodules-64\
> etc/pango/pango64.modules || echo "pango-querymodules-64 did not run properly in postun."
fi
%else
if [ -x usr/bin/pango-querymodules ] ; then
LD_LIBRARY_PATH=usr/%{_lib}\
usr/bin/pango-querymodules\
> etc/pango/pango.modules
fi
%endif
%{_pango_querymodules_update_cache}
%files
%post tools
%if 0
# If we install pango-tools for the first time, then we should run it in case
# libpango-1_0-0 was installed first (ie, if
# %{_libdir}/pango/%{pango_binary_version} already exists) which means
# pango-querymodules couldn't run there.
%endif
if [ $1 == 1 ]; then
test -d %{_libdir}/pango/%{pango_binary_version}
if test $? -eq 0; then
%{_pango_querymodules_update_cache}
fi
fi
%files -n libpango-1_0-0
%defattr(-,root,root)
%if "%_lib" == "lib64"
%doc README AUTHORS COPYING ChangeLog README.SuSE
%else
%doc README AUTHORS COPYING ChangeLog
%endif
%{_bindir}/pango-*
%dir %{_libdir}/pango
%dir %{_libdir}/pango/1.6.0
%dir %{_libdir}/pango/1.6.0/modules
%{_libdir}/pango/1.6.0/modules/*.so
%exclude %{_libdir}/pango/1.6.0/modules/pango-thai-lang.so
%dir %{_libdir}/pango/%{pango_binary_version}
%dir %{_libdir}/pango/%{pango_binary_version}/modules
%{_libdir}/pango/%{pango_binary_version}/modules/pango-arabic-fc.so
%{_libdir}/pango/%{pango_binary_version}/modules/pango-arabic-lang.so
%{_libdir}/pango/%{pango_binary_version}/modules/pango-basic-fc.so
%{_libdir}/pango/%{pango_binary_version}/modules/pango-basic-x.so
%{_libdir}/pango/%{pango_binary_version}/modules/pango-hangul-fc.so
%{_libdir}/pango/%{pango_binary_version}/modules/pango-hebrew-fc.so
%{_libdir}/pango/%{pango_binary_version}/modules/pango-indic-fc.so
%{_libdir}/pango/%{pango_binary_version}/modules/pango-indic-lang.so
%{_libdir}/pango/%{pango_binary_version}/modules/pango-khmer-fc.so
%{_libdir}/pango/%{pango_binary_version}/modules/pango-syriac-fc.so
%{_libdir}/pango/%{pango_binary_version}/modules/pango-thai-fc.so
%{_libdir}/pango/%{pango_binary_version}/modules/pango-tibetan-fc.so
%{_libdir}/lib*.so.*
%{_libdir}/girepository-1.0/Pango-1.0.typelib
%{_libdir}/girepository-1.0/PangoCairo-1.0.typelib
%{_libdir}/girepository-1.0/PangoFT2-1.0.typelib
%{_libdir}/girepository-1.0/PangoXft-1.0.typelib
%doc %{_mandir}/man?/*.*
%dir %{_sysconfdir}/pango
%{_sysconfdir}/pango/pangox.aliases
%if "%_lib" == "lib64"
@@ -215,9 +241,18 @@ fi
%ghost %{_sysconfdir}/pango/pango.modules
%endif
%files tools
%defattr(-, root, root)
%{_bindir}/pango-querymodules*
%{_bindir}/pango-view
%doc %{_mandir}/man1/pango-querymodules.1*
%doc %{_mandir}/man1/pango-view.1*
# We have this module in a subpackage because it requires additional libraries.
%files module-thai-lang
%defattr(-, root, root)
%{_libdir}/pango/1.6.0/modules/pango-thai-lang.so
%{_libdir}/pango/%{pango_binary_version}/modules/pango-thai-lang.so
%files devel
%defattr(-, root, root)
@@ -226,5 +261,6 @@ fi
%{_includedir}/pango-1.0/
%{_datadir}/gir-1.0/*.gir
%doc %{_datadir}/gtk-doc/html/pango/
%{_sysconfdir}/rpm/macros.pango
%changelog