On 2018/10/15 12:54, Heppler, J. Scott wrote:
> I have been working on porting jgmenu which provides menu generation
> for openbox, i3, dwm and other WM's.  Jgmenu can source menu generation
> from 4 different sources:
>   1)  Openbox menu.xml
>   2)  x11/menu-cache
>   3)  xdg
>   4)  pmenu
> 
> The pmenu option is python3 code that has been embedded in the upstream
> source.  Upstream notes on python:
> https://github.com/johanmalm/jgmenu/blob/master/docs/notes_on_python
> 
> Upstream has been helpful and since the 1.3 tag has changed the code
> base to accommodate openbsd (use setitimer() instead of timer_*).
> 
> I am running a jgmenu -master pull spoofed as v1.4 in amd64_current
> using x11/menu-cache in openbox.  I had both python2(default) and
> python3 when I built the port without any reference to python in the
> Makefile.  As long as the pmenu option is not used, it runs fine without
> python.
> 
> My question is specifying python3 in WANT_LIBS, BUILD_DEPENDS,
> RUN_DEPENDS.  Only when using pmenu is python3 needed for any of these.
> Still the port should be fully functional.  Does it need to be specified
> in WANT_, BUILD_ and RUN_?

danj's comments are valid and I won't duplicate them here, but I think
you're actually asking about whether to list the dependency at all.

Is pmenu a separate binary? If not, your choice is simple, you need to
include the dependency otherwise required libraries won't be found
and the program probably won't start at all.

If it is separate, your options are:

1. package everything together and list the dependencies
or
2. subpackage pmenu, reducing dependencies for the main program

Python 3 is pretty common now so I would just package everything
together. The exception is for software that's likely to be useful
on very minimal systems, which I don't think applies here.

> V =             master
> CATEGORIES =    x11
> DISTNAME =      jgmenu-${V}
> PKGNAME =       jgmenu-1.4
> HOMEPAGE =      https://github.com/johanmalm/jgmenu
> GH_ACCOUNT =    johanmalm
> GH_PROJECT =    jgmenu
> GH_COMMIT =     5ee0b7e21715ba36690606db27f6dd85cd3ee0fc
> WRKDIST =       ${WRKDIR}/jgmenu-5ee0b7e21715ba36690606db27f6dd85cd3ee0fc

The above can be simplified, but hopefully there will be a release so the
commit id pieces can go away :)

> 
> # GPLv2 only
> PERMIT_PACKAGE_CDROM =  Yes
> 
> #MASTER_SITES =  https://github.com/johanmalm/jgmenu/archive/v${V}/
> 
> WANTLIB +=      X11 Xrandr c m pthread z
> WANTLIB +=      cairo gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 iconv
> WANTLIB +=      intl lzma menu-cache pango-1.0 pangocairo-1.0 png
> WANTLIB +=      python${MODPY_DEFAULT_VERSION_3} rsvg-2 xml2
> 
> BUILD_DEPENDS = x11/menu-cache
> 
> LIB_DEPENDS =   devel/pango \
>                x11/gnome/librsvg \
>                x11/menu-cache
> 
> MODULES =       lang/python \
>                x11/gnome

The x11/gnome module is unlikely to be correct here, for this case
you most likely just want normal dependencies on gtk-update-icon-cache
and desktop-file-utils.

> MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
> MODGNOME_TOOLS = desktop-file-utils \
>                gtk-update-icon-cache
> 
> USE_GMAKE =     Yes
> 
> RUN_DEPENDS =   lang/python/${MODPY_DEFAULT_VERSION_3}
> 
> .include <bsd.port.mk>
> 
> 
> 
> 
> -- 
> J. Scott Heppler
> 

Reply via email to