]>
Commit | Line | Data |
---|---|---|
06b6a911 | 1 | |
8b0584c7 | 2 | # requires the OpenCL patches |
2b81df68 | 3 | %define llvm_version 11.0.0 |
8b0584c7 | 4 | |
2b81df68 | 5 | %define opencl_clang_version 11.0.0 |
06b6a911 JK |
6 | |
7 | Summary: The Intel Graphics Compiler for OpenCL | |
8 | Name: intel-graphics-compiler | |
2b81df68 | 9 | Version: 1.0.5353 |
6c3cbaee | 10 | Release: 3 |
06b6a911 JK |
11 | License: MIT |
12 | Group: Libraries | |
13 | Source0: https://github.com/intel/intel-graphics-compiler/archive/igc-%{version}/igc-%{version}.tar.gz | |
2b81df68 | 14 | # Source0-md5: bf101f596f63d1c9d6cddca10b9623ef |
06b6a911 | 15 | Patch0: pkgconfig.patch |
9b211843 | 16 | Patch1: cxx_flags.patch |
06b6a911 JK |
17 | URL: https://github.com/intel/intel-graphics-compiler/ |
18 | BuildRequires: llvm-devel >= %{llvm_version} | |
19 | BuildRequires: opencl-clang-devel >= %{opencl_clang_version} | |
20 | BuildRequires: cmake >= 3.2.0 | |
21 | BuildRequires: pkgconfig | |
d222cd6c | 22 | BuildRequires: rpmbuild(macros) >= 1.605 |
06b6a911 JK |
23 | Requires: %{name}-libs = %{version}-%{release} |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
3ac63ffc JP |
27 | The Intel Graphics Compiler for OpenCL is an LLVM based compiler for |
28 | OpenCL targeting Intel Gen graphics hardware architecture. | |
06b6a911 JK |
29 | |
30 | %package libs | |
31 | Summary: The Intel Graphics Compiler for OpenCL libraries | |
32 | Group: Libraries | |
33 | ||
34 | %description libs | |
35 | The Intel Graphics Compiler for OpenCL libraries. | |
36 | ||
37 | %package devel | |
38 | Summary: Header files for %{name} library | |
39 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
40 | Group: Development/Libraries | |
ba53ee66 | 41 | Requires: llvm-devel >= %{llvm_version} |
06b6a911 JK |
42 | Requires: %{name}-libs = %{version}-%{release} |
43 | ||
44 | %description devel | |
45 | Header files for %{name} library. | |
46 | ||
47 | %description devel -l pl.UTF-8 | |
48 | Pliki nagłówkowe biblioteki %{name}. | |
49 | ||
50 | %prep | |
51 | %setup -qn %{name}-igc-%{version} | |
52 | ||
53 | %patch0 -p1 | |
9b211843 | 54 | %patch1 -p1 |
06b6a911 | 55 | |
2b81df68 JP |
56 | %{__sed} -i -e 's/-Werror/-Werror -Wno-error=deprecated-declarations/' IGC/CMakeLists.txt |
57 | ||
06b6a911 JK |
58 | %build |
59 | install -d build | |
60 | cd build | |
61 | %cmake \ | |
9b211843 JK |
62 | -DCMAKE_BUILD_TYPE=Release \ |
63 | -DCMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS:-%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG}" \ | |
06b6a911 | 64 | -DCCLANG_FROM_SYSTEM=ON \ |
b64329ce | 65 | -DIGC_PREFERRED_LLVM_VERSION=%{llvm_version} \ |
2b81df68 | 66 | -DIGC_BUILD__VC_ENABLED=OFF \ |
06b6a911 JK |
67 | ../ |
68 | %{__make} | |
69 | ||
70 | cd .. | |
71 | ||
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %{__make} -C build install \ | |
76 | DESTDIR=$RPM_BUILD_ROOT | |
77 | ||
78 | %clean | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
81 | %files | |
82 | %defattr(644,root,root,755) | |
83 | %doc README.md | |
84 | %attr(755,root,root) %{_bindir}/GenX_IR | |
8bad0443 | 85 | %ifarch %{x8664} |
06b6a911 | 86 | %attr(755,root,root) %{_bindir}/iga64 |
8bad0443 JK |
87 | %else |
88 | %attr(755,root,root) %{_bindir}/iga32 | |
89 | %endif | |
06b6a911 JK |
90 | |
91 | %files libs | |
92 | %defattr(644,root,root,755) | |
8bad0443 | 93 | %ifarch %{x8664} |
06b6a911 JK |
94 | %attr(755,root,root) %{_libdir}/libiga64.so.1.*.* |
95 | %ghost %attr(755,root,root) %{_libdir}/libiga64.so.1 | |
8bad0443 | 96 | %else |
aea765ea | 97 | %attr(755,root,root) %{_libdir}/libiga32.so.1.*.* |
8bad0443 JK |
98 | %ghost %attr(755,root,root) %{_libdir}/libiga32.so.1 |
99 | %endif | |
06b6a911 JK |
100 | %attr(755,root,root) %{_libdir}/libigc.so.1.*.* |
101 | %ghost %attr(755,root,root) %{_libdir}/libigc.so.1 | |
102 | %attr(755,root,root) %{_libdir}/libigdfcl.so.1.*.* | |
103 | %ghost %attr(755,root,root) %{_libdir}/libigdfcl.so.1 | |
104 | ||
105 | %files devel | |
106 | %defattr(644,root,root,755) | |
380530b6 | 107 | %{_includedir}/iga |
06b6a911 | 108 | %{_includedir}/igc |
380530b6 | 109 | %{_includedir}/visa |
8bad0443 | 110 | %ifarch %{x8664} |
06b6a911 | 111 | %attr(755,root,root) %{_libdir}/libiga64.so |
8bad0443 JK |
112 | %else |
113 | %attr(755,root,root) %{_libdir}/libiga32.so | |
114 | %endif | |
06b6a911 JK |
115 | %attr(755,root,root) %{_libdir}/libigc.so |
116 | %attr(755,root,root) %{_libdir}/libigdfcl.so | |
117 | %{_pkgconfigdir}/igc-opencl.pc |