diff --git a/llvm-toolset-19.spec b/llvm-toolset-19.spec index e4219157f090267da35db166d549755349b89814..d9d79d713ae96feb424b6521f6c72691b34d8649 100644 --- a/llvm-toolset-19.spec +++ b/llvm-toolset-19.spec @@ -149,7 +149,7 @@ #region main package Name: llvm-toolset-%{maj_ver} Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 3 +Release: 4 Summary: The Low Level Virtual Machine License: NCSA @@ -567,7 +567,9 @@ License: Apache-2.0 WITH LLVM-exception OR NCSA URL: http://lldb.llvm.org/ Requires: %{pkg_name_clang}-libs%{?_isa} = %{version}-%{release} -Requires: %{?scl_prefix}python3-lldb +%if %{with sys_llvm} +Requires: python%{python3_pkgversion}-lldb +%endif %description -n %{pkg_name_lldb} LLDB is a next generation, high-performance debugger. It is built as a set @@ -582,15 +584,17 @@ Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release} %description -n %{pkg_name_lldb}-devel The package contains header files for the LLDB debugger. -%package -n %{?scl_prefix}python3-lldb -%{?python_provide:%python_provide python3-lldb} +%if %{with sys_llvm} +%package -n python%{python3_pkgversion}-lldb +%{?python_provide:%python_provide python%{python3_pkgversion}-lldb} Summary: Python module for LLDB Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release} -%description -n %{?scl_prefix}python3-lldb +%description -n python%{python3_pkgversion}-lldb The package contains the LLDB Python module. %endif +%endif #endregion LLDB packages #region MLIR packages @@ -622,16 +626,18 @@ Requires: %{pkg_name_mlir}-static%{?_isa} = %{version}-%{release} %description -n %{pkg_name_mlir}-devel MLIR development files. -%package -n %{?scl_prefix}python3-mlir -%{?python_provide:%python_provide python3-mlir} +%if %{with sys_llvm} +%package -n python%{python3_pkgversion}-mlir +%{?python_provide:%python_provide python%{python3_pkgversion}-mlir} Summary: MLIR python bindings Requires: python3 -Requires: python3-numpy +Requires: python%{python3_pkgversion}-numpy -%description -n %{?scl_prefix}python3-mlir +%description -n python%{python3_pkgversion}-mlir MLIR python bindings. %endif +%endif #endregion MLIR packages #region libcxx packages @@ -1396,19 +1402,24 @@ install -D -m 644 -t %{buildroot}%{_mandir}/man1/ lld/docs/ld.lld.1 # python: fix binary libraries location liblldb=$(basename $(readlink -e %{buildroot}%{install_libdir}/liblldb.so)) +%if %{with sys_llvm} mkdir -p %{buildroot}%{python3_sitearch} mv %{buildroot}%{install_prefix}/..%{python3_sitearch}/lldb %{buildroot}%{python3_sitearch}/lldb ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so %py_byte_compile %{__python3} %{buildroot}%{python3_sitearch}/lldb %endif +rm -rf %{buildroot}%{install_prefix}/..%{python3_sitearch}/lldb +%endif #endregion LLDB installation #region mlir installation %if %{with mlir} +%if %{with sys_llvm} mkdir -p %{buildroot}/%{python3_sitearch} mv %{buildroot}%{install_prefix}/python_packages/mlir_core/mlir %{buildroot}/%{python3_sitearch} +%endif # These directories should be empty now. -rmdir %{buildroot}%{install_prefix}/python_packages/mlir_core %{buildroot}%{install_prefix}/python_packages +rm -rf %{buildroot}%{install_prefix}/python_packages/mlir_core %{buildroot}%{install_prefix}/python_packages # Unneeded files. rm -rf %{buildroot}%{install_prefix}/src/python %endif @@ -2635,8 +2646,10 @@ fi %{install_libdir}/liblldb*.so %{install_libdir}/liblldb.so.* %{install_libdir}/liblldbIntelFeatures.so.* +%if %{os_version} > 2203 %{_mandir}/man1/lldb-server%{exec_suffix}.1.gz %{_mandir}/man1/lldb%{exec_suffix}.1.gz +%endif %if %{with bundle_compat_lib} %{_libdir}/liblldb.so.%{compat_maj_ver}* %endif @@ -2644,9 +2657,11 @@ fi %files -n %{pkg_name_lldb}-devel %{install_includedir}/lldb -%files -n %{?scl_prefix}python3-lldb +%if %{with sys_llvm} +%files -n python%{python3_pkgversion}-lldb %{python3_sitearch}/lldb %endif +%endif #endregion LLDB files #region MLIR files @@ -2716,9 +2731,11 @@ fi %{install_libdir}/libmlir_runner_utils.so %{install_libdir}/libMLIR*.so -%files -n %{?scl_prefix}python3-mlir +%if %{with sys_llvm} +%files -n python%{python3_pkgversion}-mlir %{python3_sitearch}/mlir/ %endif +%endif #endregion MLIR files #region libcxx files @@ -2788,6 +2805,9 @@ fi #endregion files %changelog +* Mon Mar 3 2025 liyunfei liyunfei33@huawei.com - 19.1.7-4 +- Remove python pack without sys_llvm + * Fri Feb 28 2025 jchzhou - 19.1.7-3 - Backport riscv64 support for offload host plugin - Exclude packaging non-supported liborc_rt.a for riscv64