| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| 5 |
5 |
|
| 6 |
|
PYTHON_COMPAT=( python3_{9..13} )
|
|
6 |
PYTHON_COMPAT=( python3_{10..14} )
|
| 7 |
7 |
DISTUTILS_USE_PEP517=setuptools
|
| 8 |
8 |
DISTUTILS_OPTIONAL=1
|
| 9 |
9 |
|
| ... | ... | |
| 17 |
17 |
inherit git-r3
|
| 18 |
18 |
else
|
| 19 |
19 |
SRC_URI="https://herbstluftwm.org/tarballs/${P}.tar.gz"
|
| 20 |
|
KEYWORDS="amd64 x86"
|
|
20 |
KEYWORDS="~amd64 ~x86"
|
| 21 |
21 |
fi
|
| 22 |
22 |
|
| 23 |
23 |
LICENSE="BSD-2"
|
| ... | ... | |
| 60 |
60 |
"
|
| 61 |
61 |
|
| 62 |
62 |
if [[ -n "${EGIT_REPO_URI}" ]]; then
|
|
63 |
# If hlwm is build from VCS, then hlwm-doc.json, which is used in
|
|
64 |
# the tests, needs to generated by the WITH_DOCUMENTATION option.
|
|
65 |
REQUIRED_USE+=" test? ( doc )"
|
|
66 |
|
| 63 |
67 |
# Herbstluftwm tarballs ship with pre-compiled documentation, only
|
| 64 |
68 |
# if we build from git asciidoc is needed.
|
| 65 |
69 |
BDEPEND+=" doc? ( app-text/asciidoc )"
|
| 66 |
70 |
fi
|
| 67 |
71 |
|
| 68 |
|
PATCHES=(
|
| 69 |
|
"${FILESDIR}"/${PN}-0.9.5-gcc15.patch
|
| 70 |
|
)
|
| 71 |
|
|
| 72 |
72 |
src_prepare() {
|
| 73 |
73 |
# Do not install LICENSE and respect CMAKE_INSTALL_DOCDIR.
|
| 74 |
74 |
sed -i \
|
| 75 |
75 |
-e '/^install.*LICENSEDIR/d' \
|
| 76 |
76 |
-e '/set(DOCDIR / s#.*#set(DOCDIR ${CMAKE_INSTALL_DOCDIR})#' \
|
| 77 |
77 |
CMakeLists.txt || die
|
|
78 |
|
|
79 |
# Do not install MAN pages, we use doman in src_install() for that.
|
|
80 |
sed -i '/MANDIR/d' \
|
|
81 |
doc/CMakeLists.txt || die
|
|
82 |
|
| 78 |
83 |
cmake_src_prepare
|
| 79 |
84 |
|
| 80 |
85 |
if use python; then
|
| ... | ... | |
| 102 |
107 |
distutils-r1_src_compile
|
| 103 |
108 |
popd >/dev/null || die
|
| 104 |
109 |
fi
|
|
110 |
|
|
111 |
# The following symlinks are required for src_test
|
|
112 |
ln -s "${BUILD_DIR}/herbstclient" || die "Could not symlink herbstclient"
|
|
113 |
ln -s "${BUILD_DIR}/herbstluftwm" || die "Could not symlink herbstluftwm"
|
|
114 |
if [[ -n "${EGIT_REPO_URI}" ]]; then
|
|
115 |
ln -s "${BUILD_DIR}/doc/hlwm-doc.json" "doc/hlwm-doc.json" || die "Could not symlink hlwm-doc.json"
|
|
116 |
fi
|
| 105 |
117 |
}
|
| 106 |
118 |
|
| 107 |
119 |
src_install() {
|
| ... | ... | |
| 121 |
133 |
# since they are then shipped pre-compiled in herbstluftwm's
|
| 122 |
134 |
# release tarbal. Or they exist in live ebuilds if the 'doc' USE
|
| 123 |
135 |
# flag is enabled.
|
| 124 |
|
if [[ "${PV}" != 9999 ]] || use doc; then
|
|
136 |
if [[ -n "${EGIT_REPO_URI}" ]] || use doc; then
|
| 125 |
137 |
local man_pages=(
|
| 126 |
138 |
herbstluftwm.1
|
| 127 |
139 |
herbstclient.1
|
| 128 |
140 |
herbstluftwm-tutorial.7
|
| 129 |
141 |
)
|
|
142 |
local man_page
|
| 130 |
143 |
for man_page in "${man_pages[@]}"; do
|
| 131 |
|
doman "doc/${man_page}"
|
|
144 |
doman "${BUILD_DIR}/doc/${man_page}"
|
| 132 |
145 |
done
|
| 133 |
146 |
fi
|
| 134 |
147 |
|
| ... | ... | |
| 141 |
154 |
distutils_enable_tests pytest
|
| 142 |
155 |
|
| 143 |
156 |
src_test() {
|
| 144 |
|
ln -s "${BUILD_DIR}/herbstclient" || die "Could not symlink herbstclient"
|
| 145 |
|
ln -s "${BUILD_DIR}/herbstluftwm" || die "Could not symlink herbstluftwm"
|
| 146 |
|
|
|
157 |
local EPYTEST_DESELECT=(
|
|
158 |
# Stress test that rapidly creates 50 clients. Prone to
|
|
159 |
# IPC/Xvfb timeouts, especially in parallelized builds
|
|
160 |
# environments.
|
|
161 |
tests/test_rules.py::test_floatplacement_smart_create_many
|
|
162 |
)
|
| 147 |
163 |
distutils-r1_src_test
|
| 148 |
164 |
}
|