diff options
-rw-r--r-- | portage-flags-target/keywords/slim | 2 | ||||
-rw-r--r-- | x11-misc/slim/ChangeLog | 158 | ||||
-rw-r--r-- | x11-misc/slim/Manifest | 9 | ||||
-rw-r--r-- | x11-misc/slim/files/slim-1.3.1-config.diff | 45 | ||||
-rw-r--r-- | x11-misc/slim/files/slim-1.3.1-gcc4.4.patch | 17 | ||||
-rw-r--r-- | x11-misc/slim/files/slim-1.3.1-vkbd-config.patch | 20 | ||||
-rw-r--r-- | x11-misc/slim/files/slim-1.3.1-vkbd.patch | 165 | ||||
-rw-r--r-- | x11-misc/slim/files/slim.logrotate | 9 | ||||
-rw-r--r-- | x11-misc/slim/metadata.xml | 12 | ||||
-rw-r--r-- | x11-misc/slim/slim-1.3.1-r5.ebuild | 93 |
10 files changed, 530 insertions, 0 deletions
diff --git a/portage-flags-target/keywords/slim b/portage-flags-target/keywords/slim new file mode 100644 index 0000000..9e740d9 --- /dev/null +++ b/portage-flags-target/keywords/slim @@ -0,0 +1,2 @@ +=x11-misc/slim-1.3.1-r5 ** +=x11-themes/slim-themes-1.2.3a-r3 ** diff --git a/x11-misc/slim/ChangeLog b/x11-misc/slim/ChangeLog new file mode 100644 index 0000000..97f9974 --- /dev/null +++ b/x11-misc/slim/ChangeLog @@ -0,0 +1,158 @@ +# ChangeLog for x11-misc/slim +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/x11-misc/slim/ChangeLog,v 1.36 2009/03/25 23:54:18 darkside Exp $ + +*slim-1.3.1-r5 (25 Mar 2009) + + 25 Mar 2009; Jeremy Olexa <darkside@gentoo.org> + +files/slim-1.3.1-gcc4.4.patch, +files/slim.logrotate, + +slim-1.3.1-r5.ebuild: + Add logrotate support by Daniel Pielmeier (billie) bug 262034 & gcc-4.4 + patch reported in bug 252745 + + 21 Mar 2009; Krzysiek Pawlik <nelchael@gentoo.org> + -files/slim-1.3.0-gcc43.patch, -slim-1.3.0-r1.ebuild, + -slim-1.3.1-r1.ebuild: + Remove old versions. + + 20 Mar 2009; Joseph Jezak <josejx@gentoo.org> slim-1.3.1-r4.ebuild: + Marked ppc/ppc64 stable for bug #261124. + + 07 Mar 2009; Raúl Porcel <armin76@gentoo.org> slim-1.3.1-r4.ebuild: + sparc/x86 stable wrt #261124 + + 06 Mar 2009; Thomas Anderson <gentoofan23@gentoo.org> + slim-1.3.1-r4.ebuild: + stable amd64, bug 261124 + +*slim-1.3.1-r4 (26 Dec 2008) + + 26 Dec 2008; Jeremy Olexa <darkside@gentoo.org> + files/slim-1.3.1-config.diff, -slim-1.3.1-r3.ebuild, + +slim-1.3.1-r4.ebuild: + Fix config file mistake by me, reported in bug #252353 + +*slim-1.3.1-r3 (26 Dec 2008) + + 26 Dec 2008; Jeremy Olexa <darkside@gentoo.org> + files/slim-1.3.1-config.diff, -slim-1.3.1-r2.ebuild, + +slim-1.3.1-r3.ebuild: + Add USE=branding, if set the default slim theme will be our very own + developer's (nightmorph@g.o) theme, yay. Also, make slim start as a daemon + again, bug #252353 + +*slim-1.3.1-r2 (23 Dec 2008) + + 23 Dec 2008; Jeremy Olexa <darkside@gentoo.org> + +files/slim-1.3.1-config.diff, metadata.xml, -slim-1.3.0-r2.ebuild, + +slim-1.3.1-r2.ebuild: + New slim.conf patch (bug 250722) by Nico R. Wohlgemuth. Converted to EAPI-2 + since portage-2.1.6.2 will be stable any day now. add screenshot use flag to + dep on imagemagick + + 12 Dec 2008; Raúl Porcel <armin76@gentoo.org> slim-1.3.1-r1.ebuild: + sparc/x86 stable wrt #248448 + + 29 Nov 2008; Joseph Jezak <josejx@gentoo.org> slim-1.3.1-r1.ebuild: + Marked ppc stable for bug #248448. Going stable early to allow the removal + of 1.3.0-r1. + + 26 Nov 2008; Raúl Porcel <armin76@gentoo.org> ChangeLog: + sparc/x86 stable wrt #248448 + + 24 Nov 2008; Brent Baude <ranger@gentoo.org> slim-1.3.1-r1.ebuild: + stable ppc64, bug 248448 + + 23 Nov 2008; Jeremy Olexa <darkside@gentoo.org> slim-1.3.1-r1.ebuild: + amd64 stable, bug #248448 + +*slim-1.3.1-r1 (23 Nov 2008) + + 23 Nov 2008; Jeremy Olexa <darkside@gentoo.org> -slim-1.3.1.ebuild, + +slim-1.3.1-r1.ebuild: + on second though, the proper fix is to rev bump slim to lose the coreutils + dep, bug #215661 + + 23 Nov 2008; Jeremy Olexa <darkside@gentoo.org> slim-1.3.1.ebuild: + remove corefonts from explicit RDEPEND, not needed as seen in bug #215661 + + 26 Sep 2008; Jeremy Olexa <darkside@gentoo.org> slim-1.3.1.ebuild: + re-add ~ppc64 to 1.3.1, they snuck up on me and added the keyword + + 26 Sep 2008; Jeremy Olexa <darkside@gentoo.org> +slim-1.3.1.ebuild: + version bump, thanks to Daniel Pielmeier in bug #238801 + + 26 Sep 2008; Alexis Ballier <aballier@gentoo.org> slim-1.3.0-r2.ebuild: + keyword ~ppc64, working fine on a PowerMac 970 + + 22 Sep 2008; Jeremy Olexa <darkside@gentoo.org> slim-1.3.0-r1.ebuild, + slim-1.3.0-r2.ebuild: + clean up postinst and add words about USE=pam for bug #238328. Thanks to + nightmorph for investigating + + 20 Sep 2008; Raúl Porcel <armin76@gentoo.org> slim-1.3.0-r2.ebuild: + Re-add ~sparc/~x86 wrt #238159 + +*slim-1.3.0-r2 (20 Sep 2008) + + 20 Sep 2008; Jeremy Olexa <darkside@gentoo.org> metadata.xml, + +slim-1.3.0-r2.ebuild: + modify x11-misc/slim to now show your login in wtmp/utmp. added dep, hence + dropped keywords. thanks to Andrew Stimpson for the fix in bug #218523 + + 27 Aug 2008; Brent Baude <ranger@gentoo.org> slim-1.3.0-r1.ebuild: + stable ppc, bug 209540 + + 25 Aug 2008; Christoph Mende <angelos@gentoo.org> slim-1.3.0-r1.ebuild: + Respect LDFLAGS, bug 232176 and dropped maintainership + + 05 May 2008; Samuli Suominen <drac@gentoo.org> + +files/slim-1.3.0-gcc43.patch, slim-1.3.0-r1.ebuild: + Fix building with GCC 4.3 wrt #213154, thanks to B. Nutzer. + + 27 Jan 2008; Christoph Mende <angelos@gentoo.org> -slim-1.2.6.ebuild, + -slim-1.3.0.ebuild, slim-1.3.0-r1.ebuild: + Stable on amd64 and remove old + + 27 Jan 2008; Raúl Porcel <armin76@gentoo.org> slim-1.3.0-r1.ebuild: + sparc/x86 stable + + 01 Jan 2008; Christoph Mende <angelos@gentoo.org> slim-1.3.0-r1.ebuild: + Install a default pam.d file and honor XSESSION + +*slim-1.3.0-r1 (27 Oct 2007) + + 27 Oct 2007; Christoph Mende <angelos@gentoo.org> +slim-1.3.0-r1.ebuild: + Fixed PAM handling, bug 197225 by Florian Wagner + + 08 Sep 2007; nixnut <nixnut@gentoo.org> slim-1.3.0.ebuild: + Added ~ppc wrt bug 188305 + + 02 Sep 2007; Christoph Mende <angelos@gentoo.org> slim-1.3.0.ebuild: + Stable on amd64 + + 13 Aug 2007; Christoph Mende <angelos@gentoo.org> slim-1.2.6.ebuild: + Stable on amd64 + +*slim-1.3.0 (03 Aug 2007) + + 03 Aug 2007; Christoph Mende <angelos@gentoo.org> metadata.xml, + +slim-1.3.0.ebuild: + Taking over maintainership and bump to 1.3.0 + + 12 Jul 2007; Gustavo Zacarias <gustavoz@gentoo.org> slim-1.2.6.ebuild: + Stable on sparc + + 30 May 2007; Gustavo Zacarias <gustavoz@gentoo.org> slim-1.2.6.ebuild: + Keyworded ~sparc wrt #180204 + + 02 May 2007; Samuli Suominen <drac@gentoo.org> slim-1.2.6.ebuild: + Keyword ~amd64. + +*slim-1.2.6 (02 May 2007) + + 02 May 2007; Samuli Suominen <drac@gentoo.org> +metadata.xml, + +slim-1.2.6.ebuild: + Initial commit from Sunrise Overlay for bugs 107526, 176150. Thanks to Jakub + Moc. + diff --git a/x11-misc/slim/Manifest b/x11-misc/slim/Manifest new file mode 100644 index 0000000..36c45b5 --- /dev/null +++ b/x11-misc/slim/Manifest @@ -0,0 +1,9 @@ +AUX slim-1.3.1-config.diff 1589 RMD160 dd92d5bc0ecc507309d7d36631cde9310002dd3c SHA1 8e84e9c99fc3fbb2f0893578cebf4a76cb7a0263 SHA256 cda9414dd9586f22b6996815e368078688488a234d672ecc9f647012ae8d3889 +AUX slim-1.3.1-gcc4.4.patch 380 RMD160 e2b1f057d32857239591474b5562b717a8ddab2c SHA1 60749d3357630cf54dadbc68f37d2e7831710f8f SHA256 52f6941889687a87f343f25b6aa590f0db08542bc2de65554f6e076d2033f7b1 +AUX slim-1.3.1-vkbd-config.patch 1120 RMD160 52db61923e058423ff6ad809a28f0a7b1a0f98ae SHA1 8c594e84ae452a11cd42a25958b4d687d1f6f96e SHA256 e75c085deed0c4d6dbf7a6aec0f1e0d978849b60c2a54c5828f62a7ade48ea8c +AUX slim-1.3.1-vkbd.patch 4422 RMD160 651c0a4553cef572742cf71cdced662d2cb81bcb SHA1 3d289b1bfa8983cad1442044eb36c861df5b5e83 SHA256 86a904eedfc58bc558677be7e9786a8df4dd329393bd3f20583d055a0225135c +AUX slim.logrotate 102 RMD160 ccf614eca8c0b8fc1fbc2dfb8bf71b02485a743b SHA1 d2bc9202862f0d33bb902eba3aa8fefe0797d7a3 SHA256 d0559cf7764147f601f2bab8077fd956b1171adad4872c0d324279f6a978264a +DIST slim-1.3.1.tar.gz 219446 RMD160 dc0c7c7257dfa8c2bee47ffa5ec8ddf17fd38f70 SHA1 30152b280724daf75299a8ee16585041f253ed4f SHA256 acd7a4024bfd7c2a4f3cd5d77ffed4956d13727a8f554042126d0568defe0f77 +EBUILD slim-1.3.1-r5.ebuild 2754 RMD160 7e0dfe4704387c3513b392d8f9c2783019e2c468 SHA1 e6979a4968a1d10aee4459709d2052ab03113f5f SHA256 92752e91beb36659fb3c8e7e60337262919da52f290bf4536262b4fe3375ce92 +MISC ChangeLog 5582 RMD160 d2b6a95ac7bf777cbae81097f06ee7bafa8efc9f SHA1 107ccf30523c1e291ac08925c84a2a430117369e SHA256 44b2afe048f81de84907538fa6fe460e610533831266b98bd32247c68fb60343 +MISC metadata.xml 348 RMD160 22b309bfa0ee5378b0476cc4c7fe8ea3eabe8fbc SHA1 4f8c2e941ce68487614dfab204737ff51f9f8531 SHA256 821a30989eb2cad5bd636c79abffbdb600b31d67cd1b6fb219204d8aedd987bb diff --git a/x11-misc/slim/files/slim-1.3.1-config.diff b/x11-misc/slim/files/slim-1.3.1-config.diff new file mode 100644 index 0000000..bb9a98b --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.1-config.diff @@ -0,0 +1,45 @@ +--- slim.conf.orig 2008-12-26 11:45:17.308256705 -0600 ++++ slim.conf 2008-12-26 11:46:55.314256630 -0600 +@@ -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 + + # 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 /etc/X11/xinit/xinitrc + + # Commands executed when starting and exiting a session. + # They can be used for registering a X11 session with +@@ -41,11 +42,13 @@ + # + # 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 diff --git a/x11-misc/slim/files/slim-1.3.1-gcc4.4.patch b/x11-misc/slim/files/slim-1.3.1-gcc4.4.patch new file mode 100644 index 0000000..5c51d1f --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.1-gcc4.4.patch @@ -0,0 +1,17 @@ +Patch to allow compilation with gcc-4.4 + +Notified by Daniel J. - from Debian bug tracker + +http://bugs.gentoo.org/252745 + +--- switchuser.h 2008-11-11 19:40:18.000000000 +0000 ++++ switchuser.h 2008-11-11 19:40:28.000000000 +0000 +@@ -18,6 +18,7 @@ + #include <pwd.h> + #include <grp.h> + #include <paths.h> ++#include <cstdio> + #include <iostream> + #include "const.h" + #include "cfg.h" + diff --git a/x11-misc/slim/files/slim-1.3.1-vkbd-config.patch b/x11-misc/slim/files/slim-1.3.1-vkbd-config.patch new file mode 100644 index 0000000..babaf41 --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.1-vkbd-config.patch @@ -0,0 +1,20 @@ +--- slim.conf 2009-07-03 21:39:34.000000000 +0200 ++++ slim.conf.new 2009-07-03 21:42:38.000000000 +0200 +@@ -9,6 +9,7 @@ + reboot_cmd /sbin/shutdown -r now + console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login" + #suspend_cmd /usr/sbin/suspend ++#keyboard_cmd /usr/bin/xvkbd -xdm -compact -no-repeat + + # Full path to the xauth binary + xauth_path /usr/bin/xauth +--- cfg.cpp 2008-09-26 02:54:15.000000000 +0200 ++++ cfg.cpp.new 2009-07-03 20:33:28.000000000 +0200 +@@ -42,6 +42,7 @@ + options.insert(option("sessionstop_cmd","")); + options.insert(option("console_cmd","/usr/bin/xterm -C -fg white -bg black +sb -g %dx%d+%d+%d -fn %dx%d -T ""Console login"" -e /bin/sh -c ""/bin/cat /etc/issue; exec /bin/login""")); + options.insert(option("screenshot_cmd","import -window root /slim.png")); ++ options.insert(option("keyboard_cmd","")); + options.insert(option("welcome_msg","Welcome to %host")); + options.insert(option("session_msg","Session:")); + options.insert(option("default_user","")); diff --git a/x11-misc/slim/files/slim-1.3.1-vkbd.patch b/x11-misc/slim/files/slim-1.3.1-vkbd.patch new file mode 100644 index 0000000..a21f007 --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.1-vkbd.patch @@ -0,0 +1,165 @@ +--- app.h 2008-09-26 02:54:15.000000000 +0200 ++++ app.h.new 2009-07-03 21:11:52.000000000 +0200 +@@ -58,6 +58,10 @@ + void UpdatePid(); + + bool AuthenticateUser(bool focuspass); ++ ++ void InitVirtualKeyboard(); ++ void OpenVirtualKeyboard(); ++ void CloseVirtualKeyboard(); + + static std::string findValidRandomTheme(const std::string& set); + static void replaceVariables(std::string& input, +@@ -98,6 +102,11 @@ + // For testing themes + char* testtheme; + bool testing; ++ ++ // Virtual Keyboard stuff ++ pid_t KeyboardPID; ++ char** KeyboardCmd; ++ int KeyboardArgc; + + std::string themeName; + std::string mcookie; +--- app.cpp 2008-09-26 02:54:15.000000000 +0200 ++++ app.cpp.new 2009-07-03 22:00:07.000000000 +0200 +@@ -135,6 +135,8 @@ + #endif + int tmp; + ServerPID = -1; ++ KeyboardPID = -1; ++ KeyboardArgc = -1; + testing = false; + mcookie = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; + daemonmode = false; +@@ -186,6 +188,107 @@ + + } + ++void App::InitVirtualKeyboard() { ++ static const int MAX_KEYBOARD_ARGS = 127; ++ static char* keyboard[MAX_KEYBOARD_ARGS+1] = { NULL }; ++ string command; ++ char *argptr; ++ char *args; ++ ++ cout << "Initialize virtual keyboard..." << endl; ++ ++ /* Disable virtual keyboard */ ++ KeyboardPID = -99; ++ KeyboardCmd = keyboard; ++ ++ /* Get the given command from the config file and check if it is empty. ++ If this is the case the keyboard should stay disabled. */ ++ command = cfg->getOption("keyboard_cmd"); ++ if (command == "") ++ return; ++ ++ args = new char[command.length()+1]; ++ strcpy(args, command.c_str()); ++ /* Make sure we find a \0 */ ++ args[command.length()] = '\0'; ++ ++ /* Parse the given string command into an array of strings */ ++ KeyboardArgc = 0; ++ argptr = args; ++ while (*argptr != '\0') { ++ /* Strip spaces and zero them */ ++ while (*argptr == ' ' || *argptr == '\t') { ++ *argptr = '\0'; ++ argptr++; ++ } ++ ++ /* We are at the end of the string */ ++ if (*argptr == '\0') ++ break; ++ ++ /* Ok we have a new string here, so set the next arg of the array. ++ If too many arguments are specified, remove them all to make ++ sure the keyboard starts. */ ++ keyboard[KeyboardArgc] = argptr; ++ KeyboardArgc++; ++ ++ if (KeyboardArgc >= MAX_KEYBOARD_ARGS) { ++ KeyboardArgc = 1; ++ break; ++ } ++ ++ /* Continue up to the next space */ ++ while (*argptr != ' ' && *argptr != '\t' && *argptr != '\0') { ++ argptr++; ++ } ++ } ++ ++ /* Enable virtual keyboard */ ++ if (KeyboardArgc > 0) { ++ cout << "Enabling virtual keyboard..." << endl; ++ KeyboardPID = -1; ++ } ++} ++ ++void App::OpenVirtualKeyboard() { ++ /* Initialize virtual keyboard command if requested */ ++ if (KeyboardArgc < 0) ++ InitVirtualKeyboard(); ++ ++ if(KeyboardPID == -1) { ++ cout << "Starting virtual keyboard..." << endl; ++ ++ KeyboardPID = fork (); ++ if(KeyboardPID == 0) { ++ /* This is the child process. Execute the shell command. */ ++ execvp(KeyboardCmd[0], KeyboardCmd); ++ cerr << APPNAME << "Executing the virtual keyboard failed!" << endl; ++ _exit (EXIT_FAILURE); ++ } else if (KeyboardPID < 0) { ++ cerr << APPNAME << "Spawning a new process for the virtual keyboard failed!" << endl; ++ } ++ cout << "DEBUG: Virtual keyboard is OK!" << endl; ++ } ++} ++ ++void App::CloseVirtualKeyboard() { ++ int status; ++ ++ if(KeyboardPID != -1) { ++ cout << "Terminating the virtual keyboard..." << endl; ++ status = kill(KeyboardPID, SIGTERM); ++ if(status != 0) { ++ cerr << APPNAME << "Terminating the virtual keyboard failed!" << endl; ++ return; ++ } ++ ++ /* This is the parent process. Wait for the child to complete. */ ++ if (waitpid (KeyboardPID, &status, 0) != KeyboardPID) { ++ cerr << APPNAME << "Waiting for virtual keyboard failed!" << endl; ++ } ++ } ++ KeyboardPID = -1; ++} + + void App::Run() { + DisplayName = DISPLAY; +@@ -349,6 +452,9 @@ + + // Show panel + LoginPanel->OpenPanel(); ++ ++ // Start virtual keyboard ++ OpenVirtualKeyboard(); + } + + LoginPanel->Reset(); +@@ -374,6 +480,10 @@ + if (testing) { + Action = Panel::Exit; + } ++ ++ // Close the virtual keyboard ++ CloseVirtualKeyboard(); ++ + panelclosed = 1; + LoginPanel->ClosePanel(); + diff --git a/x11-misc/slim/files/slim.logrotate b/x11-misc/slim/files/slim.logrotate new file mode 100644 index 0000000..8901530 --- /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 0000000..8f20e7c --- /dev/null +++ b/x11-misc/slim/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>desktop-misc</herd> + <maintainer> + <email>darkside@gentoo.org</email> + </maintainer> + <use> + <flag name="screenshot">Enable screenshot support (using <pkg>media-gfx/imagemagick</pkg>)</flag> + </use> +</pkgmetadata> + diff --git a/x11-misc/slim/slim-1.3.1-r5.ebuild b/x11-misc/slim/slim-1.3.1-r5.ebuild new file mode 100644 index 0000000..5779dde --- /dev/null +++ b/x11-misc/slim/slim-1.3.1-r5.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-misc/slim/slim-1.3.1-r5.ebuild,v 1.2 2009/03/27 14:34:55 mr_bones_ Exp $ + +EAPI="2" + +inherit toolchain-funcs pam eutils + +DESCRIPTION="Simple Login Manager" +HOMEPAGE="http://slim.berlios.de" +SRC_URI="mirror://berlios/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="branding screenshot pam" + +DEPEND="x11-proto/xproto + x11-libs/libXmu + x11-libs/libX11 + x11-libs/libXpm + x11-libs/libXft + media-libs/libpng + media-libs/jpeg + pam? ( virtual/pam )" +RDEPEND="${DEPEND} + x11-apps/sessreg + screenshot? ( media-gfx/imagemagick ) + branding? ( >=x11-themes/slim-themes-1.2.3a-r3 )" + +src_prepare() { + # respect C[XX]FLAGS, fix crosscompile, + # fix linking order for --as-needed" + sed -i -e "s:^CXX=.*:CXX=$(tc-getCXX) ${CXXFLAGS}:" \ + -e "s:^CC=.*:CC=$(tc-getCC) ${CFLAGS}:" \ + -e "s:^MANDIR=.*:MANDIR=/usr/share/man:" \ + -e "s:^\t\(.*\)\ \$(LDFLAGS)\ \(.*\):\t\1\ \2\ \$(LDFLAGS):g" \ + -r -e "s:^LDFLAGS=(.*):LDFLAGS=\1 ${LDFLAGS}:" \ + Makefile || die "sed failed in Makefile" + epatch "${FILESDIR}/${P}-config.diff" + + if use branding; then + sed -i -e 's/ default/ slim-gentoo-simple/' slim.conf || die + fi + + epatch "${FILESDIR}/${P}-gcc4.4.patch" + + # Add a virtual keyboard option + epatch "${FILESDIR}/${P}-vkbd-config.patch" + epatch "${FILESDIR}/${P}-vkbd.patch" +} + +src_compile() { + if use pam ; then + emake USE_PAM=1 || die "emake failed." + else + emake || die "emake failed." + fi +} + +src_install() { + if use pam ; then + emake USE_PAM=1 DESTDIR="${D}" install || die "emake install failed." + pamd_mimic_system slim auth account password session + else + emake DESTDIR="${D}" install || die "emake install failed." + fi + + insinto /etc/logrotate.d + newins "${FILESDIR}/slim.logrotate" slim || die "newins failed" + + dodoc xinitrc.sample ChangeLog README TODO THEMES +} + +pkg_postinst() { + 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\"." + elog "By default, ${PN} will use default XSESSION value set in /etc/rc.conf." + 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 + 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" + elog "desired, then please remerge ${PN} with USE=pam" + fi +} |