diff options
author | Mike Gilbert <floppym@gentoo.org> | 2024-05-14 20:10:59 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2024-05-14 20:10:59 -0400 |
commit | 3cc0a9fd571f057ca3a2eae1c7f49f7048364e2c (patch) | |
tree | 2dfb4537882d3309928501858e40d50d26179fb4 /sys-apps/keyutils | |
parent | app-emacs/lsp-mode: add live 9999 version (diff) | |
download | gentoo-3cc0a9fd571f057ca3a2eae1c7f49f7048364e2c.tar.gz gentoo-3cc0a9fd571f057ca3a2eae1c7f49f7048364e2c.tar.bz2 gentoo-3cc0a9fd571f057ca3a2eae1c7f49f7048364e2c.zip |
sys-apps/keyutils: pass parameters to make
... instead of abusing sed.
Closes: https://bugs.gentoo.org/931839
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-apps/keyutils')
-rw-r--r-- | sys-apps/keyutils/keyutils-1.6.3-r1.ebuild | 57 |
1 files changed, 32 insertions, 25 deletions
diff --git a/sys-apps/keyutils/keyutils-1.6.3-r1.ebuild b/sys-apps/keyutils/keyutils-1.6.3-r1.ebuild index c8d82212103a..6d09620c632a 100644 --- a/sys-apps/keyutils/keyutils-1.6.3-r1.ebuild +++ b/sys-apps/keyutils/keyutils-1.6.3-r1.ebuild @@ -70,30 +70,38 @@ src_prepare() { multilib_copy_sources } +mymake() { + local args=( + PREFIX="${EPREFIX}/usr" + ETCDIR="${EPREFIX}/etc" + BINDIR="${EPREFIX}/bin" + SBINDIR="${EPREFIX}/sbin" + SHAREDIR="${EPREFIX}/usr/share/keyutils" + MANDIR="${EPREFIX}/usr/share/man" + INCLUDEDIR="${EPREFIX}/usr/include" + LIBDIR="${EPREFIX}/usr/$(get_libdir)" + USRLIBDIR="${EPREFIX}/usr/$(get_libdir)" + CFLAGS="${CFLAGS}" + CXXFLAGS="${CXXFLAGS}" + RPATH=$(usex static -static '') + BUILDFOR= + NO_ARLIB="${NO_ARLIB}" + ) + if use static; then + args+=( LIB_DEPENDENCY='$(ARLIB)' ) + fi + emake "${args[@]}" "$@" +} + multilib_src_compile() { - tc-export AR CC CXX - 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) $(SONAME):' \ - Makefile || die + local NO_ARLIB + if use static; then + NO_ARLIB=0 else - export NO_ARLIB=$(usex static-libs 0 1) + NO_ARLIB=$(usex static-libs 0 1) fi - emake + tc-export AR CC CXX + mymake } multilib_src_test() { @@ -101,14 +109,13 @@ multilib_src_test() { # older versions already installed in the system. LD_LIBRARY_PATH=${BUILD_DIR} \ PATH="${BUILD_DIR}:${PATH}" \ - emake test + mymake test } multilib_src_install() { # Possibly undo the setting for USE=static (see src_compile). - export NO_ARLIB=$(usex static-libs 0 1) - - default + local NO_ARLIB=$(usex static-libs 0 1) + mymake DESTDIR="${D}" install } multilib_src_install_all() { |