Sophie

Sophie

distrib > Mageia > 9 > x86_64 > by-pkgid > e3a4a6713f26889224e4a3a80f220f1e > files > 3

libomp-15.0.6-2.mga9.src.rpm

%global toolchain clang

%global maj_ver 15
%global libomp_version %{maj_ver}.0.6
#global rc_ver 3
%global libomp_srcdir openmp-%{libomp_version}%{?rc_ver:rc%{rc_ver}}.src


%ifarch ppc64le
%global libomp_arch ppc64
%else
%global libomp_arch %{_arch}
%endif

%global baserelease %{rel}
%define rel 2

Name: libomp
Version: %{libomp_version}%{?rc_ver:~rc%{rc_ver}}
Release: %mkrel %{?rc_ver:0.}%{baserelease}%{?rc_ver:.rc%{rc_ver}}
Summary: OpenMP runtime for clang
Group: Development/Other

License: NCSA
URL: https://openmp.llvm.org/
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp_version}%{?rc_ver:-rc%{rc_ver}}/%{libomp_srcdir}.tar.xz
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp_version}%{?rc_ver:-rc%{rc_ver}}/%{libomp_srcdir}.tar.xz.sig
Source2: release-keys.asc
Source3: run-lit-tests
Source4: lit.fedora.cfg.py

# https://reviews.llvm.org/D143200
Patch10: 0001-Fix-version-scripts-after-undefined-version-script-changes.patch
Patch11: 0002-Fix-CMake-version-symbol-testing.patch

BuildRequires: clang
# For clang-offload-packager
BuildRequires: clang-tools-extra
BuildRequires: cmake
BuildRequires: ninja-build
BuildRequires: elfutils-devel
BuildRequires: perl
BuildRequires: perl-Data-Dumper
BuildRequires: perl-Encode
BuildRequires: libffi-devel

# For gpg source verification
BuildRequires:	gnupg2


# libomptarget needs the llvm cmake files
BuildRequires: llvm-devel

# libomp does not support s390x.
ExcludeArch: s390x

%description
OpenMP runtime for clang.

%package devel
Summary: OpenMP header files
Requires: %{name}%{?isa} = %{version}-%{release}
Requires: clang-resource-filesystem%{?isa} = %{version}

%description devel
OpenMP header files.

%package test
Summary: OpenMP regression tests
Requires: %{name}%{?isa} = %{version}-%{release}
Requires: %{name}-devel%{?isa} = %{version}-%{release}
Requires: clang
Requires: llvm
Requires: python3-lit

%description test
OpenMP regression tests.

%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -n %{libomp_srcdir} -p2

%build
# FC compatibility:
%global _vpath_builddir %{_target_platform}

%cmake	-GNinja \
	-DLIBOMP_INSTALL_ALIASES=OFF \
	-DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \
	-DLLVM_DIR=%{_libdir}/cmake/llvm \
	-DCMAKE_INSTALL_INCLUDEDIR=%{_libdir}/clang/%{libomp_version}/include \
%if 0%{?__isa_bits} == 64
	-DOPENMP_LIBDIR_SUFFIX=64 \
%else
	-DOPENMP_LIBDIR_SUFFIX= \
%endif
	-DCMAKE_SKIP_RPATH:BOOL=ON

%__cmake --build  %{_vpath_builddir}


%install
DESTDIR="%{buildroot}" %__cmake --install "%{_vpath_builddir}"

# Test package setup
%global libomp_srcdir %{_datadir}/libomp/src/
%global libomp_testdir %{libomp_srcdir}/runtime/test/
%global lit_cfg %{libomp_testdir}/%{_arch}.site.cfg.py
%global lit_fedora_cfg %{_datadir}/libomp/lit.fedora.cfg.py

install -d %{buildroot}%{libomp_srcdir}/runtime
cp -R runtime/test  %{buildroot}%{libomp_srcdir}/runtime
cp -R runtime/src  %{buildroot}%{libomp_srcdir}/runtime

# Generate lit config files.  Strip off the last line that initiates the
# test run, so we can customize the configuration.
head -n -1 %{_vpath_builddir}/runtime/test/lit.site.cfg >> %{buildroot}%{lit_cfg}

# Install custom fedora config file
cp %{SOURCE4} %{buildroot}%{lit_fedora_cfg}

# Patch lit config files to load custom fedora config
echo "lit_config.load_config(config, '%{lit_fedora_cfg}')" >> %{buildroot}%{lit_cfg}

