From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1290841-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AC4A413835A for <garchives@archives.gentoo.org>; Sat, 5 Jun 2021 21:28:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E14ABE0AD1; Sat, 5 Jun 2021 21:28:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B8EEEE0AD1 for <gentoo-commits@lists.gentoo.org>; Sat, 5 Jun 2021 21:28:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D0A00340DD9 for <gentoo-commits@lists.gentoo.org>; Sat, 5 Jun 2021 21:28:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 71AE77A0 for <gentoo-commits@lists.gentoo.org>; Sat, 5 Jun 2021 21:28:46 +0000 (UTC) From: "Sam James" <sam@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org> Message-ID: <1622928417.f23a9019ac3062f86ef25b2a87a0f44aa1cf01b9.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: x11-wm/herbstluftwm/ X-VCS-Repository: repo/gentoo X-VCS-Files: x11-wm/herbstluftwm/herbstluftwm-9999.ebuild X-VCS-Directories: x11-wm/herbstluftwm/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f23a9019ac3062f86ef25b2a87a0f44aa1cf01b9 X-VCS-Branch: master Date: Sat, 5 Jun 2021 21:28:46 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d2ec177e-1802-4d3b-b847-5a09908309f1 X-Archives-Hash: 0e932f2b28d6d07aafcf4b7e2c5ed3bb commit: f23a9019ac3062f86ef25b2a87a0f44aa1cf01b9 Author: Florian Schmaus <flo <AT> geekplace <DOT> eu> AuthorDate: Mon May 3 17:06:20 2021 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Jun 5 21:26:57 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f23a9019 x11-wm/herbstluftwm: sync -9999 with latest release ebuild Signed-off-by: Florian Schmaus <flo <AT> geekplace.eu> Closes: https://github.com/gentoo/gentoo/pull/20672 Signed-off-by: Sam James <sam <AT> gentoo.org> x11-wm/herbstluftwm/herbstluftwm-9999.ebuild | 67 +++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 6 deletions(-) diff --git a/x11-wm/herbstluftwm/herbstluftwm-9999.ebuild b/x11-wm/herbstluftwm/herbstluftwm-9999.ebuild index 28d103f5405..f374bfa2fc7 100644 --- a/x11-wm/herbstluftwm/herbstluftwm-9999.ebuild +++ b/x11-wm/herbstluftwm/herbstluftwm-9999.ebuild @@ -3,40 +3,64 @@ EAPI=7 -PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_COMPAT=( python3_{7..10} ) +DISTUTILS_OPTIONAL=1 -inherit cmake git-r3 python-any-r1 toolchain-funcs +inherit cmake distutils-r1 toolchain-funcs DESCRIPTION="A manual tiling window manager for X" HOMEPAGE="https://herbstluftwm.org/" -EGIT_REPO_URI="https://github.com/herbstluftwm/herbstluftwm" + +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 examples" +IUSE="+doc python" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" DEPEND=" + media-libs/freetype x11-libs/libX11 x11-libs/libXext + x11-libs/libXft x11-libs/libXinerama x11-libs/libXrandr " RDEPEND=" ${DEPEND} app-shells/bash + python? ( ${PYTHON_DEPS} ) " BDEPEND=" ${PYTHON_DEPS} virtual/pkgconfig - doc? ( app-text/asciidoc ) " +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() { @@ -49,10 +73,41 @@ src_configure() { 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 examples; then + 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 }