2019-09-30 10:52:18 -04:00
|
|
|
#Global macro or variable
|
|
|
|
|
%global __provides_exclude_from ^%{_libdir}/gtk-2.0
|
2019-11-06 19:32:37 +08:00
|
|
|
%define gtk_bin_version 2.10.0
|
2020-02-28 12:00:35 +08:00
|
|
|
%global enable_immodules_package 0
|
2019-09-30 10:52:18 -04:00
|
|
|
|
2019-11-06 19:32:37 +08:00
|
|
|
#Basic Information
|
2020-02-24 18:40:15 +08:00
|
|
|
Name: gtk2
|
2021-01-29 16:46:51 +08:00
|
|
|
Version: 2.24.33
|
2022-12-15 09:08:53 +00:00
|
|
|
Release: 7
|
2020-02-24 18:40:15 +08:00
|
|
|
Summary: GTK+ graphical user interface library
|
|
|
|
|
License: LGPLv2+
|
|
|
|
|
URL: http://www.gtk.org
|
|
|
|
|
Source: http://download.gnome.org/sources/gtk+/2.24/gtk+-%{version}.tar.xz
|
|
|
|
|
Source2: im-cedilla.conf
|
|
|
|
|
|
|
|
|
|
# Use Python 3 in gtk-builder-convert
|
|
|
|
|
# Accepted upstream: https://gitlab.gnome.org/GNOME/gtk/merge_requests/1080
|
2019-09-30 10:52:18 -04:00
|
|
|
# https://bugzilla.gnome.org/show_bug.cgi?id=583273
|
2021-01-29 16:46:51 +08:00
|
|
|
Patch1: icon-padding.patch
|
2019-09-30 10:52:18 -04:00
|
|
|
# https://bugzilla.gnome.org/show_bug.cgi?id=599618
|
2021-01-29 16:46:51 +08:00
|
|
|
Patch2: tooltip-positioning.patch
|
2019-09-30 10:52:18 -04:00
|
|
|
# https://bugzilla.gnome.org/show_bug.cgi?id=611313
|
2021-01-29 16:46:51 +08:00
|
|
|
Patch3: window-dragging.patch
|
2019-09-30 10:52:18 -04:00
|
|
|
|
|
|
|
|
#Dependency
|
|
|
|
|
BuildRequires: pkgconfig(glib-2.0) >= 2.28.0 pkgconfig(atk) >= 2.28.0
|
|
|
|
|
BuildRequires: pkgconfig(pango) >= 1.20 pkgconfig(gdk-pixbuf-2.0) >= 2.21.0
|
|
|
|
|
BuildRequires: pkgconfig(cairo) >= 1.6 pkgconfig(gobject-introspection-1.0) >= 0.9.3
|
|
|
|
|
BuildRequires: pkgconfig(xi) pkgconfig(xrandr) pkgconfig(xrender) pkgconfig(xcursor)
|
|
|
|
|
BuildRequires: pkgconfig(xinerama) pkgconfig(xcomposite) pkgconfig(xdamage)
|
2022-01-14 11:06:14 +08:00
|
|
|
BuildRequires: gettext libxslt python3-devel
|
2021-07-30 22:49:37 +08:00
|
|
|
BuildRequires: gtk-doc automake autoconf libtool pkgconfig
|
2022-01-14 11:06:14 +08:00
|
|
|
%if 0%{?openEuler}
|
|
|
|
|
BuildRequires: cups-devel
|
|
|
|
|
%endif
|
|
|
|
|
|
2019-09-30 10:52:18 -04:00
|
|
|
Requires: hicolor-icon-theme gtk-update-icon-cache
|
|
|
|
|
Requires: gdk-pixbuf2-modules glib2 >= 2.28.0 atk >= 1.29.2 pango >= 1.20
|
|
|
|
|
Requires: libXrandr >= 1.2.99.4-2
|
|
|
|
|
Requires(post): libtiff >= 3.6.1
|
|
|
|
|
|
|
|
|
|
# Conflicts with packages containing theme engines
|
|
|
|
|
# built against the 2.4.0 ABI
|
|
|
|
|
Conflicts: gtk2-engines < 2.7.4-7
|
|
|
|
|
Conflicts: libgnomeui < 2.15.1cvs20060505-2
|
|
|
|
|
Conflicts: redhat-artwork < 0.243-1
|
|
|
|
|
|
|
|
|
|
Provides: gail = %{version}-%{release}
|
|
|
|
|
Obsoletes: gail < 2.13.0-1
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
GTK+ is a library for creating graphical user interfaces. The library
|
|
|
|
|
is created in C programming language. The GTK+ is also called the GIMP
|
|
|
|
|
Toolkit. Originally, the library was created while developing the GIMP
|
|
|
|
|
image manipulation program.
|
|
|
|
|
|
2020-02-28 12:00:35 +08:00
|
|
|
%if %{enable_immodules_package}
|
2019-09-30 10:52:18 -04:00
|
|
|
%package immodules
|
|
|
|
|
Summary: Input methods for GTK+
|
|
|
|
|
Requires: gtk2 = %{version}-%{release}
|
|
|
|
|
# for /etc/X11/xinit/xinput.d
|
|
|
|
|
Requires: imsettings
|
|
|
|
|
|
|
|
|
|
%description immodules
|
|
|
|
|
The gtk2-immodules package contains standalone input methods that are shipped
|
|
|
|
|
as part of GTK+.
|
2020-02-28 12:00:35 +08:00
|
|
|
%endif
|
2019-09-30 10:52:18 -04:00
|
|
|
|
|
|
|
|
%package immodule-xim
|
|
|
|
|
Summary: XIM support for GTK+
|
|
|
|
|
Requires: gtk2 = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description immodule-xim
|
|
|
|
|
The gtk2-immodule-xim package contains XIM support for GTK+.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Development files for GTK+
|
|
|
|
|
Requires: gtk2 = %{version}-%{release}
|
|
|
|
|
Requires: pango-devel >= 1.20 gdk-pixbuf2-devel cairo-devel >= 1.6
|
|
|
|
|
Requires: atk-devel >= 1.29.2 glib2-devel >= 2.28.0
|
|
|
|
|
Requires: libX11-devel libXcursor-devel libXinerama-devel
|
|
|
|
|
Requires: libXext-devel libXi-devel libXrandr-devel
|
|
|
|
|
Requires: libXfixes-devel libXcomposite-devel
|
|
|
|
|
Requires: pkgconfig
|
|
|
|
|
|
|
|
|
|
Provides: gail-devel = %{version}-%{release}
|
|
|
|
|
Obsoletes: gail-devel < 2.13.0-1
|
|
|
|
|
Provides: gtk2-devel-doc = %{version}-%{release}
|
|
|
|
|
Obsoletes: gtk2-devel-doc < %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
This package contains the libraries, header files and developer documentation
|
|
|
|
|
that are needed for writing applications with the GTK+ widget toolkit.
|
|
|
|
|
|
|
|
|
|
%package help
|
|
|
|
|
Summary: Developer documentation for GTK+
|
|
|
|
|
Requires: gtk2 = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description help
|
|
|
|
|
This package contains developer documentation for the GTK+ widget toolkit.
|
|
|
|
|
|
|
|
|
|
#Build sections
|
|
|
|
|
%prep
|
2021-07-30 22:49:37 +08:00
|
|
|
%autosetup -n gtk+-%{version} -p1
|
2019-09-30 10:52:18 -04:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
export CFLAGS='-fno-strict-aliasing %optflags'
|
|
|
|
|
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
|
|
|
|
|
%configure $CONFIGFLAGS \
|
|
|
|
|
--enable-man \
|
|
|
|
|
--with-xinput=xfree \
|
|
|
|
|
--enable-debug \
|
2022-01-14 11:06:14 +08:00
|
|
|
%if !0%{?openEuler}
|
|
|
|
|
--disable-cups
|
|
|
|
|
%endif
|
2019-09-30 10:52:18 -04:00
|
|
|
)
|
|
|
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
2021-02-19 20:08:16 -05:00
|
|
|
%make_build
|
2019-09-30 10:52:18 -04:00
|
|
|
|
|
|
|
|
%install
|
2020-02-24 18:40:15 +08:00
|
|
|
make install DESTDIR=%{buildroot} \
|
2019-09-30 10:52:18 -04:00
|
|
|
RUN_QUERY_IMMODULES_TEST=false
|
|
|
|
|
|
2020-02-24 18:40:15 +08:00
|
|
|
echo ".so man1/gtk-query-immodules-2.0.1" > %{buildroot}%{_mandir}/man1/gtk-query-immodules-2.0-%{__isa_bits}.1
|
2019-09-30 10:52:18 -04:00
|
|
|
|
|
|
|
|
%find_lang gtk20
|
|
|
|
|
%find_lang gtk20-properties
|
|
|
|
|
|
|
|
|
|
mkdir -p tmpdocs
|
|
|
|
|
cp -aR docs/tutorial/html tmpdocs/tutorial
|
|
|
|
|
cp -aR docs/faq/html tmpdocs/faq
|
2019-11-06 19:32:37 +08:00
|
|
|
mkdir -p tmpdocs/examples
|
|
|
|
|
for dir in $(find examples/* -type d); do
|
|
|
|
|
cp -aR $dir tmpdocs/examples
|
2019-09-30 10:52:18 -04:00
|
|
|
done
|
|
|
|
|
|
2020-02-24 18:40:15 +08:00
|
|
|
mv %{buildroot}%{_bindir}/gtk-query-immodules-2.0 %{buildroot}%{_bindir}/gtk-query-immodules-2.0-64
|
2019-09-30 10:52:18 -04:00
|
|
|
|
|
|
|
|
# Install input method frameworks conf
|
2020-02-24 18:40:15 +08:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/X11/xinit/xinput.d
|
|
|
|
|
cp %{SOURCE2} %{buildroot}%{_sysconfdir}/X11/xinit/xinput.d
|
|
|
|
|
|
|
|
|
|
# Use python3 shebang instead of ambiguous python
|
|
|
|
|
pathfix.py -pn -i %{__python3} %{buildroot}%{_bindir}/gtk-builder-convert
|
2019-09-30 10:52:18 -04:00
|
|
|
|
|
|
|
|
# rm unpackaged files
|
2020-02-24 18:40:15 +08:00
|
|
|
rm %{buildroot}%{_libdir}/*.la
|
|
|
|
|
rm %{buildroot}%{_libdir}/gtk-2.0/*/*.la
|
|
|
|
|
rm %{buildroot}%{_libdir}/gtk-2.0/%{gtk_bin_version}/*/*.la
|
|
|
|
|
rm %{buildroot}%{_bindir}/gtk-update-icon-cache
|
|
|
|
|
rm %{buildroot}%{_mandir}/man1/gtk-update-icon-cache.1*
|
2019-09-30 10:52:18 -04:00
|
|
|
|
2020-02-24 18:40:15 +08:00
|
|
|
touch %{buildroot}%{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules.cache
|
2019-09-30 10:52:18 -04:00
|
|
|
|
2020-02-24 18:40:15 +08:00
|
|
|
mkdir -p %{buildroot}%{_libdir}/gtk-2.0/modules
|
|
|
|
|
mkdir -p %{buildroot}%{_libdir}/gtk-2.0/immodules
|
|
|
|
|
mkdir -p %{buildroot}%{_libdir}/gtk-2.0/%{gtk_bin_version}/filesystems
|
2019-09-30 10:52:18 -04:00
|
|
|
|
2019-11-06 19:32:37 +08:00
|
|
|
%transfiletriggerin -- %{_libdir}/gtk-2.0/immodules/ %{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules/
|
2019-09-30 10:52:18 -04:00
|
|
|
gtk-query-immodules-2.0-64 --update-cache
|
|
|
|
|
|
2019-11-06 19:32:37 +08:00
|
|
|
%transfiletriggerpostun -- %{_libdir}/gtk-2.0/immodules/ %{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules/
|
2019-09-30 10:52:18 -04:00
|
|
|
gtk-query-immodules-2.0-64 --update-cache
|
|
|
|
|
|
|
|
|
|
#Install and uninstall scripts
|
|
|
|
|
%pre
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
|
2020-02-24 18:40:15 +08:00
|
|
|
%ldconfig_scriptlets
|
2019-09-30 10:52:18 -04:00
|
|
|
|
|
|
|
|
#Files list
|
|
|
|
|
%files -f gtk20.lang
|
|
|
|
|
%doc AUTHORS NEWS README
|
|
|
|
|
%license COPYING
|
|
|
|
|
%{_bindir}/gtk-query-immodules-2.0-64
|
|
|
|
|
%{_libdir}/libgtk-x11-2.0.so.*
|
|
|
|
|
%{_libdir}/libgdk-x11-2.0.so.*
|
|
|
|
|
%{_libdir}/libgailutil.so.*
|
|
|
|
|
%{_libdir}/girepository-1.0
|
|
|
|
|
%dir %{_libdir}/gtk-2.0
|
2019-11-06 19:32:37 +08:00
|
|
|
%dir %{_libdir}/gtk-2.0/%{gtk_bin_version}
|
|
|
|
|
%{_libdir}/gtk-2.0/%{gtk_bin_version}/engines
|
|
|
|
|
%{_libdir}/gtk-2.0/%{gtk_bin_version}/filesystems
|
|
|
|
|
%dir %{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules
|
|
|
|
|
%{_libdir}/gtk-2.0/%{gtk_bin_version}/printbackends
|
2019-09-30 10:52:18 -04:00
|
|
|
%{_libdir}/gtk-2.0/modules
|
|
|
|
|
%{_libdir}/gtk-2.0/immodules
|
2019-11-06 19:32:37 +08:00
|
|
|
%ghost %{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules.cache
|
2019-09-30 10:52:18 -04:00
|
|
|
%dir %{_datadir}/gtk-2.0
|
|
|
|
|
%{_datadir}/themes/Default
|
|
|
|
|
%{_datadir}/themes/Emacs
|
|
|
|
|
%{_datadir}/themes/Raleigh
|
2020-02-28 12:00:35 +08:00
|
|
|
%if !%{enable_immodules_package}
|
|
|
|
|
%exclude %{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules/*.so
|
|
|
|
|
%exclude %{_sysconfdir}/X11/xinit/xinput.d/im-cedilla.conf
|
|
|
|
|
%exclude %config(noreplace) %{_sysconfdir}/gtk-2.0/im-multipress.conf
|
|
|
|
|
%endif
|
2019-09-30 10:52:18 -04:00
|
|
|
|
2020-02-28 12:00:35 +08:00
|
|
|
%if %{enable_immodules_package}
|
2019-09-30 10:52:18 -04:00
|
|
|
%files immodules
|
2019-11-06 19:32:37 +08:00
|
|
|
%{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules/im-am-et.so
|
|
|
|
|
%{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules/im-cedilla.so
|
|
|
|
|
%{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules/im-cyrillic-translit.so
|
|
|
|
|
%{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules/im-inuktitut.so
|
|
|
|
|
%{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules/im-ipa.so
|
|
|
|
|
%{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules/im-multipress.so
|
|
|
|
|
%{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules/im-thai.so
|
|
|
|
|
%{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules/im-ti-er.so
|
|
|
|
|
%{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules/im-ti-et.so
|
|
|
|
|
%{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules/im-viqr.so
|
2019-09-30 10:52:18 -04:00
|
|
|
%{_sysconfdir}/X11/xinit/xinput.d/im-cedilla.conf
|
|
|
|
|
%dir %{_sysconfdir}/gtk-2.0
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/gtk-2.0/im-multipress.conf
|
2020-02-28 12:00:35 +08:00
|
|
|
%endif
|
2019-09-30 10:52:18 -04:00
|
|
|
|
|
|
|
|
%files immodule-xim
|
2019-11-06 19:32:37 +08:00
|
|
|
%{_libdir}/gtk-2.0/%{gtk_bin_version}/immodules/im-xim.so
|
2019-09-30 10:52:18 -04:00
|
|
|
|
|
|
|
|
%files devel -f gtk20-properties.lang
|
|
|
|
|
%{_libdir}/lib*.so
|
|
|
|
|
%{_libdir}/gtk-2.0/include
|
|
|
|
|
%{_libdir}/pkgconfig/*
|
|
|
|
|
%{_bindir}/gtk-builder-convert
|
|
|
|
|
%{_bindir}/gtk-demo
|
2022-12-15 09:08:53 +00:00
|
|
|
%exclude %{_datadir}/gtk-2.0/demo
|
2019-09-30 10:52:18 -04:00
|
|
|
%{_datadir}/aclocal/*
|
|
|
|
|
%{_datadir}/gir-1.0
|
|
|
|
|
%{_includedir}/*
|
|
|
|
|
|
|
|
|
|
%files help
|
|
|
|
|
%{_datadir}/gtk-doc
|
|
|
|
|
%doc tmpdocs/tutorial
|
|
|
|
|
%doc tmpdocs/faq
|
|
|
|
|
%{_mandir}/man1/gtk-query-immodules-2.0*
|
|
|
|
|
%{_mandir}/man1/gtk-builder-convert.1.gz
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-12-15 09:08:53 +00:00
|
|
|
* Thu Dec 15 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 2.24.33-7
|
|
|
|
|
- remove *.c and demo* from help and devel
|
|
|
|
|
|
2022-06-11 08:49:04 +00:00
|
|
|
* Sat Jun 11 2022 wangkeorng <wangkeorng@h-partners.com> - 2.24.33-6
|
|
|
|
|
- delete autosetup macro in changelog
|
|
|
|
|
|
2022-05-07 11:45:46 +08:00
|
|
|
* Sat May 7 2022 dongyuzhen <dongyuzhen@h-partners.com> - 2.24.33-5
|
|
|
|
|
- fix changelog
|
|
|
|
|
|
|
|
|
|
* Fri Jan 14 2022 wangkerong <wangkerong@huawei.com> - 2.24.33-4
|
2022-01-14 11:06:14 +08:00
|
|
|
- Other distros disable cups
|
|
|
|
|
|
2021-07-30 22:49:37 +08:00
|
|
|
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 2.24.33-3
|
2022-06-11 08:49:04 +00:00
|
|
|
- DESC: delete -Sgit from autosetup, and delete BuildRequires git
|
2021-07-30 22:49:37 +08:00
|
|
|
|
2021-02-19 20:08:16 -05:00
|
|
|
* Wed Mar 10 2021 yanan <yanan@huawei.com> - 2.24.33-2
|
|
|
|
|
- use multi-thread to build
|
|
|
|
|
|
2021-01-29 16:46:51 +08:00
|
|
|
* Fri Jan 29 2021 jinzhimin <jinzhimin2@huawei.com> - 2.24.33-1
|
|
|
|
|
- upgrade to 2.24.33
|
|
|
|
|
|
2020-02-28 12:00:35 +08:00
|
|
|
* Fri Feb 28 2020 xiaoweiwei <xiaoweiwei5@huawei.com> - 2.24.32-7
|
|
|
|
|
- Type:enhancement
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:disable immodules package
|
|
|
|
|
|
2020-02-24 18:40:15 +08:00
|
|
|
* Mon Feb 24 2020 hexiujun <hexiujun1@huawei.com> - 2.24.32-6
|
|
|
|
|
- Type:enhancement
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:Port gtk2-devel's gtk-builder-convert to Python 3
|
|
|
|
|
|
2020-01-09 23:00:49 +08:00
|
|
|
* Thu Jan 9 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.24.32-5
|
|
|
|
|
- Type:enhancement
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:delete Patches
|
|
|
|
|
|
2020-02-28 12:00:35 +08:00
|
|
|
* Sat Sep 14 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.24.32-4
|
2019-09-30 10:52:18 -04:00
|
|
|
- Package init
|