# Install test script
install -d %{buildroot}%{_libexecdir}/tests/libomp
install -m 0755 %{SOURCE3} %{buildroot}%{_libexecdir}/tests/libomp

# Remove static libraries with equivalent shared libraries
rm -rf %{buildroot}%{_libdir}/libarcher_static.a

%check
%cmake_build --target check-openmp

%files
%license LICENSE.TXT
%{_libdir}/libomp.so
%ifnarch %{arm}
%{_libdir}/libompd.so
%{_libdir}/libarcher.so
%endif
%ifnarch %{ix86} %{arm}
%{_libdir}/libomptarget.rtl.amdgpu.so.%{maj_ver}
%{_libdir}/libomptarget.rtl.cuda.so.%{maj_ver}
%{_libdir}/libomptarget.rtl.%{libomp_arch}.so.%{maj_ver}
%endif
%{_libdir}/libomptarget.so.%{maj_ver}

%files devel
%{_libdir}/clang/%{libomp_version}/include/omp.h
%{_libdir}/cmake/openmp/FindOpenMPTarget.cmake
%ifnarch %{arm}
%{_libdir}/clang/%{libomp_version}/include/omp-tools.h
%{_libdir}/clang/%{libomp_version}/include/ompt.h
%{_libdir}/clang/%{libomp_version}/include/ompt-multiplex.h
%endif
%ifnarch %{ix86} %{arm}
%{_libdir}/libomptarget.rtl.amdgpu.so
%{_libdir}/libomptarget.rtl.cuda.so
%{_libdir}/libomptarget.rtl.%{libomp_arch}.so
%{_libdir}/libomptarget.devicertl.a
%{_libdir}/libomptarget-amdgpu-*.bc
%{_libdir}/libomptarget-nvptx-*.bc
%endif
%{_libdir}/libomptarget.so

%files test
%{_datadir}/libomp
%{_libexecdir}/tests/libomp/


%changelog
* Sun Apr 02 2023 daviddavid <daviddavid> 15.0.6-2.mga9
+ Revision: 1951255
- backport others patches to fix CMake version symbol testing
  * https://reviews.llvm.org/D143200
- add upstream patch to not do error on undefined version script symbols
  * https://github.com/llvm/llvm-project/issues/58345

* Thu Dec 08 2022 tv <tv> 15.0.6-1.mga9
+ Revision: 1919231
- Update to LLVM 15.0.6

* Thu Nov 10 2022 papoteur <papoteur> 15.0.4-3.mga9
+ Revision: 1905137
- new 15.0.4

* Fri Oct 07 2022 neoclust <neoclust> 15.0.0-3.mga9
+ Revision: 1895232
- Fix File list for arm

* Fri Oct 07 2022 neoclust <neoclust> 15.0.0-2.mga9
+ Revision: 1895231
- Rebuild because of missing rpms in armv7hl

* Wed Sep 21 2022 tv <tv> 15.0.0-1.mga9
+ Revision: 1891263
- Update to LLVM 15.0.0
- Add explicit requires from libomp-devel to libomp

* Fri Jun 17 2022 tv <tv> 14.0.5-1.mga9
+ Revision: 1864662
- Update to LLVM 14.0.5

* Wed Mar 30 2022 tv <tv> 14.0.0-1.mga9
+ Revision: 1834908
- Update to LLVM 14.0.0

* Fri Feb 04 2022 tv <tv> 13.0.1-1.mga9
+ Revision: 1771388
- Update to 13.0.1 final

* Wed Oct 20 2021 tv <tv> 13.0.0-1.mga9
+ Revision: 1752296
- 13.0.0 Release

* Thu Aug 05 2021 luigiwalser <luigiwalser> 12.0.1-2.mga9
+ Revision: 1739657
- rebuild for libffi

* Mon Jul 19 2021 tv <tv> 12.0.1-1.mga9
+ Revision: 1737063
- 12.0.1 Release
- Fix install path

* Fri Apr 16 2021 tv <tv> 12.0.0-1.mga9
+ Revision: 1715996
- 12.0.0 final

* Fri Apr 09 2021 tv <tv> 12.0.0-0.7.rc5.mga9
+ Revision: 1714258
- 12.0.0 RC5

* Fri Apr 02 2021 tv <tv> 12.0.0-0.4.rc4.mga9
+ Revision: 1712589
- 12.0.0 RC4

