diff x11/xdm/xdm.sh @ 548:b1d040632d36

vanilla: enable PAM when possible
author David Demelier <markand@malikania.fr>
date Tue, 16 Apr 2019 20:01:00 +0200
parents cacbd9d3d3a8
children bad483aace64
line wrap: on
line diff
--- a/x11/xdm/xdm.sh	Fri Apr 12 11:01:03 2019 +0200
+++ b/x11/xdm/xdm.sh	Tue Apr 16 20:01:00 2019 +0200
@@ -31,6 +31,7 @@
             x11/libxt
             x11/util-macros:build
             x11/xorgproto:build"
+PKGOPTIONS="PAM SELINUX"
 
 : ${CHOST:=$(uname -m)-linux-musl}
 : ${CBUILD:=$(uname -m)-linux-musl}
@@ -38,6 +39,20 @@
 : ${CFLAGS:=-O2}
 : ${LDFLAGS:=}
 : ${LIBS:=}
+: ${PAM:=yes}
+
+if [ "$PAM" = "yes" ]; then
+	PKGDEPENDS="security/linux-pam $PKGDEPENDS"
+	with_pam="--with-pam"
+else
+	with_pam="--without-pam"
+fi
+
+if [ "$SELINUX" = "yes" ]; then
+	with_selinux="--with-selinux"
+else
+	with_selinux="--without-selinux"
+fi
 
 build()
 {
@@ -53,9 +68,9 @@
 		--build=$CBUILD \
 		--host=$CHOST \
 		--prefix=/ \
-		--without-selinux \
-		--without-pam \
-		--without-systemd-daemon
+		--without-systemd-daemon \
+		$with_pam \
+		$with_selinux
 	make
 	make install DESTDIR=$DESTDIR
 	rm -f $DESTDIR/lib/X11/xdm/libXdmGreet.la