summaryrefslogtreecommitdiff
path: root/lxde-base/lxdm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /lxde-base/lxdm
reinit the tree, so we can have metadata
Diffstat (limited to 'lxde-base/lxdm')
-rw-r--r--lxde-base/lxdm/Manifest21
-rw-r--r--lxde-base/lxdm/files/Xsession79
-rw-r--r--lxde-base/lxdm/files/lxdm-0.4.1-configure-add-pam.patch45
-rw-r--r--lxde-base/lxdm/files/lxdm-0.4.1-event-check.patch25
-rw-r--r--lxde-base/lxdm/files/lxdm-0.4.1-fix-optional-pam.patch31
-rw-r--r--lxde-base/lxdm/files/lxdm-0.4.1-fix-pam-100-cpu.patch16
-rw-r--r--lxde-base/lxdm/files/lxdm-0.4.1-git-fix-null-pointer-deref.patch51
-rw-r--r--lxde-base/lxdm/files/lxdm-0.4.1-missing-pam-defines.patch29
-rw-r--r--lxde-base/lxdm/files/lxdm-0.4.1-optional-consolekit.patch43
-rw-r--r--lxde-base/lxdm/files/lxdm-0.4.1-pam_console-disable.patch9
-rw-r--r--lxde-base/lxdm/files/lxdm-0.4.1-selinux-support.patch7
-rw-r--r--lxde-base/lxdm/files/lxdm-0.5.3-pam_console-disable.patch8
-rw-r--r--lxde-base/lxdm/files/lxdm-0.5.3-upstream-fixes.patch236
-rw-r--r--lxde-base/lxdm/files/lxdm.service12
-rw-r--r--lxde-base/lxdm/lxdm-0.4.1-r9.ebuild89
-rw-r--r--lxde-base/lxdm/lxdm-0.5.3-r1.ebuild68
-rw-r--r--lxde-base/lxdm/lxdm-0.5.3.ebuild66
-rw-r--r--lxde-base/lxdm/metadata.xml19
18 files changed, 854 insertions, 0 deletions
diff --git a/lxde-base/lxdm/Manifest b/lxde-base/lxdm/Manifest
new file mode 100644
index 000000000000..81a595ae5ad2
--- /dev/null
+++ b/lxde-base/lxdm/Manifest
@@ -0,0 +1,21 @@
+AUX Xsession 1974 SHA256 4f17b37d78e943a0d485892a9b906743602fb5f071a8d972f5d74dccc0c5e142 SHA512 497c420601e171ae3e753f2277119bd39eb0cb4e6968b5294c54ec1673d96553787f4e02c3a0bb1d0270048e721ee96aa4b3df0caed8ae40b12d726c6abf90da WHIRLPOOL 3e906c785bf85c98ffbb8c92c27c8885bd9fcb6fa4863b11476b52df87aa22d8ee07552d303d2cc86ef878bcd953132d102300b71a340ef4e57515b39aa19738
+AUX lxdm-0.4.1-configure-add-pam.patch 1410 SHA256 22d9a569755acd1ffadc23939b6b2d0845f0956efafda31b3a91dbd5580a5815 SHA512 4a5f2f4a282739e74e63d583036e0cc84f3613983d3fac2795827d9065ade3e2cfc353472345be1948444ac4c2f037f5bc97c62a79a9b170e8fd6e0fc23ab6dd WHIRLPOOL d8ac31e16fce57b037cef36f88461ccb1e3669e5cef947aea2ed9ff32604aaee1ec959010e9a0e4099eebc86f34986cb774d2e6ddcc571afdc6b1104825dfb6d
+AUX lxdm-0.4.1-event-check.patch 704 SHA256 f5e2e29c7ea307959c4fb3e34433bb63de3efef5e14be11e4c6dfeedb1cdacb1 SHA512 459dc8106a836f6b6cdb6eb64a4d818a5af17318e800f5d6194a6ec7fcc9ce1bc2957516670dc191d5ae8bb325144997958dc2e7062f59cb38b98abf6ec60cd1 WHIRLPOOL 6208e31029cc29bfd840312f77fdc99a20881a8476dd31a41b8ec8742f1eebbdcb964062f313c5967a1919dff554f871098764b0f3990438a0c74da0c98cb4f6
+AUX lxdm-0.4.1-fix-optional-pam.patch 669 SHA256 0014c8a84e9d4cb16ec5ef29a3e734527caa677e868ef9f9dd21cc2da1721632 SHA512 817b96d59e73daadab1165df90ff6de76c06bb9fbfec57299dca4a590e2d7284e6ede4a5cffeb53d5d12a5eaaa7ad5a0f0d3d04bb35ea005a4be6f81d1b09dbf WHIRLPOOL a9ff132d0002579fea056a85417dcc6e35bc5dd7b4928734fcc5f6bda08d7bf05f634dfd127690d8de2bad91721ebc37f293f0b18d693290de4940bb0fa78245
+AUX lxdm-0.4.1-fix-pam-100-cpu.patch 444 SHA256 cf5aa1cd633c510be44cbb2d9dfa09fe6541c83c77297d000c010d5f0348ffde SHA512 2aef14d7dc9e2f10fda1d22b5837225f61af9a8fb46267ad98eb65149e72c165c6588c4816dc8c20ec90f49a2db5289b519f9b1c0b4b5b9ec430bea73fbac9a6 WHIRLPOOL 6039273a31292cc6903db4a84d89a2dc80fd0d776a9dc6f8dd438cf5d2d574e84b877a397e510267d4d7a690a0ed3520232c9225d8b590fc4b7e98c323d5e543
+AUX lxdm-0.4.1-git-fix-null-pointer-deref.patch 1560 SHA256 a33e3226c463bc445d7d27b11e34de8b09c7c1fdf44be8628d54334fd41b7ea3 SHA512 204124b2558280183e71799c2e006c9efb97b17bc5ef5f9cbf68afd0a4da2568d6e3d7a8d7dc3e12283b8d2febea541793fd72861ca7d692f1595be209d47f62 WHIRLPOOL 9f253d5b674c4a156e9fc99389c62c6271ca674beb109293992ba040520751310d229b270834a172c98275b2a5db6090679c41c663003a970c2bc60ddf631545
+AUX lxdm-0.4.1-missing-pam-defines.patch 583 SHA256 b9aa62fc73ce8f52f354388bcec0a03c228b40ba1a86e2aba1071501ecc1a5d8 SHA512 e7ebb98cae18874152ed5ae528db452428db5f0311cf92eeec93dc9bffaefb101fb587466e9f7c015199cf25c1fbc45ac1c20e3f41d7dd087622ac2e53b812e9 WHIRLPOOL ea2e3b6db573642ea79573e5a473a1ac00d6216fa1a848bb0b10b690a0f39a643fa43ff9f3f58467f6a4ad5083df8ee553f6315ed290e6d76d306ad023889707
+AUX lxdm-0.4.1-optional-consolekit.patch 1467 SHA256 48804e3af27b5ad34b84569e97a9dbfecfc3dcab7de1c460dbd1f48acf744403 SHA512 56d41d8115dbb7d83f1ae54958c3a7982175d59ae06680f092ab005ecd490e06f4209ad296abed3d562f717f23bf45413ef899e79ea2e498b4d4980b50a5f99d WHIRLPOOL a1a3bfd462f8ac74c6a6480cbcd20d3b7b351be798b180713da94c147534cf8d127d63a456f61ae4633ef7de081412e5c849cf727f830c1b0eaf9bfcb2972293
+AUX lxdm-0.4.1-pam_console-disable.patch 344 SHA256 51d1a0f0b5749e451e313df3bd3d08b3f5181f00eb01993973393c1b4dcd8ad2 SHA512 15ebae762ca266da2986c6dc29b866068e7120457da253cc0513fb285c386869f35c074c2cd1cc1ff05045f533e565400cf39ae2f484eafb29fb2faeb2d260e4 WHIRLPOOL 42255d3a834333a0c830b1a8a045e526dd3ef93271a943eea542932cf04533de7e43ba3eea459c0c758e4851f3736b3a50f158c49a5a770fafce6dfefee173f5
+AUX lxdm-0.4.1-selinux-support.patch 281 SHA256 e260022bcf9954d4b404b4a3ea5c1679165e2b7e33a1a327b61fd1ef796cb962 SHA512 8875c92a2159b0390c00a1460c294c8ebdfa8920c38d7edeaf0108813cfc59eb6aebacb28e7d5d8012177809f29962035afe6c4a9ea439f6bcdb630fd31b626c WHIRLPOOL a08ceaaefda33045eb76450c8d22906f8cac95337dccf921bc4c7bb91c83e33e7f3d55814e8738276ff0218bda4234617e0640cd5c5048412fef1f276c9f812a
+AUX lxdm-0.5.3-pam_console-disable.patch 307 SHA256 01ef3104fc97a6510b43f99a5e698d86a80d7114afc73ebc9310945170c6eb6d SHA512 a86c2f706ce0af21e33248cd488eb726033682fdedaa559cce23bb01fda51330d4293927145233c0b6cef3bb547042654ddcb00745d13f1cba2755f53a71a072 WHIRLPOOL 5c9fa3b0f6e891120e64da2138218bd1fb8cf5f0f5ec7c83cc0cc3595273ca33fe3534a4a8c1dda30a17a1903d2f8b9cb50a322f60f6c5759f099032fbdb2c05
+AUX lxdm-0.5.3-upstream-fixes.patch 5836 SHA256 97685f78bd0a0755feeae853b45a6c21aa253dbc270b9514efae4ce824842df8 SHA512 c67186af1f3288633e5a3b8a25167f92999209c99dac4257b330d9046eb0524eb766032dc6e2870a9843afa8ede88defcb1f0e1cff57ece5bc9d5d1121446070 WHIRLPOOL d488a7e49dedb651f3227d4e0fd7aa2b1e7680b0c8bc5c4bb59d501a74fd6a22ca397cd200549d3807b3ffa32d6380fe9c1e80d79ade9085f008a8c12d4d965f
+AUX lxdm.service 277 SHA256 6ffe016e8b03354b0a02e2e5d550a0f5f278fceccecfd8747619bdcf6ba9f800 SHA512 123e48527423d542fc838e3171e9130df7d87f054fc66be87b1a539a6c31b64edbf467cfc07901716845ba5c8250b39ac0a2ac2e7f3e0e563639867815ff0514 WHIRLPOOL f526f986e43c817f610a46d86510580e9f6da97b5504ca7c83c37af83b9382f050fbed2df787a07934f4880b325ce0bc10066134b2912c007f6c92dc41e9dff2
+DIST lxdm-0.4.1.tar.gz 296714 SHA256 9e0d0a5672fcf31a18de8178ce73eab1723d6ae7097dfe41e9fe2c46e180cf08 SHA512 8ed4a955a910def4db66958d1cb24976db178b8763199a024b6c2119894745e3646566c42d01472dffbbcbb7fd21784b01e74dc88038e01caebaa3b6d720ff27 WHIRLPOOL 1bbb55bf955f46aaac54ca3372c09308baa496297e56026456e464217f115d6b26994e8be6b6b228b663bb2e14cf9d5ace6930f75024f6426825dd4fefc5349f
+DIST lxdm-0.5.3.tar.xz 239132 SHA256 4891efee81c72a400cc6703e40aa76f3f3853833d048b72ec805da0f93567f2f SHA512 0e3539c595a71cb850c1756dd075b8d477a4e111a4167714057cac06650e9587f338f797f14122e7b2a2f4ad35b38cd7172b83e996758abeeaf0146d65bbc26f WHIRLPOOL f0b36b1da0ea558fcd04fe2dbf3b6e65afb1d9f19e4d7fdb1ededfc9e3b35c1135cdb24477ce3fce024029484174c3c7009e76a66fd84694220eee1dccf4802c
+EBUILD lxdm-0.4.1-r9.ebuild 2118 SHA256 b9e74582690bad01b6317cd95aa6eadf27ab8f5074a71ce10bebd11bc13b043e SHA512 405de3b534bd45d447ad537a967c776d2ff8d6e2a9e644d36a4949e84ccd9b9a91063d5e3dc468deae282212e89193006ab0fc89549c988b5c0de60153502f6f WHIRLPOOL 97a1cbebd79bb11ff105442d73451dab0adb70c4f0be2146ec2d5de3a312f2a7033459d92324b0305e90f91b0048f579485e5095f5a4534cdda0aae139186e56
+EBUILD lxdm-0.5.3-r1.ebuild 1589 SHA256 aa037f77fb993fc5cb8f1568eef7b23617b216b72471df4ca5c33cbda4df01b6 SHA512 883c14b2d2888a39e68af0e91b3c466adf752aac6179571dcedde655c9d78b145df70544ad67fd221c63739795e74cfe9619794af77eeee5792477d277e1de6f WHIRLPOOL edf42f68a1760c9623e5e183ecdba98247cec12c4d5657cc6706b78d99c9f0e8186ef14266401f3c37f0d893ff52414f5d011bbd514dbe396d690aa6c86fcf44
+EBUILD lxdm-0.5.3.ebuild 1452 SHA256 72d4f88271f4ddd70f6bf057b4d950e59bb6e425f9cef5b3805bd02e530d4d62 SHA512 1f163c3ad52bc6286f1ff51651567eec708f2998b6f7e6a01c96a44dfbcd91d8e123e0f766427b2107317d5c620d855b2c074dc59c45b658983bb016307600d8 WHIRLPOOL ae9f314f421d49c7b2139b86c47a92b7df2c6ef33a5a3d78bd8182cfb2c7db5a12c4ffd1e615fb36a01827fe3784dccb4a4d6aa1dd8235bd6e7910f2452b3667
+MISC ChangeLog 3413 SHA256 005fc76af960e2ca27d17bd5386998d4eefafbc5bbb0ab38501fbcdb6bed2553 SHA512 8b9d4310ad7a6b74615c14bfb2c967691bcbb3b86a07f0848a92df00a11072c15b70c9bae5a864f8f4454c625ea7dc5ac894029f524d074009f7e75de4bc1734 WHIRLPOOL dd69e4b20ab405becb932da58d0cef0744c7e5a3ea427de25b91e2345bceb96de17abb629a414d040ade481478c82635d03dd7f68a68c50e5a255e7f298a860e
+MISC ChangeLog-2015 6629 SHA256 0209c2b7202a400b46e1bfebbf649646118df97de4a6c3df2ade2939d01c7b89 SHA512 5750a90faab82b47f141426b49464eb9f3781538e4eea6f39421f6b2800e76ed7c1cf068b1da71a100df8da9297cf150a3ff5b7edd3169bbe4e87c57b7044968 WHIRLPOOL 9eaf2101a45d23a38a1aef69fe1abdca0b4b886de951d68073abbe2c893b04ee098eef612ae985fbf6b1006c1f4b7ee04da4d96dfdc34f583b13875a7f8968ee
+MISC metadata.xml 581 SHA256 445f767d5cbc606c43fc81855e6cd31011b25f6c1dc4cd439af76973bbfdab71 SHA512 bfb1509cb2c43f2711a38c284a1a4152192b91c5a9f681fe063848cbeb39e8a2185d2bff084d08b0d9583cb2482101e23ce955aa9b81606a2bc270a657d7a2d1 WHIRLPOOL b79a5cdc369f9ced22b58a8ec92be209006c8f0c18f51d1bb9c71113ed3d029e7cdcec58497a05083a09c7173a423a4b2c7c1e4237339ba2094f4dfa6b371b0d
diff --git a/lxde-base/lxdm/files/Xsession b/lxde-base/lxdm/files/Xsession
new file mode 100644
index 000000000000..d5df36fbb66d
--- /dev/null
+++ b/lxde-base/lxdm/files/Xsession
@@ -0,0 +1,79 @@
+#!/bin/sh
+#
+# LXDM wrapper to run around X sessions.
+# Copied form lightdm
+
+echo "Running X session wrapper"
+
+#Convert MATE to lower case util MATE scripts are fixed
+[ "$DESKTOP_SESSION" = "MATE" ] && DESKTOP_SESSION=mate
+export DESKTOP_SESSION
+
+# Load profile
+for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
+ if [ -f "$file" ]; then
+ echo "Loading profile from $file";
+ . "$file"
+ fi
+done
+
+# Load resources
+for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do
+ if [ -f "$file" ]; then
+ echo "Loading resource: $file"
+ xrdb -nocpp -merge "$file"
+ fi
+done
+
+# Load keymaps
+for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do
+ if [ -f "$file" ]; then
+ echo "Loading keymap: $file"
+ setxkbmap `cat "$file"`
+ XKB_IN_USE=yes
+ fi
+done
+
+# Load xmodmap if not using XKB
+if [ -z "$XKB_IN_USE" ]; then
+ for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do
+ if [ -f "$file" ]; then
+ echo "Loading modmap: $file"
+ xmodmap "$file"
+ fi
+ done
+fi
+
+unset XKB_IN_USE
+
+# /etc/X11/xinit/xinitrc.d/80-dbus expects $command to be
+# set to the Xsession arguments. So make it happy. See
+# https://bugs.gentoo.org/show_bug.cgi?id=533456
+command="$@"
+
+# Run all system xinitrc shell scripts.
+xinitdir="/etc/X11/xinit/xinitrc.d"
+if [ -d "$xinitdir" ]; then
+ for script in $xinitdir/*; do
+ echo "Loading xinit script $script"
+ if [ -x "$script" -a ! -d "$script" ]; then
+ . "$script"
+ fi
+ done
+fi
+
+# Load Xsession scripts
+xsessionddir="/etc/X11/Xsession.d"
+if [ -d "$xsessionddir" ]; then
+ for i in `ls $xsessionddir`; do
+ script="$xsessionddir/$i"
+ echo "Loading X session script $script"
+ if [ -r "$script" -a -f "$script" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then
+ . "$script"
+ fi
+ done
+fi
+
+echo "X session wrapper complete, running session $@"
+
+exec $command
diff --git a/lxde-base/lxdm/files/lxdm-0.4.1-configure-add-pam.patch b/lxde-base/lxdm/files/lxdm-0.4.1-configure-add-pam.patch
new file mode 100644
index 000000000000..d91bf75a67bd
--- /dev/null
+++ b/lxde-base/lxdm/files/lxdm-0.4.1-configure-add-pam.patch
@@ -0,0 +1,45 @@
+From 949ee91acb55baeb4b8761957eabd2e5a345d2ae Mon Sep 17 00:00:00 2001
+From: Mitch Harder <mitch.harder@sabayonlinux.org>
+Date: Thu, 8 Dec 2011 11:02:28 -0600
+Subject: Fix configure.ac test for pam libs.
+
+A bug report on Gentoo noted that the configure test for pam
+wasn't working correctly.
+https://bugs.gentoo.org/show_bug.cgi?id=384615
+
+This corrections borrows the configure.ac pam testing method used in xdm.
+---
+ configure.ac | 13 +++++++++++--
+ 1 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index e952473..eaa883a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -14,12 +14,21 @@ AC_PROG_INSTALL
+ AM_PROG_CC_C_O
+
+ # Checks for libraries.
+ AC_CHECK_LIB([crypt], [crypt])
+
+-AC_ARG_WITH(pam,AC_HELP_STRING([--without-pam],[build without pam]),
+-[],[AC_CHECK_LIB([pam], [pam_open_session])])
++# Check for PAM support
++AC_ARG_WITH(pam, AC_HELP_STRING([--with-pam],[Use PAM for authentication]),
++ [USE_PAM=$withval], [USE_PAM=$use_pam_default])
++if test "x$USE_PAM" != "xno" ; then
++ AC_SEARCH_LIBS(pam_open_session,[pam])
++ AC_CHECK_FUNC(pam_open_session,
++ [AC_DEFINE(USE_PAM,1,[Use PAM for authentication])],
++ [if test "x$USE_PAM" != "xtry" ; then
++ AC_MSG_ERROR(["PAM support requested, but pam_open_session not found."])
++ fi])
++fi
+
+ AC_CHECK_LIB([ck-connector],[ck_connector_open_session])
+
+ # Checks for header files.
+ AC_PATH_X
+--
+1.7.3.4
+
diff --git a/lxde-base/lxdm/files/lxdm-0.4.1-event-check.patch b/lxde-base/lxdm/files/lxdm-0.4.1-event-check.patch
new file mode 100644
index 000000000000..4c2d5b35235f
--- /dev/null
+++ b/lxde-base/lxdm/files/lxdm-0.4.1-event-check.patch
@@ -0,0 +1,25 @@
+From d4e41ecb36a1ea29482b75674d804bb0f05540b2 Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa@gmail.com>
+Date: Sun, 25 Dec 2011 15:23:19 +0800
+Subject: [PATCH 1/1] fix event check bug caused cpu 100%
+
+---
+ src/lxcom.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/lxcom.c b/src/lxcom.c
+index 02763eb..18ee12e 100644
+--- a/src/lxcom.c
++++ b/src/lxcom.c
+@@ -89,7 +89,7 @@ static gboolean lxcom_prepare (GSource *source,gint *timeout)
+
+ static gboolean lxcom_check(GSource *source)
+ {
+- return TRUE;
++ return (((LXComSource*)source)->poll.revents&G_IO_IN)?TRUE:FALSE;
+ }
+
+ static gboolean lxcom_dispatch (GSource *source,GSourceFunc callback,gpointer user_data)
+--
+1.7.4.1
+
diff --git a/lxde-base/lxdm/files/lxdm-0.4.1-fix-optional-pam.patch b/lxde-base/lxdm/files/lxdm-0.4.1-fix-optional-pam.patch
new file mode 100644
index 000000000000..0aecc08593dc
--- /dev/null
+++ b/lxde-base/lxdm/files/lxdm-0.4.1-fix-optional-pam.patch
@@ -0,0 +1,31 @@
+diff --git a/Makefile.am b/Makefile.am
+index bfac56b..40710fc 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2,10 +2,13 @@ NULL =
+ SUBDIRS= \
+ src \
+ po \
+- pam \
+ data \
+ $(NULL)
+
++if HAVE_PAM
++SUBDIRS += pam
++endif
++
+ rpm: dist @PACKAGE_NAME@.spec
+ rpmbuild -bb \
+ --define "_sourcedir `pwd`" \
+diff --git a/configure.ac b/configure.ac
+index ae5177f..aaa1bad 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,6 +27,7 @@ if test "x$USE_PAM" != "xno" ; then
+ AC_MSG_ERROR(["PAM support requested, but pam_open_session not found."])
+ fi])
+ fi
++AM_CONDITIONAL(HAVE_PAM, [test -n "$USE_PAM" -a "x$USE_PAM" != xno ])
+
+ # Checks for header files.
+ AC_PATH_X
diff --git a/lxde-base/lxdm/files/lxdm-0.4.1-fix-pam-100-cpu.patch b/lxde-base/lxdm/files/lxdm-0.4.1-fix-pam-100-cpu.patch
new file mode 100644
index 000000000000..103268efec40
--- /dev/null
+++ b/lxde-base/lxdm/files/lxdm-0.4.1-fix-pam-100-cpu.patch
@@ -0,0 +1,16 @@
+--- lxdm-0.4.1.orig/src/lxdm.c
++++ lxdm-0.4.1/src/lxdm.c
+@@ -1458,8 +1458,12 @@ void lxdm_do_login(struct passwd *pw, ch
+ setenv("XDG_SESSION_COOKIE", ck_connector_get_cookie(s->ckc), 1);
+ }
+ #endif
++ int i;
++ for(i=2;i<256;i++)
++ g_source_remove(i);
++
+ char** env, *path;
+- int n_env,i;
++ int n_env;
+ n_env = g_strv_length(environ);
+ /* copy all environment variables and override some of them */
+ env = g_new(char*, n_env + 1 + 13);
diff --git a/lxde-base/lxdm/files/lxdm-0.4.1-git-fix-null-pointer-deref.patch b/lxde-base/lxdm/files/lxdm-0.4.1-git-fix-null-pointer-deref.patch
new file mode 100644
index 000000000000..7abdbd470523
--- /dev/null
+++ b/lxde-base/lxdm/files/lxdm-0.4.1-git-fix-null-pointer-deref.patch
@@ -0,0 +1,51 @@
+From 19f82a206b2cec964cea0475395d63dedf183788 Mon Sep 17 00:00:00 2001
+From: Andrea Florio <andrea@opensuse.org>
+Date: Fri, 29 Jul 2011 23:59:32 +0200
+Subject: [PATCH] fix null pointer dereference
+
+---
+ src/config.c | 25 ++++++++++---------------
+ 1 files changed, 10 insertions(+), 15 deletions(-)
+
+diff --git a/src/config.c b/src/config.c
+index 3f92f7b..4603ab4 100644
+--- a/src/config.c
++++ b/src/config.c
+@@ -125,24 +125,19 @@ static gboolean image_file_valid(const char *filename)
+ static void update_face_image(GtkWidget *w)
+ {
+ GdkPixbuf *pixbuf;
+- char *path;
+- path=g_build_filename(user->pw_dir,".face",NULL);
+- if(access(path,R_OK))
+- {
+- g_free(path);
+- if(ui_nobody)
+- pixbuf=gdk_pixbuf_new_from_file_at_scale(ui_nobody,48,48,FALSE,NULL);
+- if(!pixbuf)
+- pixbuf=gtk_icon_theme_load_icon(gtk_icon_theme_get_default(),
++ char *path=g_build_filename(user->pw_dir,".face",NULL);
++ pixbuf=gdk_pixbuf_new_from_file_at_scale(path,48,48,FALSE,NULL);
++ g_free(path);
++ if(!pixbuf && ui_nobody)
++ pixbuf=gdk_pixbuf_new_from_file_at_scale(ui_nobody,48,48,FALSE,NULL);
++ if(!pixbuf)
++ pixbuf=gtk_icon_theme_load_icon(gtk_icon_theme_get_default(),
+ "avatar-default", 48,GTK_ICON_LOOKUP_FORCE_SIZE,NULL);
+- }
+- else
++ if(pixbuf)
+ {
+- pixbuf=gdk_pixbuf_new_from_file_at_scale(path,48,48,FALSE,NULL);
+- g_free(path);
++ gtk_image_set_from_pixbuf(GTK_IMAGE(w),pixbuf);
++ g_object_unref(pixbuf);
+ }
+- gtk_image_set_from_pixbuf(GTK_IMAGE(w),pixbuf);
+- g_object_unref(pixbuf);
+ }
+
+ static void set_face_file(const char *filename)
+--
+1.7.0.1
+
diff --git a/lxde-base/lxdm/files/lxdm-0.4.1-missing-pam-defines.patch b/lxde-base/lxdm/files/lxdm-0.4.1-missing-pam-defines.patch
new file mode 100644
index 000000000000..a59273ccf40d
--- /dev/null
+++ b/lxde-base/lxdm/files/lxdm-0.4.1-missing-pam-defines.patch
@@ -0,0 +1,29 @@
+From 0f9e8e53a8d30f5c8ccfb03edc282148f58bfd30 Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa@gmail.com>
+Date: Sun, 1 Jan 2012 17:05:22 +0800
+Subject: [PATCH] fix bug introduced from pam detect
+
+---
+ src/lxdm.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/src/lxdm.c b/src/lxdm.c
+index b5a90be..07be1e0 100644
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -25,8 +25,12 @@
+ #include <config.h>
+ #endif
+ #ifndef HAVE_LIBPAM
++#ifdef USE_PAM
++#define HAVE_LIBPAM 1
++#else
+ #define HAVE_LIBPAM 0
+ #endif
++#endif
+
+ #include <stdio.h>
+ #include <stdlib.h>
+--
+1.7.4.1
+
diff --git a/lxde-base/lxdm/files/lxdm-0.4.1-optional-consolekit.patch b/lxde-base/lxdm/files/lxdm-0.4.1-optional-consolekit.patch
new file mode 100644
index 000000000000..621a9d62e45b
--- /dev/null
+++ b/lxde-base/lxdm/files/lxdm-0.4.1-optional-consolekit.patch
@@ -0,0 +1,43 @@
+X-Gentoo-Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=443666
+X-Git-Url: http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=patch;h=902438eb83b4ae97d774e4e5f38b46f2d826df2f
+X-Git-Url: http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=patch;h=371b018474217bdff1d5108b384fbf0f45aa873d
+
+Signed-off-by: Markos Chandras <hwoarang@gentoo.org>
+
+Index: lxdm-0.4.1/configure.ac
+===================================================================
+--- lxdm-0.4.1.orig/configure.ac
++++ lxdm-0.4.1/configure.ac
+@@ -28,8 +28,6 @@ if test "x$USE_PAM" != "xno" ; then
+ fi])
+ fi
+
+-AC_CHECK_LIB([ck-connector],[ck_connector_open_session])
+-
+ # Checks for header files.
+ AC_PATH_X
+ AC_CHECK_HEADERS([shadow.h stdlib.h string.h unistd.h utmpx.h])
+@@ -89,11 +87,22 @@ PKG_CHECK_MODULES(GTK, [$pkg_modules])
+ AC_SUBST(GTK_CFLAGS)
+ AC_SUBST(GTK_LIBS)
+
+-PKG_CHECK_MODULES(CONSOLEKIT, "ck-connector",[
++
++AC_ARG_ENABLE(consolekit,
++ AC_HELP_STRING([--disable-consolekit],[disable ConsoleKit support]),
++ [enable_consolekit=$enableval],
++ [enable_consolekit=yes]
++)
++
++if test "x$enable_consolekit" = "xyes" ; then
++ AC_CHECK_LIB([ck-connector],[ck_connector_open_session])
++ PKG_CHECK_MODULES(CONSOLEKIT, "ck-connector",[
+ AC_SUBST(CONSOLEKIT_CFLAGS)
+ AC_SUBST(CONSOLEKIT_LIBS)],[
+ echo "ConsoleKit devel package not found"
+ ])
++fi
++
+
+ AC_ARG_ENABLE(password,
+ AC_HELP_STRING([--enable-password],[enable to load autologin password store at config file]),
diff --git a/lxde-base/lxdm/files/lxdm-0.4.1-pam_console-disable.patch b/lxde-base/lxdm/files/lxdm-0.4.1-pam_console-disable.patch
new file mode 100644
index 000000000000..628e9a511102
--- /dev/null
+++ b/lxde-base/lxdm/files/lxdm-0.4.1-pam_console-disable.patch
@@ -0,0 +1,9 @@
+--- lxdm-0.4.0.orig/pam/lxdm
++++ lxdm-0.4.0/pam/lxdm
+@@ -5,5 +5,5 @@ account include system-auth
+ session optional pam_keyinit.so force revoke
+ session include system-auth
+ session required pam_loginuid.so
+-session optional pam_console.so
++#session optional pam_console.so
+ session optional pam_gnome_keyring.so auto_start
diff --git a/lxde-base/lxdm/files/lxdm-0.4.1-selinux-support.patch b/lxde-base/lxdm/files/lxdm-0.4.1-selinux-support.patch
new file mode 100644
index 000000000000..c7df391b1040
--- /dev/null
+++ b/lxde-base/lxdm/files/lxdm-0.4.1-selinux-support.patch
@@ -0,0 +1,7 @@
+--- a/pam/lxdm 2011-12-05 17:30:39.749064359 -0600
++++ b/pam/lxdm 2011-12-05 17:31:19.355569211 -0600
+@@ -7,3 +7,4 @@
+ session required pam_loginuid.so
+ #session optional pam_console.so
+ session optional pam_gnome_keyring.so auto_start
++session optional pam_selinux.so
diff --git a/lxde-base/lxdm/files/lxdm-0.5.3-pam_console-disable.patch b/lxde-base/lxdm/files/lxdm-0.5.3-pam_console-disable.patch
new file mode 100644
index 000000000000..8fb8cb4d3882
--- /dev/null
+++ b/lxde-base/lxdm/files/lxdm-0.5.3-pam_console-disable.patch
@@ -0,0 +1,8 @@
+--- lxdm-0.4.0.orig/pam/lxdm
++++ lxdm-0.4.0/pam/lxdm
+@@ -5,4 +5,4 @@ account include system-auth
+ session optional pam_keyinit.so force revoke
+ session include system-auth
+-session optional pam_console.so
++#session optional pam_console.so
+ session optional pam_gnome_keyring.so auto_start
diff --git a/lxde-base/lxdm/files/lxdm-0.5.3-upstream-fixes.patch b/lxde-base/lxdm/files/lxdm-0.5.3-upstream-fixes.patch
new file mode 100644
index 000000000000..0360ebff8d06
--- /dev/null
+++ b/lxde-base/lxdm/files/lxdm-0.5.3-upstream-fixes.patch
@@ -0,0 +1,236 @@
+From c6836939c6fd603f86f469bb7c6502b28b1ca583 Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa@gmail.com>
+Date: Sun, 3 Jan 2016 11:53:13 +0800
+Subject: [PATCH 01/07] create user specific directory under /var/run
+
+---
+ src/lxdm.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/src/lxdm.c b/src/lxdm.c
+index a37f051..d81b587 100644
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -750,7 +750,13 @@ static char ** create_client_auth(struct passwd *pw,char **env)
+ if(xauth_write_file(authfile,s->display,s->mcookie)==-1)
+ {
+ g_free(authfile);
+- authfile = g_strdup_printf("/var/run/lxdm/.Xauth%d",pw->pw_uid);
++
++ gchar *authdir = g_strdup_printf("/var/run/lxdm/%d", pw->pw_uid);
++ g_mkdir_with_parents(authdir, S_IRWXU);
++ chown(authdir, pw->pw_uid, pw->pw_gid);
++
++ authfile = g_strdup_printf("%s/.Xauthority", authdir);
++ g_free(authdir);
+ remove(authfile);
+ xauth_write_file(authfile,s->display,s->mcookie);
+ }
+--
+2.1.4
+
+
+From 7258b57fd305182c6c031eb8c1ded96c5a06f6da Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa@gmail.com>
+Date: Sat, 20 Feb 2016 22:36:59 +0800
+Subject: [PATCH 02/07] fix build before gtk 2.22
+
+---
+ src/greeter-gdk.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/greeter-gdk.c b/src/greeter-gdk.c
+index 1abbefa..ad3267a 100644
+--- a/src/greeter-gdk.c
++++ b/src/greeter-gdk.c
+@@ -22,6 +22,7 @@
+
+ #define XLIB_ILLEGAL_ACCESS
+
++#include <gtk/gtk.h>
+ #include <gdk/gdk.h>
+ #include <gdk/gdkx.h>
+ #include <gdk/gdkkeysyms.h>
+@@ -88,12 +89,14 @@ static void on_ui_expose(void)
+ }
+
+ cr=gdk_cairo_create(win);
++#if GTK_CHECK_VERSION(3,0,0)
+ cairo_pattern_t *pattern=gdk_window_get_background_pattern(win);
+ if(pattern)
+ {
+ cairo_set_source(cr,pattern);
+ cairo_paint(cr);
+ }
++#endif
+
+ gdk_cairo_set_source_color(cr, &bg);
+ cairo_rectangle(cr, rc.x, rc.y, rc.width, rc.height);
+--
+2.1.4
+
+
+From 5d36a53702f1e60bb316946f1edccb2dbc3c01bd Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa@gmail.com>
+Date: Sun, 21 Feb 2016 10:45:58 +0800
+Subject: [PATCH 03/07] fix with user_list only: problem when password check
+ fail
+
+---
+ src/greeter.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/greeter.c b/src/greeter.c
+index 10b7f3f..03503b6 100644
+--- a/src/greeter.c
++++ b/src/greeter.c
+@@ -146,7 +146,7 @@ static void switch_to_input_user(void)
+ if(user_list_scrolled)
+ gtk_widget_show(user_list_scrolled);
+ else
+- gtk_widget_hide(user_list);
++ gtk_widget_show(user_list);
+ gtk_widget_grab_focus(user_list);
+ }
+ else
+--
+2.1.4
+
+
+From fe121ce70ad5e99bd3b3b896dfcbe439dd22716c Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa@gmail.com>
+Date: Sun, 21 Feb 2016 11:45:35 +0800
+Subject: [PATCH 04/07] fix not honor ctl+alt+backspacer for restarting
+
+---
+ src/lxdm.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/lxdm.c b/src/lxdm.c
+index d81b587..e00d219 100644
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -962,6 +962,11 @@ static void on_xserver_stop(void *data,int pid, int status)
+ s->dpy=NULL;
+ ui_drop();
+ lxdm_startx(s);
++ #ifndef DISABLE_XAUTH
++ char temp[256];
++ sprintf(temp,"/var/run/lxdm/lxdm-:%d.auth",s->display);
++ setenv("XAUTHORITY",temp,1);
++ #endif
+ ui_prepare();
+ lxsession_set_active(s);
+ }
+--
+2.1.4
+
+
+From 72812894cfd9454d70e4b0753531e46580416771 Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa@gmail.com>
+Date: Mon, 21 Mar 2016 19:25:25 +0800
+Subject: [PATCH 05/07] fix css under gtk 3.20
+
+---
+ data/themes/Industrial/gtk.css | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/data/themes/Industrial/gtk.css b/data/themes/Industrial/gtk.css
+index 179f0d6..f8e6432 100644
+--- a/data/themes/Industrial/gtk.css
++++ b/data/themes/Industrial/gtk.css
+@@ -17,6 +17,7 @@
+ color: #000000;
+ }
+
++#bottom_pane label,
+ #bottom_pane GtkLabel {
+ font: Sans 12;
+ color: #9E9D9B;
+--
+2.1.4
+
+
+From 855c090f1330aedc97b9a486dcd0d0b4c7ff4f4e Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa@gmail.com>
+Date: Sun, 16 Oct 2016 12:49:40 +0800
+Subject: [PATCH 06/07] Compile with the musl c library (no execinfo.h)
+
+---
+ configure.ac | 2 +-
+ src/lxdm.c | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 52f2ac9..a9fca61 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -32,7 +32,7 @@ AM_CONDITIONAL(HAVE_PAM, [test -n "$USE_PAM" -a "x$USE_PAM" != xno ])
+
+ # Checks for header files.
+ AC_PATH_X
+-AC_CHECK_HEADERS([shadow.h stdlib.h string.h unistd.h utmpx.h])
++AC_CHECK_HEADERS([execinfo.h shadow.h stdlib.h string.h unistd.h utmpx.h])
+
+ # Checks for typedefs, structures, and compiler characteristics.
+ AC_TYPE_PID_T
+diff --git a/src/lxdm.c b/src/lxdm.c
+index e00d219..53d2176 100644
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -49,7 +49,9 @@
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
+
++#ifdef HAVE_EXECINFO_H
+ #include <execinfo.h>
++#endif
+
+ #ifdef HAVE_UTMPX_H
+ #include <utmpx.h>
+@@ -1552,6 +1554,7 @@ int lxdm_do_auto_login(void)
+
+ static void log_sigsegv(void)
+ {
++#ifdef HAVE_EXECINFO_H
+ void *array[40];
+ size_t size;
+ char **bt_strs;
+@@ -1564,6 +1567,7 @@ static void log_sigsegv(void)
+ fprintf(stderr, "%s\n", bt_strs[i]);
+
+ free(bt_strs);
++#endif
+ }
+
+ static void sigsegv_handler(int sig)
+--
+2.1.4
+
+
+From a548c73e35d62ec334df5cd3a491ee409d0067bd Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa@gmail.com>
+Date: Fri, 11 Nov 2016 20:24:30 +0800
+Subject: [PATCH 07/07] fix tcp_listen=1 does not work for mordern X.org
+
+---
+ src/lxdm.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/lxdm.c b/src/lxdm.c
+index 53d2176..722936f 100644
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -490,6 +490,9 @@ static char *lxsession_xserver_command(LXSession *s)
+ {
+ arg[arc++] = g_strdup("-nolisten");
+ arg[arc++] = g_strdup("tcp");
++ } else {
++ arg[arc++] = g_strdup("-listen");
++ arg[arc++] = g_strdup("tcp");
+ }
+ if(!novtswitch)
+ {
+--
+2.1.4
+
diff --git a/lxde-base/lxdm/files/lxdm.service b/lxde-base/lxdm/files/lxdm.service
new file mode 100644
index 000000000000..bf4a0a800f26
--- /dev/null
+++ b/lxde-base/lxdm/files/lxdm.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=LXDE Display Manager
+Conflicts=getty@tty1.service plymouth-quit.service
+After=systemd-user-sessions.service getty@tty1.service plymouth-quit.service
+
+[Service]
+ExecStart=/usr/sbin/lxdm
+Restart=always
+IgnoreSIGPIPE=no
+
+[Install]
+Alias=display-manager.service
diff --git a/lxde-base/lxdm/lxdm-0.4.1-r9.ebuild b/lxde-base/lxdm/lxdm-0.4.1-r9.ebuild
new file mode 100644
index 000000000000..697ea8874540
--- /dev/null
+++ b/lxde-base/lxdm/lxdm-0.4.1-r9.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+WANT_AUTOMAKE="1.12" #493996
+inherit eutils autotools systemd
+
+DESCRIPTION="LXDE Display Manager"
+HOMEPAGE="http://lxde.org"
+SRC_URI="mirror://sourceforge/lxde/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc x86"
+
+IUSE="consolekit debug gtk3 nls pam"
+
+RDEPEND="consolekit? ( sys-auth/consolekit )
+ x11-libs/libxcb
+ gtk3? ( x11-libs/gtk+:3 )
+ !gtk3? ( x11-libs/gtk+:2 )
+ nls? ( sys-devel/gettext )
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig"
+
+src_prepare() {
+ # Upstream bug, tarball contains pre-made lxdm.conf
+ rm "${S}"/data/lxdm.conf || die
+
+ # There is consolekit
+ epatch "${FILESDIR}/${P}-pam_console-disable.patch"
+ # Fix null pointer dereference, backported from git
+ epatch "${FILESDIR}/${P}-git-fix-null-pointer-deref.patch"
+
+ epatch "${FILESDIR}"/${P}-configure-add-pam.patch
+
+ # 403999
+ epatch "${FILESDIR}"/${P}-missing-pam-defines.patch
+
+ # 412025
+ epatch "${FILESDIR}"/${P}-event-check.patch
+
+ # 393329 Selinux support
+ epatch "${FILESDIR}"/${P}-selinux-support.patch
+
+ # See https://bugs.launchpad.net/ubuntu/+source/lxdm/+bug/922363
+ epatch "${FILESDIR}/${P}-fix-pam-100-cpu.patch"
+
+ # Optional Consolekit support. bug #443666
+ epatch "${FILESDIR}"/${P}-optional-consolekit.patch
+
+ # 469512
+ epatch "${FILESDIR}"/${P}-fix-optional-pam.patch
+
+ # this replaces the bootstrap/autogen script in most packages
+ eautoreconf
+
+ # process LINGUAS
+ if use nls; then
+ einfo "Running intltoolize ..."
+ intltoolize --force --copy --automake || die
+ strip-linguas -i "${S}/po" || die
+ fi
+}
+src_configure() {
+ econf --enable-password \
+ --with-x \
+ --with-xconn=xcb \
+ $(use_enable consolekit) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(use_enable debug) \
+ $(use_with pam)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS README TODO || die
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
+
+pkg_postinst() {
+ echo
+ elog "Take into consideration that LXDM is in the early stages of development!"
+ echo
+}
diff --git a/lxde-base/lxdm/lxdm-0.5.3-r1.ebuild b/lxde-base/lxdm/lxdm-0.5.3-r1.ebuild
new file mode 100644
index 000000000000..720d8e8b2971
--- /dev/null
+++ b/lxde-base/lxdm/lxdm-0.5.3-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# Using strip-linguas in eutils
+inherit eutils autotools systemd
+
+DESCRIPTION="LXDE Display Manager"
+HOMEPAGE="http://lxde.org"
+SRC_URI="mirror://sourceforge/lxde/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+
+IUSE="consolekit debug gtk3 nls pam"
+
+RDEPEND="consolekit? ( sys-auth/consolekit )
+ x11-libs/libxcb
+ gtk3? ( x11-libs/gtk+:3 )
+ !gtk3? ( x11-libs/gtk+:2 )
+ nls? ( sys-devel/gettext )
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig"
+DOCS=( AUTHORS README TODO )
+
+src_prepare() {
+ # Upstream bug, tarball contains pre-made lxdm.conf
+ rm "${S}"/data/lxdm.conf || die
+
+ # Fix consolekit and selinux
+ eapply "${FILESDIR}/${P}-pam_console-disable.patch"
+ # Apply all upstream fixes in git until 2016-11-11
+ eapply "${FILESDIR}/lxdm-0.5.3-upstream-fixes.patch"
+ eapply_user
+
+ # this replaces the bootstrap/autogen script in most packages
+ eautoreconf
+
+ # process LINGUAS
+ if use nls; then
+ einfo "Running intltoolize ..."
+ intltoolize --force --copy --automake || die
+ strip-linguas -i "${S}/po" || die
+ fi
+}
+src_configure() {
+ econf --enable-password \
+ --with-x \
+ --with-xconn=xcb \
+ --with-systemdsystemunitdir=$(systemd_get_systemunitdir) \
+ $(use_enable consolekit) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(use_enable debug) \
+ $(use_with pam)
+}
+
+src_install() {
+ default_src_install
+
+ #Use Gentoo specific Xsession startup file
+ exeinto /etc/${PN}
+ doexe "${FILESDIR}"/Xsession
+}
diff --git a/lxde-base/lxdm/lxdm-0.5.3.ebuild b/lxde-base/lxdm/lxdm-0.5.3.ebuild
new file mode 100644
index 000000000000..74b333233f5f
--- /dev/null
+++ b/lxde-base/lxdm/lxdm-0.5.3.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils autotools systemd
+
+DESCRIPTION="LXDE Display Manager"
+HOMEPAGE="http://lxde.org"
+SRC_URI="mirror://sourceforge/lxde/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+
+IUSE="consolekit debug gtk3 nls pam"
+
+RDEPEND="consolekit? ( sys-auth/consolekit )
+ x11-libs/libxcb
+ gtk3? ( x11-libs/gtk+:3 )
+ !gtk3? ( x11-libs/gtk+:2 )
+ nls? ( sys-devel/gettext )
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig"
+DOCS=( AUTHORS README TODO )
+
+src_prepare() {
+ # Upstream bug, tarball contains pre-made lxdm.conf
+ rm "${S}"/data/lxdm.conf || die
+
+ # Fix consolekit and selinux
+ eapply "${FILESDIR}/${P}-pam_console-disable.patch"
+
+ eapply_user
+
+ # this replaces the bootstrap/autogen script in most packages
+ eautoreconf
+
+ # process LINGUAS
+ if use nls; then
+ einfo "Running intltoolize ..."
+ intltoolize --force --copy --automake || die
+ strip-linguas -i "${S}/po" || die
+ fi
+}
+src_configure() {
+ econf --enable-password \
+ --with-x \
+ --with-xconn=xcb \
+ --with-systemdsystemunitdir=$(systemd_get_systemunitdir) \
+ $(use_enable consolekit) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(use_enable debug) \
+ $(use_with pam)
+}
+
+src_install() {
+ default_src_install
+
+ #Use Gentoo specific Xsession startup file
+ exeinto /etc/${PN}
+ doexe "${FILESDIR}"/Xsession
+}
diff --git a/lxde-base/lxdm/metadata.xml b/lxde-base/lxdm/metadata.xml
new file mode 100644
index 000000000000..f6cd3ce3e625
--- /dev/null
+++ b/lxde-base/lxdm/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>lxde@gentoo.org</email>
+ <name>Gentoo LXDE Project</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>grknight@gentoo.org</email>
+ <name>Brian Evans</name>
+ </maintainer>
+ <use>
+ <flag name="consolekit">Enables support for authorization using consolekit</flag>
+ <flag name="gtk3">Use GTK+3 instead of 2</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">lxde</remote-id>
+ </upstream>
+</pkgmetadata>