File gtk.spec of Package gtk

#
# spec file for package gtk (Version 1.2.10)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           gtk
Version:        1.2.10
Release:        1084
%define _name gtk+
BuildRequires:  fdupes glib-devel gnome-patch-translation xorg-x11-devel
License:        GPL v2 or later
Group:          System/Libraries
Provides:       gtkn
Provides:       %{_name} = %{version} 
AutoReqProv:    on
# bug437293
%ifarch ppc64
Obsoletes:      gtk-64bit
%endif
%ifarch  ppc
Obsoletes:      gtk-32bit
%endif
#
Summary:        A Library for the Creation of Graphical User Interfaces
Requires:       glib 
Source:         %{_name}-%{version}.tar.bz2
Source1:        gtkrc.unifont
Patch:          gtk+-%{version}.dif
Patch1:         gtk-cvs.dif
Patch2:         gtk+-%{version}-nolibtool.patch
Patch3:         gtk-fix-dnd-crash.patch
Patch4:         gtk-filesel-dirchanged-fix.patch
Patch5:         gtk+-1.2.10-acdivert.patch
Patch6:         gtk+-1.2.10-gtkrc.patch
Patch7:         cflags-gtk-config.dif
Patch8:         gtk-autoconf.patch
Patch9:         gtk-filesel-navigation-buttons.patch
Patch10:        gtk+-%{version}-automake.patch
Patch11:        gtk+-%{version}-gtkrc_az.patch
Patch12:        gtk+-%{version}-gettext.patch
Patch13:        gtk.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       %{name}-lang = %{version}

%description
This fast and versatile library was used all over the world for all
GNOME applications, the GIMP, and several others. Originally it was
written for the GIMP and hence has the name GIMP ToolKit. Many people
like it because it is small, efficient, and very configurable.

Most applications which used GTK1 have since switched to gtk2 (GTK2).
Besides a more flexible API, it provides improved text rendering using
pango (Pango) and many other goodies, but GTK+ 2 lacks compatibility
with GTK1, so to switch, programmers have to port applications to it.

Thus, some applications for which GTK1 is sufficient, still to use
GTK1. GTK1 remains faster and less complex than GTK2. To develop
applications with gtk, you need the package gtk-devel.



Authors:
--------
    Peter Mattis      <petm@xcf.berkeley.edu>
    Spencer Kimball   <spencer@xcf.berkeley.edu>
    Josh MacDonald    <jmacd@xcf.berkeley.edu>
    Shawn T. Amundson <amundson@gtk.org>
    Jerome Bolliet    <bolliet@gtk.org>
    Damon Chaplin     <damon@gtk.org>
    Tony Gale         <gale@gtk.org>
    Jeff Garzik       <jgarzik@gtk.org>
    Lars Hamann       <lars@gtk.org>
    Raja R Harinath   <harinath@gtk.org>
    Carsten Haitzler  <raster@gtk.org>
    Tim Janik         <timj@gtk.org>
    Stefan Jeske      <stefan@gtk.org>
    Elliot Lee        <sopwith@gtk.org>
    Raph Levien       <raph@gtk.org>
    Ian Main          <imain@gtk.org>
    Federico Mena     <quartic@gtk.org>
    Paolo Molaro      <lupus@gtk.org>
    Jay Painter       <jpaint@gtk.org>
    Manish Singh      <manish@gtk.org>
    Owen Taylor       <otaylor@gtk.org>

%package devel
License:        GPL v2 or later; LGPL v2.1 or later
Obsoletes:      gtkdev
Provides:       gtkdev
Requires:       gtk = %{version}
Requires:       glib-devel XFree86-devel
Summary:        Developer Files for GIMP ToolKit
Group:          Development/Libraries/X11
AutoReqProv:    on
PreReq:         %install_info_prereq
Requires:       glibc-devel xorg-x11-devel

%description devel
All the files necessary to start your own GTK development. Also see the
gtk package.



Authors:
--------
    Peter Mattis    (petm@xcf.berkeley.edu)
    Spencer Kimball (spencer@xcf.berkeley.edu)
    Josh MacDonald  (jmacd@xcf.berkeley.edu)

