summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzamat H. Hackimov <azamat.hackimov@gmail.com>2020-09-04 00:06:07 +0300
committerAndreas Sturmlechner <asturm@gentoo.org>2021-03-15 16:23:34 +0100
commitfb3b6fa6ed33b54c6315c0b903b30de35a8ef876 (patch)
tree852f83a2b6b1fc1e6ea94adf7e066cf202cc6bec
parentmedia-gfx/optipng: Drop old (EAPI 6) (diff)
downloadgentoo-fb3b6fa6ed33b54c6315c0b903b30de35a8ef876.tar.gz
gentoo-fb3b6fa6ed33b54c6315c0b903b30de35a8ef876.tar.bz2
gentoo-fb3b6fa6ed33b54c6315c0b903b30de35a8ef876.zip
x11-misc/openbox-menu: update to 0.8.1
Updated SRC_URI (#739808), migrated to EAPI 7. Bug: https://bugs.gentoo.org/739808 Package-Manager: Portage-3.0.4, Repoman-2.3.23 Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/17404 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--x11-misc/openbox-menu/Manifest1
-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-makefile.patch106
-rw-r--r--x11-misc/openbox-menu/metadata.xml3
-rw-r--r--x11-misc/openbox-menu/openbox-menu-0.8.1.ebuild38
5 files changed, 172 insertions, 2 deletions
diff --git a/x11-misc/openbox-menu/Manifest b/x11-misc/openbox-menu/Manifest
index d0f1e833ff7..bfff046437b 100644
--- a/x11-misc/openbox-menu/Manifest
+++ b/x11-misc/openbox-menu/Manifest
@@ -1 +1,2 @@
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
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 00000000000..b1130c85d86
--- /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-makefile.patch b/x11-misc/openbox-menu/files/openbox-menu-0.8.1-makefile.patch
new file mode 100644
index 00000000000..c74a02079f9
--- /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.
+---
+ Makefile | 36 ++++++++++++++++++++++++++----------
+ README.md | 8 ++++----
+ 2 files changed, 30 insertions(+), 14 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 5d8af49..e40e611 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,19 +1,32 @@
+-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`
+-CC=gcc
++CC ?= gcc
++PKG_CONFIG ?= pkg-config
++
++CFLAGS ?= -O2 -g
++CFLAGS += -Wall $(shell $(PKG_CONFIG) --cflags glib-2.0 gtk+-2.0 libmenu-cache)
++LIBS += $(shell $(PKG_CONFIG) --libs glib-2.0 gtk+-2.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
+
+-prefix= /usr/local
++ifeq ($(WITH_SVG),1)
++CFLAGS += -DWITH_SVG
++endif
++
++prefix = /usr/local
+ DESTDIR ?= $(prefix)
+ BINDIR= ${DESTDIR}/bin
+
+-SRC= $(shell ls src/*.c 2> /dev/null)
++SRC= $(wildcard src/*.c)
+ OBJ= $(SRC:.c=.o)
+
+ all: $(OBJ) check openbox-menu
+@@ -25,13 +38,16 @@ all: $(OBJ) check openbox-menu
+ 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 $(BINDIR)/openbox-menu
++
++install-strip:
+ @strip -s openbox-menu
+ @install -Dm 755 openbox-menu $(BINDIR)/openbox-menu
+
+diff --git a/README.md b/README.md
+index 748e684..4db7074 100644
+--- 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 1636af99510..374fcd14bd7 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 00000000000..ecb08aa5c8d
--- /dev/null
+++ b/x11-misc/openbox-menu/openbox-menu-0.8.1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2020 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+:2
+"
+RDEPEND="
+ ${DEPEND}
+ icons? ( x11-wm/openbox[imlib,svg?] )
+ !icons? ( x11-wm/openbox )
+"
+BDEPEND="virtual/pkgconfig"
+
+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')
+}