commit: 3074ad7fddf2e3132bebb0e32a2e8998ad43bb77 Author: Sv. Lockal <lockalsash <AT> gmail <DOT> com> AuthorDate: Sun Mar 15 16:46:07 2026 +0000 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> CommitDate: Sun Mar 15 18:28:07 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3074ad7f
sci-ml/caffe2: fix patch application for musl Old patch failed to apply on systems where get_libdir returned "lib". Closes: https://bugs.gentoo.org/968173 Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/45941 Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org> sci-ml/caffe2/caffe2-2.10.0-r5.ebuild | 4 ++-- sci-ml/caffe2/caffe2-2.9.1-r3.ebuild | 3 ++- sci-ml/caffe2/files/caffe2-2.7.1-aotriton-fixes.patch | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sci-ml/caffe2/caffe2-2.10.0-r5.ebuild b/sci-ml/caffe2/caffe2-2.10.0-r5.ebuild index 2a9a4121be01..87d0c37ed765 100644 --- a/sci-ml/caffe2/caffe2-2.10.0-r5.ebuild +++ b/sci-ml/caffe2/caffe2-2.10.0-r5.ebuild @@ -204,8 +204,8 @@ src_prepare() { # Change libaotriton path sed -i \ - -e "/set(__AOTRITON_LIB/s|lib/|$(get_libdir)/|g" \ - -e "s|}/lib|}/$(get_libdir)|g" \ + -e "/set(__AOTRITON_LIB/s|lib/|\${CMAKE_INSTALL_LIBDIR}/|g" \ + -e "s|}/lib|}/\${CMAKE_INSTALL_LIBDIR}|g" \ cmake/External/aotriton.cmake \ || die diff --git a/sci-ml/caffe2/caffe2-2.9.1-r3.ebuild b/sci-ml/caffe2/caffe2-2.9.1-r3.ebuild index 00dd1979e173..81a37d000c44 100644 --- a/sci-ml/caffe2/caffe2-2.9.1-r3.ebuild +++ b/sci-ml/caffe2/caffe2-2.9.1-r3.ebuild @@ -202,7 +202,8 @@ src_prepare() { # Change libaotriton path sed -i \ - -e "s|}/lib|}/$(get_libdir)|g" \ + -e "/set(__AOTRITON_LIB/s|lib/|\${CMAKE_INSTALL_LIBDIR}/|g" \ + -e "s|}/lib|}/\${CMAKE_INSTALL_LIBDIR}|g" \ cmake/External/aotriton.cmake \ || die diff --git a/sci-ml/caffe2/files/caffe2-2.7.1-aotriton-fixes.patch b/sci-ml/caffe2/files/caffe2-2.7.1-aotriton-fixes.patch index 1d2c7bf8f89d..c648f3a39ed0 100644 --- a/sci-ml/caffe2/files/caffe2-2.7.1-aotriton-fixes.patch +++ b/sci-ml/caffe2/files/caffe2-2.7.1-aotriton-fixes.patch @@ -8,7 +8,7 @@ Upstream bug: https://github.com/pytorch/pytorch/issues/158109 # Note it is INSTALL"ED" if(DEFINED ENV{AOTRITON_INSTALLED_PREFIX}) - install(DIRECTORY -- $ENV{AOTRITON_INSTALLED_PREFIX}/lib64 +- $ENV{AOTRITON_INSTALLED_PREFIX}/${CMAKE_INSTALL_LIBDIR} - $ENV{AOTRITON_INSTALLED_PREFIX}/include - DESTINATION ${__AOTRITON_INSTALL_DIR}) set(__AOTRITON_INSTALL_DIR "$ENV{AOTRITON_INSTALLED_PREFIX}")
