I debated breaking the port down into flavors but really did not have a
sense about what OpenBSD users would use.  Personally, the lightest
fastest option is what I would use.

Since --with-lx is the default, it will throw a build error.  I'm not
sure what OpenBSD policy is toward a "multi-tool" port that does not
install with all needed dependencies for each one its "tools".  If I
recall correctly, the README arose to indicate -lx needed the
installation of menu-cache and gnome/mate menu packages.  Perhaps just
distilling the README down to a man page reference and the need for
gnome/mate menus apps/lx and menu-cache for lx itself?

I've been using -apps, via my own builds and in Arch for several years - I
think it is fairly mature.  It also has the fewest dependencies so it
essentially makes lx and pymenu obsolete.

In addition to the other changes, I'd like to try to split the port into
jgmenu and jgmenu-apps.  I'm an occasional porter and this will be my
1st attempt at flavors.

Last question
https://www.openbsd.org/faq/ports/guide.html#Ideal
Suggested CONFIGURE+STYLE = gnu - will "simple" work with
MULTI_PACKAGES/FLAVORS ?

I planned on modeling the port on evince evince--light.

Thanks


On Nov 21, 2022: 20:01, Omar Polo wrote:
Hello,

On 2022/11/20 16:13:11 -0800, "Heppler, J. Scott" <shep...@spectrum.net> wrote:
The attached diff updates jgmenu.

Thanks for updating jgmenu!

The update matches Debian testing and is one minor version beyond
FreeBSD.

This update add a fourth method of menu generation - apps.  "apps" is an
internal menu generator that duplicates the function of x11/menu-cache
while being significantly faster.

Builds/runs amd64.  make ports-lib-depends-check produced
Extra/ menu-cache.1

This means that a port listed as LIB_DEPENDS isn't actually used.  In
this case, the jgmenu executable is not linked to libmenu-cache.

The configure script needs --with-lx (or --all) to enable
libmenu-cache support.  I don't have a strong opinion on whether to
enable libmenu cache, but I'm propending to not having it enabled
since it's the upstream default and other package repositories are
doing the same (looking at alpine for example, freebsd hides it behind
a user option.)

pkg/README updated for apps.

I'd argue that the pkg/README is quite useless.  It doesn't add
anything to the manpages and there isn't some special OpenBSD-specific
or anyway trick setup to.  I'd just delete it rather than try to
maintain it.

