|
| 1 | +# Copyright 1999-2020 Gentoo Authors |
| 2 | +# Distributed under the terms of the GNU General Public License v2 |
| 3 | + |
| 4 | +EAPI=7 |
| 5 | + |
| 6 | +inherit xdg-utils |
| 7 | + |
| 8 | +DESCRIPTION="A session manager for the Xfce desktop environment" |
| 9 | +HOMEPAGE="https://docs.xfce.org/xfce/xfce4-session/start" |
| 10 | +SRC_URI="https://archive.xfce.org/src/xfce/${PN}/${PV%.*}/${P}.tar.bz2" |
| 11 | + |
| 12 | +LICENSE="GPL-2+" |
| 13 | +SLOT="0" |
| 14 | +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris" |
| 15 | +IUSE="elogind nls policykit systemd +xscreensaver" |
| 16 | + |
| 17 | +COMMON_DEPEND="x11-apps/iceauth |
| 18 | + >=dev-libs/glib-2.42 |
| 19 | + >=x11-libs/gtk+-3.22:3 |
| 20 | + x11-libs/libSM |
| 21 | + x11-libs/libwnck:3 |
| 22 | + x11-libs/libX11 |
| 23 | + >=xfce-base/libxfce4util-4.12:= |
| 24 | + >=xfce-base/libxfce4ui-4.12.1:=[gtk3(+)] |
| 25 | + >=xfce-base/xfconf-4.12:= |
| 26 | + policykit? ( >=sys-auth/polkit-0.102 )" |
| 27 | +RDEPEND="${COMMON_DEPEND} |
| 28 | + x11-apps/xrdb |
| 29 | + nls? ( x11-misc/xdg-user-dirs ) |
| 30 | + xscreensaver? ( || ( |
| 31 | + xfce-extra/xfce4-screensaver |
| 32 | + >=x11-misc/xscreensaver-5.26 |
| 33 | + >=x11-misc/xlockmore-5.43 |
| 34 | + x11-misc/slock |
| 35 | + x11-misc/alock[pam] |
| 36 | + ) )" |
| 37 | +DEPEND="${COMMON_DEPEND} |
| 38 | + dev-util/intltool |
| 39 | + sys-devel/gettext |
| 40 | + virtual/pkgconfig" |
| 41 | + |
| 42 | +REQUIRED_USE="elogind? ( policykit ) |
| 43 | + systemd? ( policykit )" |
| 44 | + |
| 45 | +PATCHES=( |
| 46 | + "${FILESDIR}"/${PN}-4.10.1-alock_support_to_xflock4.patch |
| 47 | +# TODO: this patch needs updating for the new version, and finding |
| 48 | +# upstream bug. |
| 49 | +# "${FILESDIR}"/${PN}-4.12.1-light-locker_support_to_xflock4.patch |
| 50 | +) |
| 51 | + |
| 52 | +src_configure() { |
| 53 | + local myconf=( |
| 54 | + $(use_enable policykit polkit) |
| 55 | + --with-xsession-prefix="${EPREFIX}"/usr |
| 56 | + ) |
| 57 | + |
| 58 | + econf "${myconf[@]}" |
| 59 | +} |
| 60 | + |
| 61 | +src_install() { |
| 62 | + default |
| 63 | + find "${ED}" -name '*.la' -delete || die |
| 64 | + |
| 65 | + local sessiondir=/etc/X11/Sessions |
| 66 | + echo startxfce4 > "${T}"/Xfce4 || die |
| 67 | + exeinto ${sessiondir} |
| 68 | + doexe "${T}"/Xfce4 |
| 69 | + dosym Xfce4 ${sessiondir}/Xfce |
| 70 | +} |
| 71 | + |
| 72 | +pkg_postinst() { |
| 73 | + xdg_icon_cache_update |
| 74 | +} |
| 75 | + |
| 76 | +pkg_postrm() { |
| 77 | + xdg_icon_cache_update |
| 78 | +} |
0 commit comments