gtk2.spec
author dermotm
Mon, 06 Sep 2004 10:13:24 +0000
changeset 3858 a0a00bd9bb27
parent 3846 9ab79af72b15
child 3895 caf5571f7b66
permissions -rw-r--r--
Incremented release numbers for build 18

Name:         gtk2
License:      LGPL
Group:        System/Libraries
Version:      2.4.9
Release:      18
Distribution: Cinnabar
Vendor:	      Sun Microsystems, Inc.
Summary:      GTK+ - GIMP Toolkit Library for creation of graphical user interfaces
Source:       http://ftp.gnome.org/pub/GNOME/sources/gtk+/2.4/gtk+-%{version}.tar.bz2
Source1:      gtk.unset-hack.sh
Source2:      gtk.unset-hack.csh
Source3:      gtk2-l10n-po-1.3.tar.bz2
Source4:      gtk-query-immodules-2.0.1.gz
Source5:      gdk-pixbuf-csource.1.gz
Source6:      libgdk-x11-2.0.3.gz
Source7:      libgdk_pixbuf-2.0.3.gz
Source8:      libgdk_pixbuf_xlib-2.0.3.gz
Source9:      libgtk-x11-2.0.3.gz
Patch1:       gtk+-01-window-icons-for-message-dialog.diff
Patch2:       gtk+-02-fileseldlg-navbuttons.diff
Patch3:       gtk+-03-text-plain-dnd.diff
Patch4:       gtk+-04-gdk-x11-uninstalled-pc.diff
Patch5:       gtk+-05-mediaLib.diff
Patch6:       gtk+-06-file-chooser.diff
Patch7:       gtk+-07-use-xim-for-all-locales.diff
Patch8:       gtk+-08-fontbutton.diff
Patch9:       gtk+-09-combo-a11y.diff
Patch10:      gtk+-10-nofocus-empty.diff
Patch11:      gtk+-11-single-row-treeview.diff
Patch12:      gtk+-12-sun-copy-paste-keybindings.diff
Patch13:      gtk+-13-sun-pgdn-pgup-keybinding.diff
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
Docdir:       %{_defaultdocdir}/doc
Autoreqprov:  on
Prereq:       /sbin/ldconfig

%define atk_version 1.7.0
%define pango_version 1.4.0
%define glib2_version 2.4.0
%define libpng_version 1.2.5
%define libjpeg_version 6.2.0

BuildRequires: atk-devel >= %{atk_version}
BuildRequires: pango-devel >= %{pango_version}
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: libpng-devel >= %{libpng_version}
BuildRequires: libjpeg >= %{libjpeg_version}
Requires:      glib2 >= %{glib2_version}
Requires:      atk >= %{atk_version}
Requires:      pango >= %{pango_version}
Requires:      libpng >= %{libpng_version}
Requires:      libjpeg >= %{libjpeg_version}

%description
This fast and versatile library is 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.

%package devel
Summary:      Library for creation of graphical user interfaces
Group:        Development/Libraries/X11
Autoreqprov:  on
Requires:     %{name} = %{version}
Requires:     atk-devel >= %{atk_version}
Requires:     pango-devel >= %{pango_version}

%description devel
This fast and versatile library is 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.

%prep
%setup -q -n gtk+-%{version} 
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1

%ifos solaris
%patch12 -p1
%endif

%patch13 -p1

bzcat %SOURCE3 | tar xvf -

%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

libtoolize --force
aclocal $ACLOCAL_FLAGS -I .
autoheader
automake -a -c -f
autoconf
CFLAGS="$RPM_OPT_FLAGS"			\
./configure --prefix=%{_prefix}		\
	    --sysconfdir=%{_sysconfdir} \
	    --with-native-locale=yes	\
	    --with-xinput=xfree		\
	    --mandir=%{_mandir}		\
	    --infodir=%{_infodir}	\
	    --enable-shm		\
	    --enable-xim		\
	    --enable-fbmanager		\
	    --with-gdktarget=x11 \
		--enable-gtk-doc

make -j $CPUS

