From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EF13059CB2 for ; Mon, 18 Apr 2016 19:10:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6E40EE087B; Mon, 18 Apr 2016 19:10:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E0301E087B for ; Mon, 18 Apr 2016 19:10:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 851203406F2 for ; Mon, 18 Apr 2016 19:10:16 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D9F1086F for ; Mon, 18 Apr 2016 19:10:13 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1461006601.26117ba0b8fb9867c06b49e2ed9840733ed638d3.vapier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/keyutils/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/keyutils/keyutils-1.5.9-r2.ebuild X-VCS-Directories: sys-apps/keyutils/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 26117ba0b8fb9867c06b49e2ed9840733ed638d3 X-VCS-Branch: master Date: Mon, 18 Apr 2016 19:10:13 +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: cd3b447f-1843-48bb-9bfc-324d3fe64b2b X-Archives-Hash: ded207ae32d5a9738975a59ef65d4ae8 commit: 26117ba0b8fb9867c06b49e2ed9840733ed638d3 Author: Mike Frysinger gentoo org> AuthorDate: Mon Apr 18 19:09:32 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Apr 18 19:10:01 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26117ba0 sys-apps/keyutils: add USE=static & USE=static-libs support #542540 sys-apps/keyutils/keyutils-1.5.9-r2.ebuild | 90 ++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/sys-apps/keyutils/keyutils-1.5.9-r2.ebuild b/sys-apps/keyutils/keyutils-1.5.9-r2.ebuild new file mode 100644 index 0000000..0a46055 --- /dev/null +++ b/sys-apps/keyutils/keyutils-1.5.9-r2.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit multilib eutils toolchain-funcs linux-info multilib-minimal + +DESCRIPTION="Linux Key Management Utilities" +HOMEPAGE="https://people.redhat.com/dhowells/keyutils/" +SRC_URI="https://people.redhat.com/dhowells/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux" +IUSE="static static-libs test" + +RDEPEND="" +DEPEND="!prefix? ( >=sys-kernel/linux-headers-2.6.11 )" + +pkg_setup() { + CONFIG_CHECK="~KEYS" + use test && CONFIG_CHECK="${CONFIG_CHECK} ~KEYS_DEBUG_PROC_KEYS" + ERROR_KEYS="You must have CONFIG_KEYS to use this package!" + ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!" + linux-info_pkg_setup +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.5.5-makefile-fixup.patch + + # The lsb check is useless, so avoid spurious command not found messages. + sed -i -e 's,lsb_release,:,' tests/prepare.inc.sh || die + # All the test files are bash, but try to execute via `sh`. + sed -i -r \ + -e 's:([[:space:]])sh([[:space:]]):\1bash\2:' \ + tests/{Makefile*,*.sh} || die + find tests/ -name '*.sh' -exec sed -i '1s:/sh$:/bash:' {} + + # Some tests call the kernel which calls userspace, but that will + # run the install keyutils rather than the locally compiled one, + # so disable round trip tests. + rm -rf tests/keyctl/requesting/{bad-args,piped,valid} + + multilib_copy_sources +} + +multilib_src_compile() { + tc-export AR CC + sed -i \ + -e "1iRPATH = $(usex static -static '')" \ + -e '/^C.*FLAGS/s|:=|+=|' \ + -e 's:-Werror::' \ + -e '/^BUILDFOR/s:=.*:=:' \ + -e "/^LIBDIR/s:=.*:= /usr/$(get_libdir):" \ + -e '/^USRLIBDIR/s:=.*:=$(LIBDIR):' \ + -e "s: /: ${EPREFIX}/:g" \ + -e '/^NO_ARLIB/d' \ + Makefile || die + + # We need the static lib in order to statically link programs. + if use static ; then + export NO_ARLIB=0 + # Hack the progs to depend on the static lib instead. + sed -i \ + -e '/^.*:.*[$](DEVELLIB)$/s:$(DEVELLIB):$(ARLIB):' \ + Makefile || die + else + export NO_ARLIB=$(usex static-libs 0 1) + fi + emake +} + +multilib_src_test() { + # Execute the locally compiled code rather than the + # older versions already installed in the system. + LD_LIBRARY_PATH=${BUILD_DIR} \ + PATH="${BUILD_DIR}:${PATH}" \ + emake test +} + +multilib_src_install() { + # Possibly undo the setting for USE=static (see src_compile). + export NO_ARLIB=$(usex static-libs 0 1) + + default + use static || gen_usr_ldscript -a keyutils +} + +multilib_src_install_all() { + dodoc README +}