diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-04-28 20:21:43 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-04-28 20:21:43 +0100 |
commit | 40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch) | |
tree | 758c221bad35c9288d0bd6df9c7dfc226728e52c /sys-apps/util-linux/util-linux-9999.ebuild | |
parent | 8d5dbd847cbc704a6a06405856e94b461011afe3 (diff) |
gentoo resync : 28.04.2021
Diffstat (limited to 'sys-apps/util-linux/util-linux-9999.ebuild')
-rw-r--r-- | sys-apps/util-linux/util-linux-9999.ebuild | 81 |
1 files changed, 62 insertions, 19 deletions
diff --git a/sys-apps/util-linux/util-linux-9999.ebuild b/sys-apps/util-linux/util-linux-9999.ebuild index 1a657d941caf..66a36a6cd0cb 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" @@ -25,7 +26,7 @@ HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/ LICENSE="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain" SLOT="0" -IUSE="audit build caps +cramfs cryptsetup fdformat hardlink kill +logger ncurses nls pam python +readline selinux slang static-libs su +suid systemd test tty-helpers udev unicode userland_GNU" +IUSE="audit build caps +cramfs cryptsetup fdformat hardlink kill +logger magic ncurses nls pam python +readline selinux slang static-libs su +suid systemd test tty-helpers udev unicode userland_GNU" # Most lib deps here are related to programs rather than our libs, # so we rarely need to specify ${MULTILIB_USEDEP}. @@ -36,7 +37,10 @@ RDEPEND=" cramfs? ( sys-libs/zlib:= ) cryptsetup? ( sys-fs/cryptsetup ) hardlink? ( dev-libs/libpcre2:= ) - ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] ) + ncurses? ( + >=sys-libs/ncurses-5.2-r2:0=[unicode?] + magic? ( sys-apps/file:0= ) + ) nls? ( virtual/libintl[${MULTILIB_USEDEP}] ) pam? ( sys-libs/pam ) ppc? ( sys-libs/librtas ) @@ -68,7 +72,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 +90,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 +107,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 +117,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 +151,7 @@ python_configure() { --without-systemdsystemunitdir --with-python ) - if use userland_GNU; then + if use userland_GNU ; then myeconfargs+=( --enable-libblkid --enable-libmount @@ -163,6 +192,7 @@ multilib_src_configure() { $(multilib_native_use_with slang) $(multilib_native_use_with systemd) $(multilib_native_use_with udev) + $(multilib_native_usex ncurses "$(use_with magic libmagic)" '--without-libmagic') $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw') $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses') $(multilib_native_use_with audit) @@ -174,12 +204,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 +234,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 +252,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 +261,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 +275,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 +288,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 +301,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 +320,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 +345,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 |