x11-wm/mutter: add patch that may fix some potential X11 crashers
[gentoo.git] / x11-wm / sawfish / sawfish-1.12.0-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 MY_P="${P/-/_}"
7 inherit eutils elisp-common
8
9 DESCRIPTION="Extensible window manager using a Lisp-based scripting language"
10 HOMEPAGE="https://sawfish.fandom.com/wiki/Main_Page"
11 SRC_URI="https://download.tuxfamily.org/sawfish/${MY_P}.tar.xz"
12
13 LICENSE="GPL-2 Artistic-2"
14 SLOT="0"
15 KEYWORDS="~alpha amd64 ~ia64 ppc ~ppc64 sparc x86"
16 IUSE="emacs kde nls xinerama"
17
18 RDEPEND="
19         emacs? ( >=app-editors/emacs-23.1:* )
20         >=dev-libs/librep-0.92.1
21         >=x11-libs/rep-gtk-0.90.7
22         x11-libs/gdk-pixbuf:2[X]
23         >=x11-libs/gtk+-2.24.0:2
24         x11-libs/libXtst
25         kde? ( kde-frameworks/kdelibs4support )
26         nls? ( sys-devel/gettext )
27         xinerama? ( x11-libs/libXinerama )
28 "
29 DEPEND="${RDEPEND}
30         virtual/pkgconfig
31 "
32
33 S="${WORKDIR}/${MY_P}"
34
35 PATCHES=(
36         # From Fedora
37         "${FILESDIR}"/${PN}-1.12.0-desktop.patch
38         "${FILESDIR}"/${PN}-1.12.0-fno-common.patch
39 )
40
41 DOCS=( AUTHORS ChangeLog CONTRIBUTING doc/AUTOSTART doc/KEYBINDINGS doc/OPTIONS doc/XSettings MAINTAINERS NEWS README README.IMPORTANT TODO )
42
43 src_configure() {
44         set -- \
45                 $(use_with kde kde5session) \
46                 $(use_with xinerama) \
47                 --with-gdk-pixbuf \
48                 --without-kde4session \
49                 --disable-static
50
51         if ! use nls; then
52                 # Use a space because configure script reads --enable-linguas=""
53                 # as "install everything". Don't use --disable-linguas, because
54                 # that means --enable-linguas="no", which means "install
55                 # Norwegian translations".
56                 set -- "$@" --enable-linguas=" "
57         elif [[ "${LINGUAS+set}" == "set" ]]; then
58                 strip-linguas -i po
59                 set -- "$@" --enable-linguas=" ${LINGUAS} "
60         else
61                 set -- "$@" --enable-linguas=""
62         fi
63
64         econf "$@"
65 }
66
67 src_compile() {
68         default
69         use emacs && elisp-compile sawfish.el
70 }
71
72 src_install() {
73         default
74         find "${D}" -name '*.la' -delete || die
75
76         if use emacs; then
77                 elisp-install ${PN} sawfish.{el,elc}
78                 elisp-site-file-install "${FILESDIR}"/50${PN}-gentoo.el
79         fi
80 }
81
82 pkg_postinst() {
83         use emacs && elisp-site-regen
84 }
85
86 pkg_postrm() {
87         use emacs && elisp-site-regen
88 }