Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37566794
en ru br
Репозитории ALT
S:2.24.33-alt1
5.1: 2.16.6-alt1
4.1: 2.12.12-alt0.M41.4
4.0: 2.10.14-alt1
3.0: 2.6.7-alt1
www.altlinux.org/Changes

Группа :: Система/Библиотеки
Пакет: libgtk+2

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

%define api_ver 2.0
%define binary_ver 2.10.0
%define ver_major 2.16

# The name used by upstream.

%define _name gtk+
%define bname libgtk+2

# with_x means building with X11, without_x means building with directfb

%def_with x

%def_disable static
%if_with x
%def_enable xkb
%endif
%def_disable gtk_doc
%def_enable man

%if_with x
%define package_name libgtk+2
%else
%define package_name libgtk+2-directfb
%endif

Name: %package_name
Version: %ver_major.6
Release: alt1

%if_with x
Summary: The GIMP ToolKit (GTK+) - X11 part
%else
Summary: The GIMP ToolKit (GTK+) - DirectFB part
%endif
License: %lgpl2plus
Group: System/Libraries
Url: http://www.gtk.org
Icon: gtk+-logo.xpm
Packager: GNOME Maintainers Team <gnome at packages.altlinux.org>

%if_without x
Provides: %bname = %version-%release
%endif
Provides: libgtk2 = %version-%release
Obsoletes: gtk2 < 2.10, gtk+-gtkbeta < 2.10, gtk+2 < 2.10
Provides: gtk2 = %version-%release, gtk+2 = %version-%release
Obsoletes: gtk-engines-pixmap < 2.5.6
Provides: gtk-engines-pixmap = %version-%release

Source: %gnome_ftp/%_name/%ver_major/%_name-%version.tar.bz2

# These should be prepared for each major version.

Source1: %bname-%ver_major-gdk.map
Source2: %bname-%ver_major-gdk_pixbuf.map
Source3: %bname-%ver_major-gtk.map

Source4: gtk-update-icon-cache.filetrigger
Source5: gdk-pixbuf-query-loaders.filetrigger

Patch: gtk+-2.16.5-alt-stop-spam.patch
Patch6: %bname-2.10.6-fix-drop-gdk_colormap_change.patch
# http://bugzilla.redhat.com/show_bug.cgi?id=478400
Patch10: default_printer.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=508915
Patch11: libgtk+2-2.16.6-gdkproperty.patch

%define glib_ver 2.20.3
%define cairo_ver 1.6
%define pango_ver 1.20
%define atk_ver 1.13.0
%define directfb_ver 0.9.24
%define fontconfig_ver 2.2.1-alt2
%define gtk_doc_ver 1.6
%define shared_mime_info_ver 0.30

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

PreReq: glib2 >= %glib_ver
PreReq: libpango >= %pango_ver
PreReq: libatk >= %atk_ver
PreReq: %bname-common = %version-%release

BuildPreReq: rpm-build-licenses rpm-build-gnome

BuildPreReq: glib2-devel >= %glib_ver libgio-devel
BuildPreReq: libcairo-devel >= %cairo_ver
BuildPreReq: libpango-devel >= %pango_ver
BuildPreReq: libatk-devel >= %atk_ver
BuildPreReq: fontconfig-devel >= %fontconfig_ver
BuildPreReq: gtk-doc >= %gtk_doc_ver

BuildRequires: libgnutls-devel

# Automatically added by buildreq on Sat Oct 06 2007

BuildRequires: docbook-utils gcc-c++ indent libcups-devel libjpeg-devel libssl-devel libtiff-devel libjasper-devel

%if_with x
# X.org 7.0 packages
BuildRequires: libXdamage-devel libXcomposite-devel libX11-devel libXcursor-devel libXext-devel libXfixes-devel libXi-devel libXinerama-devel libXrandr-devel libXrender-devel libXt-devel xorg-x11-proto-devel
%else
BuildRequires: libdirectfb-devel
%endif

%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.

%if_with x
This package contains X11 part of GTK+. It is required for GNOME 2 desktop
and programs.
%else
This package contains DirectFB part of GTK+. Usually you do not need it,
unless you are dealing with embedded platforms or non-X11 installations.
%endif

%if_with x
%package -n %bname-common
Summary: The GIMP ToolKit (GTK+) - common part
Group: System/Libraries

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

%description -n %bname-common
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 package contains the part of GTK+ that is common for X11 and DirectFB
versions. For actual use of GTK+, you need to install either of %bname-x11
and %bname-directfb packages.

%package -n %bname-common-devel
Summary: Development files and tools for GTK+ applications - common part
Group: Development/GNOME and GTK+
Requires: %bname-common = %version-%release

