Skip to content

Commit 4f56efa

Browse files
committed
addpkg: lib32-gtk2
1 parent 850bda8 commit 4f56efa

8 files changed

Lines changed: 233 additions & 0 deletions
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
3+
Date: Sat, 22 Jun 2024 22:08:43 +0200
4+
Subject: [PATCH] Lower severity of XID collision warnings
5+
6+
---
7+
gdk/x11/gdkxid.c | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/gdk/x11/gdkxid.c b/gdk/x11/gdkxid.c
11+
index 1005f9e40c0d..1523fa70b2d3 100644
12+
--- a/gdk/x11/gdkxid.c
13+
+++ b/gdk/x11/gdkxid.c
14+
@@ -58,7 +58,7 @@ _gdk_xid_table_insert (GdkDisplay *display,
15+
(GEqualFunc) gdk_xid_equal);
16+
17+
if (g_hash_table_lookup (display_x11->xid_ht, xid))
18+
- g_warning ("XID collision, trouble ahead");
19+
+ g_debug ("XID collision, trouble ahead");
20+
21+
g_hash_table_insert (display_x11->xid_ht, xid, data);
22+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Matthias Clasen <mclasen@redhat.com>
3+
Date: Sat, 15 Jun 2024 14:18:01 -0400
4+
Subject: [PATCH] Stop looking for modules in cwd
5+
6+
This is just not a good idea. It is surprising, and can be misused.
7+
8+
Fixes: #6786
9+
---
10+
gtk/gtkmodules.c | 9 ++-------
11+
1 file changed, 2 insertions(+), 7 deletions(-)
12+
13+
diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
14+
index 50729b61a590..c0f0c30a2148 100644
15+
--- a/gtk/gtkmodules.c
16+
+++ b/gtk/gtkmodules.c
17+
@@ -229,13 +229,8 @@ find_module (const gchar *name)
18+
gchar *module_name;
19+
20+
module_name = _gtk_find_module (name, "modules");
21+
- if (!module_name)
22+
- {
23+
- /* As last resort, try loading without an absolute path (using system
24+
- * library path)
25+
- */
26+
- module_name = g_module_build_path (NULL, name);
27+
- }
28+
+ if (module_name == NULL)
29+
+ return NULL;
30+
31+
module = g_module_open (module_name, G_MODULE_BIND_LOCAL | G_MODULE_BIND_LAZY);
32+

archlinuxcn/lib32-gtk2/LICENSE

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Copyright Arch Linux Contributors
2+
3+
Permission to use, copy, modify, and/or distribute this software for
4+
any purpose with or without fee is hereby granted.
5+
6+
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
7+
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
8+
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
9+
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
10+
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
11+
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
12+
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

