]> git.pld-linux.org Git - packages/llvm-libcxx.git/blob - llvm-libcxx.spec
ca836e7b189dac4f5c95056e527789436b14d2d6
[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:        14.0.6
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:  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/
22 # or gcc 10+
23 BuildRequires:  clang >= %{version}
24 BuildRequires:  cmake >= 3.13.4
25 BuildRequires:  python3 >= 1:3
26 BuildRequires:  rpmbuild(macros) >= 1.605
27 %if %{with gnu}
28 BuildRequires:  libstdc++-devel >= 6:10
29 %else
30 BuildRequires:  llvm-libcxxabi-devel
31 %endif
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 libc++ is a new implementation of the C++ standard library, targeting
36 C++11.
37
38 %description -l pl.UTF-8
39 libc++ to nowa implementacja biblioteki standardowej C++ ze wskazaniem
40 na standard C++11.
41
42 %package devel
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}
47 %if %{with gnu}
48 Requires:       libstdc++-devel
49 %else
50 Requires:       llvm-libcxxabi-devel
51 %endif
52
53 %description devel
54 Header files of LLVM LibC++ library.
55
56 %description devel -l pl.UTF-8
57 Pliki nagłówkowe biblioteki LLVM LibC++.
58
59 %package static
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}
64
65 %description static
66 Static LLVM LibC++ library.
67
68 %description static -l pl.UTF-8
69 Statyczna biblioteka LLVM LibC++.
70
71 %prep
72 %setup -q -c -a1 -a2
73
74 %{__mv} libcxx-%{version}.src libcxx
75 %{__mv} libcxxabi-%{version}.src libcxxabi
76 %{__mv} llvm-%{version}.src llvm
77
78 %build
79 %if %{without gnu}
80 # requires C++20 compiler (clang ? or gcc 10+)
81 CC="clang"
82 CXX="clang++"
83 %endif
84 install -d build
85 cd build
86 libsubdir=%{_lib}
87 %cmake ../libcxx \
88         -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=ON \
89         -DLIBCXX_LIBDIR_SUFFIX="${libsubdir#lib}" \
90 %if %{with gnu}
91         -DLIBCXX_CXX_ABI=libstdc++ \
92         -DLIBCXX_CXX_ABI_INCLUDE_PATHS="%{_includedir}/c++/%{cxx_version};%{_includedir}/c++/%{cxx_version}/%{_host}"
93 %else
94         -DLIBCXX_CXX_ABI=libcxxabi \
95         -DLIBCXX_CXX_ABI_INCLUDE_PATHS="%{_includedir}/libcxxabi"
96 %endif
97
98 %{__make}
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102
103 %{__make} -C build install \
104         DESTDIR=$RPM_BUILD_ROOT
105
106 %clean
107 rm -rf $RPM_BUILD_ROOT
108
109 %post   -p /sbin/ldconfig
110 %postun -p /sbin/ldconfig
111
112 %files
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
117
118 %files devel
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
124
125 %files static
126 %defattr(644,root,root,755)
127 %{_libdir}/libc++.a
This page took 0.147991 seconds and 2 git commands to generate.