From a6866ef9eb083f5f9ab90abb026726cdde85b4ba Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Thu, 26 Jun 2025 12:14:45 +0300 Subject: [PATCH] net-misc/onedrive: Fix prefix build The systemd user unit file still hardcodes the configuration path to /home//.config but it's unlikely that users are invoking onedrive through that. Closes: https://bugs.gentoo.org/959096 Signed-off-by: Andrei Horodniceanu Part-of: https://github.com/gentoo/gentoo/pull/42758 Closes: https://github.com/gentoo/gentoo/pull/42758 Signed-off-by: Sam James --- net-misc/onedrive/onedrive-2.5.6.ebuild | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/net-misc/onedrive/onedrive-2.5.6.ebuild b/net-misc/onedrive/onedrive-2.5.6.ebuild index 9f12e09d5e26a..f604b6dc31553 100644 --- a/net-misc/onedrive/onedrive-2.5.6.ebuild +++ b/net-misc/onedrive/onedrive-2.5.6.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit shell-completion optfeature systemd toolchain-funcs +inherit shell-completion optfeature prefix systemd toolchain-funcs DESCRIPTION="Free Client for OneDrive on Linux" HOMEPAGE="https://abraunegg.github.io/" @@ -38,6 +38,13 @@ pkg_setup() { [[ ${MERGE_TYPE} != binary ]] && _setup_gdc } +src_prepare() { + hprefixify contrib/init.d/onedrive.init + # Add EPREFIX to the system config path (/etc) + hprefixify -w '/string systemConfigDirBase/' src/config.d + default +} + src_configure() { # GDCFLAGS are meant to be specified in make.conf. Avoid the DFLAGS # name to support ::dlang which needs separate variables for each @@ -70,7 +77,7 @@ src_compile() { } src_install() { - emake DESTDIR="${D}" docdir=/usr/share/doc/${PF} install + emake DESTDIR="${D}" docdir="${EPREFIX}"/usr/share/doc/${PF} install # log directory keepdir /var/log/onedrive fperms 775 /var/log/onedrive