archlinuxcn/lib32-gtk2/PKGBUILD

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Maintainer: Felix Yan <felixonmars@archlinux.org>
2+
# Contributor: Ionut Biru <ibiru@archlinux.org
3+
# Contributor: Pierre Schmitz <pierre@archlinux.de>
4+
# Contributor: Mikko Seppälä <t-r-a-y@mbnet.fi>
5+
6+
pkgname=lib32-gtk2
7+
pkgver=2.24.33
8+
pkgrel=5
9+
pkgdesc="GObject-based multi-platform GUI toolkit (legacy, 32-bit)"
10+
url="https://www.gtk.org/"
11+
arch=(x86_64)
12+
license=(LGPL-2.1-or-later)
13+
depends=(
14+
gtk2
15+
lib32-atk
16+
lib32-cairo
17+
lib32-gdk-pixbuf2
18+
lib32-glib2
19+
lib32-glibc
20+
lib32-libcups
21+
lib32-librsvg
22+
lib32-libx11
23+
lib32-libxcomposite
24+
lib32-libxcursor
25+
lib32-libxdamage
26+
lib32-libxext
27+
lib32-libxfixes
28+
lib32-libxi
29+
lib32-libxinerama
30+
lib32-libxrandr
31+
lib32-libxrender
32+
lib32-pango
33+
)
34+
makedepends=(
35+
git
36+
glib2-devel
37+
gobject-introspection
38+
gtk-doc
39+
)
40+
source=(
41+
"git+https://gitlab.gnome.org/GNOME/gtk.git#tag=$pkgver"
42+
gtk-query-immodules-2.0-32.hook
43+
0001-Lower-severity-of-XID-collision-warnings.patch
44+
0002-Stop-looking-for-modules-in-cwd.patch
45+
)
46+
b2sums=('1b18d1cfef55466209cf93be45af15dc058a8b74d13ab590cfc7f0b09b0584adc62d4330aaed65185c0142cc8c326e4274c8e75e0af94bec5be3cfcca105c1e6'
47+
'e9a1c4037c9e1fd03e0c139059165a85b6258b0535bd8150d5b1bdab71f056240bd0448f2f1d6930aa1b1b73299707e79ce83c6f28dcbeb7664412c136bb5401'
48+
'45ecc976d9eb9d990fc204230aa052a6d1b2bdfdc94788be37d576ab262a1da49855eb46ecd4bfce4efde6e2f817a1660c6d1fa756be3b372f7f8d13b0ef0fd0'
49+
'06ca1c6f0e8f6a7c7a3cc08ce3d358af978d28fc4aa8d9e981883e3ad5adf7d821bcb27bc8b93bf65171a92396ac8f7ad62c90db501a492cca7c30b6081e957f')
50+
51+
prepare() {
52+
cd gtk
53+
git apply -3 ../0001-Lower-severity-of-XID-collision-warnings.patch
54+
55+
# CVE-2024-6655: https://www.openwall.com/lists/oss-security/2024/09/09/1
56+
# https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/7361
57+
git apply -3 ../0002-Stop-looking-for-modules-in-cwd.patch
58+
59+
sed -i '/AM_INIT_AUTOMAKE/s/]/ foreign]/' configure.ac
60+
autoreconf -fvi
61+
}
62+
63+
build() {
64+
local configure_options=(
65+
--prefix=/usr
66+
--libdir=/usr/lib32
67+
--sysconfdir=/etc
68+
--localstatedir=/var
69+
--with-xinput=yes
70+
--disable-gtk-doc
71+
)
72+
73+
export CC="gcc -m32"
74+
export CXX="g++ -m32"
75+
export PKG_CONFIG=i686-pc-linux-gnu-pkg-config
76+
CFLAGS+=" -Wno-error=implicit-int -Wno-error=incompatible-pointer-types"
77+
78+
cd gtk
79+
./configure "${configure_options[@]}"
80+
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
81+
make
82+
}
83+
84+
package() {
85+
optdepends=(
86+
'adwaita-fonts: Default font'
87+
'adwaita-icon-theme: Default icon theme'
88+
'gnome-themes-extra-gtk2: Default widget theme'
89+
)
90+
provides=(
91+
libgailutil.so
92+
libgdk-x11-2.0.so
93+
libgtk-x11-2.0.so
94+
)
95+
install=lib32-gtk2.install
96+
97+
make -C gtk DESTDIR="$pkgdir" install
98+
rm -r "$pkgdir"/{etc,usr/{include,share}}
99+
find "$pkgdir/usr/bin" -type f -not -name gtk-query-immodules-2.0 -delete
100+
mv "$pkgdir"/usr/bin/gtk-query-immodules-2.0{,-32}
101+
102+
install -Dm644 gtk-query-immodules-2.0-32.hook -t "$pkgdir/usr/share/libalpm/hooks"
103+
}
104+
105+
# vim:set sw=2 sts=-1 et:

archlinuxcn/lib32-gtk2/REUSE.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version = 1
2+
3+
[[annotations]]
4+
path = [
5+
"PKGBUILD",
6+
"README.md",
7+
"keys/**",
8+
".SRCINFO",
9+
".nvchecker.toml",
10+
"*.install",
11+
"*.sysusers",
12+
"*.tmpfiles",
13+
"*.logrotate",
14+
"*.pam",
15+
"*.service",
16+
"*.socket",
17+
"*.timer",
18+
"*.desktop",
19+
"*.hook",
20+
]
21+
SPDX-FileCopyrightText = "Arch Linux contributors"
22+
SPDX-License-Identifier = "0BSD"
23+
24+
[[annotations]]
25+
path = [
26+
"0001-Lower-severity-of-XID-collision-warnings.patch",
27+
"0002-Stop-looking-for-modules-in-cwd.patch",
28+
]
29+
SPDX-FileCopyrightText = "lib32-gtk2 contributors"
30+
SPDX-License-Identifier = "LGPL-2.1-or-later"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Trigger]
2+
Type = Path
3+
Operation = Install
4+
Operation = Upgrade
5+
Operation = Remove
6+
Target = usr/lib32/gtk-2.0/2.10.0/immodules/*.so
7+
8+
[Action]
9+
Description = Probing 32-bit GTK2 input method modules...
10+
When = PostTransaction
11+
Exec = /usr/bin/gtk-query-immodules-2.0-32 --update-cache
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pre_remove() {
2+
rm -f /usr/lib32/gtk-2.0/2.10.0/immodules.cache
3+
}

archlinuxcn/lib32-gtk2/lilac.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This file is auto-generated by n2y
2+
3+
maintainers:
4+
- github: heavysink
5+
email: winstonwu91@gmail.com
6+
7+
build_prefix: multilib
8+
9+
pre_build_script: aur_pre_build(maintainers=['City-busz'])
10+
11+
post_build: aur_post_build
12+
13+
repo_depends:
14+
- gtk2
15+
16+
update_on:
17+
- source: aur
18+
aur:

0 commit comments

Comments
 (0)