summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-09-26 08:54:27 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-09-26 08:54:27 +0000
commit4bb718f67437fabd609341927835a5c71ad17f22 (patch)
tree7b68638af7c06285f655cc439db005d7a83ccf31 /x11
parent6a22c121be5d0f0ed3f9c00e6e129b90c0b21d34 (diff)
downloadfreebsd-ports-4bb718f67437fabd609341927835a5c71ad17f22.zip
Convert to @sample
Use options helpers
Diffstat (limited to 'x11')
-rw-r--r--x11/slim/Makefile33
-rw-r--r--x11/slim/pkg-plist4
2 files changed, 11 insertions, 26 deletions
diff --git a/x11/slim/Makefile b/x11/slim/Makefile
index 5604f34a66e5..9f86de1a9ebe 100644
--- a/x11/slim/Makefile
+++ b/x11/slim/Makefile
@@ -3,7 +3,7 @@
PORTNAME= slim
PORTVERSION= 1.3.6
-PORTREVISION= 9
+PORTREVISION= 10
CATEGORIES= x11
MASTER_SITES= ftp://ftp.berlios.de/pub/slim/ \
SF/slim.berlios
@@ -32,33 +32,22 @@ CMAKE_ARGS= -DUSE_CONSOLEKIT=yes \
OPTIONS_DEFINE= PAM UTF8 CONSOLEKIT
OPTIONS_DEFAULT= PAM CONSOLEKIT
+OPTIONS_SUB= yes
UTF8_DESC= Support UTF-8 characters
CONSOLEKIT_DESC=Enable support for consolekit
PLIST_SUB+= VERSION="${PORTVERSION}"
-.include <bsd.port.options.mk>
+PAM_CMAKE_ON= -DUSE_PAM=yes
+PAM_CMAKE_OFF= -DUSE_PAM=no
-.if ${PORT_OPTIONS:MPAM}
-CMAKE_ARGS+= -DUSE_PAM=yes
-PLIST_SUB+= PAM=""
-.else
-CMAKE_ARGS+= -DUSE_PAM=no
-PLIST_SUB+= PAM="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MUTF8}
# patch taken from slim-unicode in Arch User Repository
-EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-utf8
-.endif
+UTF8_EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-utf8
-.if ${PORT_OPTIONS:MCONSOLEKIT}
-CMAKE_ARGS+= -DUSE_CONSOLEKIT=yes
-LIB_DEPENDS+= libck-connector.so:${PORTSDIR}/sysutils/consolekit
-.else
-CMAKE_ARGS+= -DUSE_CONSOLEKIT=no
-.endif
+CONSOLEKIT_CMAKE_ON= -DUSE_CONSOLEKIT=yes
+CONSOLEKIT_LIB_DEPENDS= libck-connector.so:${PORTSDIR}/sysutils/consolekit
+CONSOLEKIT_CMAKE_OFF= -DUSE_CONSOLEKIT=no
post-patch:
@${CP} ${WRKSRC}/slim.conf ${WRKSRC}/slim.conf.sample
@@ -67,9 +56,7 @@ post-patch:
@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' \
${WRKSRC}/slim.1
-post-install:
-. if ${PORT_OPTIONS:MPAM}
- ${INSTALL_DATA} ${FILESDIR}/pam.conf ${STAGEDIR}${PREFIX}/etc/pam.d/slim.default
-. endif
+post-install-PAM-on:
+ ${INSTALL_DATA} ${FILESDIR}/pam.conf ${STAGEDIR}${PREFIX}/etc/pam.d/slim.sample
.include <bsd.port.mk>
diff --git a/x11/slim/pkg-plist b/x11/slim/pkg-plist
index b0fb4b4e47e4..c5191b1dd89a 100644
--- a/x11/slim/pkg-plist
+++ b/x11/slim/pkg-plist
@@ -6,6 +6,4 @@ lib/libslim.so.%%VERSION%%
%%DATADIR%%/themes/default/slim.theme
man/man1/slim.1.gz
@sample etc/slim.conf.sample
-%%PAM%%@unexec if cmp -s %D/etc/pam.d/slim.default %D/etc/pam.d/slim; then rm -f %D/etc/pam.d/slim; fi
-%%PAM%%etc/pam.d/slim.default
-%%PAM%%@exec if [ ! -f %D/etc/pam.d/slim ]; then cp -p %D/%F %B/slim; fi
+%%PAM%%@sample etc/pam.d/slim.sample