git: 9b0bf17a5c4e - main - x11/lightdm: Fix packaging with non default options

From: Guido Falsi <madpilot_at_FreeBSD.org>
Date: Tue, 13 Feb 2024 20:26:55 UTC
The branch main has been updated by madpilot:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9b0bf17a5c4eebafdfe5b4e5463002e169857295

commit 9b0bf17a5c4eebafdfe5b4e5463002e169857295
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2024-02-13 20:25:14 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2024-02-13 20:25:14 +0000

    x11/lightdm: Fix packaging with non default options
    
    When VAPI is on and DOCS is off the port fails to package. Correct
    in plist. [1]
    
    While here also implement an NLS option.
    
    PR:             277022 [1]
    MFH:            2024Q1
---
 x11/lightdm/Makefile  |   9 ++-
 x11/lightdm/pkg-plist | 212 +++++++++++++++++++++++++-------------------------
 2 files changed, 112 insertions(+), 109 deletions(-)

diff --git a/x11/lightdm/Makefile b/x11/lightdm/Makefile
index cc0b195c5978..cdbe7bb7d5f5 100644
--- a/x11/lightdm/Makefile
+++ b/x11/lightdm/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	lightdm
 PORTVERSION=	1.32.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	x11
 MASTER_SITES=	https://github.com/canonical/${PORTNAME}/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/
 
@@ -21,7 +21,7 @@ LIB_DEPENDS=	libgcrypt.so:security/libgcrypt \
 RUN_DEPENDS=	accountsservice>=0:sysutils/accountsservice \
 		ck-launch-session:sysutils/consolekit2
 
-USES=		autoreconf compiler:c++11-lang cpe gettext gmake gnome \
+USES=		autoreconf compiler:c++11-lang cpe gettext-tools gmake gnome \
 		libtool localbase pathfix pkgconfig tar:xz xorg
 CPE_VENDOR=	${PORTNAME}_project
 USE_CXXSTD=	c++11
@@ -42,7 +42,7 @@ SUB_FILES=		Xsession
 USERS=			lightdm
 GROUPS=			lightdm video
 
-OPTIONS_DEFINE=		DOCS QT5 VAPI
+OPTIONS_DEFINE=		DOCS NLS QT5 VAPI
 OPTIONS_DEFAULT=	VAPI
 OPTIONS_SUB=		yes
 
@@ -50,6 +50,9 @@ DOCS_BUILD_DEPENDS=	${LOCALBASE}/share/aclocal/yelp.m4:textproc/yelp-tools \
 			gtkdoc-check:textproc/gtk-doc
 DOCS_CONFIGURE_ON=	--enable-gtk-doc
 
+NLS_USES=		gettext-runtime
+NLS_CONFIGURE_ENABLE=	nls
+
 QT5_USES=		qt:5
 QT5_USE=		QT=buildtools,core,dbus,gui
 QT5_CONFIGURE_ENABLE=	liblightdm-qt5
diff --git a/x11/lightdm/pkg-plist b/x11/lightdm/pkg-plist
index ed4fcb87411f..a5ed93e64ba7 100644
--- a/x11/lightdm/pkg-plist
+++ b/x11/lightdm/pkg-plist
@@ -66,112 +66,112 @@ share/dbus-1/system.d/org.freedesktop.DisplayManager.conf
 %%PORTDOCS%%share/gtk-doc/html/lightdm-gobject-1/style.css
 %%PORTDOCS%%share/gtk-doc/html/lightdm-gobject-1/up-insensitive.png
 %%PORTDOCS%%share/gtk-doc/html/lightdm-gobject-1/up.png