%install
make DESTDIR=$RPM_BUILD_ROOT install
./mkinstalldirs $RPM_BUILD_ROOT%{_sysconfdir}/gtk-2.0
mkdir -p $RPM_BUILD_ROOT/etc/profile.d
cp %SOURCE1 $RPM_BUILD_ROOT/etc/profile.d/
cp %SOURCE2 $RPM_BUILD_ROOT/etc/profile.d
install -d $RPM_BUILD_ROOT%{_mandir}/man1
install -d $RPM_BUILD_ROOT%{_mandir}/man3
install --mode=0644 %SOURCE4 $RPM_BUILD_ROOT%{_mandir}/man1
install --mode=0644 %SOURCE5 $RPM_BUILD_ROOT%{_mandir}/man1
install --mode=0644 %SOURCE6 $RPM_BUILD_ROOT%{_mandir}/man3
install --mode=0644 %SOURCE7 $RPM_BUILD_ROOT%{_mandir}/man3
install --mode=0644 %SOURCE8 $RPM_BUILD_ROOT%{_mandir}/man3
install --mode=0644 %SOURCE9 $RPM_BUILD_ROOT%{_mandir}/man3
#Copy zh_HK from zh_TW
#Fixes bug 4930405
install -d $RPM_BUILD_ROOT%{_datadir}/locale/zh_HK/LC_MESSAGES
install --mode=0644 $RPM_BUILD_ROOT%{_datadir}/locale/zh_TW/LC_MESSAGES/*.mo $RPM_BUILD_ROOT%{_datadir}/locale/zh_HK/LC_MESSAGES/
rm $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/2.4.0/immodules/*.la
rm $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/2.4.0/loaders/*.la
rm $RPM_BUILD_ROOT%{_libdir}/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig
%{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/gtk.immodules
%{_bindir}/gdk-pixbuf-query-loaders > %{_sysconfdir}/gtk-2.0/gdk-pixbuf.loaders

%postun
#If this is the last version of the package remove the config files
if [ $1 = 0 ]
then
	rm %{_sysconfdir}/gtk-2.0/gtk.immodules
	rm %{_sysconfdir}/gtk-2.0/gdk-pixbuf.loaders
fi
/sbin/ldconfig

%files 
%{_bindir}/*query*
%{_libdir}/lib*.so.*
%{_libdir}/gtk-2.0/*/immodules/*.so
%{_libdir}/gtk-2.0/*/loaders/*.so
%{_datadir}/themes/*/*
%{_datadir}/locale/*/LC_MESSAGES/*.mo
%{_sysconfdir}/profile.d/gtk.unset-hack.sh
%{_sysconfdir}/profile.d/gtk.unset-hack.csh
%dir %{_sysconfdir}/gtk-2.0
%{_mandir}/man1/*.gz

%files devel
%{_bindir}/*-demo
%{_bindir}/*-csource
%{_includedir}/gtk-2.0
%{_libdir}/lib*.so
%{_libdir}/gtk-2.0/include
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gtk-2.0
%{_datadir}/aclocal/*.m4
%{_datadir}/gtk-doc/html/*
%{_mandir}/man3/*.gz

%changelog -n gtk2
* Thu Aug 26 2004 - [email protected]
- Bump to 2.4.9

* Tue Aug 24 2004 - [email protected]
- Bump to 2.4.7

* Wed Aug 18 2004 - [email protected]
- added --enable-gtk-doc.

* Tue Aug 17 2004 - [email protected]
- Added Sun branding patch gtk+-15-sun-pgdn-pgup-keybinding.diff
  Sun keyboard bindings for Keypad keys PageUp, PageDown, Home and End.
  The patch has been rejected by the GTK maintainers as a WONTFIX as they feel
  its a bug in the Sun Xserver. Corresponding sun-patch is 085-74223-w.diff
  
* Thu Aug 12 2004 - [email protected]
- Added Sun branding patch gtk+-14-sun-copy-paste-keybindings.diff 
  to provide copy, paste, cut key bindings in Sun Keyboards. The patch is
  ported from GNOME 2.0 (sun-patches/gtk+/190-00000-s.diff). It was rejected
  by community. So, it will be a SUN specific patch.

* Thu Jul 22 2004 - [email protected]
- Added patches gtk+-10-combo-a11y.diff for bugzilla #132847
  gtk+-11-nofocus-empty.diff for bugzilla #126295
  gtk+-12-file-chooser-a11y-names.diff for bugzilla #144405
  gtk+-13-single-row-treeview.diff for bugzilla #131226

* Wed Jul 14 2004 - [email protected]
- Added a new -09 patch to fix bugtraq #5048804

* Thu Jul 08 2004 - [email protected]
- Updated l10n content to gtk2-l10n-po-1.2.tar.bz2

* Thu Jul 08 2004 - [email protected]
- run libtoolize to fix some weirdness

* Wed Jul 07 2004 - [email protected]
- Ported to rpm4

* Wed Jul 07 2004 - [email protected]
- added "-j $CPUS" to make to speed up builds

* Mon May 17 2004 - [email protected]
- Added a new -07 patch to fix bugtraq #5035382.
- Moved the previous revision 07 patch to fix bug 141190 to revision 08
  as the last patch, since the same fix is already in community's cvs server,
  hence the patch should be removed eventually when the fix comes from a
  new version of gtk+ tarball, including gtkimcontextxim.c revision 1.47 or
  newer.

* Fri May 14 2004 - [email protected]
- Applied patch to fix bug 141190, bringing gtkimcontextxim.c
  up to revision 1.47.  Revision 1.46, included in 2.4.1, broke
  compilation on Solaris.

* Fri May 14 2004 - [email protected]
- Bump to 2.4.1. Remove render icon patch, since upstream.

* Wed May 12 2004 - [email protected]
- Updated l10n content to gtk2-l10n-po-1.1.tar.bz2

* Mon Mar 29 2004 - [email protected]
- Updated l10n content to gtk2-l10n-po-1.0.tar.bz2

* Thu Mar 25 2004 - [email protected]
- Use JDS autotools.

* Wed Mar 24 2004 - [email protected]
- Bump to 2.4.0 and remove upstream file chooser patch.

* Mon Mar 22 2004 - <[email protected]>
- added patch 7 to add mediaLib support.  Also added autoconf/
  automake since this patch changes configure.in/Makefile.am
  files.

* Thu Mar 18 2004 - [email protected]
- don't install unsupported gtk-2.0/*/immodules/im-*.so

