3 %bcond_with gnu # GNU libstdc++/libsupc++ ABI instead of LLVM libcxxabi
5 Summary: LibC++ - C++ standard library from LLVM project
6 Summary(pl.UTF-8): LibC++ - biblioteka standardowa C++ z projektu LLVM
10 License: MIT or BSD-like
12 #Source0Download: https://github.com/llvm/llvm-project/releases/
13 Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/libcxx-%{version}.src.tar.xz
14 # Source0-md5: 3d5630a8dcbec623172e57fae890351b
15 #Source1Download: https://github.com/llvm/llvm-project/releases/
16 Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/libcxxabi-%{version}.src.tar.xz
17 # Source1-md5: e56dac07bbcdd6582f673333a3884a2d
18 #Source2Download: https://github.com/llvm/llvm-project/releases/
19 Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/llvm-%{version}.src.tar.xz
20 # Source2-md5: 80072c6a4be8b9adb60c6aac01f577db
21 URL: https://libcxx.llvm.org/
23 BuildRequires: clang >= %{version}
24 BuildRequires: cmake >= 3.13.4
25 BuildRequires: python3 >= 1:3
26 BuildRequires: rpmbuild(macros) >= 1.605
28 BuildRequires: libstdc++-devel >= 6:10
30 BuildRequires: llvm-libcxxabi-devel
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 libc++ is a new implementation of the C++ standard library, targeting
38 %description -l pl.UTF-8
39 libc++ to nowa implementacja biblioteki standardowej C++ ze wskazaniem
43 Summary: Header files of LLVM LibC++ library
44 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LLVM LibC++
45 Group: Development/Libraries
46 Requires: %{name} = %{version}-%{release}
48 Requires: libstdc++-devel
50 Requires: llvm-libcxxabi-devel
54 Header files of LLVM LibC++ library.
56 %description devel -l pl.UTF-8
57 Pliki nagłówkowe biblioteki LLVM LibC++.
60 Summary: Static LLVM LibC++ library
61 Summary(pl.UTF-8): Statyczna biblioteka LLVM LibC++
62 Group: Development/Libraries
63 Requires: %{name}-devel = %{version}-%{release}
66 Static LLVM LibC++ library.
68 %description static -l pl.UTF-8
69 Statyczna biblioteka LLVM LibC++.
74 %{__mv} libcxx-%{version}.src libcxx
75 %{__mv} libcxxabi-%{version}.src libcxxabi
76 %{__mv} llvm-%{version}.src llvm
80 # requires C++20 compiler (clang ? or gcc 10+)
88 -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=ON \
89 -DLIBCXX_LIBDIR_SUFFIX="${libsubdir#lib}" \
91 -DLIBCXX_CXX_ABI=libstdc++ \
92 -DLIBCXX_CXX_ABI_INCLUDE_PATHS="%{_includedir}/c++/%{cxx_version};%{_includedir}/c++/%{cxx_version}/%{_host}"
94 -DLIBCXX_CXX_ABI=libcxxabi \
95 -DLIBCXX_CXX_ABI_INCLUDE_PATHS="%{_includedir}/libcxxabi"
101 rm -rf $RPM_BUILD_ROOT
103 %{__make} -C build install \
104 DESTDIR=$RPM_BUILD_ROOT
107 rm -rf $RPM_BUILD_ROOT
109 %post -p /sbin/ldconfig
110 %postun -p /sbin/ldconfig
113 %defattr(644,root,root,755)
114 %doc libcxx/{CREDITS.TXT,LICENSE.TXT,TODO.TXT}
115 %attr(755,root,root) %{_libdir}/libc++.so.*.*
116 %attr(755,root,root) %ghost %{_libdir}/libc++.so.1
119 %defattr(644,root,root,755)
120 %attr(755,root,root) %{_libdir}/libc++.so
121 %{_libdir}/libc++experimental.a
122 %dir %{_includedir}/c++
123 %{_includedir}/c++/v1
126 %defattr(644,root,root,755)