aboutsummaryrefslogtreecommitdiff
path: root/x11/slock
diff options
context:
space:
mode:
Diffstat (limited to 'x11/slock')
-rw-r--r--x11/slock/Makefile5
-rw-r--r--x11/slock/distinfo4
-rw-r--r--x11/slock/files/patch-config.mk11
-rw-r--r--x11/slock/files/patch-slock.c (renamed from x11/slock/files/patch-pam)48
-rw-r--r--x11/slock/pkg-plist1
5 files changed, 34 insertions, 35 deletions
diff --git a/x11/slock/Makefile b/x11/slock/Makefile
index a3a18bc6e6de..56a484ecdd02 100644
--- a/x11/slock/Makefile
+++ b/x11/slock/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= slock
-PORTVERSION= 1.2
-PORTREVISION= 1
+PORTVERSION= 1.3
CATEGORIES= x11
MASTER_SITES= http://dl.suckless.org/tools/
@@ -15,7 +14,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
USES= cpe
CPE_VENDOR= suckless
-USE_XORG= x11 xt xproto xext
+USE_XORG= x11 xext xproto xrandr xt
MAKE_ARGS= PREFIX="${PREFIX}" X11LIB="${LOCALBASE}/lib" \
X11INC="${LOCALBASE}/include" CC="${CC}" \
MANPREFIX="${MANPREFIX}/man"
diff --git a/x11/slock/distinfo b/x11/slock/distinfo
index 888233dd6dc6..b82c9d0c5c3f 100644
--- a/x11/slock/distinfo
+++ b/x11/slock/distinfo
@@ -1,2 +1,2 @@
-SHA256 (slock-1.2.tar.gz) = 3402658f890a88da3f34db04fca1783ed549ade45c2ebb8d8f0cd2b549f633b3
-SIZE (slock-1.2.tar.gz) = 4853
+SHA256 (slock-1.3.tar.gz) = bab4a3aea4046aa0fd0361c3649b79b90ca531bc5dfae3c4a6c0fe436152bd18
+SIZE (slock-1.3.tar.gz) = 5943
diff --git a/x11/slock/files/patch-config.mk b/x11/slock/files/patch-config.mk
new file mode 100644
index 000000000000..dca389751d17
--- /dev/null
+++ b/x11/slock/files/patch-config.mk
@@ -0,0 +1,11 @@
+--- config.mk.orig 2013-10-09 16:23:24.000000000 +0200
++++ config.mk 2013-10-09 16:25:18.000000000 +0200
+@@ -18,6 +18,9 @@
+ CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
+ LDFLAGS = -s ${LIBS}
+
++# To enable PAM-based authentication, remove -DHAVE_SHADOW_H from CPPFLAGS
++# and add -DHAVE_PAM instead. Also, add -lpam to LDFLAGS.
++#
+ # On *BSD remove -DHAVE_SHADOW_H from CPPFLAGS and add -DHAVE_BSD_AUTH
+ # On OpenBSD and Darwin remove -lcrypt from LIBS
diff --git a/x11/slock/files/patch-pam b/x11/slock/files/patch-slock.c
index 333b0350be4e..61797d0797b1 100644
--- a/x11/slock/files/patch-pam
+++ b/x11/slock/files/patch-slock.c
@@ -1,17 +1,5 @@
---- config.mk.orig 2013-10-09 16:23:24.000000000 +0200
-+++ config.mk 2013-10-09 16:25:18.000000000 +0200
-@@ -18,6 +18,9 @@
- CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
- LDFLAGS = -s ${LIBS}
-
-+# To enable PAM-based authentication, remove -DHAVE_SHADOW_H from CPPFLAGS
-+# and add -DHAVE_PAM instead. Also, add -lpam to LDFLAGS.
-+#
- # On *BSD remove -DHAVE_SHADOW_H from CPPFLAGS and add -DHAVE_BSD_AUTH
- # On OpenBSD and Darwin remove -lcrypt from LIBS
-
---- slock.c.orig 2013-10-09 16:23:14.000000000 +0200
-+++ slock.c 2013-10-09 16:23:18.000000000 +0200
+--- slock.c.orig 2016-02-17 12:36:44.640577000 -0800
++++ slock.c 2016-02-17 12:48:20.966625000 -0800
@@ -23,6 +23,10 @@
#include <bsd_auth.h>
#endif
@@ -20,19 +8,19 @@
+#include <security/pam_appl.h>
+#endif
+
- typedef struct {
- int screen;
- Window root, win;
-@@ -44,7 +48,7 @@
- exit(EXIT_FAILURE);
+ enum {
+ INIT,
+ INPUT,
+@@ -85,7 +89,7 @@
}
+ #endif
-#ifndef HAVE_BSD_AUTH
+#if !defined(HAVE_BSD_AUTH) && !defined(HAVE_PAM)
+ /* only run as root */
static const char *
- getpw(void) { /* only run as root */
- const char *rval;
-@@ -74,8 +78,41 @@
+ getpw(void)
+@@ -119,8 +123,41 @@
}
#endif
@@ -75,8 +63,8 @@
readpw(Display *dpy)
#else
readpw(Display *dpy, const char *pws)
-@@ -111,8 +148,10 @@
- switch(ksym) {
+@@ -159,8 +196,10 @@
+ switch (ksym) {
case XK_Return:
passwd[len] = 0;
-#ifdef HAVE_BSD_AUTH
@@ -85,9 +73,9 @@
+#elif defined (HAVE_PAM)
+ running = !auth_pam(getlogin(), passwd);
#else
- running = strcmp(crypt(passwd, pws), pws);
+ running = !!strcmp(crypt(passwd, pws), pws);
#endif
-@@ -233,7 +272,7 @@
+@@ -289,7 +328,7 @@
int
main(int argc, char **argv) {
@@ -96,16 +84,16 @@
const char *pws;
#endif
Display *dpy;
-@@ -247,7 +286,7 @@
- if(!getpwuid(getuid()))
- die("slock: no passwd entry for you");
+@@ -308,7 +347,7 @@
+ if (!getpwuid(getuid()))
+ die("slock: no passwd entry for you\n");
-#ifndef HAVE_BSD_AUTH
+#if !defined(HAVE_BSD_AUTH) && !defined(HAVE_PAM)
pws = getpw();
#endif
-@@ -273,7 +312,7 @@
+@@ -341,7 +380,7 @@
}
/* Everything is now blank. Now wait for the correct password. */
diff --git a/x11/slock/pkg-plist b/x11/slock/pkg-plist
index a4f336bf7be7..3228765d0388 100644
--- a/x11/slock/pkg-plist
+++ b/x11/slock/pkg-plist
@@ -1 +1,2 @@
@(,,4755) bin/slock
+man/man1/slock.1.gz