summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO42
-rw-r--r--PKGBUILD100
-rw-r--r--gtk2.install16
-rw-r--r--gtkrc3
-rw-r--r--xid-collision-debug.patch15
5 files changed, 176 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8924233f6c16
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,42 @@
+# Generated by mksrcinfo v8
+# Thu Dec 31 22:38:42 UTC 2015
+pkgbase = gtk2-ubuntu
+ pkgdesc = GTK+ is a multi-platform toolkit (v2)
+ pkgver = 2.24.28
+ pkgrel = 1
+ url = http://www.gtk.org/
+ install = gtk2.install
+ arch = i686
+ arch = x86_64
+ license = LGPL
+ makedepends = pkg-config
+ makedepends = gobject-introspection
+ makedepends = gtk-doc
+ depends = atk
+ depends = pango
+ depends = libxcursor
+ depends = libxinerama
+ depends = libxrandr
+ depends = libxi
+ depends = libxcomposite
+ depends = libxdamage
+ depends = shared-mime-info
+ depends = cairo
+ depends = libcups
+ depends = gtk-update-icon-cache
+ depends = python2
+ provides = gtk2=2.24.28
+ conflicts = gtk2
+ replaces = gtk2-docs
+ backup = etc/gtk-2.0/gtkrc
+ source = http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.28.tar.xz
+ source = https://launchpad.net/ubuntu/+archive/primary/+files/gtk+2.0_2.24.28-1ubuntu1.debian.tar.xz
+ source = gtkrc
+ source = xid-collision-debug.patch
+ sha512sums = 86d563645ca70c1e14afd4b38d925f496e596cbf6181f2e95310f58c2f4152aaecc559e3c513e6d405fcf48d8d413d59a9d72782216529c1280bd8e1947d7760
+ sha512sums = 194eb2293d2469ba24dd7b4a3363fd36d874928a7e6c524f64ecfbb035ccb63debead860a4b857938b2d7558d79580fa6877eea8be2b6bd95ee475b578a61e3f
+ sha512sums = fb18f1937b117f97da1650fda2561e231cb5da108a9c04f3b27c19205843ea16402b52d9693eca63a8464bdfb1e6a0aedf81958ee3de75ce12aca4cce078bf23
+ sha512sums = 89e3223c86731a76b12d39245f1ec4cf8b4860ab1d11d74a10e5deb0db302f20b4bb5d9034da1d8aeb96369dbdeddcdd2f28943270dc501476c694562b960159
+
+pkgname = gtk2-ubuntu
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4dae60167eef
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,100 @@
+# Maintainer: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
+# Original Maintainer: György Balló <ballogy@freestart.hu>
+# Contributor: Christopher Reimer <github@creimer.net>
+# Contributor: 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.28
+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=('86d563645ca70c1e14afd4b38d925f496e596cbf6181f2e95310f58c2f4152aaecc559e3c513e6d405fcf48d8d413d59a9d72782216529c1280bd8e1947d7760'
+
+'194eb2293d2469ba24dd7b4a3363fd36d874928a7e6c524f64ecfbb035ccb63debead860a4b857938b2d7558d79580fa6877eea8be2b6bd95ee475b578a61e3f'
+
+'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 where the last menu item in a scrollable menu cannot be selected
+ echo '095_git_menus_scrolling.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"
+}
diff --git a/gtk2.install b/gtk2.install
new file mode 100644
index 000000000000..950663d1ff5a
--- /dev/null
+++ b/gtk2.install
@@ -0,0 +1,16 @@
+post_install() {
+ gtk-query-immodules-2.0 > etc/gtk-2.0/gtk.immodules
+}
+
+pre_upgrade() {
+ pre_remove
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ rm -f /etc/gtk-2.0/gtk.immodules &>/dev/null
+ rm -f /etc/gtk-2.0/gdk-pixbuf.loaders &>/dev/null
+}
diff --git a/gtkrc b/gtkrc
new file mode 100644
index 000000000000..d2282ac36e5f
--- /dev/null
+++ b/gtkrc
@@ -0,0 +1,3 @@
+gtk-icon-theme-name = "gnome"
+gtk-theme-name = "Adwaita"
+gtk-font-name = "Cantarell 11"
diff --git a/xid-collision-debug.patch b/xid-collision-debug.patch
new file mode 100644
index 000000000000..d61238c3b274
--- /dev/null
+++ b/xid-collision-debug.patch
@@ -0,0 +1,15 @@
+--- gtk+-2.18.3/gdk/x11/gdkxid.c 2009-06-19 04:59:18.000000000 +0200
++++ gtk+-2.18.3/gdk/x11/gdkxid.c.new 2009-07-22 11:30:12.000000000 +0200
+@@ -56,10 +56,10 @@
+ if (!display_x11->xid_ht)
+ display_x11->xid_ht = g_hash_table_new ((GHashFunc) gdk_xid_hash,
+ (GEqualFunc) gdk_xid_equal);
+-
++/*
+ if (g_hash_table_lookup (display_x11->xid_ht, xid))
+ g_warning ("XID collision, trouble ahead");
+-
++*/
+ g_hash_table_insert (display_x11->xid_ht, xid, data);
+ }
+