* Tue Mar 16 2004 - <[email protected]>
- Add patch 6 to fix -1 enumeration issue on Solaris.  This
  fixed many programs from crashing (panel, gdm, nautilus).

* Mon Mar 15 2004 - <[email protected]>
- Add patch to fix build on Solaris. In cvs.gnome.org already.

* Thu Mar 11 2004 - <[email protected]>
- Remove patches 4 and 5 - they're upstream.

* Wed Mar 10 2004 - <[email protected]>
- Bump to 2.3.6, update dependenciy versions.

* Tue Feb 10 2004 - <[email protected]>
- Bump to 2.3.2, and l10n to 0.7, and port patch 05

* Fri Jan 09 2004 - <[email protected]>
- add a missing .pc file
- clean up for Solaris builds

* Wed Jan 07 2004 - <[email protected]>
- Remove the tab cycling patch for notebooks, since it's already
  upstream.

* Mon Dec 15 2003 - <[email protected]>
- Bump to 2.3.1

* Mon Aug 25 2003 - <[email protected]>
- Fix input method hanged in zh_CN.gb18030 locale.
  Taken patch from community for bugzilla 115077 and 105909.
  Fixed 4894673, 4908025.

* Thu Aug 14 2003 - <[email protected]>
- move lib*.so to -devel, remove *.a, *.la

* Fri Jul 25 2003 - [email protected]
- /etc/gtk-2.0 needs to exist before postinstall script is run.
  run ./mkinstalldirs to ensure this.

* Fri Jul 18 2003 - <[email protected]>
- Fixing %postun action so that config files are only removed on final
  uninstall of gtk2.

* Fri Jul 11 2003 - <[email protected]>
- add file selection dialog shortcuts patch

* Wed Jul 09 2003 - <[email protected]>
- add in sun po files

* Mon Jul 07 2003 - <[email protected]>
- add new patch to make message dialogs have window icons.
  See bug #116896.

* Mon Jun 30 2003 - <[email protected]>
- Add new patch to make sure that rendering on pixbufs is okay. This 
  fixes an issue with gnome-theme-manager

* Mon Jun 30 2003 - <[email protected]>
- Bump version number for new tarballs, and reset release number.

* Wed Jun 25 2003 - <[email protected]>
- add gtk-unset-hack.sh and gtk-unset-hack.csh to workaround
  SuSE's gtk-1.2 rpms installing crackrock scripts into
  /etc/profile.d

* Thu May 29 2003 - <[email protected]>
- added patch gtk+-01-tab-change-with-ctrl-alt-pageup-pagedn.diff

* Tue May 13 2003 - [email protected]
- initial release