summaryrefslogtreecommitdiff
path: root/x11-wm/openbox
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-19 12:34:34 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-19 12:34:34 +0000
commit1d300fd75dc60cab2ca6e0bb0016b09a4fb7c67a (patch)
tree5dff362f093f67da764ce10a380ad9d14646b46e /x11-wm/openbox
parent78634f348a30a55cc55606ee1ecde032241ceaeb (diff)
gentoo auto-resync : 19:03:2023 - 12:34:33
Diffstat (limited to 'x11-wm/openbox')
-rw-r--r--x11-wm/openbox/Manifest2
-rw-r--r--x11-wm/openbox/files/openbox-3.6.1-glib-2.76.patch54
-rw-r--r--x11-wm/openbox/openbox-3.6.1-r5.ebuild123
3 files changed, 179 insertions, 0 deletions
diff --git a/x11-wm/openbox/Manifest b/x11-wm/openbox/Manifest
index 491aeefb1934..ba0a3bb48f80 100644
--- a/x11-wm/openbox/Manifest
+++ b/x11-wm/openbox/Manifest
@@ -1,9 +1,11 @@
AUX openbox-3.5.2-gnome-session.patch 574 BLAKE2B 64d1d141245172140c16e7d4bee91959f04b625eaf6c67587e77ac1d3c693ad177db88aa9bb858aab80422313a7709ec48daa594d29b14fd8f9805c1160e98a6 SHA512 35d36dd2ddef05e21491df75a1d14c3d26dd17a8da79577d06fb3b7ddf6a179c7e23bb777e4cbdaa4bb4ab745db023981645f3dbe4dcf75c7b4d5f46e18b96c8
AUX openbox-3.6.1-getgrent-to-getgroups.patch 1852 BLAKE2B ce3de49d42286ba100d655fc6ffe81a69d3cb959942060fd8d5538c23972a7f9bfdd6980b69dd57e46884595dafe153e345510a5ddab42b815ee99c5401b7148 SHA512 6daa72d78743875255c79dd84ef0def4dc0667e93e557667c53f33cfcc122a7b9df4c42413b9837ef85cf19dd256fbfe5b6816788a848c7ee7a408bacd9e2a20
+AUX openbox-3.6.1-glib-2.76.patch 2227 BLAKE2B 5f7605d81d00e1222945467a688927a9fc01e1b44acb077dca0eaae8059eb062ec114b5b1b7ec7ac826d1e5530591924ac17d9732a68e3767b01c732f8f7d452 SHA512 188a526c02072102d4ab1402b11ba40e9f5e96d6968611d34abf7d8085f57a020217054c40682b977d45ca72dd27f04cabeed3f0f23494a8345e424efea5b30e
AUX openbox-3.6.1-py3-xdg.patch 4702 BLAKE2B 52e8f35626bf71a10327efe99d518994aece46561f4cb4d26d71412f8f5e1528efbd17c48b38a902053b6d3eefbaa9b79f79c06783d669b0c76cbdf256300463 SHA512 7079cf38a79e2fe7e35c07a5600de8a4678961239d3990596378239f064522204ca40522861f1d403d6e621bca92ca14b06873645ba60fda2c86a4132a9aa16a
DIST openbox-3.6.1.tar.gz 962665 BLAKE2B 1c0288137d7b02d443c384f970cd9a3f4d5d5585989917ac6ae8cf492e045dc086650c245907e168bc7b6d0ce701339854a5d94ad510823141cc78e28c1e13c5 SHA512 5e6f4a214005bea8b26bc8959fe5bb67356a387ddd317e014f43cb5b5bf263ec617a5973e2982eb76a08dc7d3ca5ec9e72e64c9b5efd751001a8999b420b1ad0
DIST surreal-gentoo.tar.gz 13410 BLAKE2B e7d902278004785c68a2e5aa02aa326cee1ef04fe964fce283afde00cb668b06d5d8461207ef9571aa402b960ec16bdff6bf11cf38ca9a76335ced173592ffce SHA512 dd43cb78e5e33345767edad22d0470765ac9eeae02bbad0acd8098bc096c15a166bf651493d12a5953bc043c9be92e9b160607eafb4723a6bcfc5d1d6fae235e
EBUILD openbox-3.6.1-r3.ebuild 2733 BLAKE2B 935abff50dcb94fb7bba697a6cf657dd6aa10c629595b5555e39a4a1c6d2bfd18fd9794d7995a33f0be06c03ba09cef36f109980de41a65ccc921ea4bc781975 SHA512 3ff515f0a2115660494bc48d987699ced6f21f7ad0fbed012155b4f78cf65c94e70eb1213363b27be90e8d59fdbe4d59ffc4702ae2c7e8b1e19e5772475b0bfc
EBUILD openbox-3.6.1-r4.ebuild 2833 BLAKE2B a4b70f0a3a03559f9a161aabb144b809dc920082023b7ae8a9c42d3d8a676060abb5fc66626e35a2a53aa8611af07d2a39624f1320a1c4effea51037ff77571f SHA512 ad16d4ef7f89fa44a4e242ad2d7bb3e1f219172eb36e90177951e80b2f21c6761ea4765a7ab65d392a22ab4b16621ed3adfd45f5c8bfb2a233f29b11581315d2
+EBUILD openbox-3.6.1-r5.ebuild 2910 BLAKE2B 1d6af9c1107fd6b95142c72eafbb57a7e0711ce04773b477690262262327536b48f25b3d6f35a291b6bcdef6d088bbbd0d4083478f530c079755427d2663ba48 SHA512 ecf6d21c99bde8b667e1dcffaade44f13709839fd2d328b60addb1e9defa12b316716cb4cfbdfe9b29713e823adfb227beccabe3135eb4680ec13a95b65b1ee2
EBUILD openbox-9999.ebuild 2833 BLAKE2B a4b70f0a3a03559f9a161aabb144b809dc920082023b7ae8a9c42d3d8a676060abb5fc66626e35a2a53aa8611af07d2a39624f1320a1c4effea51037ff77571f SHA512 ad16d4ef7f89fa44a4e242ad2d7bb3e1f219172eb36e90177951e80b2f21c6761ea4765a7ab65d392a22ab4b16621ed3adfd45f5c8bfb2a233f29b11581315d2
MISC metadata.xml 705 BLAKE2B 0df8e542b8837fb94e5f6fd289b0d5172c1d4d01bc88c550b6afd5307619a0dfdf5de2c2ba8838d63f8a8c29a378e6545a8932c77d6f0bef7cc898a4fd400206 SHA512 acf171ad8ccc7d07b533e4f5aef895b485050fa8fa39d8a6db798a15d9c5924d4f825573b77ddd8b755b8c0b34e8c3ab49cd0f56592854ae36462c3de448f4dc
diff --git a/x11-wm/openbox/files/openbox-3.6.1-glib-2.76.patch b/x11-wm/openbox/files/openbox-3.6.1-glib-2.76.patch
new file mode 100644
index 000000000000..65d0dba17300
--- /dev/null
+++ b/x11-wm/openbox/files/openbox-3.6.1-glib-2.76.patch
@@ -0,0 +1,54 @@
+Gentoo Bug: https://bugs.gentoo.org/901777
+Upstream Bug: https://bugzilla.icculus.org/show_bug.cgi?id=6669
+Upstream Commit: https://github.com/Mikachu/openbox/commit/9ed6fdd71890c5cc43747f105382d5677e5d37e7
+
+From 9ed6fdd71890c5cc43747f105382d5677e5d37e7 Mon Sep 17 00:00:00 2001
+From: pldubouilh <pldubouilh@gmail.com>
+Date: Fri, 17 Mar 2023 18:23:47 +0100
+Subject: [PATCH] Fix list traversal issue in client_calc_layer
+
+The calls to client_calc_layer_internal can modify stacking_list, which
+can cause us to follow dangling ->next pointers (either by the pointer
+itself already being freed, or it pointing to a freed area). Avoid this
+by copying the list first, the goal is to visit every client in the list
+once so this should be fine.
+---
+ openbox/client.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/openbox/client.c b/openbox/client.c
+index 7168b2407..b8264587c 100644
+--- a/openbox/client.c
++++ b/openbox/client.c
+@@ -2742,9 +2742,12 @@ static void client_calc_layer_internal(ObClient *self)
+ void client_calc_layer(ObClient *self)
+ {
+ GList *it;
++ /* the client_calc_layer_internal calls below modify stacking_list,
++ so we have to make a copy to iterate over */
++ GList *list = g_list_copy(stacking_list);
+
+ /* skip over stuff above fullscreen layer */
+- for (it = stacking_list; it; it = g_list_next(it))
++ for (it = list; it; it = g_list_next(it))
+ if (window_layer(it->data) <= OB_STACKING_LAYER_FULLSCREEN) break;
+
+ /* find the windows in the fullscreen layer, and mark them not-visited */
+@@ -2757,7 +2760,7 @@ void client_calc_layer(ObClient *self)
+ client_calc_layer_internal(self);
+
+ /* skip over stuff above fullscreen layer */
+- for (it = stacking_list; it; it = g_list_next(it))
++ for (it = list; it; it = g_list_next(it))
+ if (window_layer(it->data) <= OB_STACKING_LAYER_FULLSCREEN) break;
+
+ /* now recalc any windows in the fullscreen layer which have not
+@@ -2768,6 +2771,8 @@ void client_calc_layer(ObClient *self)
+ !WINDOW_AS_CLIENT(it->data)->visited)
+ client_calc_layer_internal(it->data);
+ }
++
++ g_list_free(it);
+ }
+
+ gboolean client_should_show(ObClient *self)
diff --git a/x11-wm/openbox/openbox-3.6.1-r5.ebuild b/x11-wm/openbox/openbox-3.6.1-r5.ebuild
new file mode 100644
index 000000000000..ebd2a5d8b75d
--- /dev/null
+++ b/x11-wm/openbox/openbox-3.6.1-r5.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11})
+inherit autotools python-single-r1
+
+DESCRIPTION="Standards compliant, fast, light-weight, extensible window manager"
+HOMEPAGE="http://openbox.org/wiki/Main_Page"
+
+if [[ ${PV} == *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/Mikachu/openbox.git"
+else
+ SRC_URI="http://openbox.org/dist/openbox/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x86-linux"
+fi
+
+SRC_URI+=" branding? ( https://dev.gentoo.org/~hwoarang/distfiles/surreal-gentoo.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="3"
+IUSE="branding debug imlib nls session startup-notification svg xdg"
+REQUIRED_USE="xdg? ( ${PYTHON_REQUIRED_USE} )"
+
+BDEPEND="
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+RDEPEND="
+ dev-libs/glib:2
+ >=dev-libs/libxml2-2.0
+ >=media-libs/fontconfig-2
+ x11-libs/cairo
+ x11-libs/libXau
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXft
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXt
+ >=x11-libs/pango-1.8[X]
+ imlib? ( media-libs/imlib2 )
+ startup-notification? ( >=x11-libs/startup-notification-0.8 )
+ svg? ( gnome-base/librsvg:2 )
+ xdg? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ ')
+ )
+"
+DEPEND="${RDEPEND}
+ x11-base/xorg-proto
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.5.2-gnome-session.patch"
+ # see https://github.com/danakj/openbox/pull/35
+ "${FILESDIR}/${PN}-3.6.1-py3-xdg.patch"
+ # https://bugs.gentoo.org/827227
+ "${FILESDIR}/${PN}-3.6.1-getgrent-to-getgroups.patch"
+ # https://bugs.gentoo.org/901777
+ "${FILESDIR}/${PN}-3.6.1-glib-2.76.patch"
+)
+
+pkg_setup() {
+ use xdg && python-single-r1_pkg_setup
+}
+
+src_unpack() {
+ if [[ ${PV} == *9999* ]]; then
+ git-r3_src_unpack
+ fi
+
+ default
+}
+
+src_prepare() {
+ default
+ sed -i \
+ -e "s:-O0 -ggdb ::" \
+ -e 's/-fno-strict-aliasing//' \
+ m4/openbox.m4 || die
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --disable-static
+ --with-x
+ $(use_enable debug)
+ $(use_enable imlib imlib2)
+ $(use_enable nls)
+ $(use_enable session session-management)
+ $(use_enable startup-notification)
+ $(use_enable svg librsvg)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ dodir /etc/X11/Sessions
+ echo "/usr/bin/openbox-session" > "${ED}/etc/X11/Sessions/${PN}"
+ fperms a+x /etc/X11/Sessions/${PN}
+ emake DESTDIR="${D}" install
+ if use branding; then
+ insinto /usr/share/themes
+ doins -r "${WORKDIR}"/Surreal_Gentoo
+ # make it the default theme
+ sed -i \
+ -e "/<theme>/{n; s@<name>.*</name>@<name>Surreal_Gentoo</name>@}" \
+ "${D}"/etc/xdg/openbox/rc.xml \
+ || die "failed to set Surreal Gentoo as the default theme"
+ fi
+ find "${ED}" -name '*.la' -delete || die
+ if use xdg ; then
+ python_fix_shebang "${ED}"/usr/libexec/openbox-xdg-autostart
+ else
+ rm "${ED}"/usr/libexec/openbox-xdg-autostart || die
+ fi
+}