pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: wip/dte 1.11.1 committer request



Jason Bacon <jtocino%gmx.com@localhost> wrote:

> Looks like you added the filter variable to PLIST, but forgot to define
> it in the pkgsrc Makefile.  ${PLIST.notdarwin} is not predefined by
> pkgsrc, so you can't use it in PLIST before defining it yourself.  An
> example from editors/codelite/Makefile:
> 
> .include "../../mk/bsd.prefs.mk"
> 
> PLIST_VARS+=            notdarwin
> .if ${OPSYS} != "Darwin"
> PLIST.notdarwin=        YES
> .endif
> 
> For codelite, this probably make sense, since it avoids installing a
> binary that apparently won't work on Darwin (maybe requires X11?):
> 
> ${PLIST.notdarwin}bin/codelite-terminal

This was the package I used as a reference as well, however, I
mistakenly forgot to look at the Makefile to see the PLIST_VARS.
Thanks for catching this.

> For dte, the only benefit of not installing the desktop files is saving
> about 15 kB of disk for files that aren't needed:
> 
> -rw-r--r--  1 bacon  staff    12K Jan  3 08:00
> /Users/bacon/Pkgsrc/pkg/share/applications/dte.desktop
> -rw-r--r--  1 bacon  staff   2.7K Jan  3 08:00
> /Users/bacon/Pkgsrc/pkg/share/metainfo/dte.appdata.xml
> 
> Those files aren't doing any harm on Darwin.  Not worth complicating the
> package for, plus some Darwin user might want to look at them during a
> conversation about dte.  For this case, I would just patch out the
> conditional, so we have an uncluttered Makefile and a consistent PLIST.
> 
> # Make PLIST consistent across platforms
> 
> --- GNUmakefile.orig    2024-01-03 13:58:59.331475591 +0000
> +++ GNUmakefile
> @@ -41,10 +41,8 @@ check: check-tests check-opts
>   install: install-bin install-man install-bash-completion
>   uninstall: uninstall-bin uninstall-man uninstall-bash-completion
> 
> -ifneq "$(KERNEL)" "Darwin"
> - install: install-desktop-file install-appstream
> - uninstall: uninstall-desktop-file uninstall-appstream
> -endif
> +install: install-desktop-file install-appstream
> +uninstall: uninstall-desktop-file uninstall-appstream
> 
>   install-bin: all
>          $(Q) $(INSTALL) -d -m755 '$(DESTDIR)$(bindir)'

I like this approach -- having a cleaner Makefile is nice. Thanks for
reviewing and explaining this.


Home | Main Index | Thread Index | Old Index