2007-01-05 16:49:44 +01:00
#
2010-09-27 00:37:51 +02:00
# spec file for package gtk2 (Version 2.21.8)
2007-01-05 16:49:44 +01:00
#
2010-01-22 14:04:16 +01:00
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
2007-01-05 16:49:44 +01:00
#
2008-08-14 00:39:23 +02:00
# 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.
2007-01-05 16:49:44 +01:00
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
2008-02-22 01:26:35 +01:00
2007-01-05 16:49:44 +01:00
Name : gtk2
%define _name gtk+
2010-09-27 00:37:51 +02:00
Version : 2.21.8
2010-08-09 15:51:52 +02:00
Release : 1
2010-02-11 19:13:28 +01:00
# FIXME: 2.19.3 doesn't compile with parallel build. Check if this is still true for later versions.
2010-02-11 19:13:27 +01:00
# FIXME: when updating to next version, check whether we can remove the workaround for bgo#596977 below (removing -fomit-frame-pointer)
2009-12-08 11:33:41 +01:00
License : LGPLv2.1+
2009-12-08 11:33:40 +01:00
Summary : Library for Creation of Graphical User Interfaces (version 2)
2009-12-08 11:33:41 +01:00
Url : http://www.gtk.org/
Group : System/Libraries
2007-09-19 19:05:58 +02:00
Source : ftp://ftp.gnome.org/pub/GNOME/sources/%{_name}/2.12/%{_name}-%{version} .tar.bz2
2007-01-05 16:49:44 +01:00
Source2 : README.SuSE
Source3 : gtkrc
2009-12-29 19:02:29 +01:00
Source4 : baselibs.conf
2010-08-27 17:14:50 +02:00
Source5 : macros.gtk2
2008-07-24 22:44:01 +02:00
# PATCH-FIX-OPENSUSE gtk64.patch sbrabec@novell.com - 64-bit dual install. See also the Fedora patch for a simpler way of doing this.
2007-01-05 16:49:44 +01:00
Patch8 : gtk64.patch
2008-07-24 22:44:01 +02:00
# PATCH-FEATURE-UPSTREAM bugzilla-129753-gtk+-2.8.9-localize-font-style-name.diff bnc129753 bgo319484 mfabian@novell.com - Translate the font styles in the GUI
2007-01-05 16:49:44 +01:00
Patch22 : bugzilla-129753-gtk+-2.8.9-localize-font-style-name.diff
2008-07-24 22:44:01 +02:00
# PATCH-FIX-OPENSUSE bugzilla-131498-allow-xim-for-all-languages.patch bnc131498 mfabian@novell.com - Allow all languages to be run with the X Input Method
2007-01-05 16:49:44 +01:00
Patch23 : bugzilla-131498-allow-xim-for-all-languages.patch
2008-07-24 22:44:01 +02:00
# PATCH-FIX-UPSTREAM gtk2-bnc130159-bgo319483-async-selection-in-gtk-font-selection.diff bnc130159 bgo319483 federico@novell.com - Load fonts asynchronously in GtkFontSelection to make it appear faster for CJK languages
Patch24 : gtk2-bnc130159-bgo319483-async-selection-in-gtk-font-selection.diff
2007-09-19 19:05:58 +02:00
# Patches taken from upstream or slated to go upstream. We can expect these to become obsolete
# in future releases.
# Please don't delete this comment even if this section is empty -- "# empty" should
# be sufficient.
# FIXME: this section is incomplete, and that some of the patches listed earlier should
# be here instead.
2009-05-28 00:51:56 +02:00
# PATCH-FIX-OPENSUSE gtk-path-local.patch Search in /usr/local/%{_lib} by default. bnc369696 bgo534474
2008-04-23 01:54:47 +02:00
Patch53 : gtk-path-local.patch
2009-12-08 11:33:41 +01:00
BuildRequires : fdupes
BuildRequires : gcc-c++
BuildRequires : atk-devel
BuildRequires : cairo-devel
BuildRequires : cups-devel
2010-08-09 15:51:52 +02:00
BuildRequires : gdk-pixbuf-devel
2009-12-08 11:33:41 +01:00
# Needed for patches touching the build system
BuildRequires : gnome-common
BuildRequires : gnome-patch-translation
2009-12-29 19:02:29 +01:00
BuildRequires : gobject-introspection-devel
2009-12-08 11:33:41 +01:00
BuildRequires : libjasper-devel
BuildRequires : libtiff-devel
BuildRequires : pango-devel
BuildRequires : translation-update-upstream
PreReq : /usr/bin/touch /bin/rm /bin/rmdir
2007-08-09 18:33:31 +02:00
Requires : %{name} -lang = %{version}
2009-03-26 17:38:01 +01:00
Requires : hicolor-icon-theme
2008-03-07 21:59:23 +01:00
# gtk2 can exist without branding. Built in defaults will be used then.
Recommends: %{name} -branding
2008-04-03 00:37:56 +02:00
Recommends: gvfs
2009-12-08 11:33:41 +01:00
# bug437293
%ifarch ppc64
Obsoletes : gtk2-64bit
%endif
#
2008-06-22 02:36:34 +02:00
# gail is part of gtk+ as of 2.13.x
Provides : gail = 1.22.1
2009-12-08 11:33:41 +01:00
Obsoletes : gail < 1.22.1
BuildRoot : %{_tmppath} /%{name} -%{version} -build
2007-01-05 16:49:44 +01:00
%description
This fast and versatile library is used all over the world for all
2007-07-10 18:22:31 +02:00
libgnome (GNOME) applications, gimp (The GIMP), and several others.
Originally, version 1 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 gtk (GTK1) have since switched to 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.
To develop applications with gtk, you need the package gtk2-devel.
2007-01-05 16:49:44 +01:00
2008-03-07 21:59:23 +01:00
%package branding-upstream
2009-12-08 11:33:41 +01:00
License : LGPLv2.1+
2008-03-07 21:59:23 +01:00
Summary : Library for Creation of Graphical User Interfaces (version 2)
Group : System/Libraries
Provides : %{name} -branding = %{version}
2008-10-22 18:00:24 +02:00
Conflicts : otherproviders(%{name} -branding)
2009-12-08 11:33:41 +01:00
Supplements: packageand(%{name} :branding-upstream)
2008-03-07 21:59:23 +01:00
%description branding-upstream
This fast and versatile library is used all over the world for all
libgnome (GNOME) applications, gimp (The GIMP), and several others.
Originally, version 1 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 gtk (GTK1) have since switched to 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.
To develop applications with gtk, you need the package gtk2-devel.
2007-01-05 16:49:44 +01:00
%package devel
2009-12-08 11:33:41 +01:00
License : LGPLv2.1+
2007-07-10 18:22:31 +02:00
Summary : Development environment for the Gtk2 GUI library
2007-01-05 16:49:44 +01:00
Group : Development/Libraries/X11
2008-11-28 15:09:26 +01:00
# bug437293
%ifarch ppc64
Obsoletes : gtk2-devel-64bit
%endif
#
2010-08-09 15:51:52 +02:00
Requires : %{name} = %{version} atk-devel cairo-devel gdk-pixbuf-devel glibc-devel glib2-devel pango-devel %(rpm -q --whatprovides XFree86-devel --queryformat '%{NAME}' )
2008-07-11 21:09:42 +02:00
# gtk-builder-convert needs this.
Requires : pyxml
2008-06-22 02:36:34 +02:00
# gail is part of gtk+ as of 2.13.x
Provides : gail-devel = 1.22.1
2009-12-08 11:33:41 +01:00
Obsoletes : gail-devel < 1.22.1
2009-02-20 22:11:30 +01:00
Provides : gtk2-doc = %{version}
2009-12-08 11:33:41 +01:00
Obsoletes : gtk2-doc < %{version}
2007-01-05 16:49:44 +01:00
%description devel
2007-07-10 18:22:31 +02:00
This package contains all necessary include files, libraries,
configuration files and development tools needed to compile and link
applications using the gtk2 library.
In addition, it contains a large set of demo applications in source
code and manual pages for the provided Gtk2 development tools.
Gtk2 is a fast and versatile library is used all over the world for all
2007-01-05 16:49:44 +01:00
GNOME applications, the GIMP, and several other applications.
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.
2007-08-09 18:33:31 +02:00
%lang_package
2007-01-05 16:49:44 +01:00
%prep
2009-11-25 14:48:22 +01:00
%setup -q -n %{_name}-%{version}
translation-update-upstream
translation-update-upstream po-properties gtk20-properties
gnome-patch-translation-prepare
2007-01-05 16:49:44 +01:00
%if "%_lib" == "lib64"
cp -a %{S:2} .
# WARNING: This patch does not patch not installed demos and tests.
%patch8 -p1
%endif
%patch22 -p1
%patch23 -p1
2008-07-24 22:44:01 +02:00
%patch24 -p1
2008-04-23 01:54:47 +02:00
%patch53
2009-11-25 14:48:22 +01:00
gnome-patch-translation-update
2007-01-05 16:49:44 +01:00
%build
2009-12-08 11:33:41 +01:00
NOCONFIGURE=1 gnome-autogen.sh
2007-01-05 16:49:44 +01:00
export CFLAGS=" $RPM_OPT_FLAGS "
export CFLAGS=" $ C F L A G S - f s t a c k - p r o t e c t o r "
%ifarch ppc64
export CFLAGS=" $ C F L A G S - m m i n i m a l - t o c "
%endif
2009-10-05 22:42:39 +02:00
# fix crash in gdm, nautilus, etc. (bgo#596977)
export CFLAGS=`echo $CFLAGS | sed -e 's/-fomit-frame-pointer//g' `
2009-05-28 00:51:56 +02:00
%configure \
2010-08-09 15:51:52 +02:00
--disable-static \
2009-05-28 00:51:56 +02:00
--enable-man \
2010-07-22 23:44:11 +02:00
--with-xinput=xfree
2010-02-11 19:13:28 +01:00
#make %{?jobs:-j%jobs}
make
2007-01-05 16:49:44 +01:00
%install
2009-02-20 22:11:30 +01:00
%makeinstall
2010-08-09 15:51:52 +02:00
find %{buildroot} %{_libdir} -name '*.la' -delete -print
2007-01-05 16:49:44 +01:00
mkdir -p $RPM_BUILD_ROOT %{_sysconfdir} /gtk-2.0
2010-08-09 15:51:52 +02:00
touch $RPM_BUILD_ROOT %{_sysconfdir} /gtk-2.0/gtk.immodules
2007-02-15 18:20:28 +01:00
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT %{_sysconfdir} /gtk-2.0
2010-08-09 15:51:52 +02:00
mkdir -p $RPM_BUILD_ROOT %{_libdir} /gtk-2.0/{,2.10.0/}{engines,filesystems,immodules,modules,printbackends}
2007-01-05 16:49:44 +01:00
%find_lang gtk20
%find_lang gtk20-properties gtk20.lang
%if "%_lib" == "lib64"
2010-08-27 17:14:50 +02:00
mv $RPM_BUILD_ROOT %{_bindir} /gtk-query-immodules-2.0 $RPM_BUILD_ROOT %{_bindir} /gtk-query-immodules-2.0-64
mv $RPM_BUILD_ROOT %{_sysconfdir} /gtk-2.0/gtk.immodules $RPM_BUILD_ROOT %{_sysconfdir} /gtk-2.0/gtk64.immodules
2007-01-05 16:49:44 +01:00
%endif
2010-08-27 17:14:50 +02:00
# Install rpm macros
mkdir -p %{buildroot} %{_sysconfdir} /rpm
cp %{S:5} %{buildroot} %{_sysconfdir} /rpm
2007-08-09 18:33:31 +02:00
%fdupes $RPM_BUILD_ROOT
2007-01-05 16:49:44 +01:00
%clean
rm -rf $RPM_BUILD_ROOT
2010-08-25 14:08:51 +02:00
%post
/sbin/ldconfig
2010-08-27 17:14:50 +02:00
%if "%_lib" == "lib64"
%{_bindir} /gtk-query-immodules-2.0-64 > %{_sysconfdir} /gtk64.immodules
%else
%{_bindir} /gtk-query-immodules-2.0 > %{_sysconfdir} /gtk.immodules
%endif
2007-01-05 16:49:44 +01:00
2007-09-19 19:05:58 +02:00
%postun -p /sbin/ldconfig
2007-01-05 16:49:44 +01:00
2007-08-09 18:33:31 +02:00
%files
2007-01-05 16:49:44 +01:00
%defattr (-,root,root)
2010-08-09 15:51:52 +02:00
%doc AUTHORS COPYING README NEWS ChangeLog
2007-01-05 16:49:44 +01:00
%if "%_lib" == "lib64"
2010-08-09 15:51:52 +02:00
%doc README.SuSE
2007-01-05 16:49:44 +01:00
%endif
%{_bindir} /*query*
%{_bindir} /gtk-update-icon-cache
%{_datadir} /themes/*
%{_libdir} /lib*.so.*
%dir %{_libdir} /gtk-2.0
%dir %{_libdir} /gtk-2.0/[2me]*
2008-06-22 02:36:34 +02:00
%{_libdir} /gtk-2.0/modules/*.so
2007-01-05 16:49:44 +01:00
%dir %{_libdir} /gtk-2.0/immodules
%dir %{_libdir} /gtk-2.0/2*/*
%{_libdir} /gtk-2.0/2*/*/*.so
%dir %{_sysconfdir} /gtk-2.0
%if "%_lib" == "lib64"
%ghost %{_sysconfdir} /gtk-2.0/gtk64.immodules
%else
%ghost %{_sysconfdir} /gtk-2.0/gtk.immodules
%endif
2007-07-10 18:22:31 +02:00
%{_sysconfdir} /gtk-2.0/im-multipress.conf
2009-12-29 19:02:29 +01:00
%{_libdir} /girepository-1.0/*.typelib
2007-08-09 18:33:31 +02:00
2008-03-07 21:59:23 +01:00
%files branding-upstream
%defattr (-,root,root)
%config %{_sysconfdir} /gtk-2.0/gtkrc
2007-08-09 18:33:31 +02:00
%files lang -f gtk20.lang
%defattr (-,root,root)
2007-01-05 16:49:44 +01:00
%files devel
%defattr (-,root,root)
2008-07-11 21:09:42 +02:00
%{_bindir} /gtk-builder-convert
2007-01-05 16:49:44 +01:00
%{_bindir} /*-demo
2010-08-09 15:51:52 +02:00
%{_datadir} /gir-1.0/*.gir
%dir %{_datadir} /gtk-2.0
%{_datadir} /gtk-2.0/demo
2007-01-05 16:49:44 +01:00
%{_datadir} /aclocal/*.m4
2008-06-22 02:36:34 +02:00
%{_includedir} /gail-1.0
2007-01-05 16:49:44 +01:00
%{_includedir} /gtk-2.0
%{_includedir} /gtk-unix-print-2.0
%{_libdir} /lib*.so
%{_libdir} /gtk-2.0/include
%{_libdir} /pkgconfig/*.pc
%doc %{_mandir} /man*/*
2010-08-09 15:51:52 +02:00
%doc %{_datadir} /gtk-doc/html/*
2010-08-27 17:14:50 +02:00
%{_sysconfdir} /rpm/macros.gtk2
2007-12-14 17:19:17 +01:00
2007-02-19 21:35:11 +01:00
%changelog