blob: 569e89b737784779a9ed498648dbb120140b0e6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# Maintainer: Michael Healy <horsemanoffaith@gmail.com>
# vercheck-pkgbuild: auto
# vercheck-ubuntu: name=gtk+2.0, repo=wily
# vercheck-archlinux: name=gtk2, repo=extra, arch=x86_64
# vercheck-gnome: name=gtk+, majorver=2.24
pkgname=gtk2-ubuntu
_ubuntu_rel=1ubuntu1
pkgver=2.24.30
pkgrel=1
pkgdesc="GTK+ is a multi-platform toolkit (v2)"
arch=(i686 x86_64)
url="http://www.gtk.org/"
license=(LGPL)
depends=(atk pango libxcursor libxinerama libxrandr libxi libxcomposite
libxdamage shared-mime-info cairo libcups gtk-update-icon-cache
python2)
makedepends=(pkg-config gobject-introspection gtk-doc)
provides=("gtk2=${pkgver}")
conflicts=(gtk2)
replaces=(gtk2-docs)
backup=(etc/gtk-2.0/gtkrc)
install=gtk2.install
source=("http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${pkgver}.tar.xz"
"https://launchpad.net/ubuntu/+archive/primary/+files/gtk+2.0_${_ubuntu_ver:-${pkgver}}-${_ubuntu_rel}.debian.tar.xz"
gtkrc
xid-collision-debug.patch)
sha512sums=('13373e4809b48acefdbf09f18f0f18b562f05b3ce2e3169c5aa80722a262405b3b4a220ecee54c59ef03ef89be9850dc659f6da9251abaf7c577599b7a4319b1'
'd948b64130e3acc02743b212d7afa96cee0da1f9adb9855989749c33f53e1f5fcc3328e14d83e733699f2f3f9657f79efb01afcea6f06760a1b6eea9c65dbd75'
'fb18f1937b117f97da1650fda2561e231cb5da108a9c04f3b27c19205843ea16402b52d9693eca63a8464bdfb1e6a0aedf81958ee3de75ce12aca4cce078bf23'
'89e3223c86731a76b12d39245f1ec4cf8b4860ab1d11d74a10e5deb0db302f20b4bb5d9034da1d8aeb96369dbdeddcdd2f28943270dc501476c694562b960159')
prepare() {
cd "gtk+-${pkgver}"
patch -p1 -i ../xid-collision-debug.patch
# Apply Ubuntu patches
# Enable patches
# Implement gtk-shell-shows-menubar from gtk3
echo 'gtk-shell-shows-menubar.patch' > ../debian/patches/series
# liboverlay-scrollbar.so: undefined symbol: ubuntu_gtk_set_use_overlay_scrollbar
echo '100_overlay_scrollbar_loading.patch' >> ../debian/patches/series
# Allow printing to printers advertised using Avahi/Bonjour when CUPS 1.6
echo 'print-dialog-show-options-of-remote-dnssd-printers.patch' >> ../debian/patches/series
# Make GTK 2 applications behave more like GTK 3 applications where the
# windows can be dragged via the menubar.
echo '062_dnd_menubar.patch' >> ../debian/patches/series
# Make sure than an offscreen window does not grab the mouse pointer.
echo '071_no_offscreen_widgets_grabbing.patch' >> ../debian/patches/series
# Fix bug for printers that don't print at 300 DPI
echo '096_git_gtkprintsettings.patch' >> ../debian/patches/series
# The list of printers should be searchable/sortable
echo 'backport_search_printer_location.patch' >> ../debian/patches/series
# Allow window dragging from empty areas of the menubar
echo 'menubar_toolbar_dragging.patch' >> ../debian/patches/series
for i in $(grep -v '#' ../debian/patches/series); do
msg "Applying ${i}"
patch -p1 -i "../debian/patches/${i}"
done
}
build() {
cd "gtk+-${pkgver}"
autoreconf -vfi
CXX=/bin/false ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-xinput=yes \
--enable-test-print-backend
# https://bugzilla.gnome.org/show_bug.cgi?id=655517
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
package() {
cd "gtk+-${pkgver}"
make DESTDIR="${pkgdir}" install
sed -i "s#env python#env python2#" "${pkgdir}/usr/bin/gtk-builder-convert"
install -Dm644 "${srcdir}/gtkrc" "${pkgdir}/usr/share/gtk-2.0/gtkrc"
# Use the official gtk-update-icon-cache package
rm -v "${pkgdir}/usr/bin/gtk-update-icon-cache"
}
|