%description -n %bname-common-devel
This package contains development files common to X11 and DirectFB versions
of GTK+. You'll need to install either %bname-x11-devel or
%bname-directfb-devel package to develop programs with GTK+.
%endif

%package devel
Summary: Development files and tools for GTK+ applications - common part
Group: Development/GNOME and GTK+
Icon: gtk+-devel-logo.xpm
%if_with x
Obsoletes: gtk2-devel < 2.10, gtk+-gtkbeta-devel, gtk+2-devel < 2.10, libgtk+2-devel-static < 2.10
Provides: gtk2-devel = %version-%release, gtk+2-devel = %version-%release, libgtk+2-devel-static = %version-%release
Provides: libgtk2-devel = %version-%release
%else
Conflicts: %bname-devel
%endif
Requires: %package_name = %version-%release
Requires: %bname-common-devel = %version-%release

%description devel
%if_with x
This package contains development files for GTK+, X11 version. Use this to
build programs that use GTK+.
%else
This package contains development files for GTK+, DirectFB version. You
do not usually need this package, unless you are trying to build some
program especially for usage with DirectFB. The work on DirectFB backend is
in progress, and its API/ABI are far from stable.
%endif

%if_with x
%package -n gtk-demo
Summary: GTK+ widgets demonstration program
Group: Development/GNOME and GTK+

%description -n gtk-demo
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
This package contains a program, along with its source code, that
demonstrates GTK+ variety of all its widgets.

%package -n %bname-devel-doc
Summary: Development documentation for GTK+
Group: Development/GNOME and GTK+
Conflicts: %name < %version, %name > %version
BuildArch: noarch

%description -n %bname-devel-doc
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
This package contains documentation needed for developing GTK+ applications.

%package -n %bname-devel-doc-examples
Summary: Examples for developing applications which will use GTK+
Group: Development/GNOME and GTK+
Conflicts: %bname < %version-%release
BuildArch: noarch

%description -n %bname-devel-doc-examples
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
This package contains sources for example programs.

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

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

%package -n libgail
Summary: Accessibility implementation for GTK+ and GNOME libraries
Group: System/Libraries
Requires: %package_name = %version-%release
Obsoletes: libgail < 1.22.4
Provides: libgail = %version-%release

%description -n libgail
GAIL implements the abstract interfaces found in ATK for GTK+ and GNOME libraries,
enabling accessibility technologies such as at-spi to access those GUIs.

%package -n libgail-devel
Summary: Files to compile applications that use GAIL
Group: Development/GNOME and GTK+
Requires: libgail = %version-%release
Requires: %package_name-devel = %version-%release
Obsoletes: libgail-devel < 1.22.4
Provides: libgail-devel = %version-%release

%description -n libgail-devel
This package contains the files required to develop applications against
the GAIL libraries.

%package -n libgail-devel-static
Summary: Static libraries of GAIL
Group: Development/GNOME and GTK+
Requires: libgail-devel = %version-%release
Obsoletes: libgail-devel-static < 1.22.4
Provides: libgail-devel-static = %version-%release

%description -n libgail-devel-static
This package contains the libraries required to compile applications
statically linked against the GAIL libraries.

%package -n libgail-devel-doc
Summary: Development documentation for GAIL
Group: Development/GNOME and GTK+
Conflicts: libgail < %version-%release
BuildArch: noarch

%description -n libgail-devel-doc
GAIL implements the abstract interfaces found in ATK for GTK+ and GNOME
libraries, enabling accessibility technologies such as at-spi to access
those GUIs.

This package contains development documentation for GAIL.


%define fulllibpath %_libdir/gtk-%api_ver/%binary_ver/

%prep
%setup -q -n %_name-%version
install -p -m644 %SOURCE1 gdk/symver.map
install -p -m644 %SOURCE2 gdk-pixbuf/symver.map
install -p -m644 %SOURCE3 gtk/symver.map

%patch -p1
%patch6 -p0
%patch10 -p0 -b .default-printer
%patch11

%build
%autoreconf
%{?_disable_static:export lt_cv_prog_cc_static_works=no}
%{?_enable_static:export lt_cv_prog_cc_static_works=yes}

export CFLAGS="$CFLAGS $(freetype-config --cflags)"
export LDLIBS="$LDLIBS $(freetype-config --libs)"

%configure \
   %{subst_enable xkb} \
   %{subst_enable man} \
   %{subst_enable static} \
   %{?_with_x:--with-gdktarget=x11} \
   %{?_without_x:--with-gdktarget=directfb} \
   %{subst_with x} \
   %{?_with_x:--with-xinput=yes} \
   %{?_enable_gtk_doc:--enable-gtk-doc}

# SMP-incompatible build

%make LIBTOOL_EXPORT_OPTIONS=-Wl,--version-script=symver.map

