%define glib2_version 2.24.0
%define pkgconfig_version 0.12
%define freetype2_version 2.3.9
%define cairo_version 1.8.8

# biarch support
%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
%define _querymodules_suffix %{nil}
%if %{build_compat32}
%define _querymodules_suffix -32
%endif

Summary: System for layout and rendering of internationalized text.
Summary(ja): 国際化テキストのレイアウト・レンダリングシステム
Name: pango
Version: 1.28.0
Release: 1%{?_dist_release}
License: LGPL
Group: System Environment/Libraries
Source: ftp://ftp.gnome.org/pub/gnome/sources/pango/1.26/pango-%{version}.tar.bz2
URL: http://www.pango.org
BuildRoot: %{_tmppath}/%{name}-%{version}-root

# We need to prereq this so we can run pango-querymodules
Requires: glib2 >= %{glib2_version}
Requires: freetype2 >= %{freetype2_version}
BuildRequires: libtool >= 1.4.2
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: pkgconfig >= %{pkgconfig_version}
BuildRequires: freetype2-devel >= %{freetype2_version}
BuildRequires: fontconfig-devel
BuildRequires: libX11-devel, libXft-devel, libXrender
BuildRequires: cairo-devel >= %{cairo_version}
Obsoletes: pango-gtkbeta, fribidi-gtkbeta

# Look for pango.modules in an arch-specific directory
Patch0: pango-1.2.5-lib64.patch
# biarch support (mdk)
#Patch5: pango-1.2.5-lib64.patch.bz2


%description
Pango is a system for layout and rendering of internationalized text.

%description -l ja
Pango は国際化テキストのレイアウト・レンダリングシステムです。


%package devel
Summary: System for layout and rendering of internationalized text.
Summary(ja): 国際化テキストのレイアウト・レンダリングシステム
Group: Development/Libraries
Requires: pango = %{version}
Requires: glib2-devel >= %{glib2_version}
Requires: freetype2-devel >= %{freetype2_version}
Requires: cairo-devel >= %{cairo_version}
Requires: libX11-devel, libXft-devel, libXrender
Obsoletes: fribidi-gtkbeta-devel, pango-gtkbeta-devel

%description devel
The pango-devel package includes the static libraries, header files,
and developer docs for the pango package.

Install pango-devel if you want to develop programs which will use
pango.

#####################################################################
# compat32
%package -n compat32-%{name}
Summary: System for layout and rendering of internationalized text.
Summary(ja): 国際化テキストのレイアウト・レンダリングシステム
Group: Development/Libraries
%description -n compat32-%{name}
Pango is a system for layout and rendering of internationalized text.
%description -n compat32-%{name} -l ja
Pango は国際化テキストのレイアウト・レンダリングシステムです。

%package -n compat32-%{name}-devel
Summary: Development files for pango
Summary(ja): pango 用の開発ファイル
Group: Development/Libraries
Requires: compat32-%{name} = %{version}
Requires: %{name}-devel = %{version}
%description -n compat32-%{name}-devel
The pango-devel package includes the static libraries, header files,
and developer docs for the pango package.


%prep
%setup -q -n pango-%{version}
%patch0 -p1 -b .lib64

%build
%configure --with-included-modules=basic-fc
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

# biarch support
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pango/%{_arch}
touch $RPM_BUILD_ROOT%{_sysconfdir}/pango/%{_arch}/pango.modules

%if %{build_compat32}
cp $RPM_BUILD_ROOT%{_bindir}/pango-querymodules \
   $RPM_BUILD_ROOT%{_bindir}/pango-querymodules%{_querymodules_suffix}
%endif

# remove unpackaged files
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/pango/*/modules/*.la
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/pango/pango.modules

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig
%{_bindir}/pango-querymodules > %{_sysconfdir}/pango/%{_arch}/pango.modules

%postun -p /sbin/ldconfig

%if %{build_compat32}
%post -n compat32-%{name}
/sbin/ldconfig
%{_bindir}/pango-querymodules%{_querymodules_suffix} > %{_sysconfdir}/pango/%{_arch}/pango.modules

%postun -p /sbin/ldconfig -n compat32-%{name}
%endif

%files
%defattr(-, root, root)
%doc README AUTHORS COPYING NEWS
%doc pango-view/HELLO.txt
#doc README AUTHORS COPYING ChangeLog
#doc examples/HELLO.utf8
%{_bindir}/pango-querymodules
%{_bindir}/pango-view
%{_libdir}/libpango*-*.so.*
%{_libdir}/pango
%{_mandir}/man*/*
%dir %{_sysconfdir}/pango
%config %{_sysconfdir}/pango/pangox.aliases
%ghost %{_sysconfdir}/pango/%{_arch}/pango.modules

