Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-wm/herbstluftwm/
Date: Mon, 26 Sep 2022 16:44:47
Message-Id: 1664210424.f0a4706bb5f4b1c0c6ecf131a61d75f3ebaa865d.flow@gentoo
1 commit: f0a4706bb5f4b1c0c6ecf131a61d75f3ebaa865d
2 Author: Florian Schmaus <flow <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 26 16:38:27 2022 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 26 16:40:24 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0a4706b
7
8 x11-wm/herbstluftwm: add 0.9.5
9
10 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
11
12 x11-wm/herbstluftwm/Manifest | 1 +
13 x11-wm/herbstluftwm/herbstluftwm-0.9.5.ebuild | 141 ++++++++++++++++++++++++++
14 2 files changed, 142 insertions(+)
15
16 diff --git a/x11-wm/herbstluftwm/Manifest b/x11-wm/herbstluftwm/Manifest
17 index 2462e486361d..0db1ba96e2d5 100644
18 --- a/x11-wm/herbstluftwm/Manifest
19 +++ b/x11-wm/herbstluftwm/Manifest
20 @@ -1 +1,2 @@
21 DIST herbstluftwm-0.9.4.tar.gz 549029 BLAKE2B 23f1dbf212c4d0a64f2e2d8442ac7c2465a54a13af74de6c949c4d6eda85fd4e66b73188c526d0968372eb45691ffca43e387c8410691fd134f662e1e8c501b3 SHA512 068438d14b0addcd17a0c0bda1d33ec4aaff08a3c85698a49e9d3dd0c07f91e315f936d73c11b0c159b8735373ea1efe8a572a0976fc327f4aaa6a0f08436e9d
22 +DIST herbstluftwm-0.9.5.tar.gz 556773 BLAKE2B db851f02ce249be74f0104dd0b335fb1ed50b4a19e5f7de17cdc34b7eba99ac2f348c5a4a4e0afd2c68576f650029203c735ccb293a60d321769d56f746d6593 SHA512 a85fd1ab16b873f512d6965cc4a93524e3ed4a15079d0d4ee54012e217bd41db3b54729c1b30ee361c34b38799f95bc537099056ba7a5f791bf2be6724bc92c3
23
24 diff --git a/x11-wm/herbstluftwm/herbstluftwm-0.9.5.ebuild b/x11-wm/herbstluftwm/herbstluftwm-0.9.5.ebuild
25 new file mode 100644
26 index 000000000000..4989b68eb8db
27 --- /dev/null
28 +++ b/x11-wm/herbstluftwm/herbstluftwm-0.9.5.ebuild
29 @@ -0,0 +1,141 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +PYTHON_COMPAT=( python3_{9..11} )
36 +DISTUTILS_OPTIONAL=1
37 +
38 +inherit cmake distutils-r1
39 +
40 +DESCRIPTION="A manual tiling window manager for X"
41 +HOMEPAGE="https://herbstluftwm.org/"
42 +
43 +if [[ "${PV}" == "9999" ]] || [[ -n "${EGIT_COMMIT_ID}" ]]; then
44 + EGIT_REPO_URI="https://github.com/herbstluftwm/herbstluftwm"
45 + inherit git-r3
46 +else
47 + SRC_URI="https://herbstluftwm.org/tarballs/${P}.tar.gz"
48 + KEYWORDS="~amd64 ~x86"
49 +fi
50 +
51 +LICENSE="BSD-2"
52 +SLOT="0"
53 +IUSE="+doc python test"
54 +RESTRICT="!test? ( test )"
55 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
56 +
57 +COMMON_DEPEND="
58 + x11-libs/libX11
59 + x11-libs/libXext
60 + x11-libs/libXfixes
61 + x11-libs/libXft
62 + x11-libs/libXinerama
63 + x11-libs/libXrandr
64 + x11-libs/libXrender
65 +"
66 +DEPEND="
67 + ${COMMON_DEPEND}
68 + test? (
69 + dev-python/ewmh
70 + dev-python/python-xlib
71 + x11-apps/xsetroot
72 + x11-base/xorg-server[xephyr,xvfb]
73 + x11-misc/xdotool
74 + x11-terms/xterm
75 + )
76 +"
77 +RDEPEND="
78 + ${COMMON_DEPEND}
79 + app-shells/bash
80 + python? ( ${PYTHON_DEPS} )
81 +"
82 +BDEPEND="
83 + ${PYTHON_DEPS}
84 + virtual/pkgconfig
85 +"
86 +
87 +if [[ -n "${EGIT_REPO_URI}" ]]; then
88 + # Herbstluftwm tarballs ship with pre-compiled documentation, only
89 + # if we build from git asciidoc is needed.
90 + BDEPEND+=" doc? ( app-text/asciidoc )"
91 +fi
92 +
93 +src_prepare() {
94 + # Do not install LICENSE and respect CMAKE_INSTALL_DOCDIR.
95 + sed -i \
96 + -e '/^install.*LICENSEDIR/d' \
97 + -e '/set(DOCDIR / s#.*#set(DOCDIR ${CMAKE_INSTALL_DOCDIR})#' \
98 + CMakeLists.txt || die
99 + cmake_src_prepare
100 +
101 + if use python; then
102 + pushd "${S}"/python > /dev/null || die
103 + distutils-r1_src_prepare
104 + popd > /dev/null || die
105 + fi
106 +}
107 +
108 +src_configure() {
109 + # Ensure that 'python3' is in PATH. #765118
110 + python_setup
111 +
112 + mycmakeargs=(
113 + -DWITH_DOCUMENTATION=$(usex doc)
114 + )
115 + cmake_src_configure
116 +}
117 +
118 +src_compile() {
119 + cmake_src_compile
120 +
121 + if use python; then
122 + pushd python > /dev/null || die
123 + distutils-r1_src_compile
124 + popd >/dev/null || die
125 + fi
126 +}
127 +
128 +src_install() {
129 + cmake_src_install
130 +
131 + if ! use doc; then
132 + rm -r "${ED}"/usr/share/doc/${PF}/examples || die
133 + fi
134 +
135 + if use python; then
136 + pushd python > /dev/null || die
137 + distutils-r1_src_install
138 + popd > /dev/null || die
139 + fi
140 +
141 + # The man pages exists in src_install either in non-live ebuilds,
142 + # since they are then shipped pre-compiled in herbstluftwm's
143 + # release tarbal. Or they exist in live ebuilds if the 'doc' USE
144 + # flag is enabled.
145 + if [[ "${PV}" != 9999 ]] || use doc; then
146 + local man_pages=(
147 + herbstluftwm.1
148 + herbstclient.1
149 + herbstluftwm-tutorial.7
150 + )
151 + for man_page in "${man_pages[@]}"; do
152 + doman "doc/${man_page}"
153 + done
154 + fi
155 +}
156 +
157 +distutils_enable_tests pytest
158 +
159 +src_test() {
160 + ln -s "${BUILD_DIR}/herbstclient" || die "Could not symlink herbstclient"
161 + ln -s "${BUILD_DIR}/herbstluftwm" || die "Could not symlink herbstluftwm"
162 +
163 + pushd python > /dev/null || die
164 + distutils_install_for_testing
165 + popd > /dev/null || die
166 +
167 + # Ensure PYTHONPATH is exported, see https://bugs.gentoo.org/801658.
168 + export PYTHONPATH
169 + python_test
170 +}