diff options
author | Mike Gilbert <floppym@gentoo.org> | 2023-02-02 12:23:58 -0500 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2023-02-02 12:29:53 -0500 |
commit | 869d632e91cd0e6369a053a7cc4adbc6030cd8f5 (patch) | |
tree | 59e86193eb369fd89956f8c3e53cd8a6943cb824 /net-misc/netifrc | |
parent | dev-games/godot: add 4.0_beta17 (diff) | |
download | gentoo-869d632e91cd0e6369a053a7cc4adbc6030cd8f5.tar.gz gentoo-869d632e91cd0e6369a053a7cc4adbc6030cd8f5.tar.bz2 gentoo-869d632e91cd0e6369a053a7cc4adbc6030cd8f5.zip |
net-misc/netifrc: convert MAKE_ARGS to an array
Always pass PREFIX/UPREFIX to override the broken Makefile logic.
Closes: https://bugs.gentoo.org/892946
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'net-misc/netifrc')
-rw-r--r-- | net-misc/netifrc/netifrc-0.7.3-r1.ebuild | 24 | ||||
-rw-r--r-- | net-misc/netifrc/netifrc-9999.ebuild | 26 |
2 files changed, 29 insertions, 21 deletions
diff --git a/net-misc/netifrc/netifrc-0.7.3-r1.ebuild b/net-misc/netifrc/netifrc-0.7.3-r1.ebuild index 33d349ea52b6..76b8ecc7d9ce 100644 --- a/net-misc/netifrc/netifrc-0.7.3-r1.ebuild +++ b/net-misc/netifrc/netifrc-0.7.3-r1.ebuild @@ -40,25 +40,29 @@ src_prepare() { } src_compile() { - MAKE_ARGS="${MAKE_ARGS} - UDEVDIR=${EPREFIX}$(get_udevdir) - LIBEXECDIR=${EPREFIX}/lib/${PN} PF=${PF}" + MAKE_ARGS=( + PREFIX="${EPREFIX}" + UPREFIX="${EPREFIX}/usr" + UDEVDIR="${EPREFIX}$(get_udevdir)" + LIBEXECDIR="${EPREFIX}/lib/${PN}" + PF="${PF}" + ) - use prefix && MAKE_ARGS+=" MKPREFIX=yes PREFIX=${EPREFIX}" - - emake ${MAKE_ARGS} all + emake "${MAKE_ARGS[@]}" all } src_install() { - emake ${MAKE_ARGS} DESTDIR="${D}" install + emake "${MAKE_ARGS[@]}" DESTDIR="${D}" install dodoc README CREDITS FEATURE-REMOVAL-SCHEDULE STYLE TODO # Install the service file - LIBEXECDIR="${EPREFIX}/lib/${PN}" - UNIT_DIR="$(systemd_get_systemunitdir)" + local LIBEXECDIR="${EPREFIX}/lib/${PN}" sed "s:@LIBEXECDIR@:${LIBEXECDIR}:" "${S}/systemd/net_at.service.in" > "${T}/net_at.service" || die systemd_newunit "${T}/net_at.service" 'net@.service' - dosym "${UNIT_DIR#${EPREFIX}}/net@.service" "${UNIT_DIR#${EPREFIX}}/net@lo.service" + + local UNIT_DIR="$(systemd_get_systemunitdir)" + UNIT_DIR="${UNIT_DIR#"${EPREFIX}"}" + dosym net@.service "${UNIT_DIR}/net@lo.service" } pkg_postinst() { diff --git a/net-misc/netifrc/netifrc-9999.ebuild b/net-misc/netifrc/netifrc-9999.ebuild index 31f53c53facc..c91d452c9918 100644 --- a/net-misc/netifrc/netifrc-9999.ebuild +++ b/net-misc/netifrc/netifrc-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -39,25 +39,29 @@ src_prepare() { } src_compile() { - MAKE_ARGS="${MAKE_ARGS} - UDEVDIR=${EPREFIX}$(get_udevdir) - LIBEXECDIR=${EPREFIX}/lib/${PN} PF=${PF}" + MAKE_ARGS=( + PREFIX="${EPREFIX}" + UPREFIX="${EPREFIX}/usr" + UDEVDIR="${EPREFIX}$(get_udevdir)" + LIBEXECDIR="${EPREFIX}/lib/${PN}" + PF="${PF}" + ) - use prefix && MAKE_ARGS+=" MKPREFIX=yes PREFIX=${EPREFIX}" - - emake ${MAKE_ARGS} all + emake "${MAKE_ARGS[@]}" all } src_install() { - emake ${MAKE_ARGS} DESTDIR="${D}" install + emake "${MAKE_ARGS[@]}" DESTDIR="${D}" install dodoc README CREDITS FEATURE-REMOVAL-SCHEDULE STYLE TODO # Install the service file - LIBEXECDIR="${EPREFIX}/lib/${PN}" - UNIT_DIR="$(systemd_get_systemunitdir)" + local LIBEXECDIR="${EPREFIX}/lib/${PN}" sed "s:@LIBEXECDIR@:${LIBEXECDIR}:" "${S}/systemd/net_at.service.in" > "${T}/net_at.service" || die systemd_newunit "${T}/net_at.service" 'net@.service' - dosym "${UNIT_DIR#${EPREFIX}}/net@.service" "${UNIT_DIR#${EPREFIX}}/net@lo.service" + + local UNIT_DIR="$(systemd_get_systemunitdir)" + UNIT_DIR="${UNIT_DIR#"${EPREFIX}"}" + dosym net@.service "${UNIT_DIR}/net@lo.service" } pkg_postinst() { |