]>
Commit | Line | Data |
---|---|---|
82a35335 JB |
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 | |
6b4e6430 | 8 | Version: 7.0.0 |
82a35335 JB |
9 | Release: 1 |
10 | License: MIT or BSD-like | |
11 | Group: Libraries | |
d27b4c56 JB |
12 | #Source0Download: http://releases.llvm.org/download.html |
13 | Source0: http://releases.llvm.org/%{version}/libcxx-%{version}.src.tar.xz | |
6b4e6430 | 14 | # Source0-md5: 5ef835bf8c9f49611af4d5f3362d9658 |
f97f72f9 | 15 | URL: http://libcxx.llvm.org/ |
908067b5 | 16 | BuildRequires: cmake >= 3.4.3 |
82a35335 JB |
17 | BuildRequires: rpmbuild(macros) >= 1.605 |
18 | %if %{with gnu} | |
19 | BuildRequires: libstdc++-devel | |
20 | %else | |
21 | BuildRequires: llvm-libcxxabi-devel | |
22 | %endif | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | libc++ is a new implementation of the C++ standard library, targeting | |
27 | C++11. | |
28 | ||
29 | %description -l pl.UTF-8 | |
30 | libc++ to nowa implementacja biblioteki standardowej C++ ze wskazaniem | |
31 | na standard C++11. | |
32 | ||
33 | %package devel | |
34 | Summary: Header files of LLVM LibC++ library | |
35 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LLVM LibC++ | |
36 | Group: Development/Libraries | |
37 | Requires: %{name} = %{version}-%{release} | |
38 | %if %{with gnu} | |
39 | Requires: libstdc++-devel | |
40 | %else | |
41 | Requires: llvm-libcxxabi-devel | |
42 | %endif | |
43 | ||
44 | %description devel | |
45 | Header files of LLVM LibC++ library. | |
46 | ||
47 | %description devel -l pl.UTF-8 | |
48 | Pliki nagłówkowe biblioteki LLVM LibC++. | |
49 | ||
d05c82af JB |
50 | %package static |
51 | Summary: Static LLVM LibC++ library | |
52 | Summary(pl.UTF-8): Statyczna biblioteka LLVM LibC++ | |
53 | Group: Development/Libraries | |
54 | Requires: %{name}-devel = %{version}-%{release} | |
55 | ||
56 | %description static | |
57 | Static LLVM LibC++ library. | |
58 | ||
59 | %description static -l pl.UTF-8 | |
60 | Statyczna biblioteka LLVM LibC++. | |
61 | ||
82a35335 JB |
62 | %prep |
63 | %setup -q -n libcxx-%{version}.src | |
64 | ||
65 | %build | |
66 | install -d build | |
67 | cd build | |
800c4e33 | 68 | libsubdir=%{_lib} |
82a35335 | 69 | %cmake .. \ |
800c4e33 | 70 | -DLIBCXX_LIBDIR_SUFFIX="${libsubdir#lib}" \ |
82a35335 JB |
71 | %if %{with gnu} |
72 | -DLIBCXX_CXX_ABI=libstdc++ \ | |
800c4e33 | 73 | -DLIBCXX_CXX_ABI_INCLUDE_PATHS="%{_includedir}/c++/%{cxx_version};%{_includedir}/c++/%{cxx_version}/%{_host}" |
82a35335 | 74 | %else |
5926edea | 75 | -DLIBCXX_CXX_ABI=libcxxabi \ |
800c4e33 | 76 | -DLIBCXX_CXX_ABI_INCLUDE_PATHS="%{_includedir}/libcxxabi" |
82a35335 JB |
77 | %endif |
78 | ||
79 | %{__make} | |
80 | ||
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %{__make} -C build install \ | |
85 | DESTDIR=$RPM_BUILD_ROOT | |
86 | ||
87 | %clean | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %post -p /sbin/ldconfig | |
91 | %postun -p /sbin/ldconfig | |
92 | ||
93 | %files | |
94 | %defattr(644,root,root,755) | |
95 | %doc CREDITS.TXT LICENSE.TXT | |
96 | %attr(755,root,root) %{_libdir}/libc++.so.*.* | |
97 | %attr(755,root,root) %ghost %{_libdir}/libc++.so.1 | |
98 | ||
99 | %files devel | |
100 | %defattr(644,root,root,755) | |
101 | %attr(755,root,root) %{_libdir}/libc++.so | |
6b4e6430 JB |
102 | %{_libdir}/libc++experimental.a |
103 | %{_libdir}/libc++fs.a | |
82a35335 JB |
104 | %dir %{_includedir}/c++ |
105 | %{_includedir}/c++/v1 | |
d05c82af JB |
106 | |
107 | %files static | |
108 | %defattr(644,root,root,755) | |
109 | %{_libdir}/libc++.a |