%lang_package
%prep
%setup -q -n %{_name}-%{version} 
gnome-patch-translation-prepare
cp -a %{S:1} .
%patch
%patch1 -p1 
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5
%patch6 -p1
%patch7 -p1
%patch8
%patch9 -p1
%patch10
%patch11
%patch12
%patch13
rename no nb po/no.*
sed -i "s/\(ALL_LINGUAS.*\) no /\1 nb /" configure.in
sed -i s/iso-8859-9e/iso-8859-9/ po/az.po
# FIXME: Strange: iconv supports it, msgconv does not
iconv -f TCVN-5712 -t UTF-8 po/vi.po >po/vi.po.new ; mv po/vi.po.new po/vi.po ; sed -i s/TCVN-5712/UTF-8/ po/vi.po
gnome-patch-translation-update

%build
autoreconf -f -i
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure\
	--with-native-locale=yes\
	--with-xinput=xfree
make

%install
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk/themes/engines
rm $RPM_BUILD_ROOT%{_infodir}/dir
%find_lang %{_name}
cp -a gtkrc.unifont $RPM_BUILD_ROOT%{_sysconfdir}/gtk
cd $RPM_BUILD_ROOT%{_sysconfdir}/gtk
test -f gtkrc.zh_TW.big5 -a ! -f gtkrc.zh_TW && ln -s gtkrc.zh_TW.big5 gtkrc.zh_TW
# Locales, which can work with special gtkrc.unifont, but not copy of non-UTF-8 gtkrc.
for rcfile in he hy ka ko ru th uk vi yi zh ; do
    ln -s gtkrc.unifont gtkrc.$rcfile.utf8
done
# Locales, which can work with copy of gtkrc, used for the same non-UTF-8 locales.
for rcfile in gtkrc.?? ; do
    if ! test -e $rcfile.utf8 ; then
	if test -L $rcfile ; then
	    rcdest=$(readlink $rcfile)
# These locales, can work with universal UTF-8 gtkrc (mostly Latin ones).
	    rcrestr=${rcdest%gtkrc.iso8859[12349]}
	    rcrest=${rcdest%gtkrc.iso88591[0345]}
	    if test "$rcdest" != "$rcrest" ; then
		cp -d $rcfile $rcfile.utf8
	    fi
	else
	    ln -s $rcfile $rcfile.utf8
	fi
    fi
done
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%post devel
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/gdk.info.gz

%postun devel
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gdk.info.gz

