ports/177857: [patch] Update x11/slim to 1.3.5

Kevin Zheng kevinz5000 at gmail.com
Sun Apr 14 16:30:00 UTC 2013


>Number:         177857
>Category:       ports
>Synopsis:       [patch] Update x11/slim to 1.3.5
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 14 16:30:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Kevin Zheng
>Release:        9.1-RELEASE
>Organization:
>Environment:
FreeBSD sigma.local 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243826: Tue Dec  4 06:55:39 UTC 2012     root at obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Update x11/slim to 1.3.5. Along with this change:
 - Update master sites and mirrors.
 - Correctly define LICENSE_FILE
 - Sort LIB_DEPENDS
 - Sort USE_stuff
 - Clean up old patches
 - Upstream did whitespace changes, need to update patches to reflect this
 - Cosmetic changes to sample configuration file

Tested on redports with both options, and works on my machine. Additional runtime testing could be helpful.
>How-To-Repeat:

>Fix:
Apply the attached patch with `svn patch` against x11/slim.

Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 315799)
+++ Makefile	(working copy)
@@ -2,30 +2,31 @@
 # $FreeBSD$
 
 PORTNAME=	slim
-PORTVERSION=	1.3.4
-PORTREVISION=	5
+PORTVERSION=	1.3.5
 CATEGORIES=	x11
-MASTER_SITES=	http://slim.berlios.de/releases/
+MASTER_SITES=	ftp://ftp.berlios.de/pub/slim/ \
+		SF/slim.berlios
 
 MAINTAINER=	henry.hu.sh at gmail.com
 COMMENT=	Graphical login manager for X11, derived from Login.app
 
 LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/COPYING
 
-LIB_DEPENDS=	dbus-1:${PORTSDIR}/devel/dbus \
-		pthread-stubs:${PORTSDIR}/devel/libpthread-stubs \
+LIB_DEPENDS=	ck-connector:${PORTSDIR}/sysutils/consolekit \
+		dbus-1:${PORTSDIR}/devel/dbus \
+		expat:${PORTSDIR}/textproc/expat2 \
+		fontconfig:${PORTSDIR}/x11-fonts/fontconfig \
+		freetype:${PORTSDIR}/print/freetype2 \
 		jpeg:${PORTSDIR}/graphics/jpeg \
 		png15:${PORTSDIR}/graphics/png \
-		freetype:${PORTSDIR}/print/freetype2 \
-		ck-connector:${PORTSDIR}/sysutils/consolekit \
-		expat:${PORTSDIR}/textproc/expat2 \
-		xcb:${PORTSDIR}/x11/libxcb \
-		fontconfig:${PORTSDIR}/x11-fonts/fontconfig
+		pthread-stubs:${PORTSDIR}/devel/libpthread-stubs \
+		xcb:${PORTSDIR}/x11/libxcb
 
 USES=		cmake
-USE_XORG=	ice sm x11 xau xdmcp xext xft xmu xorg-server xrender xt
 USE_PKGCONFIG=	build
 USE_RC_SUBR=	slim
+USE_XORG=	ice sm x11 xau xdmcp xext xft xmu xorg-server xrender xt
 SUB_FILES=	pkg-message
 
 CMAKE_ARGS=	-DUSE_CONSOLEKIT=yes
@@ -45,26 +46,22 @@
 .endif
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/${PORTNAME}.conf
-	@${REINPLACE_CMD} -e 's|"/etc"|"${PREFIX}/etc"|' \
-	    -e 's|slim.conf|slim.conf.sample|' \
-	    -e 's|set(MANDIR "$${CMAKE_INSTALL_PREFIX}/share/man")|set(MANDIR "${PREFIX}/man")|' \
-	    ${WRKSRC}/CMakeLists.txt
-	@${MV} ${WRKSRC}/slim.conf ${WRKSRC}/slim.conf.sample
-	@${REINPLACE_CMD} -e 's|std::snprintf|snprintf|' ${WRKSRC}/Ck.cpp
+	@${CP} ${WRKSRC}/slim.conf ${WRKSRC}/slim.conf.sample
+	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+		${WRKSRC}/slim.conf.sample
+	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' \
+		-e 's|/etc|${PREFIX}/etc|' \
+		-e 's|share/man|man|' \
+		-e 's|slim.conf|slim.conf.sample|' \
+		-e '/systemd/d' \
+		${WRKSRC}/CMakeLists.txt
 
-# Fix a previous bad install - Ok to remove at version 1.3.5 or later
-pre-install:
-	@${RM} -f ${LOCALBASE}/share/man/man1/slim.1
-	@${RMDIR} ${LOCALBASE}/share/man/man1 2>/dev/null || true
-	@${RMDIR} ${LOCALBASE}/share/man 2>/dev/null || true
-
 post-install:
