x11-wm/xpra: Replace virtual/ffmpeg
[gentoo.git] / x11-wm / herbstluftwm / herbstluftwm-0.8.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit toolchain-funcs cmake-utils
6
7 if [[ ${PV} == 9999* ]]; then
8         inherit git-r3
9         EGIT_REPO_URI="https://github.com/herbstluftwm/herbstluftwm"
10         BDEPEND="app-text/asciidoc"
11 else
12         SRC_URI="https://herbstluftwm.org/tarballs/${P}.tar.gz"
13         KEYWORDS="~amd64 ~x86"
14         BDEPEND=""
15 fi
16
17 DESCRIPTION="A manual tiling window manager for X"
18 HOMEPAGE="https://herbstluftwm.org/"
19
20 LICENSE="BSD-2"
21 SLOT="0"
22 IUSE="examples xinerama zsh-completion"
23
24 DEPEND="
25         x11-libs/libX11
26         x11-libs/libXext
27         xinerama? ( x11-libs/libXinerama )
28 "
29 RDEPEND="
30         ${DEPEND}
31         app-shells/bash
32         zsh-completion? ( app-shells/zsh )
33 "
34 BDEPEND+="
35         virtual/pkgconfig
36 "
37
38 src_configure() {
39         sed -i \
40                 -e '/^install.*LICENSEDIR/d' \
41                 -e '/set(DOCDIR / s#.*#set(DOCDIR ${CMAKE_INSTALL_DOCDIR})#' \
42                 CMakeLists.txt || die
43
44         mycmakeargs=(
45                 -DWITH_XINERAMA=$(usex xinerama)
46         )
47
48         cmake-utils_src_configure
49 }
50
51 src_install() {
52         cmake-utils_src_install
53
54         if ! use examples; then
55                 rm -r "${ED}"/usr/share/doc/${PF}/examples || die
56         fi
57
58         if ! use zsh-completion; then
59                 rm -r "${ED}"/usr/share/zsh || die
60         fi
61 }