* Fri Mar 12 2021 tv <tv> 12.0.0-0.4.rc3.mga9
+ Revision: 1701745
- LLVM 12.0.0 rc3

* Sun Feb 28 2021 tv <tv> 12.0.0-0.2.rc2.mga9
+ Revision: 1693206
- 12.0.0-rc2 release

* Mon Feb 01 2021 tmb <tmb> 11.0.1-4.mga8
+ Revision: 1674357
- rebuild for proper rel

* Thu Jan 07 2021 tv <tv> 11.0.1-3.mga8.mga8
+ Revision: 1669444
- LLVM 11.0.1 final

* Tue Dec 22 2020 tv <tv> 11.0.1-2.rc2.mga8.mga8
+ Revision: 1662971
- llvm 11.0.1-rc2

* Fri Dec 04 2020 tv <tv> 11.0.1-1.rc1.mga8.mga8
+ Revision: 1652574
- llvm 11.0.1-rc1

* Thu Nov 26 2020 tv <tv> 11.0.0-2.1.mga8.mga8
+ Revision: 1649445
- fix deps

* Wed Nov 25 2020 tv <tv> 11.0.0-2.mga8.mga8
+ Revision: 1649344
- 11.0.0

* Thu Oct 08 2020 akien <akien> 10.0.1-1.mga8.mga8
+ Revision: 1632805
- Version 10.0.1

* Mon Jul 20 2020 tv <tv> 10.0.0-4.mga8.mga8
+ Revision: 1607471
- adjust for %%cmake_install being different from FC's one
- Use modern cmake macro
- Use gnupg verify
- make libomp-test requires the lib it was built with

* Fri Jun 12 2020 tv <tv> 10.0.0-2.mga8.mga8
+ Revision: 1593048
- Add Requires: libomp-devel = %%{version}-%%{release} to libomp-test to avoid
  the need to test interoperability between the various combinations of old
  and new subpackages.

* Tue Mar 24 2020 tv <tv> 10.0.0-1.mga8.mga8
+ Revision: 1559493
- 10.0.0 final

* Thu Mar 19 2020 tv <tv> 10.0.0-0.5.rc5.mga8.mga8
+ Revision: 1558098
- 10.0.0 rc5
- Disable tests that require several cores when running on a single core

* Sun Mar 15 2020 tv <tv> 10.0.0-0.4.rc4.mga8.mga8
+ Revision: 1556557
- 10.0.0 rc4

* Thu Mar 05 2020 tv <tv> 10.0.0-0.3.rc3.mga8.mga8
+ Revision: 1554129
- 10.0.0 RC3

* Wed Feb 19 2020 tv <tv> 10.0.0-0.1.rc2.mga8.mga8
+ Revision: 1544487
- 10.0.0 RC2

* Wed Feb 12 2020 tv <tv> 10.0.0-0.1.rc1.mga8.mga8
+ Revision: 1508972
- 10.0.0 rc1
+ wally <wally>
- build with new cmake macros

* Sat Sep 21 2019 tv <tv> 9.0.0-1.mga8.mga8
+ Revision: 1444192
- 9.0.0 Release

* Mon Sep 16 2019 tv <tv> 9.0.0-0.1.rc3.mga8.mga8
+ Revision: 1442675
- 9.0.0-rc3 Release

* Sat Apr 13 2019 tv <tv> 8.0.0-1.mga8
+ Revision: 1389633
- 8.0.0 final

* Sun Dec 30 2018 tv <tv> 7.0.1-1.mga7
+ Revision: 1346950
- 7.0.1

* Mon Sep 24 2018 tv <tv> 7.0.0-2.mga7
+ Revision: 1303446
- new release
+ umeabot <umeabot>
- Mageia 7 Mass Rebuild

* Thu Jun 28 2018 tv <tv> 6.0.1-1.mga7
+ Revision: 1240619
- 6.0.1

* Fri Apr 13 2018 tv <tv> 6.0.0-2.mga7
+ Revision: 1218447
- new release

* Sat Jan 06 2018 tv <tv> 5.0.1-2.mga7
+ Revision: 1190768
- fix deps

* Tue Dec 26 2017 tv <tv> 5.0.1-1.mga7
+ Revision: 1185123
- imported package libomp


* Thu Dec 21 2017 Tom Stellard <tstellar@redhat.com> - 5.0.1-1
- 5.0.1 Release.

* Mon May 15 2017 Tom Stellard <tstellar@redhat.com> - 5.0.0-1
- Initial version.