Using CONFIGURE_STYLE = gnu in this case is slightly wrong.  The
configure script seems to honour some GNU autoconf parameter (--with-*
and --prefix) but it's a hand-written one, so I'd go with `simple'
plus CONFIGURE_ARGS.

Makefile.inc needs a patch to drop the hardcoded -Os.

nitpick: the github repository moved to jgmenu/jgmenu.

works fine here, but I never touched the configuration, so further
testing is welcome :)

ok?


Index: Makefile
===================================================================
RCS file: /home/cvs/ports/x11/jgmenu/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- Makefile    13 Nov 2022 15:30:22 -0000      1.13
+++ Makefile    21 Nov 2022 18:29:29 -0000
@@ -1,17 +1,16 @@
COMMENT =       freedesktop-compliant menu for openbox and tint2
CATEGORIES =    x11

-GH_ACCOUNT =   johanmalm
+GH_ACCOUNT =   jgmenu
GH_PROJECT =    jgmenu
-GH_TAGNAME =   v2.1
-REVISION =     6
+GH_TAGNAME =   v4.4.1

# GPLv2 only
PERMIT_PACKAGE =        Yes

-WANTLIB =  X11 Xrandr c cairo gdk_pixbuf-2.0 gio-2.0 glib-2.0
-WANTLIB += gobject-2.0 harfbuzz iconv intl lzma m menu-cache pango-1.0
-WANTLIB += pangocairo-1.0 png pthread rsvg-2 xml2 z
+WANTLIB += X11 Xrandr c cairo gdk_pixbuf-2.0 gio-2.0 glib-2.0
+WANTLIB += gobject-2.0 harfbuzz iconv intl lzma m pango-1.0 pangocairo-1.0
+WANTLIB += png pthread rsvg-2 xml2 z

# base-gcc does not understand all the warnings
COMPILER =      base-clang ports-gcc
@@ -20,13 +19,13 @@ MODULES =           lang/python
MODPY_BUILDDEP =        No
MODPY_SETUPTOOLS =      No

-LIB_DEPENDS =  x11/gnome/librsvg \
-               x11/menu-cache
+LIB_DEPENDS =  x11/gnome/librsvg

RUN_DEPENDS =   devel/desktop-file-utils \
                x11/gtk+3,-guic

-CONFIGURE_STYLE =      none
+CONFIGURE_STYLE =      simple
+CONFIGURE_ARGS +=      --prefix="${PREFIX}"

USE_GMAKE =     Yes
MAKE_FLAGS =    VERBOSE=1
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/x11/jgmenu/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo    26 Feb 2019 16:16:05 -0000      1.2
+++ distinfo    21 Nov 2022 14:12:01 -0000
@@ -1,2 +1,2 @@
-SHA256 (jgmenu-2.1.tar.gz) = rtB7PRVsAn4uS2Kvv5b4+RstWRRvT22Hc8SNMV81rz8=
-SIZE (jgmenu-2.1.tar.gz) = 330256
+SHA256 (jgmenu-4.4.1.tar.gz) = FkGU652nzO3M+0d5ZWCyprD3NK5sXDh47BhPfP5/jzI=
+SIZE (jgmenu-4.4.1.tar.gz) = 382258
Index: patches/patch-Makefile
===================================================================
RCS file: /home/cvs/ports/x11/jgmenu/patches/patch-Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 patch-Makefile
--- patches/patch-Makefile      11 Mar 2022 20:16:09 -0000      1.2
+++ patches/patch-Makefile      21 Nov 2022 14:12:01 -0000
@@ -1,42 +1,32 @@
Index: Makefile
--- Makefile.orig
+++ Makefile
-@@ -24,7 +24,7 @@ else
- datarootdir= $(prefix)/share
- endif
-
--CFLAGS  += -g -Wall -Os -std=gnu89
-+CFLAGS  += -Wall -std=gnu89
- CFLAGS  += -Wextra -Wdeclaration-after-statement -Wno-format-zero-length \
-          -Wold-style-definition -Woverflow -Wpointer-arith \
-          -Wstrict-prototypes -Wunused -Wvla -Wunused-result
-@@ -100,18 +100,18 @@ $(DEPDIR)/%.d: ;
+@@ -80,17 +80,17 @@ $(DEPDIR)/%.d: ;
 .PRECIOUS: $(DEPDIR)/%.d

- install: checkdeps $(PROGS)
+ install: $(PROGS)
-       @install -d $(DESTDIR)$(bindir)
-       @install -m755 jgmenu src/jgmenu_run $(DESTDIR)$(bindir)
--      @install -d $(DESTDIR)$(libexecdir)
--      @install -m755 $(PROGS_LIBEXEC) $(SCRIPTS_LIBEXEC) 
$(DESTDIR)$(libexecdir)
--      @./scripts/set-exec-path.sh $(DESTDIR)$(bindir)/jgmenu_run $(libexecdir)
+-      @install -d $(DESTDIR)$(libexecdir)/jgmenu
+-      @install -m755 $(PROGS_LIBEXEC) $(SCRIPTS_LIBEXEC) 
$(DESTDIR)$(libexecdir)/jgmenu
+-      @./scripts/set-exec-path.sh $(DESTDIR)$(bindir)/jgmenu_run 
$(libexecdir)/jgmenu
-       @$(MAKE) --no-print-directory -C docs/manual/ prefix=$(prefix) install
-       @install -d $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/
-       @install -d $(DESTDIR)$(datarootdir)/applications/
-       @install -m644 ./data/jgmenu.svg 
$(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/
-       @install -m644 ./data/jgmenu.desktop 
$(DESTDIR)$(datarootdir)/applications/
+-      @for dir in $(CONTRIB_DIRS); do                         \
+       install -d $(DESTDIR)$(bindir)
+       install -m755 jgmenu src/jgmenu_run $(DESTDIR)$(bindir)
-+      install -d $(DESTDIR)$(libexecdir)
-+      install -m755 $(PROGS_LIBEXEC) $(SCRIPTS_LIBEXEC) 
$(DESTDIR)$(libexecdir)
-+      ./scripts/set-exec-path.sh $(DESTDIR)$(bindir)/jgmenu_run $(libexecdir)
++      install -d $(DESTDIR)$(libexecdir)/jgmenu
++      install -m755 $(PROGS_LIBEXEC) $(SCRIPTS_LIBEXEC) 
$(DESTDIR)$(libexecdir)/jgmenu
++      ./scripts/set-exec-path.sh $(DESTDIR)$(bindir)/jgmenu_run 
$(libexecdir)/jgmenu
+       $(MAKE) --no-print-directory -C docs/manual/ prefix=$(prefix) install
+       install -d $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/
+       install -d $(DESTDIR)$(datarootdir)/applications/
+       install -m644 ./data/jgmenu.svg 
$(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/
+       install -m644 ./data/jgmenu.desktop 
$(DESTDIR)$(datarootdir)/applications/
- ifeq ($(NO_LX),1)
--      @echo "info: lx module not included as libmenu-cache >=1.1.0 not found"
-+      echo "info: lx module not included as libmenu-cache >=1.1.0 not found"
- endif
++      for dir in $(CONTRIB_DIRS); do                          \
+               $(MAKE) -C contrib/$$dir install || exit 1;     \
+       done

- # We are not brave enough to uninstall in /usr/, /usr/local/ etc
Index: patches/patch-Makefile_inc
===================================================================
RCS file: patches/patch-Makefile_inc
diff -N patches/patch-Makefile_inc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile_inc  21 Nov 2022 18:38:30 -0000
@@ -0,0 +1,14 @@
+drop -Os
+
+Index: Makefile.inc
+--- Makefile.inc.orig
++++ Makefile.inc
+@@ -15,7 +15,7 @@ else
+ datarootdir= $(prefix)/share
+ endif
+
+-CFLAGS  += -g -Wall -Os -std=gnu99
++CFLAGS  += -g -Wall -std=gnu99
+ CFLAGS  += -Wextra -Wdeclaration-after-statement -Wno-format-zero-length \
+          -Wold-style-definition -Woverflow -Wpointer-arith \
+          -Wstrict-prototypes -Wunused -Wvla -Wunused-result
Index: patches/patch-docs_manual_Makefile
===================================================================
RCS file: /home/cvs/ports/x11/jgmenu/patches/patch-docs_manual_Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 patch-docs_manual_Makefile
--- patches/patch-docs_manual_Makefile  11 Mar 2022 20:16:09 -0000      1.2
+++ patches/patch-docs_manual_Makefile  21 Nov 2022 14:12:01 -0000
@@ -1,7 +1,7 @@
Index: docs/manual/Makefile
--- docs/manual/Makefile.orig
+++ docs/manual/Makefile
-@@ -11,7 +11,7 @@ man7pages  = jgmenututorial.7
+@@ -4,7 +4,7 @@ man7pages  = jgmenututorial.7 jgmenuunicode.7
 manpages   = $(man1pages) $(man7pages)

 prefix ?= /usr/local
Index: patches/patch-src_jgmenu_run
===================================================================
RCS file: /home/cvs/ports/x11/jgmenu/patches/patch-src_jgmenu_run,v
retrieving revision 1.2
diff -u -p -r1.2 patch-src_jgmenu_run
--- patches/patch-src_jgmenu_run        11 Mar 2022 20:16:09 -0000      1.2
+++ patches/patch-src_jgmenu_run        21 Nov 2022 14:12:01 -0000
@@ -1,7 +1,7 @@
Index: src/jgmenu_run
--- src/jgmenu_run.orig
+++ src/jgmenu_run
-@@ -57,7 +57,7 @@ then
+@@ -58,7 +58,7 @@ then
        if test -e ${JGMENU_LOCKFILE}
        then
                send_tint2_env_vars_to_jgmenu
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/ports/x11/jgmenu/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST   11 Mar 2022 20:16:09 -0000      1.3
+++ pkg/PLIST   21 Nov 2022 18:36:00 -0000
@@ -1,24 +1,27 @@
@bin bin/jgmenu
bin/jgmenu_run
lib/jgmenu/
-lib/jgmenu/jgmenu-config.py
+@bin lib/jgmenu/jgmenu-apps
+@bin lib/jgmenu/jgmenu-config
@bin lib/jgmenu/jgmenu-greeneye
+lib/jgmenu/jgmenu-hide-app.sh
@bin lib/jgmenu/jgmenu-i18n
lib/jgmenu/jgmenu-init.sh
-@bin lib/jgmenu/jgmenu-lx
@bin lib/jgmenu/jgmenu-ob
-lib/jgmenu/jgmenu-pmenu.py
+@bin lib/jgmenu/jgmenu-obtheme
@bin lib/jgmenu/jgmenu-socket
+lib/jgmenu/jgmenu-themes.sh
lib/jgmenu/jgmenu-unity-hack.py
-@man man/man1/jgmenu-config.1
+@man man/man1/jgmenu-apps.1
+@man man/man1/jgmenu-i18n.1
@man man/man1/jgmenu-lx.1
@man man/man1/jgmenu-ob.1
@man man/man1/jgmenu-pmenu.1
@man man/man1/jgmenu.1
@man man/man1/jgmenu_run.1
@man man/man7/jgmenututorial.7
+@man man/man7/jgmenuunicode.7
share/applications/jgmenu.desktop
-share/doc/pkg-readmes/${PKGSTEM}
share/icons/hicolor/scalable/apps/jgmenu.svg
@tag gtk-update-icon-cache %D/share/icons/hicolor
@tag update-desktop-database
Index: pkg/README
===================================================================
RCS file: pkg/README
diff -N pkg/README
--- pkg/README  11 Mar 2022 20:16:09 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-+-------------------------------------------------------------------------------
-| Running ${PKGSTEM} on OpenBSD
-+-------------------------------------------------------------------------------
-
-jgmenu options
-==============
-
-This jgmenu port can generate an X11 application menu three different ways:
-  1) 'jgmenu_run lx' using additional packages menu-cache and gnome(mate)-menus
-  2) 'jgmenu_run ob' from an existing openbox menu.xml file
-  3) 'jgmenu_run pmenu' with python3 text parsing
-
-For those running Openbox, the first method provides automatic, FreeDesktop
-compliant, menu generation.  The second method will source a manually edited
-menu.xml file.  If no ~/.config/openbox/menu.xml file exists,
-/etc/xdg/openbox/menu.xml will be used.  Pmenu does not require additional
-packages but has roughly four times the latency.
-
-For other Window managers, pmenu, lx/menu-cache/gnome(mate)-menus will work.
-
-More details are provided in jgmenu(4) and jgmenututorial(7).

--
J. Scott Heppler

Penguin Innovations

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

NOTICE: This e-mail message and any attachments may
contain legally privileged and confidential information intended
solely for the use of the intended recipients. If you are not an
intended recipient, you are hereby notified that you have
received this message in error and any review, dissemination,
distribution, copying, or other unauthorized use of this email
and any attachment is strictly prohibited. If you have received
this email in error, please notify the sender immediately and
delete the message and any attachments from your system.

Reply via email to