diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /x11-misc/slim |
reinit the tree, so we can have metadata
Diffstat (limited to 'x11-misc/slim')
19 files changed, 1029 insertions, 0 deletions
diff --git a/x11-misc/slim/Manifest b/x11-misc/slim/Manifest new file mode 100644 index 000000000000..042c70c401ff --- /dev/null +++ b/x11-misc/slim/Manifest @@ -0,0 +1,21 @@ +AUX Xsession-r3 4045 SHA256 5eaa3c03278443f27a8477397dd0bcaa5f95e7d0cf99448f028bf0165ce089af SHA512 6c0bfba4c3f00b75d6b5fb0e0e8a492fa262b2d0f3c6382861d7f3a8c657e803151a2060e181439952649fd2acf6fa71b75811565f1156018027ec14a761f7d0 WHIRLPOOL 4808e5a3303bf4e8aff965cf1e77e4ca45413468f54dfa163ced9e848a53d19f705b203054002729f05d2efcc303b8456fd76644de8c1fb28613a43599c815cb +AUX slim-1.3.5-arm.patch 289 SHA256 95c7be21f8a176ce649e2dd804b8c2fa019e5e206a2532233f8b76bdbf201fba SHA512 1d3a3a387433c8bfc9bff6ac3779e70e0e0ca5f65e6120dd83fb51d59dfa47facc6d31c6e955b737e41ebf760416015f7f12dc749e710957cbef274aa5d1d308 WHIRLPOOL 54cb1cff534d30c157460a729a054cb4089b39dbf950b7d78462f6cc8f1dcc1770b6943fe0e24198ad0313cd2c359e0684d35e99155e3945fc19e14638986437 +AUX slim-1.3.5-disable-ck-for-systemd.patch 3303 SHA256 e309716a177bcff758f2e5b807a99380d503ae08a819048cacd01f1010a40791 SHA512 64205963f8f56f012dd16c2aea18e2e4f4e155093d44222a512b242061b334b7faa9c3abdd1acc011213f0fed9007cf232da8c61e6cedc30c710b149fa841f04 WHIRLPOOL cc3e45fe35e5b178213f261f22e3f54e4175e501a6bd7b3a042206d14713d9f038238f531d1dd872abe15a8d118d5ccd0edec83028e49ad8df3ba1d77c55812c +AUX slim-1.3.6-config.diff 2934 SHA256 5f7f1fcd6d0d28a4060b2360fdbd0489dd3884087596786ce3f31615098d1840 SHA512 afee976f30f563ed97187f40cdd618159545d7850e8af15bd5b30306c347cf8e5276c6c16938ce094bb589dcab8d88d5c368f7267dbe3f794a18f734f69ddf10 WHIRLPOOL caf3eac08c415e6370a1e0c4077137ccf4763c761a91d130648d9edbbcbb2ced2723c4a5dc4498fff4b3f410b7b6bb21b6f0c3882043aa25ce0941d37a5905cd +AUX slim-1.3.6-drop-zlib.patch 309 SHA256 d90ead30ef02aa4e0f6fcc9b23c248522409749338972c8d343880e66478ac8b SHA512 2aa62e5b7ad67df47009e4cff0b34b8ff6116e9d3d23194c8199ec06356fbf0660df6b807e530075d3dc5aa8e04dda29e7a6e1337212b58e3bae09e9543c0c22 WHIRLPOOL b16da43ede2991bc14af3063d187301e93c29deb96c336a7558caeabcc5ba92bf425512252e170ee45f48dcbb2837e0c46dd7c828ad1943e65b3100df3dd18b0 +AUX slim-1.3.6-envcpy-bad-pointer-arithmetic.patch 583 SHA256 8965ea24c0864881713a4548fe10bd24e885e94a441c17ddbf94fbe2872fb1ea SHA512 cec2a82cc57a3dc3eb67a40becb9ef562d1fc0c2e962cb0cdddf978d776c8139f616647e3ab25255a616d3b17ff3f67ecaf4d7d92fa6af8aaec3ccf30efdde9c WHIRLPOOL c9df1bd8d5b1fffebaf3f4cf8f729b2ce07e5e02fcf9866a8f16c3da311811fa3fb1fdb87546a5e4a39fde88499af3c0fb5b04eda6ebf92c260bba83af2a700e +AUX slim-1.3.6-fix-slimlock-nopam-v2.patch 839 SHA256 7ee18c47e3159145be99b16bc2a8c56543043be17ff4527e581cf033a0b4d42e SHA512 2251cd96801e593b387037d79014ea86fdec223d8910628fbfd0e9c5eafbe79c27ffb7f08123c89b635d33dc2bf9cf76e2964f5293352784c1e08c7b1c7427c0 WHIRLPOOL ec303bf8a764e0445726df941d1e09b94d0aaae522f43146dc3a5fef4ad197f0bd654d081489f51a7ed0cbbf30fe8954abb1f5ff5066e4ca69bbb04e21373c54 +AUX slim-1.3.6-freetype.patch 426 SHA256 8bf59d9d4ebbf629f524331fa0389937ccbe1074a5e7d8eb1cfed4264986669b SHA512 e7181993d305b5dd2d27c9c44ffa944c07a5fc9342c70a12f2f8283dff61db7ee3dc8aac50a566104dfb50ae06777b52835a4a2c3e19ad0e82b22a9487cd71aa WHIRLPOOL cd96fa2d38f55b470571d42e67d22f4a5660d5ff7b77e9e934c613a5141424305297a7dca5d03ea3a5cc4de60a339e7b9a63e3861e664642301e3e342ed46dc3 +AUX slim-1.3.6-honour-cflags.patch 499 SHA256 7a19c872c2f3a290a74df246cdd3f08126f7ce46e63fb5074a326b81adb805bf SHA512 bbc99d396d30e034100e468d8d5a69cee3bc26eb6029793bdb95f29bd6364f680baec13e12e9ca7dcf01d84de3d8d45712462de36f6f729c7f8c232865a71a7a WHIRLPOOL 96941218006cd2d91efca231f9f2917431a1aa4e0afd31137809a90efb4e69122addf5257aff76b2b345606fa44b8593d9b3bb9d01125a83f751ea6f5945dc48 +AUX slim-1.3.6-libslim-cmake-fixes.patch 852 SHA256 9565d206e0e34000975e59afbd2bc3de74fd3f590afdd9e34d0125cb3f12c75a SHA512 457e23e193c6b9ecb5335accad444470ffb2e0109550d041385bba2b6036fdfac8d48e031574e4229d8b8768a7a86f6d6c191b214540f1156a2a13e5a9f3451f WHIRLPOOL e712e7b829da0cc3113a7cc69364045467c89fa05a52b36ccc2393a708840f36108088088500485e251c9765eefd0485462876fb14ca15db09c49a7f63a81cad +AUX slim-1.3.6-session-chooser.patch 3994 SHA256 3ee06061b10f42925cbd33ca25af1e870d4462be54c34e409fbe7b8f3bafa20e SHA512 7227fa0210d7870971870409da2d86d9f239ae285dde116e2b2d817318339fb51324bd11d04dc4c26a2ca3c1e5a0f0686987eab7042265389fb2f60cc7d37a45 WHIRLPOOL 594651c89d95210b28e8db7b7da547ab3009678be8312d8f94f79c71008aa7d4c3f2f02b71ce0624f400e84399a779b4544ac5523529255209c8e2f9a27b8f1c +AUX slim-1.3.6-strip-systemd-unit-install.patch 474 SHA256 01e02399cad7f223233e70c255956aff809aa16d416c3e1428d171e0a810c576 SHA512 377b1443c700ab6697b2087affed8486d9661de8794355e134a78125695a22e966927f26296e6330b8f4e7a600e9d21bca034dbc2d5445171e05618a2bfad55a WHIRLPOOL 5aef1e500930710b3cfe042078c3916d361800c61aac9813c56cd64d654786afb67a9f9357c0e1ffede6f5a65068c837767aca8f6fdddeb7935bdcd5e4b4ca9f +AUX slim-1.3.6-systemd-session.patch 820 SHA256 1cb2b5f322ae975cd5a5a9ccca45854c642497638aa1707234d8595e58adee3e SHA512 df653a31bd2b0d3bb5b09d700d89d6b4c444b3ef49dc6d5a0646cab5480841a76ecb1c3bcd45b602eb0d2000971a5ef576eac63de67907769ea23b6925329635 WHIRLPOOL 7557d7afd65ad3dd232656f05f1da7735668c1bb55125b1c833c55f9e4ea1411dcbfd8a104cba0d4d0f94aecd29a9f36d56c06515464e78da772e2ee304019db +AUX slim-9999-config.diff 2480 SHA256 e3005e301c54d370cea3911ce1f3dc96f3dae579fc4ec91e7c4581b197084ceb SHA512 6018c5eadd0c63e86b07ad8662ffc046fd1f586c101dc84bc9452295a9a11ed1a82a6a8a228bf8d5e064cc5d17b1bcea8662f957b831c96f8ba21c0f55a0d216 WHIRLPOOL 1479e9e37ba520cd95f63920d68c76910a7390b7f9ab7677e6eea91f60ae21437f1e0f1d481fe39758c923db53cd3ac7cd6f2d17577af2da8dd0cb3539a42467 +AUX slim.logrotate 102 SHA256 d0559cf7764147f601f2bab8077fd956b1171adad4872c0d324279f6a978264a SHA512 b49ce2dc1a1943c5f8eea8e6394cc27b014832e2d9908220f32ffd21fbe69442ec45b18f6e435430c6cbed074e5983e2136ebade10218bb073bb13106716f5b2 WHIRLPOOL 9e940bd1d88613e46ac4a333afa0f02cd16c583a1b34f509c4409321f7d5c5e14ec86e38e9743a6176187a72e403683127fbaf293abbef678e23873c428613c1 +DIST slim-1.3.6.tar.gz 232547 SHA256 21defeed175418c46d71af71fd493cd0cbffd693f9d43c2151529125859810df SHA512 345b1dee5d6f0c3716dfa7c5c16274adbf18586bdaaa6af4f310e24c5a61f79a297ffac921a5ba545523317e9fe120916df226c36b9c9b49c2ac9c1ca21dee0c WHIRLPOOL 473fa2f3752ec0c1bd2410ff3110649ce792c2e904928694b5fb8a43de619945276282e4a9de86198b9f38cdd74d1f9dc9cbcc754cc97989002b368ef26a8429 +EBUILD slim-1.3.6-r5.ebuild 4192 SHA256 1482c46164fcd85f5545d441943cf99c2ae03a3590e9810569a9799efcae90b6 SHA512 30666fddd7b6d85ea19a5cee3a6cca3eddaa08a488ba149fa38a9efd54d018d0e6d6d707d2a43c3247ed0d0c55212eda97dd7823e964f94b887e1d645e6aefed WHIRLPOOL 1fb5583b5dfeacf0c41a63fd1d08f6a990f9bff5858048e49669eadbd04c4ffdf02c2104aebc3373668376035796df960905d21f717176e28b1472f7769f651f +EBUILD slim-9999.ebuild 4018 SHA256 468982fc85e8e793d661081f53abd5c384cc7b1d06c1bb6e8709bb81efe551ab SHA512 0c19543e3e0a17dcd57077e3a434d78844059d9c019ad0fec3c4807eeb7b84065e445aaf4f31949012f0d375eac6bc7b3a2cc4b3f009e0e1fa9d8c0da065f7a4 WHIRLPOOL 6bc8bd5a0ae21316c68da51deda870dbbcdb6e5abd94cf63ef0838de81e56b0e18453b3cce22202c52566cd035def1dadae4360d979a98bb44232799b2144580 +MISC ChangeLog 5333 SHA256 f9c57c79c9c3ba95f341184696aadc7687a54aacfdddc52dcf68706d51cc7d99 SHA512 534536b3c01ddd5f7eecfbb6f6dfcd73b351a4f7aea514a4af3fde846deb83c68320b4aac07ef519d619090a9ba0bdb2c368da73e445161f294032669ba1aa10 WHIRLPOOL 052878a509d34f34576d1b7be013efffc77c33d27eb8796e4b5dda6c5a5bbee497d2a771381b80f4a9983b663b1a156b8d3f02bd83bb1d603e3e722d0e6c6a5d +MISC ChangeLog-2015 22739 SHA256 1e67ee4595a1e8158ecd11793aee571869c36ac957cbfcee33568fe3322567c2 SHA512 b4b057c02f75ce35393919f66b30bdab9e022ec3b4c84a3f2b1df8326cff73544242a7f8e89573158f4c3900de3445bca7cadc04e7711238ab5671d93ddbaf9b WHIRLPOOL f14e454abea01516a1fd930fa599077b09e0f53984fa377070e2ee706cc44392622793a7fb351d492cc7a6d89dec11b78293dbd0fba3f21e174aa55d43515097 +MISC metadata.xml 514 SHA256 8096ec96a71df42b3dad271816d305140ad3dc67321778a300a8d3876a4fcb0e SHA512 28f99f92bda5c50f97a164aa53915ecc458dfd84e6c3dbfb9dbfd6e64d0a98b7de9bfc202949506b2af91cb716a8b681f1db07b974d3d3776f15e2cdf5129950 WHIRLPOOL 695802103c841ee6ae60fe8225e6eefbbeae6ed65d7dcf51b249a77c3ef1339e485f29c60ddd4f392aa9e524fe97e5e9a7ed519c262b62fd67b52d0836265e60 diff --git a/x11-misc/slim/files/Xsession-r3 b/x11-misc/slim/files/Xsession-r3 new file mode 100644 index 000000000000..237fb3630661 --- /dev/null +++ b/x11-misc/slim/files/Xsession-r3 @@ -0,0 +1,158 @@ +#!/bin/sh +# +# Slim login manager Xsession script +# + +command="$@" + +# this will go into slim.log along with all other echo's +# good for debugging where things go wrong +echo "$0: Beginning session setup..." + +# First read /etc/profile and .profile +test -f /etc/profile && . /etc/profile +test -f "$HOME/.profile" && . "$HOME/.profile" +# Second read /etc/xprofile and .xprofile for X specific setup +test -f /etc/xprofile && . /etc/xprofile +test -f "$HOME/.xprofile" && . "$HOME/.xprofile" + +# wrap possible arguments to determine whether to treat special or not +if [ "x$command" = "xcustom" ] || [ "x$command" = "xCustom" ] || [ "x$command" = "xdefault" ] || [ "x$command" = "xDefault" ]; then + command="Xsession" +fi +if [ "x$command" = "x" ]; then + # no default specified, check if Xsession will complete + # and if not then assign XSESSION to command + if [ -x "$HOME/.xsession" ] || [ -x "$HOME/.Xclients" ] || [ -x /etc/X11/xinit/Xclients ] || [ -x /etc/X11/Xclients ]; then + command="Xsession" + else + command=$XSESSION + fi +fi + +# most of this is from /etc/X11/chooser.sh +sessionscript="" +if [ -n "${command}" ]; then + # find a match for $command in /etc/X11/Sessions + for x in /etc/X11/Sessions/* ; do + if [ "`echo ${x##*/} | awk '{ print toupper($1) }'`" = "`echo ${command} | awk '{ print toupper($1) }'`" ]; then + sessionscript=${x} + break + fi + done + if [ -n "${sessionscript}" ]; then + if [ -x "${sessionscript}" ]; then + command="${sessionscript}" + else + command="/bin/sh ${sessionscript}" + fi + else + + # find an executable for $command + x="" + y="" + + for x in "${command}" "`echo ${command} | awk '{ print toupper($1) }'`" "`echo ${command} | awk '{ print tolower($1) }'`" + do + # Fall through ... + if [ -x "`which ${x} 2>/dev/null`" ]; then + y="`which ${x} 2>/dev/null`" + break + fi + done + # note , if the command could not be found then $command will be empty + command="$y" + unset x + unset y + fi +fi + +# call xrdb and xmodmap and such, since $command is not a session script +if [ -z "${sessionscript}" ]; then + userresources="$HOME/.Xresources" + usermodmap="$HOME/.Xmodmap" + userxkbmap="$HOME/.Xkbmap" + + sysresources=/etc/X11/Xresources + sysmodmap=/etc/X11/Xmodmap + sysxkbmap=/etc/X11/Xkbmap + + rh6sysresources=/etc/X11/xinit/Xresources + rh6sysmodmap=/etc/X11/xinit/Xmodmap + + # merge in defaults + if [ -f "$rh6sysresources" ]; then + xrdb -merge "$rh6sysresources" + fi + + if [ -f "$sysresources" ]; then + xrdb -merge "$sysresources" + fi + + if [ -f "$userresources" ]; then + xrdb -merge "$userresources" + fi + + # merge in keymaps + if [ -f "$sysxkbmap" ]; then + setxkbmap `cat "$sysxkbmap"` + XKB_IN_USE=yes + fi + + if [ -f "$userxkbmap" ]; then + setxkbmap `cat "$userxkbmap"` + XKB_IN_USE=yes + fi + + # + # Eeek, this seems like too much magic here + # + if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then + if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/XF86Config ]; then + xkbsymbols=`sed -n -e 's/^[ ]*XkbSymbols[ ]*"\(.*\)".*$/\1/p' /etc/X11/XF86Config` + if [ -n "$xkbsymbols" ]; then + setxkbmap -symbols "$xkbsymbols" + XKB_IN_USE=yes + fi + fi + fi + + # xkb and xmodmap don't play nice together + if [ -z "$XKB_IN_USE" ]; then + if [ -f "$rh6sysmodmap" ]; then + xmodmap "$rh6sysmodmap" + fi + + if [ -f "$sysmodmap" ]; then + xmodmap "$sysmodmap" + fi + + if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" + fi + fi + + unset XKB_IN_USE +fi +unset sessionscript + +# start failsafe session +if [ -z "${command}" ]; then + echo "$0: Failed to find a command to start the session, so starting a failsafe xterm." + exec xterm -geometry 80x24+0+0 +fi + +# run all system xinitrc shell scripts which will update command +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for i in /etc/X11/xinit/xinitrc.d/* ; do + if [ -x "$i" ]; then + . "$i" + fi + done + unset i +fi + +echo "$0: Setup done, will execute: $command" +exec $command + +# vim:ts=4 diff --git a/x11-misc/slim/files/slim-1.3.5-arm.patch b/x11-misc/slim/files/slim-1.3.5-arm.patch new file mode 100644 index 000000000000..9438ce4a1caf --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.5-arm.patch @@ -0,0 +1,11 @@ +--- a/Ck.cpp 2012-06-26 04:20:14.000000000 -0400 ++++ b/Ck.cpp 2012-10-05 13:25:29.000000000 -0400 +@@ -91,7 +91,7 @@ + + vt = *((long *)return_value); + +- std::snprintf(device, 32, "/dev/tty%ld", vt); ++ std::sprintf(device, "/dev/tty%ld", vt); + + if(return_value) + XFree(return_value); diff --git a/x11-misc/slim/files/slim-1.3.5-disable-ck-for-systemd.patch b/x11-misc/slim/files/slim-1.3.5-disable-ck-for-systemd.patch new file mode 100644 index 000000000000..f7e361767615 --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.5-disable-ck-for-systemd.patch @@ -0,0 +1,122 @@ +diff -Naur slim-1.3.5/app.cpp slim-1.3.5.new/app.cpp +--- slim-1.3.5/app.cpp 2012-12-31 08:03:42.000000000 -0500 ++++ slim-1.3.5.new/app.cpp 2013-08-22 14:16:37.994854259 -0400 +@@ -138,11 +138,14 @@ + daemonmode = false; + force_nodaemon = false; + firstlogin = true; ++#ifdef USE_CONSOLEKIT ++ consolekit_support_enabled = true; ++#endif + Dpy = NULL; + + /* Parse command line + Note: we force a option for nodaemon switch to handle "-nodaemon" */ +- while((tmp = getopt(argc, argv, "vhp:n:d?")) != EOF) { ++ while((tmp = getopt(argc, argv, "vhsp:n:d?")) != EOF) { + switch (tmp) { + case 'p': /* Test theme */ + testtheme = optarg; +@@ -163,6 +166,11 @@ + std::cout << APPNAME << " version " << VERSION << endl; + exit(OK_EXIT); + break; ++#ifdef USE_CONSOLEKIT ++ case 's': /* Disable consolekit support */ ++ consolekit_support_enabled = false; ++ break; ++#endif + case '?': /* Illegal */ + logStream << endl; + case 'h': /* Help */ +@@ -171,6 +179,9 @@ + << " -d: daemon mode" << endl + << " -nodaemon: no-daemon mode" << endl + << " -v: show version" << endl ++#ifdef USE_CONSOLEKIT ++ << " -s: start for systemd, disable consolekit support" << endl ++#endif + << " -p /path/to/theme/dir: preview theme" << endl; + exit(OK_EXIT); + break; +@@ -559,6 +570,7 @@ + #endif + + #ifdef USE_CONSOLEKIT ++ if (consolekit_support_enabled) { + /* Setup the ConsoleKit session */ + try { + ck.open_session(DisplayName, pw->pw_uid); +@@ -567,6 +579,7 @@ + logStream << APPNAME << ": " << e << endl; + exit(ERR_EXIT); + } ++ } + #endif + + /* Create new process */ +@@ -578,6 +591,7 @@ + char** child_env = pam.getenvlist(); + + # ifdef USE_CONSOLEKIT ++ if (consolekit_support_enabled) { + char** old_env = child_env; + + /* Grow the copy of the environment for the session cookie */ +@@ -590,6 +604,7 @@ + memcpy(child_env, old_env, sizeof(char*)*n+1); + child_env[n - 1] = StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie()); + child_env[n] = NULL; ++ } + # endif /* USE_CONSOLEKIT */ + #else + +@@ -611,6 +626,7 @@ + child_env[n++]=StrConcat("MAIL=", maildir.c_str()); + child_env[n++]=StrConcat("XAUTHORITY=", xauthority.c_str()); + # ifdef USE_CONSOLEKIT ++ if (consolekit_support_enabled) + child_env[n++]=StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie()); + # endif /* USE_CONSOLEKIT */ + child_env[n++]=0; +@@ -656,12 +672,14 @@ + } + + #ifdef USE_CONSOLEKIT ++ if (consolekit_support_enabled) { + try { + ck.close_session(); + } + catch(Ck::Exception &e) { + logStream << APPNAME << ": " << e << endl; + }; ++ } + #endif + + #ifdef USE_PAM +diff -Naur slim-1.3.5/app.h slim-1.3.5.new/app.h +--- slim-1.3.5/app.h 2012-12-31 08:03:42.000000000 -0500 ++++ slim-1.3.5.new/app.h 2013-08-22 14:12:45.536850016 -0400 +@@ -108,6 +108,10 @@ + char *testtheme; + bool testing; + ++#ifdef USE_CONSOLEKIT ++ bool consolekit_support_enabled; ++#endif ++ + std::string themeName; + std::string mcookie; + +diff -Naur slim-1.3.5/slim.service slim-1.3.5.new/slim.service +--- slim-1.3.5/slim.service 2012-12-31 08:03:42.000000000 -0500 ++++ slim-1.3.5.new/slim.service 2013-08-22 14:15:39.186853186 -0400 +@@ -3,7 +3,7 @@ + After=systemd-user-sessions.service + + [Service] +-ExecStart=/usr/bin/slim -nodaemon ++ExecStart=/usr/bin/slim -nodaemon -s + + [Install] + Alias=display-manager.service diff --git a/x11-misc/slim/files/slim-1.3.6-config.diff b/x11-misc/slim/files/slim-1.3.6-config.diff new file mode 100644 index 000000000000..9da6795cccfa --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.6-config.diff @@ -0,0 +1,77 @@ +--- slim.conf.orig 2010-08-25 11:52:23.000000000 -0400 ++++ slim.conf 2010-08-25 11:58:58.000000000 -0400 +@@ -2,7 +2,7 @@ + # Note: -xauth $authfile is automatically appended + default_path /bin:/usr/bin:/usr/local/bin + default_xserver /usr/bin/X +-#xserver_arguments -dpi 75 ++xserver_arguments -nolisten tcp -br -deferglyphs 16 vt07 + + # Commands for halt, login, etc. + halt_cmd /sbin/shutdown -h now +@@ -18,7 +18,7 @@ + + + # Activate numlock when slim starts. Valid values: on|off +-# numlock on ++numlock on + + # Hide the mouse cursor (note: does not work with some WMs). + # Valid values: true|false +@@ -33,7 +33,8 @@ + # to adjust the command according to your preferred shell, + # i.e. for freebsd use: + # login_cmd exec /bin/sh - ~/.xinitrc %session +-login_cmd exec /bin/bash -login ~/.xinitrc %session ++# login_cmd exec /bin/bash -login ~/.xinitrc %session ++login_cmd exec /bin/bash -login /usr/share/slim/Xsession %session + + # Commands executed when starting and exiting a session. + # They can be used for registering a X11 session with +@@ -41,20 +42,30 @@ + # + # sessionstart_cmd some command + # sessionstop_cmd some command ++sessionstart_cmd /usr/bin/sessreg -a -l :0.0 %user ++sessionstop_cmd /usr/bin/sessreg -d -l :0.0 %user + + # Start in daemon mode. Valid values: yes | no + # Note that this can be overriden by the command line + # options "-d" and "-nodaemon" +-# daemon yes ++daemon yes + +-# Available sessions (first one is the default). +-# The current chosen session name is replaced in the login_cmd ++# Available sessions: ++# The current chosen session name replaces %session in the login_cmd + # above, so your login command can handle different sessions. ++# If no session is chosen (via F1), %session will be an empty string. + # see the xinitrc.sample file shipped with slim sources +-sessions xfce4,icewm-session,wmaker,blackbox ++#sessions xfce4,icewm-session,wmaker,blackbox ++# Alternatively, read available sessions from a directory of scripts: ++#sessiondir /etc/X11/Sessions ++# Or, read available sessions from the xsessions desktop files -- ++# note that this may provide a full path to the session executable! ++sessiondir /usr/share/xsessions + +-# Executed when pressing F11 (requires imagemagick) ++# Executed when pressing F11 (requires media-gfx/imagemagick for import) ++# Alternative is media-gfx/scrot. See Gentoo bug 252241 for more info. + screenshot_cmd import -window root /slim.png ++#screenshot_cmd scrot /root/slim.png + + # welcome message. Available variables: %host, %domain + welcome_msg Welcome to %host +@@ -83,8 +91,8 @@ + # randomly choose from + current_theme default + +-# Lock file +-lockfile /var/run/slim.lock ++# Lock file, /etc/init.d/xdm expects slim.pid ++lockfile /run/slim.pid + + # Log file + logfile /var/log/slim.log diff --git a/x11-misc/slim/files/slim-1.3.6-drop-zlib.patch b/x11-misc/slim/files/slim-1.3.6-drop-zlib.patch new file mode 100644 index 000000000000..cf2106a8a8eb --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.6-drop-zlib.patch @@ -0,0 +1,10 @@ +--- a/CMakeLists.txt 2014-02-28 10:38:48.655262163 -0500 ++++ b/CMakeLists.txt 2014-02-28 10:47:01.671271162 -0500 +@@ -96,7 +96,6 @@ + find_package(Freetype REQUIRED) + find_package(JPEG REQUIRED) + find_package(PNG REQUIRED) +-find_package(ZLIB REQUIRED) + + # Fontconfig + set(FONTCONFIG_DIR ${CMAKE_MODULE_PATH}) diff --git a/x11-misc/slim/files/slim-1.3.6-envcpy-bad-pointer-arithmetic.patch b/x11-misc/slim/files/slim-1.3.6-envcpy-bad-pointer-arithmetic.patch new file mode 100644 index 000000000000..b3787dd58459 --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.6-envcpy-bad-pointer-arithmetic.patch @@ -0,0 +1,15 @@ +--- a/app.cpp 2015-09-14 12:00:00.460481656 -0400 ++++ b/app.cpp 2015-09-14 14:41:10.970536588 -0400 +@@ -606,9 +606,9 @@ + + n++; + +- child_env = static_cast<char**>(malloc(sizeof(char*)*n)); +- memcpy(child_env, old_env, sizeof(char*)*n+1); +- child_env[n - 1] = StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie()); ++ child_env = static_cast<char**>(malloc(sizeof(char*)*(n+1))); ++ memcpy(child_env, old_env, sizeof(char*)*n); ++ child_env[n-1] = StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie()); + child_env[n] = NULL; + } + # endif /* USE_CONSOLEKIT */ diff --git a/x11-misc/slim/files/slim-1.3.6-fix-slimlock-nopam-v2.patch b/x11-misc/slim/files/slim-1.3.6-fix-slimlock-nopam-v2.patch new file mode 100644 index 000000000000..d5fc4db4838d --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.6-fix-slimlock-nopam-v2.patch @@ -0,0 +1,26 @@ +--- a/CMakeLists.txt 2013-10-27 21:24:21.193802669 -0400 ++++ b/CMakeLists.txt 2013-10-27 21:26:54.127806951 -0400 +@@ -220,7 +220,6 @@ + ####### install + # slim + install(TARGETS slim RUNTIME DESTINATION bin) +-install(TARGETS slimlock RUNTIME DESTINATION bin) + + if (BUILD_SHARED_LIBS) + set_target_properties(libslim PROPERTIES +@@ -235,8 +234,14 @@ + + # man file + install(FILES slim.1 DESTINATION ${MANDIR}/man1/) +-install(FILES slimlock.1 DESTINATION ${MANDIR}/man1/) + # configure + install(FILES slim.conf DESTINATION ${SYSCONFDIR}) ++ ++#slimlock ++if(BUILD_SLIMLOCK) ++install(TARGETS slimlock RUNTIME DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE SETUID) ++install(FILES slimlock.1 DESTINATION ${MANDIR}/man1/) ++endif(BUILD_SLIMLOCK) ++ + # themes directory + subdirs(themes) diff --git a/x11-misc/slim/files/slim-1.3.6-freetype.patch b/x11-misc/slim/files/slim-1.3.6-freetype.patch new file mode 100644 index 000000000000..8cefc0bf0998 --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.6-freetype.patch @@ -0,0 +1,12 @@ +diff -up ./CMakeLists.txt.orig ./CMakeLists.txt +--- ./CMakeLists.txt.orig 2014-11-11 20:38:40.706121207 +0100 ++++ ./CMakeLists.txt 2014-11-11 20:39:34.206120264 +0100 +@@ -165,7 +165,7 @@ include_directories( + ${X11_Xft_INCLUDE_PATH} + ${X11_Xrender_INCLUDE_PATH} + ${X11_Xrandr_INCLUDE_PATH} +- ${FREETYPE_INCLUDE_DIR_freetype2} ++ ${FREETYPE_INCLUDE_DIRS} + ${X11_Xmu_INCLUDE_PATH} + ${ZLIB_INCLUDE_DIR} + ${JPEG_INCLUDE_DIR} diff --git a/x11-misc/slim/files/slim-1.3.6-honour-cflags.patch b/x11-misc/slim/files/slim-1.3.6-honour-cflags.patch new file mode 100644 index 000000000000..8335e0fe9e75 --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.6-honour-cflags.patch @@ -0,0 +1,14 @@ +--- CMakeLists.txt 2013-10-01 18:38:05.000000000 -0400 ++++ CMakeLists.txt.new 2013-10-15 11:33:18.975741094 -0400 +@@ -42,11 +42,6 @@ + set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DPKGDATADIR=\"${PKGDATADIR}\"") + set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DSYSCONFDIR=\"${SYSCONFDIR}\"") + +-# Flags +-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -O2") +-set(CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} -Wall -g -O2") +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -O2") +- + # source + set(slim_srcs + main.cpp diff --git a/x11-misc/slim/files/slim-1.3.6-libslim-cmake-fixes.patch b/x11-misc/slim/files/slim-1.3.6-libslim-cmake-fixes.patch new file mode 100644 index 000000000000..11e39dc97628 --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.6-libslim-cmake-fixes.patch @@ -0,0 +1,33 @@ +--- a/CMakeLists.txt 2013-10-15 11:35:16.688739802 -0400 ++++ b/CMakeLists.txt 2013-10-15 11:53:46.185727620 -0400 +@@ -115,6 +115,7 @@ + message("\tPAM Found") + set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DUSE_PAM") + target_link_libraries(${PROJECT_NAME} ${PAM_LIBRARY}) ++ target_link_libraries(libslim ${PAM_LIBRARY}) + target_link_libraries(slimlock ${PAM_LIBRARY}) + include_directories(${PAM_INCLUDE_DIR}) + else(PAM_FOUND) +@@ -173,7 +174,10 @@ + ) + + target_link_libraries(libslim +- ${JPEG_LIBRARIES} ++ ${RT_LIB} ++ ${X11_Xft_LIB} ++ ${X11_Xrandr_LIB} ++ ${JPEG_LIBRARIES} + ${PNG_LIBRARIES} + ) + +@@ -228,8 +228,8 @@ + SOVERSION ${SLIM_VERSION}) + + install(TARGETS libslim +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SIFFUX} + ) + endif (BUILD_SHARED_LIBS) + diff --git a/x11-misc/slim/files/slim-1.3.6-session-chooser.patch b/x11-misc/slim/files/slim-1.3.6-session-chooser.patch new file mode 100644 index 000000000000..b43c9a307605 --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.6-session-chooser.patch @@ -0,0 +1,115 @@ +--- a/cfg.cpp 2013-10-01 18:38:05.000000000 -0400 ++++ b/cfg.cpp 2013-10-24 12:12:20.584103253 -0400 +@@ -274,14 +274,14 @@ + while (true) { + string::const_iterator begin = s; + while (*s != c && s != str.end()) { ++s; } +- tmp = string(begin, s); +- if (useEmpty || tmp.size() > 0) ++ tmp = string(begin, s); ++ if (useEmpty || tmp.size() > 0) + v.push_back(tmp); + if (s == str.end()) { + break; + } + if (++s == str.end()) { +- if (useEmpty) ++ if (useEmpty) + v.push_back(""); + break; + } +@@ -289,6 +289,7 @@ + } + + void Cfg::fillSessionList(){ ++ string strSessionList = getOption("sessions"); + string strSessionDir = getOption("sessiondir"); + + sessions.clear(); +@@ -307,29 +308,29 @@ + struct stat oFileStat; + + if (stat(strFile.c_str(), &oFileStat) == 0) { +- if (S_ISREG(oFileStat.st_mode) && +- access(strFile.c_str(), R_OK) == 0){ +- ifstream desktop_file( strFile.c_str() ); +- if (desktop_file){ +- string line, session_name = "", session_exec = ""; +- while (getline( desktop_file, line )) { +- if (line.substr(0, 5) == "Name=") { +- session_name = line.substr(5); +- if (!session_exec.empty()) +- break; +- } else +- if (line.substr(0, 5) == "Exec=") { +- session_exec = line.substr(5); +- if (!session_name.empty()) +- break; +- } +- } +- desktop_file.close(); +- pair<string,string> session(session_name,session_exec); +- sessions.push_back(session); +- cout << session_exec << " - " << session_name << endl; +- } +- ++ if (S_ISREG(oFileStat.st_mode) && ++ access(strFile.c_str(), R_OK) == 0){ ++ ifstream desktop_file( strFile.c_str() ); ++ if (desktop_file){ ++ string line, session_name = "", session_exec = ""; ++ while (getline( desktop_file, line )) { ++ if (line.substr(0, 5) == "Name=") { ++ session_name = line.substr(5); ++ if (!session_exec.empty()) break; ++ } else if (line.substr(0, 5) == "Exec=") { ++ session_exec = line.substr(5); ++ if (!session_name.empty()) break; ++ } ++ } ++ desktop_file.close(); ++ if (!session_name.empty() && !session_exec.empty()) { ++ pair<string,string> session(session_name,session_exec); ++ sessions.push_back(session); ++ } else if (access(strFile.c_str(), X_OK) == 0) { ++ pair<string,string> session(string(pDirent->d_name),strFile); ++ sessions.push_back(session); ++ } ++ } + } + } + } +@@ -338,8 +339,18 @@ + } + + if (sessions.empty()){ +- pair<string,string> session("",""); +- sessions.push_back(session); ++ if (strSessionList.empty()) { ++ pair<string,string> session("",""); ++ sessions.push_back(session); ++ } else { ++ // iterate through the split of the session list ++ vector<string> sessit; ++ split(sessit,strSessionList,',',false); ++ for (vector<string>::iterator it = sessit.begin(); it != sessit.end(); ++it) { ++ pair<string,string> session(*it,*it); ++ sessions.push_back(session); ++ } ++ } + } + } + +--- a/app.cpp 2013-10-24 12:16:59.870111072 -0400 ++++ b/app.cpp 2013-10-24 12:29:59.899132910 -0400 +@@ -377,10 +377,6 @@ + LoginPanel->SetName(cfg->getOption("default_user") ); + } + +- if (firstloop) { +- LoginPanel->SwitchSession(); +- } +- + if (!AuthenticateUser(focuspass && firstloop)){ + panelclosed = 0; + firstloop = false; diff --git a/x11-misc/slim/files/slim-1.3.6-strip-systemd-unit-install.patch b/x11-misc/slim/files/slim-1.3.6-strip-systemd-unit-install.patch new file mode 100644 index 000000000000..f116c5ebc976 --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.6-strip-systemd-unit-install.patch @@ -0,0 +1,13 @@ +--- CMakeLists.txt 2013-10-15 12:02:13.463722050 -0400 ++++ CMakeLists.txt.new 2013-10-17 09:41:41.602917345 -0400 +@@ -238,10 +238,6 @@ + install(FILES slimlock.1 DESTINATION ${MANDIR}/man1/) + # configure + install(FILES slim.conf DESTINATION ${SYSCONFDIR}) +-# systemd service file +-if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") +- install(FILES slim.service DESTINATION ${LIBDIR}/systemd/system) +-endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + # themes directory + subdirs(themes) + diff --git a/x11-misc/slim/files/slim-1.3.6-systemd-session.patch b/x11-misc/slim/files/slim-1.3.6-systemd-session.patch new file mode 100644 index 000000000000..0639aeb5f185 --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.6-systemd-session.patch @@ -0,0 +1,29 @@ +--- a/app.cpp 2013-10-23 16:19:57.074100282 -0400 ++++ b/app.cpp 2013-10-23 16:33:13.302122574 -0400 +@@ -829,8 +829,13 @@ + + StopServer(); + RemoveLock(); +- while (waitpid(-1, NULL, WNOHANG) > 0); /* Collects all dead childrens */ +- Run(); ++ if (force_nodaemon) { ++ delete LoginPanel; ++ exit(ERR_EXIT); /* use ERR_EXIT so that systemd's RESTART=on-failure works */ ++ } else { ++ while (waitpid(-1, NULL, WNOHANG) > 0); /* Collects all dead childrens */ ++ Run(); ++ } + } + + void App::KillAllClients(Bool top) { +--- a/slim.service 2013-10-23 16:19:57.074100282 -0400 ++++ b/slim.service 2013-10-23 16:45:14.901142776 -0400 +@@ -4,6 +4,7 @@ + + [Service] + ExecStart=/usr/bin/slim -nodaemon -s ++Restart=on-failure + + [Install] + Alias=display-manager.service +Common subdirectories: slim-1.3.6/themes and slim-1.3.6.new/themes diff --git a/x11-misc/slim/files/slim-9999-config.diff b/x11-misc/slim/files/slim-9999-config.diff new file mode 100644 index 000000000000..81f0feea43f1 --- /dev/null +++ b/x11-misc/slim/files/slim-9999-config.diff @@ -0,0 +1,70 @@ +diff --git a/slim.conf b/slim.conf +index 2c72255..7af4adb 100644 +--- a/slim.conf ++++ b/slim.conf +@@ -2,7 +2,7 @@ + # Note: -xauth $authfile is automatically appended + default_path /bin:/usr/bin:/usr/local/bin + default_xserver /usr/bin/X +-#xserver_arguments -dpi 75 ++xserver_arguments -nolisten tcp -br -deferglyphs 16 vt07 + + # Commands for halt, login, etc. + halt_cmd /sbin/shutdown -h now +@@ -18,7 +18,7 @@ authfile /var/run/slim.auth + + + # Activate numlock when slim starts. Valid values: on|off +-# numlock on ++numlock on + + # Hide the mouse cursor (note: does not work with some WMs). + # Valid values: true|false +@@ -33,19 +33,20 @@ authfile /var/run/slim.auth + # to adjust the command according to your preferred shell, + # i.e. for freebsd use: + # login_cmd exec /bin/sh - ~/.xinitrc %session +-login_cmd exec /bin/bash -login ~/.xinitrc %session ++# login_cmd exec /bin/bash -login ~/.xinitrc %session ++login_cmd exec /bin/bash -login /usr/share/slim/Xsession %session + + # Commands executed when starting and exiting a session. + # They can be used for registering a X11 session with + # sessreg. You can use the %user variable + # +-# sessionstart_cmd some command +-# sessionstop_cmd some command ++sessionstart_cmd /usr/bin/sessreg -a -l :0.0 %user ++sessionstop_cmd /usr/bin/sessreg -d -l :0.0 %user + + # Start in daemon mode. Valid values: yes | no + # Note that this can be overriden by the command line + # options "-d" and "-nodaemon" +-# daemon yes ++daemon yes + + # Available sessions: + # The current chosen session name replaces %session in the login_cmd +@@ -63,7 +64,10 @@ login_cmd exec /bin/bash -login ~/.xinitrc %session + sessiondir /usr/share/xsessions + + # Executed when pressing F11 (requires imagemagick for 'import') +-screenshot_cmd import -window root /slim.png ++# Alternative: media-gfx/scrot. See Gentoo bug 252241 for more info. ++screenshot_cmd import -window root /tmp/slim.png ++#screenshot_cmd scrot /tmp/slim.png ++ + + # welcome message. Available variables: %host, %domain + welcome_msg Welcome to %host +@@ -92,8 +96,8 @@ reboot_msg The system is rebooting... + # randomly choose from + current_theme default + +-# Lock file +-lockfile /var/run/slim.lock ++# Lock file, /etc/init.d/xdm expects slim.pid ++lockfile /run/slim.pid + + # Log file + logfile /var/log/slim.log diff --git a/x11-misc/slim/files/slim.logrotate b/x11-misc/slim/files/slim.logrotate new file mode 100644 index 000000000000..89015306ff50 --- /dev/null +++ b/x11-misc/slim/files/slim.logrotate @@ -0,0 +1,9 @@ +/var/log/slim.log { + compress + rotate 4 + weekly + delaycompress + copytruncate + missingok + notifempty +} diff --git a/x11-misc/slim/metadata.xml b/x11-misc/slim/metadata.xml new file mode 100644 index 000000000000..8f38f154c1b0 --- /dev/null +++ b/x11-misc/slim/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>axs@gentoo.org</email> + </maintainer> + <maintainer type="project"> + <email>desktop-misc@gentoo.org</email> + <name>Gentoo Desktop Miscellaneous Project</name> + </maintainer> + <use> + <flag name="consolekit">Enable native consolekit support</flag> + </use> + <upstream> + <remote-id type="sourceforge">slim.berlios</remote-id> + </upstream> +</pkgmetadata> diff --git a/x11-misc/slim/slim-1.3.6-r5.ebuild b/x11-misc/slim/slim-1.3.6-r5.ebuild new file mode 100644 index 000000000000..6663621cf77b --- /dev/null +++ b/x11-misc/slim/slim-1.3.6-r5.ebuild @@ -0,0 +1,140 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit cmake-utils pam eutils systemd versionator + +DESCRIPTION="Simple Login Manager" +HOMEPAGE="https://sourceforge.net/projects/slim.berlios/" +SRC_URI="mirror://sourceforge/project/${PN}.berlios/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm ~mips ppc ppc64 sparc x86 ~x86-fbsd" +IUSE="branding pam consolekit" +REQUIRED_USE="consolekit? ( pam )" + +RDEPEND="x11-libs/libXmu + x11-libs/libX11 + x11-libs/libXpm + x11-libs/libXft + x11-libs/libXrandr + media-libs/libpng:0= + virtual/jpeg:= + x11-apps/sessreg + consolekit? ( sys-auth/consolekit + sys-apps/dbus ) + pam? ( virtual/pam + !x11-misc/slimlock )" +DEPEND="${RDEPEND} + virtual/pkgconfig + x11-proto/xproto" +PDEPEND="branding? ( >=x11-themes/slim-themes-1.2.3a-r3 )" + +src_prepare() { + # Our Gentoo-specific config changes + epatch "${FILESDIR}"/${P}-config.diff \ + "${FILESDIR}"/${PN}-1.3.5-arm.patch \ + "${FILESDIR}"/${P}-honour-cflags.patch \ + "${FILESDIR}"/${P}-libslim-cmake-fixes.patch \ + "${FILESDIR}"/${PN}-1.3.5-disable-ck-for-systemd.patch \ + "${FILESDIR}"/${P}-strip-systemd-unit-install.patch \ + "${FILESDIR}"/${P}-systemd-session.patch \ + "${FILESDIR}"/${P}-session-chooser.patch \ + "${FILESDIR}"/${P}-fix-slimlock-nopam-v2.patch \ + "${FILESDIR}"/${P}-drop-zlib.patch \ + "${FILESDIR}"/${P}-freetype.patch \ + "${FILESDIR}"/${P}-envcpy-bad-pointer-arithmetic.patch + + if use elibc_FreeBSD; then + sed -i -e 's/"-DHAVE_SHADOW"/"-DNEEDS_BASENAME"/' CMakeLists.txt \ + || die + fi + + if use branding; then + sed -i -e 's/ default/ slim-gentoo-simple/' slim.conf || die + fi + + epatch_user +} + +src_configure() { + mycmakeargs=( + $(cmake-utils_use pam USE_PAM) + $(cmake-utils_use consolekit USE_CONSOLEKIT) + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + if use pam ; then + pamd_mimic system-local-login slim auth account session + pamd_mimic system-local-login slimlock auth + fi + + systemd_dounit slim.service + + insinto /usr/share/slim + newins "${FILESDIR}/Xsession-r3" Xsession + + insinto /etc/logrotate.d + newins "${FILESDIR}/slim.logrotate" slim + + dodoc xinitrc.sample ChangeLog README TODO THEMES +} + +pkg_postinst() { + # massage ${REPLACING_VERSIONS} to come up with whether or not it's a new install + # or if it's older than 1.3.2-r7 + # Note - there should only ever be zero or one version as this package isn't slotted, + # so the logic doesn't worry about what happens if there's two, due to the case where + # a previous emerge attempt failed in the middle of qmerge. + local rv=none + for rv in ${REPLACING_VERSIONS} ; do + if version_is_at_least "1.3.2-r7" "${rv}" ; then + rv=newer + break; + fi + if version_is_at_least "1.0" "${rv}" ; then + rv=older + break; + fi + done + + if [[ ${rv} == none ]]; then + elog + elog "The configuration file is located at /etc/slim.conf." + elog + elog "If you wish ${PN} to start automatically, set DISPLAYMANAGER=\"${PN}\" " + elog "in /etc/conf.d/xdm and run \"rc-update add xdm default\"." + fi + if [[ ${rv} != newer ]]; then + elog + elog "By default, ${PN} is set up to do proper X session selection, including ~/.xsession" + elog "support, as well as selection between sessions available in" + elog "/etc/X11/Sessions/ at login by pressing [F1]." + elog + elog "The XSESSION environment variable is still supported as a default" + elog "if no session has been specified by the user." + elog + elog "If you want to use .xinitrc in the user's home directory for session" + elog "management instead, see README and xinitrc.sample in" + elog "/usr/share/doc/${PF} and change your login_cmd in /etc/slim.conf" + elog "accordingly." + elog + ewarn "Please note that slim supports consolekit directly. Please do not use any " + ewarn "old work-arounds (including calls to 'ck-launch-session' in xinitrc scripts)" + ewarn "and enable USE=\"consolekit\" instead." + ewarn + fi + if ! use pam; then + elog "You have merged ${PN} without USE=\"pam\", this will cause ${PN} to fall back to" + elog "the console when restarting your window manager. If this is not desired, then" + elog "please remerge ${PN} with USE=\"pam\"" + elog + fi +} diff --git a/x11-misc/slim/slim-9999.ebuild b/x11-misc/slim/slim-9999.ebuild new file mode 100644 index 000000000000..1b8b9a68b1c8 --- /dev/null +++ b/x11-misc/slim/slim-9999.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit cmake-utils pam eutils systemd versionator + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="https://github.com/axs-gentoo/slim-git.git" + inherit git-r3 + KEYWORDS="" +else + SRC_URI="mirror://sourceforge/project/${PN}.berlios/${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +fi + +DESCRIPTION="Simple Login Manager" +HOMEPAGE="https://sourceforge.net/projects/slim.berlios/" +LICENSE="GPL-2" +SLOT="0" +IUSE="branding pam consolekit" +REQUIRED_USE="consolekit? ( pam )" + +RDEPEND="x11-libs/libXmu + x11-libs/libX11 + x11-libs/libXpm + x11-libs/libXft + x11-libs/libXrandr + media-libs/libpng:0= + virtual/jpeg:= + x11-apps/sessreg + consolekit? ( sys-auth/consolekit + sys-apps/dbus ) + pam? ( virtual/pam + !x11-misc/slimlock )" +DEPEND="${RDEPEND} + virtual/pkgconfig + x11-proto/xproto" +PDEPEND="branding? ( >=x11-themes/slim-themes-1.2.3a-r3 )" + +src_prepare() { + # Our Gentoo-specific config changes + epatch "${FILESDIR}"/${P}-config.diff + + if use elibc_FreeBSD; then + sed -i -e 's/"-DHAVE_SHADOW"/"-DNEEDS_BASENAME"/' CMakeLists.txt \ + || die + fi + + if use branding; then + sed -i -e '/current_theme/s/default/slim-gentoo-simple/' slim.conf \ + || die + fi +} + +src_configure() { + mycmakeargs=( + $(cmake-utils_use pam USE_PAM) + $(cmake-utils_use consolekit USE_CONSOLEKIT) + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + if use pam ; then + pamd_mimic system-local-login slim auth account session + pamd_mimic system-local-login slimlock auth + fi + + systemd_dounit build_files/slim.service + + insinto /usr/share/slim + newins "${FILESDIR}/Xsession-r3" Xsession + + insinto /etc/logrotate.d + newins "${FILESDIR}/slim.logrotate" slim + + dodoc xinitrc.sample README THEMES +} + +pkg_postinst() { + # massage ${REPLACING_VERSIONS} to come up with whether or not it's a new install + # or if it's older than 1.3.2-r7 + # Note - there should only ever be zero or one version as this package isn't slotted, + # so the logic doesn't worry about what happens if there's two, due to the case where + # a previous emerge attempt failed in the middle of qmerge. + local rv=none + for rv in ${REPLACING_VERSIONS} ; do + if version_is_at_least "1.3.2-r7" "${rv}" ; then + rv=newer + break; + fi + if version_is_at_least "1.0" "${rv}" ; then + rv=older + break; + fi + done + + if [[ ${rv} == none ]]; then + elog + elog "The configuration file is located at /etc/slim.conf." + elog + elog "If you wish ${PN} to start automatically, set DISPLAYMANAGER=\"${PN}\" " + elog "in /etc/conf.d/xdm and run \"rc-update add xdm default\"." + fi + if [[ ${rv} != newer ]]; then + elog + elog "By default, ${PN} is set up to provide X session selection based on the" + elog ".desktop entries in /usr/share/xsessions/ that are installed by each" + elog "DE, including ~/.xsession support via the 'Xsession' session. Sessions" + elog "are selected at login by pressing [F1]. As per the Xorg guide, each" + elog "user's default session can be specified by adding the name from" + elog "/etc/X11/Sessions to ~/.xsession." + elog + elog "The XSESSION environment variable is still supported as a default" + elog "if no session has been specified by the user." + elog + elog "If you want to use .xinitrc in the user's home directory for session" + elog "management instead, see README and xinitrc.sample in" + elog "/usr/share/doc/${PF} and change your login_cmd in /etc/slim.conf" + elog "accordingly." + elog + ewarn "Please note that slim supports consolekit directly. Please do not use any " + ewarn "old work-arounds (including calls to 'ck-launch-session' in xinitrc scripts)" + ewarn "and enable USE=\"consolekit\" instead." + ewarn + fi + if ! use pam; then + elog "You have merged ${PN} without USE=\"pam\", this will cause ${PN} to fall back to" + elog "the console when restarting your window manager. If this is not desired, then" + elog "please remerge ${PN} with USE=\"pam\"" + elog + fi +} |