%files devel
%defattr(-, root, root)
%{_libdir}/libpango*.so
%{_includedir}/*
%{_libdir}/pkgconfig/*
%{_datadir}/gtk-doc/*

%if %{build_compat32}
%files -n compat32-%{name}
%defattr(-, root, root)
%{_libdir}/libpango*-*.so.*
%{_bindir}/pango-querymodules%{_querymodules_suffix}
%{_libdir}/pango
%dir %{_sysconfdir}/pango/%{_arch}
%ghost %{_sysconfdir}/pango/%{_arch}/pango.modules

%files -n compat32-%{name}-devel
%defattr(-, root, root)
%{_libdir}/libpango*.so
%{_libdir}/pkgconfig/*
%endif

%changelog
* Wed Mar 31 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.28.0-1
- new upstream release

* Sun Jan 10 2010 Shu KONNO <owa@bg.wakwak.com> 1.26.2-2
- changed %%makeinstall to make install with DESTDIR option

* Thu Jan 07 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.26.2-1
- new upstream release

* Sun Nov 29 2009 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.26.1-1
- new upstream release

* Thu Sep 24 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.26.0-1
- new upstream release

* Sun Jul 26 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.24.5-1
- new upstream release

* Wed Jul 01 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.24.4-1
- new upstream release

* Thu May 28 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.24.2-1
- new upstream release

* Mon May 04 2009 NAKAMURA Kenta <kenta@vinelinux.org> 1.24.1-2
- removed %%if !%%{build_compat32} case condition

* Mon May 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.24.1-1
- new upstream release

* Wed Mar 18 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.24.0-1
- new upstream release

* Tue Dec 23 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.22.4-1
- new upstream release

* Tue Nov 25 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.22.3-1
- new upstream release

* Fri Oct 24 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.22.1-1
- new upstream release

* Tue Sep 23 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.22.0-1
- new upstream release

* Thu Jul 10 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.20.5-1
- new upstream release

* Sun May 25 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.20.3-2
- spec in UTF-8 actually

* Sun May 25 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.20.3-1
- new upstream release
- rebuilt with xorg-x11 7.3

* Wed Apr  9 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.20.1-1vl5
- new upstream release

* Thu Mar 20 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.20.0-1vl5
- used %{?_dist_release}

* Wed Mar 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.20.0-0vl1
- new upstream release

* Thu Jan 10 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.18.4-0vl1
- new upstream release

* Fri Nov 16 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.18.3-0vl1
- new upstream release
- added Patch0 instead of Patch5

* Sun May 20 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.16.4-0vl2
- replace build with new environment

* Sun May 20 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.16.4-0vl2
- rebuild with new environment

* Thu May 03 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.16.4-0vl1
- new upstream release

* Wed Apr 25 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.16.2-0vl1
- new upstream release

* Mon Dec 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.14.9-0vl1
- new upstream release

* Sun Oct 15 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.14.7-0vl1
- new upstream release

* Sat Sep 16 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.14.4-0vl1
- new upstream release

* Thu Aug 10 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.14.0-0vl1
- new upstream release

* Tue Aug 08 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.12.3-0vl3
- rebuild with cairo-1.2.0

* Tue Aug 01 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.12.3-0vl2
- add Patch10 to create fake style(italic/bold) for all fonts.
  http://bugzilla.gnome.org/show_bug.cgi?id=319808
  - This patch is not applied in upstream, but it seems usefull
    for us.

* Sun May 28 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.12.3-0vl1
- new upstream release

* Sun Apr 30 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.12.2-0vl1
- new upstream release

* Sat Apr 08 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.12.1-0vl1
- new upstream release

* Fri Mar 17 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.12.0-0vl2
- fix broken dependancy

* Tue Mar 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.12.0-0vl1
- new upstream release

* Sun Mar 05 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.11.99-0vl1
- new upstream release
- add compat32 package for x86_64 arch support
- add Patch5 for biarch support

* Sun Jan 29 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.10.2-0vl1
- new upstream release

* Sat Oct 08 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.10.1-0vl1
- new upstream release

* Sun Aug 28 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.10.0-0vl1
- new upstream release

* Mon Aug 15 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.9.1-0vl2
- rebuild with cairo-0.9
- add patch10 to disable building example programs

* Tue Aug 02 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.9.1-0vl1
- new upstream release

* Mon Jan 10 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.0-0vl1
- new upstream release
- drop obsolete patches

* Sun Nov 07 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.0-0vl1
- new upstream release
- import upstream patches from fedora package.

* Sat Aug 14 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.1-0vl1
- new upstream release

* Thu Mar 18 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.0-0vl1
- new upstream release

* Thu Mar  4 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.5-0vl3
- remove unneeded dependancy to freetype2-devel

* Wed Nov 19 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.5-0vl2
- add patch10 to build against freetype-2.1.7
- rebuild with freetype-2.1.7

* Mon Sep 01 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.5-0vl1
- new upstream release

* Tue Jun 10 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.3-0vl1
- new upstream release

* Mon Feb 10 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-0vl1
- new upstream release

* Thu Jan 16 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.0-0vl2
- merge patch1,2 from rawhide package.

* Wed Dec 25 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.0-0vl1
- new upstream release

* Thu Dec 13 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1.5-0vl1
- new upstream release
- Build for Vine Linux, specfile are based on rawhide release

* Thu Nov 21 2002 Havoc Pennington <hp@redhat.com>
- change PKG_CONFIG_PATH hack to also search /usr/X11R6/lib64/pkgconfig

* Wed Nov 20 2002 Havoc Pennington <hp@redhat.com>
- explicitly require pangoxft to be built, so we catch situations such
  as xft.pc moving to /usr/X11R6
- also add /usr/X11R6/lib/pkgconfig to PKG_CONFIG_PATH as a temporary 
  hack

* Thu Nov  7 2002 Havoc Pennington <hp@redhat.com>
- 1.1.3

* Thu Oct 31 2002 Owen Taylor <otaylor@redhat.com> 1.1.1-5
- Require the necessary freetype version, don't just
  BuildRequires it (#74744)

* Thu Oct 31 2002 Owen Taylor <otaylor@redhat.com> 1.1.1-4
- Own /etc/pango (#73962, Enrico Scholz)
- Remove .la files from the build root

* Mon Oct  7 2002 Havoc Pennington <hp@redhat.com>
- require glib 2.0.6-3, try rebuild on more arches

* Wed Aug 21 2002 Owen Taylor <otaylor@redhat.com>
- Version 1.1.1 (main change, fixes font selection for FT2 backend, 
  as in gdmgreeter)

* Thu Aug 15 2002 Owen Taylor <otaylor@redhat.com>
- Fix linked list manipulation problem that was causing hang for anaconda
- Fix warning from loading mini-fonts with context == NULL

* Wed Aug 14 2002 Owen Taylor <otaylor@redhat.com>
- Fix major memory leak in the last patch

* Tue Aug 13 2002 Owen Taylor <otaylor@redhat.com>
- Actually use language tags at the rendering layer (should fix #68211)

* Mon Jul 15 2002 Owen Taylor <otaylor@redhat.com>
- Remove fixed-ltmain.sh, relibtoolize; to fix relink problems without 
- Fix bug causing hex boxes to be misrendered
  leaving RPATH (#66005)
- For FT2 backend, supply FT_LOAD_NO_BITMAP to avoid problems with 
  fonts with embedded bitmaps (#67851)

* Mon Jul  8 2002 Owen Taylor <otaylor@redhat.com>
- Make basic-x shaper work with our big-5 fonts

* Wed Jul  3 2002 Owen Taylor <otaylor@redhat.com>
- New upstream tarball with hooks for change-on-the fly font rendering

* Tue Jun 25 2002 Owen Taylor <otaylor@redhat.com>
- Up FreeType version to deal with FreeType-2.0.x / 2.1.x \
  ABI changes for pango's OpenType code.

* Mon Jun 24 2002 Owen Taylor <otaylor@redhat.com>
- Add some Korean aliases that the installer wants

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Sat Jun  8 2002 Havoc Pennington <hp@redhat.com>
- devel package requires fontconfig/Xft devel packages

* Fri Jun 07 2002 Havoc Pennington <hp@redhat.com>
- rebuild in different environment

* Thu Jun  6 2002 Owen Taylor <otaylor@redhat.com>
- Snapshot with Xft2/fontconfig support

* Wed May 29 2002 Owen Taylor <otaylor@redhat.com>
- Version 1.0.2
- Patch for charmaps problem

* Sun May 26 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Wed May 22 2002 Havoc Pennington <hp@redhat.com>
- rebuild in different environment

* Wed May 22 2002 Havoc Pennington <hp@redhat.com>
- add patch to adjust to newer version of freetype

* Wed Apr  3 2002 Alex Larsson <alexl@redhat.com>
- Update to version 1.0.1, remove patch

* Tue Mar 19 2002 Owen Taylor <otaylor@redhat.com>
- Patch from CVS for big speedup with FreeType-2.0.9

* Mon Mar 11 2002 Owen Taylor <otaylor@redhat.com>
- Rebuild

* Fri Mar  8 2002 Owen Taylor <otaylor@redhat.com>
- Version 1.0.0

* Mon Feb 25 2002 Alex Larsson <alexl@redhat.com>
- Update to 0.26

* Thu Feb 21 2002 Alex Larsson <alexl@redhat.com>
- Bump for rebuild

* Mon Feb 18 2002 Alex Larsson <alexl@redhat.com>
- Update to 0.25

* Fri Feb 15 2002 Havoc Pennington <hp@redhat.com>
- add horrible buildrequires hack

* Thu Feb 14 2002 Havoc Pennington <hp@redhat.com>
- 0.24.90 cvs snap

* Tue Jan 29 2002 Owen Taylor <otaylor@redhat.com>
- Version 0.24

* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Wed Jan  2 2002 Havoc Pennington <hp@redhat.com>
- new snap 0.23.90

* Sun Nov 25 2001 Havoc Pennington <hp@redhat.com>
- rebuild with 64-bit-fixed glib

* Sun Nov 25 2001 Havoc Pennington <hp@redhat.com>
- Version 0.22
- add explicit check for required glib2 version before we do the build,
  so we don't end up with bad RPMs on --nodeps builds
- PreReq the glib2_version version, instead of 1.3.8 hardcoded that 
  no one had updated recently

* Thu Oct 25 2001 Owen Taylor <otaylor@redhat.com>
- Version 0.21

* Thu Oct  4 2001 Havoc Pennington <hp@redhat.com>
- cvs snap
- new cvs snap with a bugfix

* Thu Sep 27 2001 Havoc Pennington <hp@redhat.com>
- sync with Owen's changes, fix up dependency versions

* Wed Sep 19 2001 Havoc Pennington <hp@redhat.com>
- 0.19

* Mon Sep 10 2001 Havoc Pennington <hp@redhat.com>
- build CVS snap

* Wed Sep 05 2001 Havoc Pennington <hp@redhat.com>
- no relinking junk

* Tue Sep  4 2001 root <root@dhcpd37.meridian.redhat.com>
- Version 0.18

* Fri Jul 20 2001 Owen Taylor <otaylor@redhat.com>
- Configure --disable-gtk-doc
- BuildRequires freetype-devel, XFree86-devel

* Tue Jun 12 2001 Havoc Pennington <hp@redhat.com>
- 0.17
- libtool hackarounds

* Fri May 04 2001 Owen Taylor <otaylor@redhat.com>
- 0.16, rename back to pango from pango-gtkbeta

* Fri Feb 16 2001 Owen Taylor <otaylor@redhat.com>
- Obsolete fribidi-gtkbeta

* Mon Dec 11 2000 Havoc Pennington <hp@redhat.com>
- Remove that patch I just put in

* Mon Dec 11 2000 Havoc Pennington <hp@redhat.com>
- Patch pangox.pc.in to include -Iincludedir

* Fri Nov 17 2000 Owen Taylor <otaylor@redhat.com>
- final 0.13

* Tue Nov 14 2000 Owen Taylor <otaylor@redhat.com>
- New 0.13 tarball

* Mon Nov 13 2000 Owen Taylor <otaylor@redhat.com>
- 0.13pre1

* Sun Aug 13 2000 Owen Taylor <otaylor@redhat.com>
- Rename to 0.12b to avoid versioning problems

* Thu Aug 10 2000 Havoc Pennington <hp@redhat.com>
- Move to a CVS snapshot

* Fri Jul 07 2000 Owen Taylor <otaylor@redhat.com>
- Move back to /usr
- Version 0.12

* Mon Jun 19 2000  Owen Taylor <otaylor@redhat.com>
- Add missing %%defattr

* Thu Jun 8 2000  Owen Taylor <otaylor@redhat.com>
- Rebuild with a prefix of /opt/gtk-beta

* Wed May 31 2000 Owen Taylor <otaylor@redhat.com>
- version 0.11
- add --without-qt

* Wed Apr 26 2000 Owen Taylor <otaylor@redhat.com>
- Make the devel package require *-gtkbeta-* not the normal packages.

* Tue Apr 25 2000 Owen Taylor <otaylor@redhat.com>
- GTK+ snapshot version installing in /opt/gtk-beta

* Fri Feb 11 2000 Owen Taylor <otaylor@redhat.com>
- Created spec file
