tools makefile contains this line SYSTEMDUNITDIR ?= $(shell $(PKG_CONFIG) --variable=systemdsystemunitdir systemd 2>/dev/null || echo "$(PREFIX)/lib/systemd/system") so if pkg-config result is empty, units get installed to /usr/lib/systemd/system in gentoo units are placed into /lib/systemd/system we should use SYSTEMDUNITDIR="$(systemd_get_systemunitdir)" since systemd_get_systemunitdir() from systemd.eclass always returns desired unit dir even on openrc systems.
Created attachment 578238 [details, diff] net-vpn-wireguard-explicitly-pass-SYSTEMDUNITDIR.patch
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ccb65feb4e240ee1d35406042f0c644b5e1f73d commit 7ccb65feb4e240ee1d35406042f0c644b5e1f73d Author: Jason A. Donenfeld <zx2c4@gentoo.org> AuthorDate: 2019-12-28 07:51:52 +0000 Commit: Jason A. Donenfeld <zx2c4@gentoo.org> CommitDate: 2019-12-28 08:04:13 +0000 net-vpn/wireguard-tools: determine systemd unit directory properly Closes: https://bugs.gentoo.org/687110 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Jason A. Donenfeld <zx2c4@gentoo.org> net-vpn/wireguard-tools/wireguard-tools-1.0.20191226.ebuild | 3 ++- net-vpn/wireguard-tools/wireguard-tools-9999.ebuild | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)