Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1586986
 поиск   регистрация   авторизация 
 
Группа :: Система/Библиотеки
Пакет: libgtk+2

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

%define _name gtk+
%define ver_major 2.4
%define binary_ver 2.4.0
%def_disable static

Name: libgtk+2
Version: %ver_major.14
Release: alt1.M24.1

Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
Summary(ru_RU.KOI8-R): GTK+, библиотека для создания GUI под X Window System
License: LGPL
Group: System/Libraries
Url: http://www.gtk.org
Packager: Yuri N. Sedunov <aris at altlinux.ru>

Icon: gtk+-logo.xpm
Source: ftp://ftp.gnome.org/pub/gnome/sources/%_name/%ver_major/%_name-%version.tar.bz2
Patch: gtk+-2.4.2-Lai-gtkfilesel.patch.bz2
Patch1: gtk+-2.2.4-Lai-images_types-2004.04.04.patch.gz

Patch10: gtk+-2.2.4-xpm-ncol-overflow.patch
Patch11: gtk+-2.2.4-xpm-largecol.patch

%define glib_ver 2.4.8
%define pango_ver 1.4.0
%define atk_ver 1.6.1
%define xft_ver 2.0-alt5
%define fontconfig_ver 2.2.1-alt2
%define shared_mime_info_ver 0.13

# We need to prereq these so we can run gtk-query-immodules-2.0 in post

PreReq: glib2 >= %glib_ver
PreReq: libpango >= %pango_ver
PreReq: libatk >= %atk_ver
PreReq: XFree86-libs

Requires: common-licenses
Requires: shared-mime-info >= %shared_mime_info_ver

# some fonts with Xft2 support require

Requires: urw-fonts >= 2.0-alt19

Provides: gtk2 = %version, gtk+2 = %version, libgtk2 = %version
Obsoletes: gtk2, gtk+-gtkbeta, gtk+2, libgtk2

BuildPrereq: glib2-devel >= %glib_ver
BuildPrereq: libpango-devel >= %pango_ver
BuildPrereq: libatk-devel >= %atk_ver
#BuildPreReq: libXft-devel >= %xft_ver
BuildPreReq: libXft-devel
BuildPreReq: fontconfig-devel >= %fontconfig_ver

# Automatically added by buildreq on Fri Apr 30 2004 (-bi)

BuildRequires: XFree86-devel-static XFree86-libs common-licenses docbook-utils fontconfig-devel freetype2-devel gcc-c++ gcc-g77 glib2-devel indent libatk-devel libjpeg-devel libpango-devel libpng-devel libstdc++-devel libtiff-devel pkgconfig zlib-devel

%description
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.

This version of GTK+ is required for Gnome 2.x.

%package devel
Summary: Development tools for GTK+ applications
Summary(ru_RU.KOI8-R): Набор для разработчика приложений, использующих GTK+
Group: Development/GNOME and GTK+
Icon: gtk+-devel-logo.xpm
Requires: %name = %version-%release, glib2-devel >= %glib_ver, pkgconfig
Requires: libatk-devel >= %atk_ver, libpango-devel >= %pango_ver
Provides: gtk2-devel = %version, gtk+2-devel = %version, libgtk2-devel = %version, libgtk+2-devel-static
Obsoletes: gtk2-devel, gtk+-gtkbeta-devel, gtk+2-devel, libgtk2-devel, libgtk+2-devel-static

%description devel
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
This package contains the files needed for developing GTK+ applications.

%if_with static
%package devel-static
Summary: Static libraries for GTK+ (GIMP ToolKit) applications
Group: Development/GNOME and GTK+
Requires: %name = %version-%release
Provides: gtk2-devel-static = %version, gtk+2-devel-static = %version, libgtk2-devel-static = %version
Obsoletes: gtk2-devel, gtk+-gtkbeta-devel, gtk+2-devel, libgtk2-devel

%description devel-static
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
This package contains the static libraries for GTK+.

%endif

%prep
%setup -q -n %_name-%version
%patch -p1
%patch1 -p1
%patch10 -p1
%patch11 -p1

%build
%{?_disable_static:export lt_cv_prog_cc_static_works=no}
%{?_enable_static:export lt_cv_prog_cc_static_works=yes}
%configure \
   %{subst_enable static} \
