llvm-libunwind/llvm-libunwind.spec

122 lines
3.7 KiB
RPMSpec
Raw Normal View History

2021-11-17 07:52:26 +00:00
%global maj_ver 13
%global min_ver 0
2022-01-12 08:32:45 +00:00
%global patch_ver 1
%global rc_ver 1
2021-11-17 07:52:26 +00:00
%global libunwind_version %{maj_ver}.%{min_ver}.%{patch_ver}
%global libunwind_srcdir libunwind-%{libunwind_version}%{?rc_ver:rc%{rc_ver}}.src
Name: llvm-libunwind
Version: %{libunwind_version}%{?rc_ver:~rc%{rc_ver}}
Release: 1%{?dist}
Summary: LLVM libunwind
License: ASL 2.0 or NCSA or MIT
URL: http://llvm.org
2022-01-12 08:32:45 +00:00
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{libunwind_srcdir}.tar.xz
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{libunwind_srcdir}.tar.xz.sig
2021-11-17 07:52:26 +00:00
Source2: tstellar-gpg-key.asc
# Upstream tighly ties its build to libcxx source, we don't want to use that
# senario, so we need to maintain that patch downstream.
Patch0: standalone.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: ninja-build
BuildRequires: llvm-devel
# For documentation
BuildRequires: python3-sphinx
# For gpg source verification
BuildRequires: gnupg2
# Explicitly not supported upstream
ExcludeArch: s390x
%description
LLVM libunwind is an implementation of the interface defined by the HP libunwind
project. It was contributed Apple as a way to enable clang++ to port to
platforms that do not have a system unwinder. It is intended to be a small and
fast implementation of the ABI, leaving off some features of HP's libunwind
that never materialized (e.g. remote unwinding).
%package devel
Summary: LLVM libunwind development files
Provides: libunwind(major) = %{maj_ver}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Static and unversioned shared libraries for LLVM libunwind
%package doc
Summary: libunwind documentation
# jquery.js and langage_data.js are used in the HTML doc and under BSD License
License: BSD and (ASL 2.0 or NCSA or MIT)
%description doc
Documentation for LLVM libunwind
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -n %{libunwind_srcdir} -p2
%build
%cmake -GNinja \
-DLLVM_CMAKE_PATH=%{_libdir}/cmake/llvm \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DLLVM_BUILD_DOCS=ON \
-DLLVM_ENABLE_SPHINX=ON \
-DLIBUNWIND_ENABLE_STATIC=OFF \
-DLIBUNWIND_INCLUDE_DOCS=ON \
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
-DLLVM_INSTALL_SPHINX_HTML_DIR=%{_pkgdocdir}/html \
-DSPHINX_EXECUTABLE=%{_bindir}/sphinx-build-3
%cmake_build
%install
%cmake_install
# We can't install on default location because that would conflict with
# https://src.fedoraproject.org/rpms/libunwind
# ABI wise, even though llvm-libunwind's library is named libunwind, it doesn't
# have the exact same ABI has gcc's libunwind (it actually provides a subset).
mkdir -p %{buildroot}/%{_libdir}/llvm-unwind/
mv %{buildroot}%{_libdir}/libunwind* %{buildroot}/%{_libdir}/llvm-unwind/
rm %{buildroot}%{_docdir}/libunwind/html/.buildinfo
# Same applies to the documentation
mv %{buildroot}%{_docdir}/libunwind %{buildroot}%{_docdir}/llvm-libunwind
%check
# upstream has a hard dependency on libcxx source code for test to be configured
# properly. We can't model that, so rely on gating instead.
#cmake_build --target check-unwind
%files
%license LICENSE.TXT
%dir %{_libdir}/llvm-unwind
%{_libdir}/llvm-unwind/libunwind.so.*
%files devel
%{_libdir}/llvm-unwind/libunwind.so
%files doc
%license LICENSE.TXT
%dir %{_docdir}/llvm-libunwind
%doc %{_docdir}/llvm-libunwind/html
%changelog
2022-01-12 08:32:45 +00:00
* Wed Jan 12 2022 Nikita Popov <npopov@redhat.com> - 13.0.1~rc1-1
- Update to LLVM 13.0.1rc1
2021-11-17 07:52:26 +00:00
* Wed Nov 17 2021 sguelton@redhat.com - 13.0.0-1
- Initial release