ldc2-1.18.0.ebuild: eninja fails in installing phase with ACCESS DENIED
BorisCarvajal opened this issue · comments
Boris Carvajal commented
It seems that the command eninja -C "${BUILD_DIR}" install
doesn't respect the sandbox mode and tries to use the root fs.
A quick fix is adding DESTDIR="${D}"
to the cmd:
DESTDIR="${D}" eninja -C "${BUILD_DIR}" install
Furthermore I think the best solution is to keep using cmake-utils_src_{make,install}
,
delete -G Ninja
from mycmakeargs
and set either:
CMAKE_MAKEFILE_GENERATOR="ninja"
at the start or EAPI=7
.
With the new eapi ninja is the default generator for cmake.
diff --git a/dev-lang/ldc2/ldc2-1.18.0.ebuild b/dev-lang/ldc2/ldc2-1.18.0.ebuild
index 0c75a56..d15013d 100644
--- a/dev-lang/ldc2/ldc2-1.18.0.ebuild
+++ b/dev-lang/ldc2/ldc2-1.18.0.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit multilib-build cmake-utils ninja-utils eapi7-ver llvm
+inherit multilib-build cmake-utils llvm
MY_PV="${PV//_/-}"
MY_P="ldc-${MY_PV}-src"
@@ -54,7 +54,6 @@ d_src_configure() {
# Make sure libphobos2 is installed into ldc2's directory.
export LIBDIR_${ABI}="${LIBDIR_HOST}"
local mycmakeargs=(
- -G Ninja
-DD_VERSION=2
-DCMAKE_INSTALL_PREFIX=/usr/lib/ldc2/$(ver_cut 1-2)
-DD_COMPILER="${DMD}"
@@ -67,11 +66,11 @@ d_src_configure() {
}
d_src_compile() {
- eninja -C "${BUILD_DIR}"
+ cmake-utils_src_make
}
d_src_install() {
- eninja -C "${BUILD_DIR}" install
+ cmake-utils_src_install
rm -rf "${ED}"/usr/share/bash-completion
}
Marco Leise commented
Ah thanks, I'm not really up to date with build ebuild writing. I'll update the ebuild with your patch.