From 151df00579f02aa1232816a73c76c103229cd154 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Wed, 2 Oct 2019 05:04:14 +0000 Subject: [PATCH] x11/slim: Permit setting a default xsession from .xinitrc. PR: 236027 Submitted by: Andrew Hotlab Approved by: Henry Hu (maintainer) --- x11/slim/Makefile | 11 ++++++++--- x11/slim/distinfo | 1 + x11/slim/files/extra-patch-xdefault | 23 +++++++++++++++++++++++ x11/slim/files/pkg-message.in | 13 ++++++++----- 4 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 x11/slim/files/extra-patch-xdefault diff --git a/x11/slim/Makefile b/x11/slim/Makefile index b66bb7daa7d8..7fbfcfdb14aa 100644 --- a/x11/slim/Makefile +++ b/x11/slim/Makefile @@ -3,7 +3,7 @@ PORTNAME= slim PORTVERSION= 1.3.6 -PORTREVISION= 17 +PORTREVISION= 18 CATEGORIES= x11 MASTER_SITES= ftp://ftp.berlios.de/pub/slim/ \ SF/slim.berlios @@ -23,16 +23,18 @@ USE_XORG= ice sm x11 xau xcb xdmcp xext xft xmu xorg-server xrandr \ xrender xt USE_RC_SUBR= slim USE_LDCONFIG= yes + SUB_FILES= pkg-message CMAKE_ARGS= -DUSE_CONSOLEKIT=yes \ -DBUILD_SLIMLOCK=no \ -DBUILD_SHARED_LIBS=yes -OPTIONS_DEFINE= PAM UTF8 CONSOLEKIT -OPTIONS_DEFAULT= PAM UTF8 CONSOLEKIT +OPTIONS_DEFINE= XDEFAULT PAM UTF8 CONSOLEKIT +OPTIONS_DEFAULT= XDEFAULT PAM UTF8 CONSOLEKIT OPTIONS_SUB= yes +XDEFAULT_DESC=Allow to set a default xsession in .xinitrc UTF8_DESC= Support UTF-8 characters CONSOLEKIT_DESC=Enable support for consolekit @@ -41,6 +43,9 @@ PLIST_SUB+= VERSION="${PORTVERSION}" PAM_CMAKE_ON= -DUSE_PAM=yes PAM_CMAKE_OFF= -DUSE_PAM=no +# patch taken from https://github.com/iwamatsu/slim/pull/1 +XDEFAULT_EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-xdefault + # patch taken from slim-unicode in Arch User Repository UTF8_EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-utf8 diff --git a/x11/slim/distinfo b/x11/slim/distinfo index f0ce7cf132f1..3b9233ca8128 100644 --- a/x11/slim/distinfo +++ b/x11/slim/distinfo @@ -1,2 +1,3 @@ +TIMESTAMP = 1555924312 SHA256 (slim-1.3.6.tar.gz) = 21defeed175418c46d71af71fd493cd0cbffd693f9d43c2151529125859810df SIZE (slim-1.3.6.tar.gz) = 232547 diff --git a/x11/slim/files/extra-patch-xdefault b/x11/slim/files/extra-patch-xdefault new file mode 100644 index 000000000000..31ff1ce8c100 --- /dev/null +++ b/x11/slim/files/extra-patch-xdefault @@ -0,0 +1,23 @@ +--- cfg.orig 2019-02-25 15:10:23.454289000 +0100 ++++ cfg.cpp 2019-02-25 15:10:52.700402000 +0100 +@@ -293,6 +293,9 @@ + + sessions.clear(); + ++ pair session("","default"); ++ sessions.push_back(session); ++ + if( !strSessionDir.empty() ) { + DIR *pDir = opendir(strSessionDir.c_str()); + +@@ -335,11 +338,6 @@ + } + closedir(pDir); + } +- } +- +- if (sessions.empty()){ +- pair session("",""); +- sessions.push_back(session); + } + } diff --git a/x11/slim/files/pkg-message.in b/x11/slim/files/pkg-message.in index 86d04c9f3562..c7458f7d8a4e 100644 --- a/x11/slim/files/pkg-message.in +++ b/x11/slim/files/pkg-message.in @@ -4,18 +4,21 @@ Thanks to Nikos Ntarmos, it is now possible to start slim from /etc/ttys. Please see %%PREFIX%%/etc/rc.d/slim for instructions on how to do that. -Alternatively, just put +Alternatively, just put the following entry in /etc/rc.conf: slim_enable=yes -into /etc/rc.conf - *** Option "sessions" is no longer supported. *** Now you need to put session files in the directory specified by option "sessiondir". They should be xdg-style .desktop files. -The "Name" entry in the session file would be used as session name. -The "Exec" entry would replace %session in login_cmd. + +WARNING: the default behaviour in parsing .xinitrc file has changed! + You can now set a default xsession as described here: + https://github.com/iwamatsu/slim/pull/1 + You can turn back to random xsession selection by compiling + this port without the option XDEFAULT. + EOM } ]