From e921847ce4c158b81a655693cff02108b60d17c1 Mon Sep 17 00:00:00 2001 From: xiaochn Date: Thu, 15 May 2025 05:53:36 +0000 Subject: [PATCH] fix the build error when use custom vendor Signed-off-by: xiaochn --- tensorflow.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tensorflow.spec b/tensorflow.spec index 60fac6b..09577af 100644 --- a/tensorflow.spec +++ b/tensorflow.spec @@ -1,7 +1,7 @@ %global _empty_manifest_terminate_build 0 Name: tensorflow Version: 2.12.1 -Release: 2 +Release: 3 Summary: An Open Source Machine Learning Framework for Everyone License: Apache License 2.0 URL: https://www.tensorflow.org/ @@ -51,6 +51,10 @@ tar xf external.tar.bz2 -C ${extdir} %ifarch aarch64 %patch 1000 -p0 -d ${extdir} %endif +%if "%{_vendor}" != "openEuler" +sed -i 's/openEuler/%{_vendor}/g' ${extdir}/external/local_config_cc/BUILD +sed -i 's/openEuler/%{_vendor}/g' ${extdir}/external/local_config_cc/builtin_include_directory_paths +%endif ln -sfn ${instdir}/embedded_tools ${extdir}/external/bazel_tools for f in $(find $extdir/external -lname "*/external/*"); do OLDLINK=$(readlink $f); echo $OLDLINK; NEWLINK=${extdir}/external/${OLDLINK#*external}; ln -sf $NEWLINK $f-newlink; mv -Tf $f-newlink $f; done for f in $(find $extdir/external -lname "*/rpmbuild/*"); do OLDLINK=$(readlink $f); echo $OLDLINK; NEWLINK=${HOME}/rpmbuild/${OLDLINK#*rpmbuild}; ln -sf $NEWLINK $f-newlink; mv -Tf $f-newlink $f;done @@ -71,6 +75,9 @@ bazel --output_user_root=`pwd`/../output_user_root build --nofetch --host_copt=- %{_bindir}/* %changelog +* Thu May 15 2025 xiaochn - 2.12.1-3 +- fix the build error when use custom vendor + * Fri Jan 03 2025 misaka00251 - 2.12.1-2 - Use patch macro instead of patch command -- Gitee