%install
%make_install DESTDIR=%buildroot install
install -d %buildroot{%_sysconfdir/gtk-%api_ver,%_libdir/gtk-%api_ver/%binary_ver/engines}

touch %buildroot%_sysconfdir/gtk-%api_ver/gtk.immodules
touch %buildroot%_sysconfdir/gtk-%api_ver/gdk-pixbuf.loaders

# system wide gtkrc

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

cat <<__SH__ >%name.sh

export GDK_PIXBUF_MODULEDIR=\`getconf LIBDIR\`/gtk-%api_ver/%binary_ver/loaders
export GTK_PATH=\`getconf LIBDIR\`/gtk-%api_ver/%binary_ver
__SH__

cat <<__CSH__ >%name.csh

setenv GDK_PIXBUF_MODULEDIR \`getconf LIBDIR\`/gtk-%api_ver/%binary_ver/loaders
setenv GTK_PATH \`getconf LIBDIR\`/gtk-%api_ver/%binary_ver

__CSH__

install -pD -m755 %name.sh %buildroot%_sysconfdir/profile.d/%name.sh
install -pD -m755 %name.csh %buildroot%_sysconfdir/profile.d/%name.csh

# The license

ln -sf %_licensedir/LGPL-2 COPYING

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

bzip2 -9f ChangeLog NEWS

# examples

mkdir -p %buildroot/%_docdir/%name-devel-%version
cp -R  examples/ %buildroot/%_docdir/%name-devel-%version/

# rpm posttrans filetriggers

install -pD -m 755 %SOURCE4 %buildroot%_rpmlibdir/gtk-icon-cache.filetrigger
install -pD -m 755 %SOURCE5 %buildroot%_rpmlibdir/gdk-pixbuf-query-loaders.filetrigger

%post
%_bindir/gtk-query-immodules-%api_ver > %_sysconfdir/gtk-%api_ver/gtk.immodules
#%_bindir/gdk-pixbuf-query-loaders > %_sysconfdir/gtk-%api_ver/gdk-pixbuf.loaders

%triggerpostun -- %package_name <= %api_ver.6-alt0.7
[ $2 != 0 ] || exit 0
%_bindir/gtk-query-immodules-%api_ver > %_sysconfdir/gtk-%api_ver/gtk.immodules

# -common subpackage is only generated when compiling with X. This is

# a hack that fixes problems with binaries from -common that depend on
# libraries from backend packages.
%if_with x
%files -n %bname-common -f gtk20.lang
%_bindir/gtk-query-immodules-%api_ver
%_bindir/gtk-update-icon-cache
%_bindir/gdk-pixbuf-query-loaders
%_libdir/libgdk_pixbuf-%api_ver.so.*
#%_libdir/libgtk*.so.*
%dir %_libdir/gtk-%api_ver
%dir %_libdir/gtk-%api_ver/%binary_ver
%dir %_libdir/gtk-%api_ver/modules
%dir %fulllibpath/engines
%fulllibpath/engines/libpixmap.so
%dir %fulllibpath/immodules
%fulllibpath/immodules/im-am-et.so
%fulllibpath/immodules/im-cedilla.so
%fulllibpath/immodules/im-cyrillic-translit.so
%fulllibpath/immodules/im-inuktitut.so
%fulllibpath/immodules/im-ipa.so
%fulllibpath/immodules/im-thai.so
%fulllibpath/immodules/im-ti-er.so
%fulllibpath/immodules/im-ti-et.so
%fulllibpath/immodules/im-viqr.so
%fulllibpath/immodules/im-multipress.so
%dir %fulllibpath/loaders
%fulllibpath/loaders/libpixbufloader-*.so
%dir %fulllibpath/printbackends
%fulllibpath/printbackends/libprintbackend-*.so
%dir %_datadir/themes
%dir %_datadir/themes/*
%dir %_datadir/themes/*/gtk-%{api_ver}*
%_datadir/themes/*/gtk-%{api_ver}*/gtkrc
%dir %_sysconfdir/gtk-%api_ver
%config(noreplace) %_sysconfdir/gtk-%api_ver/gtkrc
%config(noreplace) %_sysconfdir/gtk-%api_ver/im-multipress.conf
%config(noreplace) %_sysconfdir/profile.d/*
%ghost %_sysconfdir/gtk-%api_ver/gtk.immodules
%ghost %_sysconfdir/gtk-%api_ver/gdk-pixbuf.loaders
%_man1dir/gdk-pixbuf-query-loaders.*
%_man1dir/gtk-query-immodules*
%_man1dir/gtk-update-icon-cache.*
# filetriggers
%_rpmlibdir/gtk-icon-cache.filetrigger
%_rpmlibdir/gdk-pixbuf-query-loaders.filetrigger
%doc --no-dereference COPYING
%doc AUTHORS NEWS.bz2 README ChangeLog.bz2 ChangeLog.gtk*
%endif

%files
%if_with x
%fulllibpath/immodules/im-xim.so
%_libdir/libgdk-x11-%api_ver.so.*
%_libdir/libgdk_pixbuf_xlib-%api_ver.so.*
%_libdir/libgtk-x11-%api_ver.so.*
%else
%_libdir/libgdk-directfb-%api_ver.so.*
%_libdir/libgtk-directfb-%api_ver.so.*
%endif

%if_with x
%files -n %bname-common-devel
%_bindir/gtk-builder-convert
%_bindir/gdk-pixbuf-csource
%dir %_includedir/gtk-%api_ver
%dir %_includedir/gtk-%api_ver/gdk
%_includedir/gtk-%api_ver/gdk/*.h
%exclude %_includedir/gtk-%api_ver/gdk/gdkx.h
%dir %_includedir/gtk-%api_ver/gdk-pixbuf
%_includedir/gtk-%api_ver/gdk-pixbuf/*.h
%dir %_includedir/gtk-%api_ver/gtk
%_includedir/gtk-%api_ver/gtk/*.h
%dir %_includedir/gtk-unix-print-%api_ver
%dir %_includedir/gtk-unix-print-%api_ver/gtk
%_includedir/gtk-unix-print-%api_ver/gtk/*.h
%dir %_libdir/gtk-%api_ver/include
%_libdir/libgdk_pixbuf-%api_ver.so
%dir %_datadir/gtk-%api_ver
%_datadir/aclocal/gtk-%api_ver.m4
%_man1dir/gtk-builder-convert.*
%_man1dir/gdk-pixbuf-csource.1.*
%exclude %_datadir/gtk-%api_ver/demo
%endif

%files devel
# Common (by filenames) part. %bname-x11-devel and %bname-directfb-devel
# are conflicting due to these files.
%_pkgconfigdir/gdk-%api_ver.pc
%_pkgconfigdir/gdk-pixbuf-%api_ver.pc
%_pkgconfigdir/gtk+-%api_ver.pc
%_pkgconfigdir/gtk+-unix-print-%api_ver.pc
%_libdir/gtk-%api_ver/include/gdkconfig.h
# Backend-specific parts
%if_with x
%dir %_includedir/gtk-%api_ver/gdk-pixbuf-xlib
%_includedir/gtk-%api_ver/gdk-pixbuf-xlib/*.h
%_includedir/gtk-%api_ver/gdk/gdkx.h
%_libdir/libgdk-x11-%api_ver.so
%_libdir/libgdk_pixbuf_xlib-%api_ver.so
%_libdir/libgtk-x11-%api_ver.so
%_pkgconfigdir/gdk-x11-%api_ver.pc
%_pkgconfigdir/gdk-pixbuf-xlib-%api_ver.pc
%_pkgconfigdir/gtk+-x11-%api_ver.pc
%else
%_includedir/gtk-%api_ver/gdk/gdkdirectfb.h
%_includedir/gtk-%api_ver/gdk/gdkprivate-directfb.h
%_libdir/libgdk-directfb-%api_ver.so
%_libdir/libgtk-directfb-%api_ver.so
%_pkgconfigdir/gdk-directfb-%api_ver.pc
%_pkgconfigdir/gtk+-directfb-%api_ver.pc
%endif

%if_with x
%files -n gtk-demo
%_bindir/gtk-demo
%dir %_datadir/gtk-%api_ver/demo
%_datadir/gtk-%api_ver/demo/*

%files -n %bname-devel-doc
%_datadir/gtk-doc/html/*
%exclude %_datadir/gtk-doc/html/gail-libgail-util

%files devel-doc-examples
%doc %_docdir/%name-devel-%version/examples

%if_enabled static
%files -n %bname-devel-static
%_libdir/*.a
%fulllibpath/*/*.a

%files -n libgail-devel-static
%_libdir/libgailutil.a
%_libdir/gtk-%api_ver/modules/libferret.a
%_libdir/gtk-%api_ver/modules/libgail.a

%endif
%endif

%files -n libgail -f gail.lang
%_libdir/libgailutil.so.*
%_libdir/gtk-%api_ver/modules/libferret.so
%_libdir/gtk-%api_ver/modules/libgail.so
%exclude %_libdir/gtk-%api_ver/modules/*.la

%files -n libgail-devel
%_includedir/gail-1.0
%_libdir/libgailutil.so
%_pkgconfigdir/gail.pc

%files -n libgail-devel-doc
%_datadir/gtk-doc/html/gail-libgail-util

%exclude %fulllibpath/*/*.la

%changelog

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

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin