blob: 97c6dad7e92aeb22c59c5925fe244dd5e7f7886b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
%define gccdir %{_libdir}/gcc/%{_cygwin_target}/4.5.3
Name: cygwin-clang
Version: 3.0
Release: 1%{?dist}
Summary: Clang compiler for Cygwin toolchain
Group: Development/Libraries
License: NCSA
URL: http://clang.llvm.org
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: http://www.llvm.org/releases/%{version}/llvm-%{version}.tar.gz
Source1: http://www.llvm.org/releases/%{version}/clang-%{version}.tar.gz
BuildRequires: gcc-c++
BuildRequires: libffi-devel
# for pod2man
BuildRequires: perl
Requires: cygwin-binutils
Requires: cygwin-gcc
Requires: cygwin-gcc-c++
%description
Clang C/C++/ObjC compiler for the Cygwin toolchain
%prep
%setup -q -T -b 0 -a 1 -n llvm-%{version}.src
mv clang-%{version}.src tools/clang
%build
%{configure} --target=%{_cygwin_target} --enable-targets=x86,cbe,cpp \
--disable-assertions --enable-optimized --enable-libffi \
--disable-embed-stdcxx --disable-bindings \
--with-clang-resource-dir=../%{_lib}/clang/%{_cygwin_target}/%{version} \
--with-c-include-dirs=%{gccdir}/include:%{_cygwin_includedir}:%{_cygwin_includedir}/w32api \
--with-cxx-include-root=%{gccdir}/include/c++ \
--with-cxx-include-arch=%{_cygwin_target}
make %{?_smp_mflags} REQUIRES_RTTI=1 ENABLE_DOCS=0
make -C tools/clang/docs/tools clang.1
%install
rm -rf $RPM_BUILD_ROOT
make install -C tools/clang/lib/Headers \
PROJ_headers=$RPM_BUILD_ROOT%{_libdir}/clang/%{_cygwin_target}/%{version}/include
install -D -m0755 Release/bin/clang $RPM_BUILD_ROOT%{_bindir}/%{_cygwin_target}-clang
ln -s %{_cygwin_target}-clang $RPM_BUILD_ROOT%{_bindir}/%{_cygwin_target}-clang++
install -D -m0644 tools/clang/docs/tools/clang.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{_cygwin_target}-clang.1
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc LICENSE.TXT README.txt
%{_bindir}/%{_cygwin_target}-clang
%{_bindir}/%{_cygwin_target}-clang++
%{_libdir}/clang/%{_cygwin_target}/
%{_mandir}/man1/%{_cygwin_target}-clang.*
%changelog
* Sun Feb 05 2011 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 3.0-1
- Initial RPM release.
|