summaryrefslogtreecommitdiff
path: root/x11-misc/openbox-menu
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-20 14:27:17 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-20 14:27:17 +0000
commit5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (patch)
tree66e860a5099bcad013f1cf667255dc372a7c11b3 /x11-misc/openbox-menu
parent7218e1b46bceac05841e90472501742d905fb3fc (diff)
gentoo resync : 20.03.2021
Diffstat (limited to 'x11-misc/openbox-menu')
-rw-r--r--x11-misc/openbox-menu/Manifest7
-rw-r--r--x11-misc/openbox-menu/files/openbox-menu-0.8.1-build.patch26
-rw-r--r--x11-misc/openbox-menu/files/openbox-menu-0.8.1-gtk3.patch91
-rw-r--r--x11-misc/openbox-menu/files/openbox-menu-0.8.1-makefile.patch106
-rw-r--r--x11-misc/openbox-menu/metadata.xml3
-rw-r--r--x11-misc/openbox-menu/openbox-menu-0.8.1.ebuild41
6 files changed, 271 insertions, 3 deletions
diff --git a/x11-misc/openbox-menu/Manifest b/x11-misc/openbox-menu/Manifest
index 83396248f9b0..5f6e65c0e9c3 100644
--- a/x11-misc/openbox-menu/Manifest
+++ b/x11-misc/openbox-menu/Manifest
@@ -1,4 +1,9 @@
AUX openbox-menu-0.5.0-build.patch 2004 BLAKE2B 6284c4d0a8695b501de51014296d40e51b8af31f7ceba84af1ad7e091576703f7bd0325fb8ab741197565e92d66e2e225b4582111ac532b0e7245db352fe85a3 SHA512 52e425084837c1c198adbbb11b48ea59855ab5396159d45b01f55659bb2f506fd297ce4baebb544028df53063e8e9535129e049b47eff0f25917e81d20b93b97
+AUX openbox-menu-0.8.1-build.patch 636 BLAKE2B 3804a03977411ca5c92fc8e79707f78940456f3c6b301db119cb24169b73e2fd882354a5de0cd1a2142f5e96a156e47c4719f835ad6934af41c20ef6270e8e13 SHA512 89f8d578a4050bb492691a9c30bbce4bf7410e867e19fc9dcf2477a613cf12ee905a05dcecbda33330e5ef4cc47f5d27803cd8118bd46b4ca83e4d322d6ebb26
+AUX openbox-menu-0.8.1-gtk3.patch 2971 BLAKE2B c941e37ed9d3acf32704aceef12d55167c3a76904ed82af55668c3268abe8fb69e3f9513732b87f10de9c6ee24c3bbd825dd22f603ac1a0a88cb5169178a6c7c SHA512 d0d733c0f443f5024d12fd3194e5eae1eaf6b7a4afd16864912f8bd411a7ae74b7d744214805e3f4464e774e7e03c2d556db00c886a1b00254b5fcb50436bb12
+AUX openbox-menu-0.8.1-makefile.patch 3562 BLAKE2B 542a20fbda371b186a6130804f3b2ac8b5b07c4d11db662ac622699a59ac16fbd9e4a1e573d48a166f5950adbdea8d4f240482ae09610ed83433dbaf284109f0 SHA512 9ceb1a2d69e65625796431b34af9a1b58980293633dbe253ff103d2c3a97aca33984c66c2c85fea2c15fa16747d190d31642112c1c546bbee0b850341da61548
DIST openbox-menu-0.8.0.tar.bz2 24229 BLAKE2B 8950d1bf55454f239a92cf17f8676295f7c769b73fce34ee2786b0a5dd18bd81b3dddfec7f5fcf77f697072abaea758d1d5c9d0f80d41c0a9d80709b845161c2 SHA512 955a5e16e7be001aec030358d3568aa6a3303d7138d6eb998494cd9ffa77de14ecf4bee163a9d49faf67939c85e303cbae51461f04f7eeaf44167a377c0f352d
+DIST openbox-menu-0.8.1.tar.gz 27960 BLAKE2B f4c78956c163b0d8ca2d601b05354217071e93307a0abc1536d1d373a3d402384b0a4d3c15252aaf9aae7c20b76b5b8aa69edfacbe11cfaa76b1aba8a7a4834e SHA512 de6454e88ac30b5cb1094ae427116808ad9dd2f37c8d2ae20dea77aa60d414a47149c09e8ea7d3c5c31182b728b8a4f13283f33c6e2a34d3cd4b64f91d4ef8da
EBUILD openbox-menu-0.8.0.ebuild 863 BLAKE2B 6307b21773b654f8361a5f50d368ea67dd73524add3ad924e852387a6d2ea686a43d2f5ec141131b2f4114f3f6154e5ab077174cd572c4f087de9c902f3eef1c SHA512 72e8228e4342dafc2d3f61f0e318c765e3c1687d31abab541fe8fb5c2045f9ac12cd4e7f19d921b1a5a8c98cacbec4b86b25534c58898ae4be9e4df86c354e3e
-MISC metadata.xml 674 BLAKE2B 018ec38449dd44d0817ecbea05843ea9f36baaa79f05013bfc53f558249aac211e8d71acaca85e60ba1ef6aaee8df80ac4d910fc72f51d05c9b682fc67a7bf05 SHA512 bfc261259c62793a0feb740063a18bfc675d7f13745aedea341c0af7cb7e6673ebfe866d3285ecfa17ed4b00ae97bbeccb442bca506fd2e9f78a7880e1db2ed2
+EBUILD openbox-menu-0.8.1.ebuild 916 BLAKE2B 1ecd7c4e6f68a8171fb627144093119e431f10bb39a030c10a77cac62b979eb264cd690b7630be414fcc1622c10691f6befb4d7ff12087cb615d7d845904f533 SHA512 6df34226328ff9527243ff8620f26f1bd935f95c4a62e7fc5974bca84b07f437ae003627f40b98b8ac73d8939587687019edc6f5ea1ccecb62147d77255baf4c
+MISC metadata.xml 604 BLAKE2B ff5d6c6d050fae1b99d870085b2d7a30bc5e1e883b054d24faaeea71eda55cd8ef9d2ac13836f127cba8e8497f41f8f91c3d9d35b00cbc242e01261a1fc1d13f SHA512 e9f551bab1b048cc6d9012983f346986619eac5a359e5e68db11b843cf1a52c91fdd738eff5f84efcd973b525a7063485ddd9fef783109f99606a7c52df09432
diff --git a/x11-misc/openbox-menu/files/openbox-menu-0.8.1-build.patch b/x11-misc/openbox-menu/files/openbox-menu-0.8.1-build.patch
new file mode 100644
index 000000000000..b1130c85d864
--- /dev/null
+++ b/x11-misc/openbox-menu/files/openbox-menu-0.8.1-build.patch
@@ -0,0 +1,26 @@
+From e3989a504d9713d0de8b236b1f8d21c74d1fcd00 Mon Sep 17 00:00:00 2001
+From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
+Date: Thu, 11 Feb 2021 21:12:52 +0300
+Subject: [PATCH 1/2] Fix compilation
+
+icon_theme is needed in menu.c
+---
+ src/openbox-menu.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/openbox-menu.h b/src/openbox-menu.h
+index 88ab2bf..e3dee22 100644
+--- a/src/openbox-menu.h
++++ b/src/openbox-menu.h
+@@ -82,4 +82,8 @@ gboolean context_get_persistent (OB_Menu*);
+
+ void context_free(OB_Menu *);
+
++#ifdef WITH_ICONS
++extern GtkIconTheme *icon_theme;
++#endif
++
+ #endif // __OPENBOXMENU_APP__
+--
+2.26.2
+
diff --git a/x11-misc/openbox-menu/files/openbox-menu-0.8.1-gtk3.patch b/x11-misc/openbox-menu/files/openbox-menu-0.8.1-gtk3.patch
new file mode 100644
index 000000000000..6b16b8a0ff8d
--- /dev/null
+++ b/x11-misc/openbox-menu/files/openbox-menu-0.8.1-gtk3.patch
@@ -0,0 +1,91 @@
+From 8fe1e7fa9239ed8b604a59ef2202f183f1f56eb6 Mon Sep 17 00:00:00 2001
+From: Fabrice THIROUX <fabrice.thiroux@net-c.com>
+Date: Sat, 13 Feb 2021 14:46:53 +0100
+Subject: [PATCH] Updated for gtk3. Remove icon_theme annoying variable
+
+---
+ Makefile | 4 ++--
+ src/menu.c | 1 -
+ src/openbox-menu.h | 1 +
+ src/utils.c | 16 ++++++----------
+ 4 files changed, 9 insertions(+), 13 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 5d8af49..5e09ef2 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+-LIBS= `pkg-config --libs glib-2.0 gtk+-2.0 libmenu-cache`
+-CFLAGS+= -g -Wall `pkg-config --cflags glib-2.0 gtk+-2.0 libmenu-cache`
++LIBS= `pkg-config --libs glib-2.0 gtk+-3.0 libmenu-cache`
++CFLAGS+= -g -Wall `pkg-config --cflags glib-2.0 gtk+-3.0 libmenu-cache`
+ CC=gcc
+ #-DG_DISABLE_DEPRECATED
+
+diff --git a/src/menu.c b/src/menu.c
+index 5b7e8f8..3b752d9 100644
+--- a/src/menu.c
++++ b/src/menu.c
+@@ -240,7 +240,6 @@ main (int argc, char **argv)
+
+ #ifdef WITH_ICONS
+ gtk_init (&argc, &argv);
+- icon_theme = gtk_icon_theme_get_default ();
+ #endif
+
+ if ((ob_context = configure (argc, argv)) == NULL)
+diff --git a/src/openbox-menu.h b/src/openbox-menu.h
+index 7035e9d..f5a7bce 100644
+--- a/src/openbox-menu.h
++++ b/src/openbox-menu.h
+@@ -19,6 +19,7 @@
+
+ #ifndef __OPENBOXMENU_APP__
+ #define __OPENBOXMENU_APP__
++
+ #include <menu-cache.h>
+
+ #ifdef WITH_ICONS
+diff --git a/src/utils.c b/src/utils.c
+index 7a68316..2f4f95b 100644
+--- a/src/utils.c
++++ b/src/utils.c
+@@ -169,8 +169,6 @@ clean_exec (MenuCacheApp *app)
+
+ #if WITH_ICONS
+
+-extern GtkIconTheme *icon_theme;
+-
+ /****f* utils/item_icon_path
+ * OUTPUT
+ * return the path for the themed icon if item.
+@@ -199,23 +197,21 @@ item_icon_path (MenuCacheItem *item)
+ if (g_path_is_absolute (name))
+ return g_strdup (name);
+
+- /* We remove the file extension as gtk_icon_theme_lookup_icon can't
+- * lookup a theme icon for, ie, 'geany.png'. It has to be 'geany'.
+- */
+- tmp_name = strndup (name, strrchr (name, '.') - name);
+ #ifdef WITH_SVG
+- icon_info = gtk_icon_theme_lookup_icon (icon_theme, tmp_name, 16, GTK_ICON_LOOKUP_GENERIC_FALLBACK);
++ icon_info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default(), name, 16, GTK_ICON_LOOKUP_GENERIC_FALLBACK);
+ #else
+- icon_info = gtk_icon_theme_lookup_icon (icon_theme, tmp_name, 16, GTK_ICON_LOOKUP_NO_SVG | GTK_ICON_LOOKUP_GENERIC_FALLBACK);
++ icon_info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default(), name, 16, GTK_ICON_LOOKUP_NO_SVG | GTK_ICON_LOOKUP_GENERIC_FALLBACK);
+ #endif
+ g_free (tmp_name);
+ }
+
++
++
+ if (!icon_info) /* 2nd fallback */
+- icon_info = gtk_icon_theme_lookup_icon (icon_theme, "empty", 16, GTK_ICON_LOOKUP_NO_SVG);
++ icon_info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (), "empty", 16, GTK_ICON_LOOKUP_NO_SVG);
+
+ icon = g_strdup (gtk_icon_info_get_filename (icon_info));
+- gtk_icon_info_free (icon_info);
++ g_object_unref (icon_info);
+
+ return icon;
+ }
diff --git a/x11-misc/openbox-menu/files/openbox-menu-0.8.1-makefile.patch b/x11-misc/openbox-menu/files/openbox-menu-0.8.1-makefile.patch
new file mode 100644
index 000000000000..a2848bf464bf
--- /dev/null
+++ b/x11-misc/openbox-menu/files/openbox-menu-0.8.1-makefile.patch
@@ -0,0 +1,106 @@
+From fa18093783ec77102c304134626bf3b4ddc07ec8 Mon Sep 17 00:00:00 2001
+From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
+Date: Thu, 11 Feb 2021 21:47:47 +0300
+Subject: [PATCH 2/2] Update Makefile build
+
+Introduce CC and PKG_CONFIG variables that can be redefined by user.
+Added variables WITH_ICONS and WITH_SVG that can be also redefined by user.
+Misc enhancements to file globbing.
+
+* 2021-03-15 asturm: Fix BINDIR path, add DESTDIR, adapt to GTK3 change
+
+--- a/Makefile
++++ b/Makefile
+@@ -1,19 +1,31 @@
+-LIBS= `pkg-config --libs glib-2.0 gtk+-3.0 libmenu-cache`
+-CFLAGS+= -g -Wall `pkg-config --cflags glib-2.0 gtk+-3.0 libmenu-cache`
+-CC=gcc
++CC ?= gcc
++PKG_CONFIG ?= pkg-config
++
++CFLAGS ?= -O2 -g
++CFLAGS += -Wall $(shell $(PKG_CONFIG) --cflags glib-2.0 gtk+-3.0 libmenu-cache)
++LIBS += $(shell $(PKG_CONFIG) --libs glib-2.0 gtk+-3.0 libmenu-cache)
++
+ #-DG_DISABLE_DEPRECATED
+
+-# Comment this line if you don't want icons to appear in menu
+-CFLAGS+=-DWITH_ICONS
+-# Uncomment this line if Openbox can display SVG icons
++# set to 0 to turn off icons in menus
++WITH_ICONS=1
++
++ifeq ($(WITH_ICONS),1)
++CFLAGS += -DWITH_ICONS
++endif
++
++# set to 0 to turn off svg icons in menus
+ # Check SVG support with '$ ldd /usr/bin/openbox | grep svg', librsvg must appear..
+-# CFLAGS+=-DWITH_SVG
++WITH_SVG=0
++
++ifeq ($(WITH_SVG),1)
++CFLAGS += -DWITH_SVG
++endif
+
+-prefix= /usr/local
+-DESTDIR ?= $(prefix)
+-BINDIR= ${DESTDIR}/bin
++prefix = /usr
++BINDIR = ${prefix}/bin
+
+-SRC= $(shell ls src/*.c 2> /dev/null)
++SRC= $(wildcard src/*.c)
+ OBJ= $(SRC:.c=.o)
+
+ all: $(OBJ) check openbox-menu
+@@ -25,15 +37,18 @@
+ openbox-menu: $(OBJ)
+ $(CC) $(OBJ) -o openbox-menu $(LDFLAGS) $(LIBS)
+
+-.PHONY: clean install doc changelog check xmllint
++.PHONY: clean install install-strip doc changelog check xmllint
+
+ clean:
+ @rm -f $(OBJ) $(TEST_OBJ) openbox-menu check
+ @rm -rf doc
+
+ install:
++ @install -Dm 755 openbox-menu "$(DESTDIR)$(BINDIR)/openbox-menu"
++
++install-strip:
+ @strip -s openbox-menu
+- @install -Dm 755 openbox-menu $(BINDIR)/openbox-menu
++ @install -Dm 755 openbox-menu "$(DESTDIR)$(BINDIR)/openbox-menu"
+
+ doc:
+ robodoc --src . --doc doc/ --multidoc --index --html --cmode
+
+diff --git a/README.md b/README.md
+--- a/README.md
++++ b/README.md
+@@ -6,17 +6,17 @@ Type `make` then, with superuser privileges, `make install` to install it. openb
+
+ ## Compile openbox-menu without icons ##
+
+-Openbox-menu shows icons before categories name and applications name (in fact, the menu and the icons are displayed by Openbox; Openbox-menu only outputs text content). You can remove icon support by editing the Makefile and commenting the following line (add a # in the begining)
++Openbox-menu shows icons before categories name and applications name (in fact, the menu and the icons are displayed by Openbox; Openbox-menu only outputs text content). You can enable icon support by running `make` with `WITH_ICONS=1` option (pass `WITH_ICONS=0` to disable it):
+
+-> CFLAGS+=-DWITH_ICONS
++> make WITH_ICONS=1
+
+ If errors occur while compiling, remove gtk+-2.0 from lines above the one previously commented.
+
+ ## SVG support
+
+-Openbox can display SVG icons since version 3.5.1. SVG support in openbox-menu has to be activated in Makefile by uncommenting the following line
++Openbox can display SVG icons since version 3.5.1. SVG support in openbox-menu can be enabled by running `make` with `WITH_SVG=1` option (pass `WITH_SVG=0` to disable it):
+
+-> CFLAGS+=-DWITH_SVG
++> make WITH_SVG=1
+
+ SVG suport will be activated by default in the future.
+
+--
+2.26.2
+
diff --git a/x11-misc/openbox-menu/metadata.xml b/x11-misc/openbox-menu/metadata.xml
index 1636af995109..374fcd14bd7e 100644
--- a/x11-misc/openbox-menu/metadata.xml
+++ b/x11-misc/openbox-menu/metadata.xml
@@ -10,8 +10,7 @@
<email>fabrice.thiroux@free.fr</email>
<name>Fabrice Thiroux</name>
</maintainer>
- <doc lang="en">https://bitbucket.org/fabriceT/openbox-menu</doc>
- <remote-id type="bitbucket">fabriceT/openbox-menu</remote-id>
+ <remote-id type="github">fabriceT/openbox-menu</remote-id>
</upstream>
<use>
<flag name="icons">Enable support for icons in menus</flag>
diff --git a/x11-misc/openbox-menu/openbox-menu-0.8.1.ebuild b/x11-misc/openbox-menu/openbox-menu-0.8.1.ebuild
new file mode 100644
index 000000000000..e49e6551b159
--- /dev/null
+++ b/x11-misc/openbox-menu/openbox-menu-0.8.1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="Another dynamic menu generator for Openbox"
+HOMEPAGE="http://fabrice.thiroux.free.fr/openbox-menu_en.html"
+SRC_URI="https://github.com/fabriceT/openbox-menu/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+icons svg"
+REQUIRED_USE="svg? ( icons )"
+
+DEPEND="
+ dev-libs/glib:2
+ lxde-base/menu-cache
+ x11-libs/gtk+:3
+"
+RDEPEND="${DEPEND}
+ icons? ( x11-wm/openbox[imlib,svg?] )
+ !icons? ( x11-wm/openbox )
+"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ # git master
+ "${FILESDIR}/${P}-gtk3.patch"
+ # downstream patches
+ "${FILESDIR}/${P}-build.patch"
+ "${FILESDIR}/${P}-makefile.patch"
+)
+
+src_compile() {
+ emake CC=$(tc-getCC) PKG_CONFIG=$(tc-getPKG_CONFIG) \
+ WITH_ICONS=$(usex icons '1' '0') \
+ WITH_SVG=$(usex svg '1' '0')
+}