]> git.pld-linux.org Git - packages/llvm-libcxx.git/blob - llvm-libcxx.spec
- up to 15.0.7
[packages/llvm-libcxx.git] / llvm-libcxx.spec
1 #
2 # Conditional build:
3 %bcond_with     gnu     # GNU libstdc++/libsupc++ ABI instead of LLVM libcxxabi
4 #
5 Summary:        LibC++ - C++ standard library from LLVM project
6 Summary(pl.UTF-8):      LibC++ - biblioteka standardowa C++ z projektu LLVM
7 Name:           llvm-libcxx
8 Version:        15.0.7
9 Release:        1
10 License:        MIT or BSD-like
11 Group:          Libraries
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:  c2c0724be18c153ab902a5a880796af8
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:  c1f77222397506239dd79d8109a9113d
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:  c77db4c71e1eb267358204dffe2c6e10
21 Source3:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/cmake-%{version}.src.tar.xz
22 # Source3-md5:  5be9535f0b93cb6232d0171a8abb3137
23 URL:            https://libcxx.llvm.org/
24 # or gcc 10+
25 BuildRequires:  clang >= %{version}
26 BuildRequires:  cmake >= 3.13.4
27 BuildRequires:  python3 >= 1:3
28 BuildRequires:  rpmbuild(macros) >= 1.605
29 %if %{with gnu}
30 BuildRequires:  libstdc++-devel >= 6:10
31 %else
32 BuildRequires:  llvm-libcxxabi-devel
33 %endif
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 libc++ is a new implementation of the C++ standard library, targeting
38 C++11.
39
40 %description -l pl.UTF-8
41 libc++ to nowa implementacja biblioteki standardowej C++ ze wskazaniem
42 na standard C++11.
43
44 %package devel
45 Summary:        Header files of LLVM LibC++ library
46 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki LLVM LibC++
47 Group:          Development/Libraries
48 Requires:       %{name} = %{version}-%{release}
49 %if %{with gnu}
50 Requires:       libstdc++-devel
51 %else
52 Requires:       llvm-libcxxabi-devel
53 %endif
54
55 %description devel
56 Header files of LLVM LibC++ library.
57
58 %description devel -l pl.UTF-8
59 Pliki nagłówkowe biblioteki LLVM LibC++.
60
61 %package static
62 Summary:        Static LLVM LibC++ library
63 Summary(pl.UTF-8):      Statyczna biblioteka LLVM LibC++
64 Group:          Development/Libraries
65 Requires:       %{name}-devel = %{version}-%{release}
66
67 %description static
68 Static LLVM LibC++ library.
69
70 %description static -l pl.UTF-8
71 Statyczna biblioteka LLVM LibC++.
72
73 %prep
74 %setup -q -c -a1 -a2 -a3
75
76 %{__mv} libcxx-%{version}.src libcxx
77 %{__mv} libcxxabi-%{version}.src libcxxabi
78 %{__mv} llvm-%{version}.src llvm
79 %{__mv} cmake-%{version}.src cmake
80
81 %build
82 %if %{without gnu}
83 # requires C++20 compiler (clang ? or gcc 10+)
84 CC="clang"
85 CXX="clang++"
86 %endif
87 libsubdir=%{_lib}
88 %cmake -B build -S libcxx \
89         -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=ON \
90         -DLIBCXX_INCLUDE_BENCHMARKS=OFF \
91         -DLIBCXX_LIBDIR_SUFFIX="${libsubdir#lib}" \
92 %if %{with gnu}
93         -DLIBCXX_CXX_ABI=libstdc++ \
94         -DLIBCXX_CXX_ABI_INCLUDE_PATHS="%{_includedir}/c++/%{cxx_version};%{_includedir}/c++/%{cxx_version}/%{_host}"
95 %else
96         -DLIBCXX_CXX_ABI=system-libcxxabi \
97         -DLIBCXX_CXX_ABI_INCLUDE_PATHS="%{_includedir}/libcxxabi"
98 %endif
99
100 %{__make} -C build
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104
105 %{__make} -C build install \
106         DESTDIR=$RPM_BUILD_ROOT
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %post   -p /sbin/ldconfig
112 %postun -p /sbin/ldconfig
113
114 %files
115 %defattr(644,root,root,755)
116 %doc libcxx/{CREDITS.TXT,LICENSE.TXT,TODO.TXT}
117 %attr(755,root,root) %{_libdir}/libc++.so.*.*
118 %attr(755,root,root) %ghost %{_libdir}/libc++.so.1
119
120 %files devel
121 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_libdir}/libc++.so
123 %{_libdir}/libc++experimental.a
124 %dir %{_includedir}/c++
125 %{_includedir}/c++/v1
126
127 %files static
128 %defattr(644,root,root,755)
129 %{_libdir}/libc++.a
This page took 0.100001 seconds and 3 git commands to generate.