From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 969781382C5 for ; Fri, 6 Apr 2018 11:44:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CACCCE08D6; Fri, 6 Apr 2018 11:44:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 9A601E08D6 for ; Fri, 6 Apr 2018 11:44:21 +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 A761E335C60 for ; Fri, 6 Apr 2018 11:44:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7B36C27D for ; Fri, 6 Apr 2018 11:44:17 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1523015003.73d3426b9af66c84b32ea0631205a0546049d9f3.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/util-linux/util-linux-9999.ebuild X-VCS-Directories: sys-apps/util-linux/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 73d3426b9af66c84b32ea0631205a0546049d9f3 X-VCS-Branch: master Date: Fri, 6 Apr 2018 11:44:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6f3bbfcb-4fc6-450b-adde-b6db9141283c X-Archives-Hash: d730c4cf8aace6336b6d591a7ee2ca30 commit: 73d3426b9af66c84b32ea0631205a0546049d9f3 Author: Michał Górny gentoo org> AuthorDate: Fri Apr 6 08:49:02 2018 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Apr 6 11:43:23 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73d3426b sys-apps/util-linux: Support library-only build for *BSD Closes: https://bugs.gentoo.org/651398 sys-apps/util-linux/util-linux-9999.ebuild | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/sys-apps/util-linux/util-linux-9999.ebuild b/sys-apps/util-linux/util-linux-9999.ebuild index 2bf922e742b..76ee8160737 100644 --- a/sys-apps/util-linux/util-linux-9999.ebuild +++ b/sys-apps/util-linux/util-linux-9999.ebuild @@ -25,7 +25,7 @@ HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/" LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain" SLOT="0" -IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode" +IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +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}. @@ -73,6 +73,13 @@ 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 + # 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) + rm tests/ts/uuid/oids || die + fi + if [[ ${PV} == 9999 ]] ; then po/update-potfiles eautoreconf @@ -128,7 +135,8 @@ multilib_src_configure() { $(use_with selinux) $(usex ncurses '' '--without-tinfo') ) - if multilib_is_native_abi; then + # build programs only on GNU, on *BSD we want libraries only + if multilib_is_native_abi && use userland_GNU; then myeconfargs+=( --disable-chfn-chsh --disable-login @@ -156,13 +164,18 @@ multilib_src_configure() { --disable-all-programs --disable-bash-completion --without-systemdsystemunitdir - # build all libraries + # build libraries --enable-libuuid --enable-libblkid - --enable-libmount --enable-libsmartcols --enable-libfdisk ) + if use userland_GNU; then + # those libraries don't work on *BSD + myeconfargs+=( + --enable-libmount + ) + fi fi ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" } @@ -174,7 +187,7 @@ multilib_src_test() { multilib_src_install() { emake DESTDIR="${D}" install - if multilib_is_native_abi; then + if multilib_is_native_abi && use userland_GNU; then # need the libs in / gen_usr_ldscript -a blkid mount smartcols uuid @@ -188,6 +201,12 @@ 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 + # manpage collisions + # TODO: figure out a good way to keep them + rm "${ED%/}"/usr/share/man/man3/uuid* || die + fi + if use pam; then newpamd "${FILESDIR}/runuser.pamd" runuser newpamd "${FILESDIR}/runuser-l.pamd" runuser-l