--with-xinput=yes \
--enable-fbmanager

# SMP-incompatible build

%make

%install
%makeinstall
%__install -d %buildroot{%_sysconfdir/gtk-2.0,%_libdir/gtk-2.0/%binary_ver/engines}

# system wide gtkrc

%__cat <<__RC__ > %buildroot%_sysconfdir/gtk-2.0/gtkrc
# This enables editing of menu accelerators by pressing
# an accelerator over the menu item.
gtk-can-change-accels = 1
__RC__

# The license

%__ln_s -f %_licensedir/LGPL-2 COPYING

# remove non-packaged files

%__rm -f %buildroot%_libdir/gtk-2.0/*/*/*.la

%find_lang --output=gtk20.lang gtk20 gtk20-properties

# --------------------------------------------------------------------------------------

# needed for Lai's GTK+ File Selector patch
%__cat <<__SH__ >%_name.sh
# Some features of enhanced file selector have performance penalties.
# Here are some environment variables to disable them.

# Disable looking up icons for files.

export GTK_FILESEL_NO_ICONS=1
# Disable file type detection. This will also disable icons.
export GTK_FILESEL_NO_MIME=1
# Disable all columns (Date, Size, etc.) except File.
# This will disable icon lookup and file type detection too.
export GTK_FILESEL_SIMPLE=0
__SH__

%__cat <<__CSH__ >%_name.csh
# Some features of enhanced file selector have performance penalties.
# Here are some environment variables to disable them.

# Disable looking up icons for files.

setenv GTK_FILESEL_NO_ICONS 1
# Disable file type detection. This will also disable icons.
setenv GTK_FILESEL_NO_MIME 1
# Disable all columns (Date, Size, etc.) except File.
# This will disable icon lookup and file type detection too.
setenv GTK_FILESEL_SIMPLE 0
__CSH__

%__install -pD -m755 %_name.sh %buildroot%_sysconfdir/profile.d/%_name.sh
%__install -pD -m755 %_name.csh %buildroot%_sysconfdir/profile.d/%_name.csh
#----------------------------------------------------------------------------------------

%post
%post_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 -p %postun_ldconfig

%triggerpostun -- %name <= 2.0.6-alt0.7
[ $2 != 0 ] || exit 0
%_bindir/gtk-query-immodules-2.0 > %_sysconfdir/gtk-2.0/gtk.immodules

%files -f gtk20.lang
%_bindir/gtk-query-immodules-2.0
%_bindir/gdk-pixbuf-query-loaders
#%_bindir/gxid
%_libdir/libgtk*.so.*
%_libdir/libgdk*.so.*
%dir %_libdir/gtk-2.0
%dir %_libdir/gtk-2.0/%binary_ver
%dir %_libdir/gtk-2.0/%binary_ver/*
%_libdir/gtk-2.0/%binary_ver/*/*.so
%_datadir/themes
%dir %_sysconfdir/gtk-2.0
#---------------------------------
# needed for Lai's GTK+ File Selector patch
%config %_sysconfdir/profile.d/*
#---------------------------------
%config(noreplace) %_sysconfdir/gtk-2.0/gtkrc
%ghost %_sysconfdir/gtk-2.0/gtk.immodules
%ghost %_sysconfdir/gtk-2.0/gdk-pixbuf.loaders
%_man1dir/gdk-pixbuf-query-loaders.*
%_man1dir/gtk-query-immodules*
%doc --no-dereference COPYING
%doc AUTHORS ChangeLog NEWS README

%files devel
%_bindir/gdk-pixbuf-csource
%_bindir/gtk-demo
%_libdir/*.so
%_libdir/gtk-2.0/include
%_libdir/pkgconfig/*
%_includedir/*
%_datadir/gtk-2.0
%_datadir/aclocal/*
%_datadir/gtk-doc/html/*
%_man1dir/gdk-pixbuf-csource*

%if_enabled static
%files devel-static
%_libdir/*.a
%_libdir/gtk-2.0/*/*/*.a
%endif

%changelog

Полный changelog можно просмотреть здесь

 
design & coding: Vladimir Lettiev aka crux © 2004-2005