diff options
author | Florian Schmaus <flow@gentoo.org> | 2022-09-26 18:38:27 +0200 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2022-09-26 18:40:24 +0200 |
commit | f0a4706bb5f4b1c0c6ecf131a61d75f3ebaa865d (patch) | |
tree | 6df266e01acd2eadbe53f41aa34d99082102581d /x11-wm | |
parent | net-wireless/uhd: fix bug 839498 (diff) | |
download | gentoo-f0a4706bb5f4b1c0c6ecf131a61d75f3ebaa865d.tar.gz gentoo-f0a4706bb5f4b1c0c6ecf131a61d75f3ebaa865d.tar.bz2 gentoo-f0a4706bb5f4b1c0c6ecf131a61d75f3ebaa865d.zip |
x11-wm/herbstluftwm: add 0.9.5
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'x11-wm')
-rw-r--r-- | x11-wm/herbstluftwm/Manifest | 1 | ||||
-rw-r--r-- | x11-wm/herbstluftwm/herbstluftwm-0.9.5.ebuild | 141 |
2 files changed, 142 insertions, 0 deletions
diff --git a/x11-wm/herbstluftwm/Manifest b/x11-wm/herbstluftwm/Manifest index 2462e486361d..0db1ba96e2d5 100644 --- a/x11-wm/herbstluftwm/Manifest +++ b/x11-wm/herbstluftwm/Manifest @@ -1 +1,2 @@ DIST herbstluftwm-0.9.4.tar.gz 549029 BLAKE2B 23f1dbf212c4d0a64f2e2d8442ac7c2465a54a13af74de6c949c4d6eda85fd4e66b73188c526d0968372eb45691ffca43e387c8410691fd134f662e1e8c501b3 SHA512 068438d14b0addcd17a0c0bda1d33ec4aaff08a3c85698a49e9d3dd0c07f91e315f936d73c11b0c159b8735373ea1efe8a572a0976fc327f4aaa6a0f08436e9d +DIST herbstluftwm-0.9.5.tar.gz 556773 BLAKE2B db851f02ce249be74f0104dd0b335fb1ed50b4a19e5f7de17cdc34b7eba99ac2f348c5a4a4e0afd2c68576f650029203c735ccb293a60d321769d56f746d6593 SHA512 a85fd1ab16b873f512d6965cc4a93524e3ed4a15079d0d4ee54012e217bd41db3b54729c1b30ee361c34b38799f95bc537099056ba7a5f791bf2be6724bc92c3 diff --git a/x11-wm/herbstluftwm/herbstluftwm-0.9.5.ebuild b/x11-wm/herbstluftwm/herbstluftwm-0.9.5.ebuild new file mode 100644 index 000000000000..4989b68eb8db --- /dev/null +++ b/x11-wm/herbstluftwm/herbstluftwm-0.9.5.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +DISTUTILS_OPTIONAL=1 + +inherit cmake distutils-r1 + +DESCRIPTION="A manual tiling window manager for X" +HOMEPAGE="https://herbstluftwm.org/" + +if [[ "${PV}" == "9999" ]] || [[ -n "${EGIT_COMMIT_ID}" ]]; then + EGIT_REPO_URI="https://github.com/herbstluftwm/herbstluftwm" + inherit git-r3 +else + SRC_URI="https://herbstluftwm.org/tarballs/${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="BSD-2" +SLOT="0" +IUSE="+doc python test" +RESTRICT="!test? ( test )" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +COMMON_DEPEND=" + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXft + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXrender +" +DEPEND=" + ${COMMON_DEPEND} + test? ( + dev-python/ewmh + dev-python/python-xlib + x11-apps/xsetroot + x11-base/xorg-server[xephyr,xvfb] + x11-misc/xdotool + x11-terms/xterm + ) +" +RDEPEND=" + ${COMMON_DEPEND} + app-shells/bash + python? ( ${PYTHON_DEPS} ) +" +BDEPEND=" + ${PYTHON_DEPS} + virtual/pkgconfig +" + +if [[ -n "${EGIT_REPO_URI}" ]]; then + # Herbstluftwm tarballs ship with pre-compiled documentation, only + # if we build from git asciidoc is needed. + BDEPEND+=" doc? ( app-text/asciidoc )" +fi + +src_prepare() { + # Do not install LICENSE and respect CMAKE_INSTALL_DOCDIR. + sed -i \ + -e '/^install.*LICENSEDIR/d' \ + -e '/set(DOCDIR / s#.*#set(DOCDIR ${CMAKE_INSTALL_DOCDIR})#' \ + CMakeLists.txt || die + cmake_src_prepare + + if use python; then + pushd "${S}"/python > /dev/null || die + distutils-r1_src_prepare + popd > /dev/null || die + fi +} + +src_configure() { + # Ensure that 'python3' is in PATH. #765118 + python_setup + + mycmakeargs=( + -DWITH_DOCUMENTATION=$(usex doc) + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + + if use python; then + pushd python > /dev/null || die + distutils-r1_src_compile + popd >/dev/null || die + fi +} + +src_install() { + cmake_src_install + + if ! use doc; then + rm -r "${ED}"/usr/share/doc/${PF}/examples || die + fi + + if use python; then + pushd python > /dev/null || die + distutils-r1_src_install + popd > /dev/null || die + fi + + # The man pages exists in src_install either in non-live ebuilds, + # since they are then shipped pre-compiled in herbstluftwm's + # release tarbal. Or they exist in live ebuilds if the 'doc' USE + # flag is enabled. + if [[ "${PV}" != 9999 ]] || use doc; then + local man_pages=( + herbstluftwm.1 + herbstclient.1 + herbstluftwm-tutorial.7 + ) + for man_page in "${man_pages[@]}"; do + doman "doc/${man_page}" + done + fi +} + +distutils_enable_tests pytest + +src_test() { + ln -s "${BUILD_DIR}/herbstclient" || die "Could not symlink herbstclient" + ln -s "${BUILD_DIR}/herbstluftwm" || die "Could not symlink herbstluftwm" + + pushd python > /dev/null || die + distutils_install_for_testing + popd > /dev/null || die + + # Ensure PYTHONPATH is exported, see https://bugs.gentoo.org/801658. + export PYTHONPATH + python_test +} |