summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Behún <kabel@kernel.org>2022-11-10 13:47:55 +0100
committerAlfredo Tupone <tupone@gentoo.org>2022-11-10 17:50:21 +0100
commit3f3bd41414e681c097158fd4edadf2461b0b9326 (patch)
treec9d72e480e1387f94a1c980abd78459c6b54573f /sci-libs/caffe2
parentdev-libs/FP16: Fix install phase for Gentoo Prefix (diff)
downloadgentoo-3f3bd41414e681c097158fd4edadf2461b0b9326.tar.gz
gentoo-3f3bd41414e681c097158fd4edadf2461b0b9326.tar.bz2
gentoo-3f3bd41414e681c097158fd4edadf2461b0b9326.zip
sci-libs/caffe2: Fix installation for Gentoo Prefix
Add EPREFIX to the TORCH_INSTALL_LIB_DIR and LIBSHM_INSTALL_LIB_SUBDIR library directories in src_configure() and use the ED instead of D variable in src_install() to fix the installation when installing in Gentoo Prefix. Signed-off-by: Marek Behún <kabel@kernel.org> Closes: https://github.com/gentoo/gentoo/pull/28208 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'sci-libs/caffe2')
-rw-r--r--sci-libs/caffe2/caffe2-1.11.0-r2.ebuild6
-rw-r--r--sci-libs/caffe2/caffe2-1.12.0.ebuild6
2 files changed, 6 insertions, 6 deletions
diff --git a/sci-libs/caffe2/caffe2-1.11.0-r2.ebuild b/sci-libs/caffe2/caffe2-1.11.0-r2.ebuild
index 6ae8a8dc9187..d5d2250da0f5 100644
--- a/sci-libs/caffe2/caffe2-1.11.0-r2.ebuild
+++ b/sci-libs/caffe2/caffe2-1.11.0-r2.ebuild
@@ -135,8 +135,8 @@ src_configure() {
-DUSE_TENSORPIPE=OFF
-Wno-dev
- -DTORCH_INSTALL_LIB_DIR=/usr/$(get_libdir)
- -DLIBSHM_INSTALL_LIB_SUBDIR=/usr/$(get_libdir)
+ -DTORCH_INSTALL_LIB_DIR="${EPREFIX}"/usr/$(get_libdir)
+ -DLIBSHM_INSTALL_LIB_SUBDIR="${EPREFIX}"/usr/$(get_libdir)
)
cmake_src_configure
}
@@ -154,7 +154,7 @@ src_install() {
rm -rf python
mkdir -p python/torch || die
- mv "${D}"/usr/lib/python*/site-packages/caffe2 python/ || die
+ mv "${ED}"/usr/lib/python*/site-packages/caffe2 python/ || die
cp torch/version.py python/torch/ || die
python_foreach_impl python_install
}
diff --git a/sci-libs/caffe2/caffe2-1.12.0.ebuild b/sci-libs/caffe2/caffe2-1.12.0.ebuild
index 366c29f98b7f..ddf9e99a9ba2 100644
--- a/sci-libs/caffe2/caffe2-1.12.0.ebuild
+++ b/sci-libs/caffe2/caffe2-1.12.0.ebuild
@@ -136,8 +136,8 @@ src_configure() {
-DUSE_TENSORPIPE=OFF
-Wno-dev
- -DTORCH_INSTALL_LIB_DIR=/usr/$(get_libdir)
- -DLIBSHM_INSTALL_LIB_SUBDIR=/usr/$(get_libdir)
+ -DTORCH_INSTALL_LIB_DIR="${EPREFIX}"/usr/$(get_libdir)
+ -DLIBSHM_INSTALL_LIB_SUBDIR="${EPREFIX}"/usr/$(get_libdir)
)
use cuda && addpredict "/dev/nvidiactl" # bug 867706
@@ -157,7 +157,7 @@ src_install() {
rm -rf python
mkdir -p python/torch || die
- mv "${D}"/usr/lib/python*/site-packages/caffe2 python/ || die
+ mv "${ED}"/usr/lib/python*/site-packages/caffe2 python/ || die
cp torch/version.py python/torch/ || die
python_foreach_impl python_install
}