%files
%defattr(-, root, root)
%doc AUTHORS COPYING README NEWS ChangeLog 
%{_libdir}/*.so.*
%dir %{_libdir}/gtk
%dir %{_libdir}/gtk/themes
%dir %{_libdir}/gtk/themes/engines
%{_datadir}/themes/*
%{_sysconfdir}/gtk

%files lang -f %{_name}.lang

%files devel
%defattr(-, root, root)
%{_bindir}/*
%{_datadir}/aclocal/*.m4
%{_includedir}/*
%doc %{_infodir}/*.info*
%doc %{_mandir}/man?/*.*
%{_libdir}/*.so
%{_libdir}/*.*a
%{_libdir}/pkgconfig/*.pc

%changelog
* Tue Dec 09 2008 ro@suse.de
- remove ix86 from ifarch statement obsoleting 32bit package
* Mon Nov 24 2008 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Tue Aug 07 2007 maw@suse.de
- Use %%fdupes
- Split off a -lang subpackage
- s#%%run_ldconfig#/sbin/ldconfig/ in %%post and %%postun.
* Tue May 08 2007 ro@suse.de
- pull version/release definition before use
* Tue Jan 23 2007 sbrabec@suse.cz
- Fixed bad charset for az.po and vi.po.
* Tue Jan 23 2007 ro@suse.de
- drop requires for gnome-filesystem
* Tue Jan 16 2007 sbrabec@suse.cz
- Fixed Norwegian patch translation (#235192).
* Mon Jan 15 2007 sbrabec@suse.cz
- Prefix changed to /usr.
- Spec file cleanup.
* Wed Feb 01 2006 sbrabec@suse.cz
- Use translation compendium gnome-patch-translation.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Sep 26 2005 mls@suse.de
- make devel package require base package
* Wed Sep 21 2005 gekker@suse.de
- Fix uninitialized variables, implicit declarations of functions
* Sat Apr 09 2005 schwab@suse.de
- Adapt for renamed gettext macro.
* Tue Oct 26 2004 mmj@suse.de
- Locale rename no to nb
* Fri Mar 26 2004 sbrabec@suse.cz
- Fixed default font for UTF-8 locales (#36771).
- Call autoreconf (some changes in gtk-cvs.dif were ignored).
- Create special gtkrc.unifont for non-Latin UTF-8 locales (#36771).
- Fixed typo in gtkrc.az.
- Build with -fno-strict-aliasing.
* Mon Mar 15 2004 sbrabec@suse.cz
- Fixed infodir in %%post and %%postun, too.
* Mon Mar 15 2004 sbrabec@suse.cz
- FHS 2.3 fix (mandir, infodir, #35821).
* Wed Mar 10 2004 sbrabec@suse.cz
- Fixed %%doc attributes (#33163).
* Fri Mar 05 2004 hhetter@suse.de
- applied gtk-filesel-navigation-buttons.patch:
  add file selector icons, default to ~/Documents
* Tue Mar 02 2004 sbrabec@suse.cz
- Added requirement for XFree86-devel to gtk-devel (bug #33682).
* Sat Jan 10 2004 adrian@suse.de
- add %%run_ldconfig
* Fri Jan 09 2004 schwab@suse.de
- Fix quoting in autoconf macros.
* Tue Jul 22 2003 hhetter@suse.de
- added /opt/gnome/include to the -cflag output
  of gtk-config
* Mon Jul 14 2003 sbrabec@suse.cz
- GNOME prefix change to /opt/gnome.
* Fri Jun 20 2003 sbrabec@suse.cz
- Fixed directory packaging.
- Created an empty directory for theme engines.
* Thu Apr 24 2003 ro@suse.de
- fix install_info --delete call and move from preun to postun
* Wed Mar 19 2003 sbrabec@suse.cz
- Set GTK_RC_FILES (bug #25645).
* Tue Mar 18 2003 sbrabec@suse.cz
- Set GTK_DATA_PREFIX to proper value and install themes to directory
  required by GTK_DATA_PREFIX (bug #25581).
* Mon Feb 10 2003 ke@suse.de
- Also add the gdk info file.
* Mon Feb 10 2003 ke@suse.de
- Use install_info macro [# 23422].
* Mon Jan 27 2003 mfabian@suse.de
- change default font-size for Japanese in ja_JP.eucJP locale
  to 12 pixel instead of 14 pixel (see Bug #20056).
- add a /etc/gtk/gtkrc.utf-8 to make it work right by default
  in UTF-8 locales without requiring the user to have a
  ~/.gtkrc file.
* Mon Nov 18 2002 ro@suse.de
- fix build with latest autoconf
* Wed Aug 14 2002 hhetter@suse.de
- added fileselection and dnd-crash fix patch (#17688)
* Fri May 31 2002 meissner@suse.de
- same ac magic as in glib to compile on ppc64.
* Thu Apr 25 2002 coolo@suse.de
- %%_lib support
* Tue Feb 05 2002 hhetter@suse.de
- include pkgconfig files in devel package
* Thu Jan 31 2002 hhetter@suse.de
- applied newer bugfix patch for stable version
* Fri Jan 18 2002 mfabian@suse.de
- don't change the value returned by setlocale
  (this makes gtk programs work in zh_TW.Big5 locale again)
* Tue Sep 25 2001 hhetter@suse.de
- added missing locale files to filelist,
  closing Bug Id# 11301
* Fri Sep 14 2001 egger@suse.de
- Added bugfixes from the stable CVS.
  Fixes:
  * Huge eventload while drag-and-drop avoided
  * Fix refcounting for gtklists
  * Fix size calculation for optionmenus
  * Fix special gtkrc use for different locales
  * Fix use of wrong variable to prevent crash in multibyte envs.
- Tested on ppc without any sideeffects.
* Mon Apr 02 2001 egger@suse.de
- Update to version 1.2.10. This contains important
  internationalisation fixes!
* Mon Mar 26 2001 phm@suse.de
- add gtkrc.zh_TW as link to gtkrc.zh_TW.big5
* Mon Mar 12 2001 schwab@suse.de
- Work around missing declaration of XSetIMValues.
* Sun Mar 04 2001 egger@suse.de
- Updated to 1.2.9.
- Cleaned up specfile.
* Thu Mar 01 2001 egger@suse.de
- Updated to version 1.2.9pre4.
- Removed aa patch due to incompatibility.
* Thu Mar 01 2001 egger@suse.de
- Updated to version 1.2.9pre1.
* Wed Feb 14 2001 egger@suse.de
- Recompressed with bzip2.
- Added antialiased fonts patch if supported on target
  architecture, needs to be activated by setting GDK_USE_XFT.
* Sun Dec 10 2000 egger@suse.de
- Moved location of configuration files to /etc according to the
  LSB requirements.
- Cleaned up specfile.
- Use BuildRoot and RPM_BUILD_OPT for building.
* Wed Nov 01 2000 egger@suse.de
- Updated specfile to new long packagenames.
- Reworked specfile.
- Probably needs some more work; I'm taking care of that.
* Sun Oct 29 2000 egger@suse.de
- Beatified the specfile a little and prepared it
  for long filenames.
* Thu May 25 2000 egger@suse.de
- Updated to 1.2.8.
- Replaced every occurence of 1.2.7 by %%{version}.
* Mon May 22 2000 egger@suse.de
- Autobuild is more pickier about paths now -> fixed them.
* Fri May 19 2000 egger@suse.de
- Removed deprecated documentation.
* Mon May 15 2000 egger@suse.de
- Added a Provides: gtk+ on request of ke@suse.de.
* Fri Apr 07 2000 bk@suse.de
- added suse update config macro
* Wed Mar 01 2000 werner@suse.de
- Fix config.guess selection
* Thu Feb 24 2000 egger@suse.de
- Use wildcards...
* Thu Feb 24 2000 egger@suse.de
- Replaced some strings by variables.
* Wed Feb 23 2000 egger@suse.de
- Set required tag to glib 1.2.7.
* Wed Feb 23 2000 egger@suse.de
- Use %%doc tags for a "better build"(TM).
* Thu Feb 17 2000 fehr@suse.de
- changed to version 1.2.7
* Mon Oct 11 1999 fehr@suse.de
- changed to version 1.2.6
* Wed Sep 29 1999 fehr@suse.de
- changed to version 1.2.5
* Mon Sep 27 1999 bs@suse.de
- fixed requirements for sub packages
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Tue Aug 24 1999 fehr@suse.de
- changed to version 1.2.4
* Tue Jul 13 1999 ro@suse.de
- package renamed to gtk/gtkdev
* Tue May 18 1999 fehr@suse.de
- changed to version 1.2.3
* Fri Mar 26 1999 fehr@suse.de
- changed to version 1.2.1
* Thu Mar 18 1999 fehr@suse.de
- add html documentation to package
* Mon Mar 01 1999 fehr@suse.de
- changed to version 1.2.0
* Wed Feb 17 1999 fehr@suse.de
- changed to version 1.1.16
* Fri Feb 05 1999 fehr@suse.de
- changed to version 1.1.15
* Wed Feb 03 1999 bs@suse.de
- changed file list, to let it build in libc5 environment.
* Mon Feb 01 1999 bs@suse.de
- set exec permissions to libs (again)
* Fri Jan 29 1999 fehr@suse.de
- changed to version 1.1.14
* Tue Jan 19 1999 fehr@suse.de
- changed to version 1.1.13
* Sat Jan 09 1999 fehr@suse.de
- changed to version 1.1.12
* Mon Jan 04 1999 fehr@suse.de
- changed to version 1.1.11
* Tue Dec 22 1998 fehr@suse.de
- changed to version 1.1.9
* Wed Nov 11 1998 fehr@suse.de
- packages gtkn/gtkndev contain gtk+-1.1.4
* Fri Oct 23 1998 fehr@suse.de
- split up packages into runtime/development file
- packages gtkn/gtkndev contain gtk+-1.1.3
* Fri Oct 23 1998 fehr@suse.de
- split up packages into runtime/development file
- seperate glib from gtk library
* Tue Sep 22 1998 fehr@suse.de
- switch to version 1.0.6
* Wed Sep 16 1998 fehr@suse.de
- switch to version 1.0.5
* Fri Jun 26 1998 fehr@suse.de
- switch to version 1.0.4
* Mon May 18 1998 fehr@suse.de
- switch to version 1.0.1
* Tue Mar 03 1998 fehr@suse.de
- switch to version 0.99.4
* Tue Feb 03 1998 fehr@suse.de
- switch to version 0.99.3
* Thu Jan 08 1998 fehr@suse.de
- switch to version 0.99.2
* Fri Nov 07 1997 fehr@suse.de
- add fix for gtkcolorsel.c
* Thu Oct 30 1997 fehr@suse.de
- add version 971025 of gtk package to S.u.S.E. distribution
openSUSE Build Service is sponsored by