1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-25 07:32:36 +01:00

Use wprefs_bindir output variable to set WPrefs path in menus.

The path to WPrefs has been hardcoded in many of the menu files to
/usr/local/GNUstep/Applications/WPrefs.app/WPrefs, which would only actually
work if the user ran something like:
     ./configure --with-gnustepdir=/usr/local/GNUstep
during build.

Instead, we add a .in extension to all menu files with this issue and use sed
to use the actual WPrefs path (given by the wprefs_bindir output variable) and
generate a new menu file.

A very similar idea is already used to generate the WMState file, which sets
WPrefs as the command for the Window Maker logo tile in the dock.

This patch fixes Debian bug #851737:
https://bugs.debian.org/851737
This commit is contained in:
Doug Torrance
2017-01-19 18:24:30 -05:00
committed by Carlos R. Mafra
parent 23417d9934
commit d48a37060c
23 changed files with 87 additions and 49 deletions

View File

@@ -1,64 +1,80 @@
SUBDIRS = Backgrounds Defaults IconSets Icons Pixmaps Styles Themes
SUBDIRS = Backgrounds . Defaults IconSets Icons Pixmaps Styles Themes
prefsdatadir = $(pkgdatadir)
prefsdata_DATA =\
appearance.menu\
autostart.sh\
background.menu\
exitscript.sh\
wpexecbindir = @wprefs_bindir@
# menus which need generated to have correct path to WPrefs
GENERATED_MENUS =\
menu\
menu.bg\
menu.fi\
menu.fy\
menu.hu\
menu.ko\
menu.nl\
menu.ro\
menu.sk\
menu.zh_TW\
plmenu\
plmenu.bg\
plmenu.es\
plmenu.fi\
plmenu.fy\
plmenu.ja\
plmenu.ko\
plmenu.nl\
plmenu.ro\
plmenu.sk\
plmenu.zh_TW
# menus which do not mention WPrefs
NONGENERATED_MENUS =\
menu.ca\
menu.cz\
menu.da\
menu.de\
menu.el\
menu.es\
menu.fi\
menu.fr\
menu.fy\
menu.gl\
menu.he\
menu.hr\
menu.hu\
menu.it\
menu.ja\
menu.ko\
menu.nl\
menu.no\
menu.pl\
menu.pt\
menu.ro\
menu.ru\
menu.se\
menu.sk\
menu.sl\
menu.tr\
menu.zh_CN\
menu.zh_TW\
plmenu\
plmenu.bg\
plmenu.da\
plmenu.de\
plmenu.es\
plmenu.fi\
plmenu.fr\
plmenu.fy\
plmenu.hr\
plmenu.it\
plmenu.ja\
plmenu.ko\
plmenu.nl\
plmenu.pl\
plmenu.ro\
plmenu.sk\
plmenu.zh_CN\
plmenu.zh_TW\
plmenu.zh_CN
dist_prefsdata_DATA =\
appearance.menu\
autostart.sh\
background.menu\
exitscript.sh\
README\
README.themes\
wmmacros
wmmacros\
$(NONGENERATED_MENUS)
EXTRA_DIST = $(prefsdata_DATA) mkMakefile
nodist_prefsdata_DATA = $(GENERATED_MENUS)
EXTRA_DIST = mkMakefile\
$(addsuffix .in, $(GENERATED_MENUS))
CLEANFILES = $(GENERATED_MENUS)
$(GENERATED_MENUS):
$(AM_V_GEN)sed -e "s:#wprefs#:$(wpexecbindir)/WPrefs:" \
$(srcdir)/$@.in > $@