]>
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 | |
76d0d499 | 8 | Version: 3.9.0 |
82a35335 JB |
9 | Release: 1 |
10 | License: MIT or BSD-like | |
11 | Group: Libraries | |
5926edea | 12 | #Source0Download: http://llvm.org/releases/download.html |
82a35335 | 13 | Source0: http://llvm.org/releases/%{version}/libcxx-%{version}.src.tar.xz |
76d0d499 | 14 | # Source0-md5: 0a11efefd864ce6f321194e441f7e569 |
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 | ||
50 | %prep | |
51 | %setup -q -n libcxx-%{version}.src | |
52 | ||
53 | %build | |
54 | install -d build | |
55 | cd build | |
800c4e33 | 56 | libsubdir=%{_lib} |
82a35335 | 57 | %cmake .. \ |
800c4e33 JB |
58 | -DLIBCXX_ENABLE_CXX1Y=ON \ |
59 | -DLIBCXX_LIBDIR_SUFFIX="${libsubdir#lib}" \ | |
82a35335 JB |
60 | %if %{with gnu} |
61 | -DLIBCXX_CXX_ABI=libstdc++ \ | |
800c4e33 | 62 | -DLIBCXX_CXX_ABI_INCLUDE_PATHS="%{_includedir}/c++/%{cxx_version};%{_includedir}/c++/%{cxx_version}/%{_host}" |
82a35335 | 63 | %else |
5926edea | 64 | -DLIBCXX_CXX_ABI=libcxxabi \ |
800c4e33 | 65 | -DLIBCXX_CXX_ABI_INCLUDE_PATHS="%{_includedir}/libcxxabi" |
82a35335 JB |
66 | %endif |
67 | ||
68 | %{__make} | |
69 | ||
70 | %install | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
73 | %{__make} -C build install \ | |
74 | DESTDIR=$RPM_BUILD_ROOT | |
75 | ||
76 | %clean | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %post -p /sbin/ldconfig | |
80 | %postun -p /sbin/ldconfig | |
81 | ||
82 | %files | |
83 | %defattr(644,root,root,755) | |
84 | %doc CREDITS.TXT LICENSE.TXT | |
85 | %attr(755,root,root) %{_libdir}/libc++.so.*.* | |
86 | %attr(755,root,root) %ghost %{_libdir}/libc++.so.1 | |
87 | ||
88 | %files devel | |
89 | %defattr(644,root,root,755) | |
90 | %attr(755,root,root) %{_libdir}/libc++.so | |
91 | %dir %{_includedir}/c++ | |
92 | %{_includedir}/c++/v1 |