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