sci-libs/caffe2: fix when PORTAGE_TMPDIR is not the default value

Closes: https://bugs.gentoo.org/946201
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
Alfredo Tupone
2024-12-10 19:00:25 +01:00
parent 0b6587d629
commit 0841eddc7d
2 changed files with 9 additions and 3 deletions

View File

@@ -119,6 +119,7 @@ PATCHES=(
"${FILESDIR}"/${P}-gentoo.patch
"${FILESDIR}"/${PN}-2.4.0-cpp-httplib.patch
"${FILESDIR}"/${P}-glog-0.6.0.patch
"${FILESDIR}"/${P}-newfix-functorch-install.patch
)
src_prepare() {
@@ -295,9 +296,6 @@ src_install() {
# Used by pytorch ebuild
insinto "/var/lib/${PN}"
doins "${BUILD_DIR}"/CMakeCache.txt
mv "${D}${S}"/functorch/functorch.so \
"${D}"/var/lib/${PN}/functorch.so || die
rm -r "${D}"/var/tmp || die
dostrip -x /var/lib/${PN}/functorch.so
rm -rf python

View File

@@ -0,0 +1,8 @@
--- a/functorch/CMakeLists.txt 2024-11-10 11:18:29.151992840 +0100
+++ b/functorch/CMakeLists.txt 2024-11-10 11:20:19.642389982 +0100
@@ -42,4 +42,4 @@
if(NOT ${TORCH_PYTHON_LINK_FLAGS} STREQUAL "")
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS ${TORCH_PYTHON_LINK_FLAGS})
endif()
-install(TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}")
+install(TARGETS ${PROJECT_NAME} DESTINATION "/var/lib/caffe2/")