From fc823dcf311c841d9125fd89c612d764eca1d8fe Mon Sep 17 00:00:00 2001 From: Nicolas PARLANT Date: Sun, 22 Mar 2026 01:07:08 +0100 Subject: [PATCH] net-dialup/accel-ppp: sync w/ live, fix modules, avoid sed-op Closes: https://bugs.gentoo.org/971394 Signed-off-by: Nicolas PARLANT Part-of: https://codeberg.org/gentoo/gentoo/pulls/395 Merges: https://codeberg.org/gentoo/gentoo/pulls/395 Signed-off-by: Sam James --- .../accel-ppp/accel-ppp-1.14.0-r2.ebuild | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/net-dialup/accel-ppp/accel-ppp-1.14.0-r2.ebuild b/net-dialup/accel-ppp/accel-ppp-1.14.0-r2.ebuild index e95cee0cbf172..1fa3ccc4b498f 100644 --- a/net-dialup/accel-ppp/accel-ppp-1.14.0-r2.ebuild +++ b/net-dialup/accel-ppp/accel-ppp-1.14.0-r2.ebuild @@ -46,29 +46,17 @@ pkg_setup() { use lua && lua-single_pkg_setup } -src_prepare() { - sed -i -e "/mkdir/d" \ - -e "s: RENAME accel-ppp.conf.dist::" accel-pppd/CMakeLists.txt || die 'sed on accel-pppd/CMakeLists.txt failed' - - # Do not install kernel modules like that - breaks sandbox! - sed -i -e '/modules_install/d' \ - drivers/ipoe/CMakeLists.txt \ - drivers/vlan_mon/CMakeLists.txt || die - - append-ldflags -Wl,-z,lazy # Bug #549918 - - cmake_src_prepare -} - src_configure() { + append-ldflags -Wl,-z,lazy # Bug #549918 local libdir="$(get_libdir)" local mycmakeargs=( -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc" -DCMAKE_INSTALL_LOCALSTATEDIR="${EPREFIX}/var" -DLIB_SUFFIX="${libdir#lib}" - -DBUILD_IPOE_DRIVER="$(usex ipoe)" + # modules handled by linux-mod + -DBUILD_IPOE_DRIVER=no -DBUILD_PPTP_DRIVER=no - -DBUILD_VLAN_MON_DRIVER="$(usex ipoe)" + -DBUILD_VLAN_MON_DRIVER=no -DCRYPTO_LIBRARY=OPENSSL -DLOG_PGSQL="$(usex postgres)" -DLUA="$(usex lua TRUE FALSE)" @@ -81,13 +69,23 @@ src_configure() { cmake_src_configure } -src_compile() { - local modlist=( ipoe=accel-ppp:drivers/ipoe vlan_mon=accel-ppp:drivers/vlan_mon ) +build_modules() { + local mod modlist + for mod in ipoe vlan_mon; do + # see bug #971394 + ln -s "${BUILD_DIR}"/version.h drivers/${mod} || die + local modlist+=( ${mod}=accel-ppp:drivers/${mod} ) + done MODULES_MAKEARGS+=( KDIR="${KV_OUT_DIR}" ) linux-mod-r1_src_compile +} + +src_compile() { + use ipoe && build_modules cmake_src_compile + } src_install() { @@ -101,6 +99,8 @@ src_install() { doins accel-pppd/extra/net-snmp/ACCEL-PPP-MIB.txt fi + mv "${ED}"/etc/accel-ppp.conf{.dist,} || die + newinitd "${FILESDIR}"/${PN}.initd ${PN}d newconfd "${FILESDIR}"/${PN}.confd ${PN}d