commit:     1f6128143a5f8bb3dd26c112a1269099d7cde9c9
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Mon Jan 29 14:57:18 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Feb  3 07:22:34 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f612814

sci-libs/caffe2: do not move torch headers; symlink them

This allows to use provided CMake configuration to build other projects
(like intel-extension-for-pytorch).

Closes: https://bugs.gentoo.org/923269
Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/35073
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sci-libs/caffe2/{caffe2-2.1.2-r2.ebuild => caffe2-2.1.2-r3.ebuild} | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sci-libs/caffe2/caffe2-2.1.2-r2.ebuild 
b/sci-libs/caffe2/caffe2-2.1.2-r3.ebuild
similarity index 98%
rename from sci-libs/caffe2/caffe2-2.1.2-r2.ebuild
rename to sci-libs/caffe2/caffe2-2.1.2-r3.ebuild
index f45e501e8567..9b7554309dbc 100644
--- a/sci-libs/caffe2/caffe2-2.1.2-r2.ebuild
+++ b/sci-libs/caffe2/caffe2-2.1.2-r3.ebuild
@@ -223,16 +223,15 @@ src_install() {
        rm -rf python
        mkdir -p python/torch/include || die
        mv "${ED}"/usr/lib/python*/site-packages/caffe2 python/ || die
-       mv "${ED}"/usr/include/torch python/torch/include || die
        if use cuda; then
                mv "${ED}${S}"/nvfuser python/nvfuser || die
                mv "${ED}"/usr/$(get_libdir)/nvfuser.so python/nvfuser/_C.so || 
die
        fi
-       rm -rf "${ED}${S}"/test
-       rm -rf "${ED}${S}"/third_party
        cp torch/version.py python/torch/ || die
        python_domodule python/caffe2
        python_domodule python/torch
+       ln -s ../../../../../include/torch \
+               "${D}$(python_get_sitedir)"/torch/include/torch || die # bug 
923269
        if use cuda; then
                python_domodule python/nvfuser
        fi

Reply via email to