summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2021-04-16 14:36:14 +0200
committerLars Wendler <polynomial-c@gentoo.org>2021-04-16 14:37:25 +0200
commitaa1e037908fd5a41f69ee28775eae1aace149e98 (patch)
treebb61c834379d5d3a50a5f3d01cc1a6e02d22f86b
parentsys-apps/util-linux: Bump to version 2.37_rc1 (diff)
downloadgentoo-aa1e0379.tar.gz
gentoo-aa1e0379.tar.bz2
gentoo-aa1e0379.zip
sys-apps/util-linux: Synced live ebuild
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
-rw-r--r--sys-apps/util-linux/util-linux-9999.ebuild73
1 files changed, 56 insertions, 17 deletions
diff --git a/sys-apps/util-linux/util-linux-9999.ebuild b/sys-apps/util-linux/util-linux-9999.ebuild
index 1a657d941caf..a4c2dbb25acc 100644
--- a/sys-apps/util-linux/util-linux-9999.ebuild
+++ b/sys-apps/util-linux/util-linux-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{7..9} )
inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 usr-ldscript \
pam python-r1 multilib-minimal multiprocessing systemd
@@ -17,7 +17,8 @@ if [[ ${PV} == 9999 ]] ; then
else
[[ "${PV}" = *_rc* ]] || \
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
- SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+ SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~polynomial-c/${MY_P}-manpages.tar.xz"
fi
DESCRIPTION="Various useful Linux utilities"
@@ -68,7 +69,15 @@ RDEPEND+="
!>=sys-apps/shadow-4.7-r2[su]
)
!net-wireless/rfkill
- !<app-shells/bash-completion-2.7-r1"
+ !<app-shells/bash-completion-2.7-r1
+"
+
+# Required for man-page generation
+if [[ "${PV}" == 9999 ]] ; then
+ BDEPEND+="
+ dev-ruby/asciidoctor
+ "
+fi
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
@@ -78,6 +87,15 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
)
+rm_man() {
+ [[ -n $1 ]] || die
+ local el
+ for el in $1 ; do
+ find "${WORKDIR}/man" -type f -name "${el}.?" -delete \
+ || die
+ done
+}
+
src_prepare() {
default
@@ -86,7 +104,7 @@ src_prepare() {
-e "s|UUIDD_SOCKET=\"\$(mktemp -u \"\${TS_OUTDIR}/uuiddXXXXXXXXXXXXX\")\"|UUIDD_SOCKET=\"\$(mktemp -u \"${T}/uuiddXXXXXXXXXXXXX.sock\")\"|g" \
tests/ts/uuid/uuidd || die "Failed to fix uuidd test"
- if ! use userland_GNU; then
+ if ! use userland_GNU ; then
# test runner is using GNU-specific xargs call
sed -i -e 's:xargs:gxargs:' tests/run.sh || die
# test requires util-linux uuidgen (which we don't build)
@@ -96,6 +114,14 @@ src_prepare() {
if [[ ${PV} == 9999 ]] ; then
po/update-potfiles
eautoreconf
+ else
+ # Conditionally remove some man-pages
+ use hardlink || rm_man "hardlink"
+ use kill || rm_man "kill"
+ use logger || rm_man "logger"
+ use ncurses || rm_man "pg"
+ use su || rm_man "su"
+ use tty-helpers || rm_man "mesg wall write"
fi
elibtoolize
@@ -122,7 +148,7 @@ python_configure() {
--without-systemdsystemunitdir
--with-python
)
- if use userland_GNU; then
+ if use userland_GNU ; then
myeconfargs+=(
--enable-libblkid
--enable-libmount
@@ -174,12 +200,14 @@ multilib_src_configure() {
$(use_with selinux)
)
# build programs only on GNU, on *BSD we want libraries only
- if multilib_is_native_abi && use userland_GNU; then
+ if multilib_is_native_abi && use userland_GNU ; then
myeconfargs+=(
--disable-chfn-chsh
--disable-login
+ --disable-newgrp
--disable-nologin
--disable-pylibmount
+ --disable-vipw
--enable-agetty
--enable-bash-completion
--enable-line
@@ -202,9 +230,16 @@ multilib_src_configure() {
$(use_enable tty-helpers write)
$(use_with cryptsetup)
)
+ if [[ ${PV} == *9999 ]] ; then
+ myeconfargs+=( --enable-asciidoc )
+ else
+ # We ship pre-generated man-pages for releases
+ myeconfargs+=( --disable-asciidoc )
+ fi
else
myeconfargs+=(
--disable-all-programs
+ --disable-asciidoc
--disable-bash-completion
--without-systemdsystemunitdir
# build libraries
@@ -213,7 +248,7 @@ multilib_src_configure() {
--enable-libsmartcols
--enable-libfdisk
)
- if use userland_GNU; then
+ if use userland_GNU ; then
# those libraries don't work on *BSD
myeconfargs+=(
--enable-libmount
@@ -222,7 +257,7 @@ multilib_src_configure() {
fi
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
- if multilib_is_native_abi && use python; then
+ if multilib_is_native_abi && use python ; then
python_foreach_impl python_configure
fi
}
@@ -236,7 +271,7 @@ python_compile() {
multilib_src_compile() {
emake all
- if multilib_is_native_abi && use python; then
+ if multilib_is_native_abi && use python ; then
python_foreach_impl python_compile
fi
}
@@ -249,7 +284,7 @@ python_test() {
multilib_src_test() {
emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
- if multilib_is_native_abi && use python; then
+ if multilib_is_native_abi && use python ; then
python_foreach_impl python_test
fi
}
@@ -262,14 +297,14 @@ python_install() {
}
multilib_src_install() {
- if multilib_is_native_abi && use python; then
+ if multilib_is_native_abi && use python ; then
python_foreach_impl python_install
fi
# This needs to be called AFTER python_install call (#689190)
emake DESTDIR="${D}" install
- if multilib_is_native_abi && use userland_GNU; then
+ if multilib_is_native_abi && use userland_GNU ; then
# need the libs in /
gen_usr_ldscript -a blkid fdisk mount smartcols uuid
fi
@@ -281,13 +316,17 @@ multilib_src_install_all() {
# e2fsprogs-libs didnt install .la files, and .pc work fine
find "${ED}" -name "*.la" -delete || die
- if ! use userland_GNU; then
+ if [[ ${PV} != 9999 ]] ; then
+ doman "${WORKDIR}"/man/man*/*
+ fi
+
+ if ! use userland_GNU ; then
# manpage collisions
# TODO: figure out a good way to keep them
rm "${ED}"/usr/share/man/man3/uuid* || die
fi
- if use pam; then
+ if use pam ; then
newpamd "${FILESDIR}/runuser.pamd" runuser
newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
fi
@@ -302,11 +341,11 @@ multilib_src_install_all() {
}
pkg_postinst() {
- if ! use tty-helpers; then
+ if ! use tty-helpers ; then
elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
fi
- if [[ -z ${REPLACING_VERSIONS} ]]; then
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog "The agetty util now clears the terminal by default. You"
elog "might want to add --noclear to your /etc/inittab lines."
fi