summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-misc/openbox-menu/files')
-rw-r--r--x11-misc/openbox-menu/files/openbox-menu-0.5.0-build.patch81
-rw-r--r--x11-misc/openbox-menu/files/openbox-menu-0.8.1-build.patch20
-rw-r--r--x11-misc/openbox-menu/files/openbox-menu-0.8.1-gtk3.patch77
-rw-r--r--x11-misc/openbox-menu/files/openbox-menu-0.8.1-makefile.patch106
4 files changed, 203 insertions, 81 deletions
diff --git a/x11-misc/openbox-menu/files/openbox-menu-0.5.0-build.patch b/x11-misc/openbox-menu/files/openbox-menu-0.5.0-build.patch
deleted file mode 100644
index 5750e982be10..000000000000
--- a/x11-misc/openbox-menu/files/openbox-menu-0.5.0-build.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From: Julian Ospald <hasufell@gentoo.org>
-Date: Wed Aug 21 14:26:38 UTC 2013
-Subject: several QA fixes
-
---- a/Makefile
-+++ b/Makefile
-@@ -1,17 +1,27 @@
--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
--# Check SVG support with '$ ldd /usr/bin/openbox | grep svg', librsvg must appear..
--# CFLAGS+=-DWITH_SVG
--
--prefix= /usr/local
--DESTDIR ?= $(prefix)
--BINDIR= ${DESTDIR}/bin
-+# set to 0 to turn off icons in menus
-+ICONS=1
-+
-+# set to 0 to turn off svg icons in menus
-+SVG_ICONS=1
-+
-+ifeq ($(SVG_ICONS),1)
-+CPPFLAGS += -DWITH_SVG
-+endif
-+
-+ifeq ($(ICONS),1)
-+CPPFLAGS += -DWITH_ICONS
-+endif
-+
-+prefix = /usr
-+BINDIR = ${prefix}/bin
-
- SRC= $(shell ls *.c 2> /dev/null)
- OBJ= $(SRC:.c=.o)
-@@ -19,26 +29,29 @@
- all: $(OBJ) openbox-menu
-
- %.o: %.c
-- $(CC) $(CFLAGS) -c $< -o $@
-+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
- openbox-menu: $(OBJ)
-- $(CC) $(OBJ) -o openbox-menu $(LDFLAGS) $(LIBS)
-+ $(CC) $(CFLAGS) $(OBJ) -o openbox-menu $(LDFLAGS) $(LIBS)
-
--.PHONY: clean install doc changelog check
-+.PHONY: clean install install-strip doc changelog check
-
- clean:
- @rm -f *.o openbox-menu
- @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
-
- check: openbox-menu
-- ./openbox-menu > test.xml
-+ ./openbox-menu > test.xml
- xmllint test.xml
- rm test.xml
-
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..ea66efb12903
--- /dev/null
+++ b/x11-misc/openbox-menu/files/openbox-menu-0.8.1-build.patch
@@ -0,0 +1,20 @@
+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
+--- 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..de8e28189a25
--- /dev/null
+++ b/x11-misc/openbox-menu/files/openbox-menu-0.8.1-gtk3.patch
@@ -0,0 +1,77 @@
+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
+
+---
+--- 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
+
+--- 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)
+--- 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
+--- 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
+