-	@${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${MAN1PREFIX}/man/man1
 	@if [ ! -f ${PREFIX}/etc/slim.conf ]; then \
 		${CP} ${PREFIX}/etc/slim.conf.sample ${PREFIX}/etc/slim.conf ; \
 	fi
 .	if ${PORT_OPTIONS:MPAM}
+	@${MKDIR} ${PREFIX}/etc/pam.d
 	@${INSTALL_DATA} ${FILESDIR}/pam.conf ${PREFIX}/etc/pam.d/slim.default
 	@if [ ! -f ${PREFIX}/etc/pam.d/slim ]; then \
 		${CP} ${PREFIX}/etc/pam.d/slim.default ${PREFIX}/etc/pam.d/slim ; \
Index: distinfo
===================================================================
--- distinfo	(revision 315799)
+++ distinfo	(working copy)
@@ -1,2 +1,2 @@
-SHA256 (slim-1.3.4.tar.gz) = 155c26460c98b9f0925624028b4254afc0de4fda33300f3ac45606b2c5cbd501
-SIZE (slim-1.3.4.tar.gz) = 227197
+SHA256 (slim-1.3.5.tar.gz) = 818d209f51e2fa8d5b94ef75ce90a7415be48b45e796d66f8083a9532b655629
+SIZE (slim-1.3.5.tar.gz) = 226413
Index: files/patch-Ck.cpp
===================================================================
--- files/patch-Ck.cpp	(revision 315799)
+++ files/patch-Ck.cpp	(working copy)
@@ -1,11 +1,11 @@
---- Ck.cpp.orig	2012-02-22 03:59:52.000000000 +0400
-+++ Ck.cpp	2012-07-19 00:03:34.000000000 +0400
+--- ./Ck.cpp.orig	2012-12-31 07:03:42.000000000 -0600
++++ ./Ck.cpp	2013-03-23 14:10:35.000000000 -0500
 @@ -91,7 +91,7 @@
  
-     vt = *((long *)return_value);
+ 	vt = *((long *)return_value);
  
--    std::snprintf(device, 32, "/dev/tty%ld", vt);
-+    std::snprintf(device, 32, "/dev/ttyv%ld", vt - 1);
+-	std::snprintf(device, 32, "/dev/tty%ld", vt);
++	snprintf(device, 32, "/dev/ttyv%ld", vt - 1);
  
-     if(return_value)
-       XFree(return_value);
+ 	if(return_value)
+ 	  XFree(return_value);
Index: files/patch-PAM.cpp
===================================================================
--- files/patch-PAM.cpp	(revision 315799)
+++ files/patch-PAM.cpp	(working copy)
@@ -1,10 +1,10 @@
---- PAM.cpp.orig	2012-06-26 12:20:14.000000000 +0400
-+++ PAM.cpp	2012-12-16 16:05:09.000000000 +0400
-@@ -128,6 +128,7 @@
-             case PAM_MAXTRIES:
-             case PAM_CRED_INSUFFICIENT:
-             case PAM_AUTH_ERR:
-+            case PAM_CONV_ERR:
-                 throw Auth_Exception(pam_handle, "pam_authentication()", last_result);
+--- ./PAM.cpp.orig	2012-12-31 07:03:42.000000000 -0600
++++ ./PAM.cpp	2013-03-23 14:10:35.000000000 -0500
+@@ -127,6 +127,7 @@
+ 			case PAM_MAXTRIES:
+ 			case PAM_CRED_INSUFFICIENT:
+ 			case PAM_AUTH_ERR:
++			case PAM_CONV_ERR:
+ 				throw Auth_Exception(pam_handle, "pam_authentication()", last_result);
  
-             case PAM_SUCCESS:
+ 			case PAM_SUCCESS:
Index: files/patch-app.cpp
===================================================================
--- files/patch-app.cpp	(revision 315799)
+++ files/patch-app.cpp	(working copy)
@@ -1,11 +1,11 @@
---- app.cpp.orig	2008-10-04 13:45:58.000000000 +0200
-+++ app.cpp	2008-10-04 13:46:07.000000000 +0200
-@@ -887,7 +887,7 @@
-     }
+--- ./app.cpp.orig	2012-12-31 07:03:42.000000000 -0600
++++ ./app.cpp	2013-03-23 14:10:35.000000000 -0500
+@@ -931,7 +931,7 @@
+ 	}
  
-     if (!hasVtSet && daemonmode) {
--        server[argc++] = (char*)"vt07";
-+        server[argc++] = (char*)"vt09";
-     }
-     server[argc] = NULL;
+ 	if (!hasVtSet && daemonmode) {
+-		server[argc++] = (char*)"vt07";
++		server[argc++] = (char*)"vt09";
+ 	}
+ 	server[argc] = NULL;
  
