Newer
Older
# Maintainer: Bernhard Landauer <oberon@manjaro.org>
# Maintainer: Tomasz Gąsior <tomaszgasior.pl>
_repo=gtk3-mushrooms
__arch_pkg_commit=a97a4614dfdb3a2f0c97ed58f94385ecc9b16b1e
_pkgname=lib32-gtk3
pkgname=$_pkgname-classic
pkgver=3.22.30
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
pkgdesc="GTK3 patched for classic desktops like MATE/XFCE (see README)."
url="https://github.com/TomaszGasior/gtk3-mushrooms"
_archgit=https://git.archlinux.org/svntogit/community.git/plain/trunk
conflicts=($_pkgname)
provides=($_pkgname=$pkgver)
arch=(x86_64)
license=(LGPL)
depends=(
adwaita-icon-theme
cantarell-fonts
gtk3-classic
lib32-at-spi2-atk
lib32-colord
lib32-dbus
lib32-dconf
lib32-gdk-pixbuf2
lib32-json-glib
lib32-libcanberra
lib32-libcups
lib32-libepoxy
lib32-librsvg
lib32-libxcomposite
lib32-libxcursor
lib32-libxdamage
lib32-libxinerama
lib32-libxkbcommon
lib32-libxrandr
lib32-mesa
lib32-pango
lib32-rest
lib32-wayland
)
makedepends=(
'git'
'gcc-multilib'
'gobject-introspection'
'gtk-doc'
'sassc'
)
source=(
# GTK source code.
"https://download.gnome.org/sources/gtk+/${pkgver%.*}/gtk+-$pkgver.tar.xz"
# Temporary. Will be removed with next GTK3 release.
"upstream_transparent_window_bg_1._patch::https://github.com/GNOME/gtk/commit/2ce63a86ba689aa41eb47409c889c469497478b0.patch"
"upstream_transparent_window_bg_2._patch::https://github.com/GNOME/gtk/commit/01d1bc3c75fd0eff5665f5b9c690c5e1e6c65f13.patch"
"gtk-query-immodules-3.0-32.hook::$_archgit/gtk-query-immodules-3.0-32.hook?h=packages/$_pkgname&id=$__arch_pkg_commit"
# gtk3-mushrooms patches
"git+$url.git"
# trayicons background patch https://github.com/TomaszGasior/gtk3-mushrooms/issues/12
'fixes__gtktrayicon-background.patch'
)
sha256sums=('a1a4a5c12703d4e1ccda28333b87ff462741dc365131fbc94c218ae81d9a6567'
'ceb95c0952ccd3ded84cd55a2386a33edac91597052b077d12fa4a3cc62a1612'
'68e3ea59140ee565a146fff2db2d2e2ed99536bbad8ba818bee124325d516e01'
'4ac8112ac7e6fa879756e1eeb89b5efa0825ba00e5b05469913b256f86a37608'
'SKIP'
'57086d7b73b8631bf1a44ff1db255333e8244ae6bd2c1617d540397f78790f7b')
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
94
95
96
97
98
99
100
101
102
103
104
105
__patch_makefiles() {
__replace_string_in_file() {
sed -i".bak" "s/$1/$2/" "$3"
rm "$3.bak"
}
__replace_string_in_file \
"SRC_SUBDIRS = gdk gtk libgail-util modules demos tests testsuite examples" \
"SRC_SUBDIRS = gdk gtk libgail-util modules demos" \
"Makefile.am"
__replace_string_in_file \
"SUBDIRS = po po-properties \$(SRC_SUBDIRS) docs m4macros build" \
"SUBDIRS = po \$(SRC_SUBDIRS) m4macros build" \
"Makefile.am"
__replace_string_in_file \
"SUBDIRS = gtk-demo widget-factory icon-browser" \
"SUBDIRS = widget-factory" \
"demos/Makefile.am"
__replace_string_in_file \
"gtk-update-icon-cache" \
"" \
"gtk/Makefile.am"
}
__patch_gtk_code() {
for patch_file in $srcdir/$_repo/*.patch; do
patch -d "gtk" -p3 -i "$patch_file"
done
cat "$srcdir/$_repo/smaller-adwaita.css" | tee -a gtk/theme/Adwaita/gtk-contained{,-dark}.css > /dev/null
}
prepare() {
# Make building faster by skipping tests, code examples and unused elements.
__patch_makefiles
# Apply patches to GTK code.
__patch_gtk_code
# Temporary. Will be removed with next GTK3 release.
patch -p 1 -i "$srcdir/upstream_transparent_window_bg_1._patch"
patch -p 1 -i "$srcdir/upstream_transparent_window_bg_2._patch"
patch -p 1 -i "$srcdir/fixes__gtktrayicon-background.patch"
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
NOCONFIGURE=1 ./autogen.sh
}
build() {
cd "gtk+-$pkgver"
export CC='gcc -m32'
export CXX='/bin/false'
export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
CXX=/bin/false ./configure \
--prefix=/usr \
--libdir=/usr/lib32 \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-x11-backend \
--enable-wayland-backend \
--disable-schemas-compile \
--disable-gtk-doc-html \
--disable-libcanberra
# 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
mv "${pkgdir}"/usr/bin/gtk-query-immodules-3.0{,-32}
mv "${pkgdir}"/usr/bin/gtk-query-settings{,-32}
rm "${pkgdir}"/usr/bin/{gtk-{builder-tool,encode-symbolic-svg,launch},gtk3-widget-factory}
rm -rf "${pkgdir}"/{etc,usr/{include,share}}
install -Dm 644 ../gtk-query-immodules-3.0-32.hook "${pkgdir}"/usr/share/libalpm/hooks/gtk-query-immodules-3.0-32.hook