-%%VAPI%%share/help/C/lightdm/autologin.page
-%%VAPI%%share/help/C/lightdm/config.page
-%%VAPI%%share/help/C/lightdm/default-greeter.page
-%%VAPI%%share/help/C/lightdm/default-session.page
-%%VAPI%%share/help/C/lightdm/diagnostics.page
-%%VAPI%%share/help/C/lightdm/guest.page
-%%VAPI%%share/help/C/lightdm/index.page
-%%VAPI%%share/help/C/lightdm/legal.xml
-%%VAPI%%share/help/C/lightdm/local-sessions.page
-%%VAPI%%share/help/C/lightdm/remote-sessions.page
-%%VAPI%%share/help/C/lightdm/seat.page
-%%VAPI%%share/help/C/lightdm/standard-authentication.page
-%%VAPI%%share/help/C/lightdm/user-list.page
-%%VAPI%%share/help/C/lightdm/user-switching.page
-%%VAPI%%share/help/C/lightdm/vnc.page
-%%VAPI%%share/help/C/lightdm/write-greeter.page
-%%VAPI%%share/help/C/lightdm/xdmcp.page
-%%VAPI%%share/locale/af/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/an/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/ar/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/ast/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/az/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/be/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/bg/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/bn/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/bo/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/br/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/bs/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/ca/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/ca@valencia/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/ckb/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/cs/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/da/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/de/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/el/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/en_AU/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/en_CA/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/en_GB/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/eo/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/es/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/et/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/eu/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/fa/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/fi/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/fo/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/fr/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/fy/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/gd/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/gl/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/gu/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/he/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/hi/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/hr/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/hu/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/ia/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/id/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/is/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/it/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/ja/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/kk/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/km/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/kn/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/ko/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/ku/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/lb/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/lt/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/lv/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/mhr/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/mi/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/ml/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/mr/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/ms/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/my/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/nb/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/nl/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/nn/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/oc/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/pa/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/pl/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/pt/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/pt_BR/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/ro/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/ru/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/sc/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/sd/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/shn/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/si/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/sk/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/sl/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/sq/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/sr/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/sv/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/ta/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/te/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/tg/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/th/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/tl/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/tr/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/ug/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/uk/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/uz/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/vi/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/wae/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/zh_CN/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/zh_HK/LC_MESSAGES/lightdm.mo
-%%VAPI%%share/locale/zh_TW/LC_MESSAGES/lightdm.mo
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/autologin.page
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/config.page
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/default-greeter.page
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/default-session.page
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/diagnostics.page
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/guest.page
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/index.page
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/legal.xml
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/local-sessions.page
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/remote-sessions.page
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/seat.page
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/standard-authentication.page
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/user-list.page
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/user-switching.page
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/vnc.page
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/write-greeter.page
+%%VAPI%%%%PORTDOCS%%share/help/C/lightdm/xdmcp.page
+%%NLS%%share/locale/af/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/an/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/ar/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/ast/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/az/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/be/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/bg/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/bn/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/bo/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/br/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/bs/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/ca/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/ca@valencia/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/ckb/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/cs/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/da/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/de/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/el/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/en_AU/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/en_CA/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/en_GB/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/eo/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/es/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/et/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/eu/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/fa/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/fi/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/fo/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/fy/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/gd/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/gl/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/gu/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/he/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/hi/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/hr/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/hu/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/ia/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/id/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/is/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/it/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/ja/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/kk/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/km/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/kn/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/ko/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/ku/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/lb/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/lt/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/lv/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/mhr/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/mi/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/ml/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/mr/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/ms/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/my/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/nb/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/nl/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/nn/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/oc/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/pa/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/pl/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/pt/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/pt_BR/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/ro/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/ru/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/sc/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/sd/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/shn/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/si/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/sk/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/sl/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/sq/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/sr/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/sv/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/ta/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/te/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/tg/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/th/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/tl/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/tr/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/ug/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/uk/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/uz/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/vi/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/wae/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/zh_CN/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/zh_HK/LC_MESSAGES/lightdm.mo
+%%NLS%%share/locale/zh_TW/LC_MESSAGES/lightdm.mo
 share/polkit-1/actions/org.freedesktop.DisplayManager.AccountsService.policy
 %%VAPI%%share/vala/vapi/liblightdm-gobject-1.deps
 %%VAPI%%share/vala/vapi/liblightdm-gobject-1.vapi