Index: files/patch-libpng-setjmp-image.cpp
===================================================================
--- files/patch-libpng-setjmp-image.cpp	(revision 315799)
+++ files/patch-libpng-setjmp-image.cpp	(working copy)
@@ -1,33 +0,0 @@
---- image.cpp.orig	2012-07-05 11:54:10.000000000 +0400
-+++ image.cpp	2012-07-05 12:20:08.000000000 +0400
-@@ -746,6 +746,10 @@
-     return(ret);
- }
- 
-+#if (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 5) || PNG_LIBPNG_VER_MAJOR > 1
-+#define PNG_NEW_SETJMP_API
-+#endif
-+
- int
- Image::readPng(const char *filename, int *width, int *height,
-                unsigned char **rgb, unsigned char **alpha)
-@@ -781,7 +785,13 @@
-                                 (png_infopp) NULL);
-     }
- 
--    if (setjmp(png_ptr->jmpbuf)) {
-+    if (setjmp(
-+#ifdef PNG_NEW_SETJMP_API
-+(png_jmpbuf(png_ptr))
-+#else
-+png_ptr->jmpbuf
-+#endif
-+    )) {
-         goto png_destroy;
-     }
- 
-@@ -894,3 +904,4 @@
-     fclose(infile);
-     return(ret);
- }
-+#undef PNG_NEW_SETJMP_API
Index: files/patch-log.h
===================================================================
--- files/patch-log.h	(revision 315799)
+++ files/patch-log.h	(working copy)
@@ -1,15 +0,0 @@
---- log.h.orig	2012-06-26 10:20:14.000000000 +0200
-+++ log.h	2012-11-25 20:00:39.294546666 +0100
-@@ -1,6 +1,12 @@
- #ifndef _LOG_H_
- #define _LOG_H_
- 
-+#ifdef USE_CONSOLEKIT
-+#include "Ck.h"
-+#endif
-+#ifdef USE_CONSOLEKIT
-+#include "PAM.h"
-+#endif
- #include "const.h"
- #include <fstream>
- 
Index: files/patch-slim.conf
===================================================================
--- files/patch-slim.conf	(revision 315799)
+++ files/patch-slim.conf	(working copy)
@@ -1,5 +1,5 @@
---- slim.conf.orig	2008-10-04 13:49:03.000000000 +0200
-+++ slim.conf	2008-10-04 13:52:44.000000000 +0200
+--- ./slim.conf.orig	2012-12-31 07:03:42.000000000 -0600
++++ ./slim.conf	2013-03-23 14:10:35.000000000 -0500
 @@ -1,17 +1,19 @@
  # Path, X server and arguments (if needed)
  # Note: -xauth $authfile is automatically appended
Index: files/patch-switchuser.cpp
===================================================================
--- files/patch-switchuser.cpp	(revision 315799)
+++ files/patch-switchuser.cpp	(working copy)
@@ -1,13 +1,11 @@
---- switchuser.cpp	2009-10-14 16:28:20.000000000 +0800
-+++ switchuser.cpp	2009-10-14 16:34:23.000000000 +0800
-@@ -38,6 +38,8 @@
+--- ./switchuser.cpp.orig	2012-12-31 07:03:42.000000000 -0600
++++ ./switchuser.cpp	2013-03-23 14:10:35.000000000 -0500
+@@ -36,6 +36,8 @@
  
  void SwitchUser::SetUserId() {
-     if( (Pw == 0) ||
-+            (setsid() == -1) ||
-+            (setlogin(Pw->pw_name) != 0) ||
-             (initgroups(Pw->pw_name, Pw->pw_gid) != 0) ||
-             (setgid(Pw->pw_gid) != 0) ||
-             (setuid(Pw->pw_uid) != 0) ) {
-
-
+ 	if( (Pw == 0) ||
++			(setsid() == -1) ||
++			(setlogin(Pw->pw_name) != 0) ||
+ 			(initgroups(Pw->pw_name, Pw->pw_gid) != 0) ||
+ 			(setgid(Pw->pw_gid) != 0) ||
+ 			(setuid(Pw->pw_uid) != 0) ) {
Index: files/patch-themes__default__slim.theme
===================================================================
--- files/patch-themes__default__slim.theme	(revision 315799)
+++ files/patch-themes__default__slim.theme	(working copy)
@@ -1,5 +1,5 @@
---- themes/default/slim.theme.orig	2012-02-21 15:59:52.000000000 -0800
-+++ themes/default/slim.theme	2012-06-02 23:23:10.000000000 -0700
+--- ./themes/default/slim.theme.orig	2012-12-31 07:03:42.000000000 -0600
++++ ./themes/default/slim.theme	2013-03-23 14:10:35.000000000 -0500
 @@ -1,9 +1,10 @@
  # text04 theme for SLiM
  # by Johannes Winkelmann
Index: files/slim.in
===================================================================
--- files/slim.in	(revision 315799)
+++ files/slim.in	(working copy)
@@ -1,14 +1,13 @@
 #!/bin/sh
-
-# $FreeBSD$
 #
+# $FreeBSD: ports/x11/slim/files/slim.in,v 1.3 2012/11/28 00:15:49 svnexp Exp $
+#
 # PROVIDE: slim
 # REQUIRE: LOGIN dbus hald
 # KEYWORD: shutdown
 #
-# Add the following lines to /etc/rc.conf to enable slim:
-# slim_enable (bool):      Set to "NO" by default.
-#                          Set it to "YES" to enable slim
+# Add the following line to /etc/rc.conf to enable slim:
+# slim_enable="YES"
 #
 # Alternatively, edit /etc/ttys and change the line below
 #   ttyv8   "/usr/X11R6/bin/xdm -nodaemon"  xterm   off secure


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list