|
|
d57bb15 |
%global with_snapshot 0
|
|
|
c5b4389 |
%global commit ec62d6cbef2fab4c49003c0206716d3d6248b59e
|
|
Igor Gnatenko |
54f9961 |
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
Igor Gnatenko |
54f9961 |
|
|
|
fb12699 |
Name: ispc
|
|
|
010e91c |
Version: 1.23.0
|
|
|
3dc8589 |
%if %{with_snapshot}
|
|
|
c5b4389 |
Release: %autorelease -p -s 20230102git%{shortcommit}
|
|
|
3dc8589 |
%else
|
|
|
69a21fe |
Release: %autorelease
|
|
|
3dc8589 |
%endif
|
|
|
fb12699 |
Summary: C-based SPMD programming language compiler
|
|
|
fb12699 |
|
|
|
c5b4389 |
License: BSD-3-Clause
|
|
|
fb12699 |
URL: https://ispc.github.io/
|
|
|
3dc8589 |
%if %{with_snapshot}
|
|
Igor Gnatenko |
54f9961 |
Source0: https://github.com/%{name}/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
|
|
|
3dc8589 |
%else
|
|
|
3dc8589 |
Source0: https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
3dc8589 |
%endif
|
|
|
cc987e9 |
|
|
|
fb12699 |
BuildRequires: bison
|
|
|
d2afcfc |
BuildRequires: cmake
|
|
|
d2afcfc |
BuildRequires: clang-devel
|
|
|
c7fc346 |
BuildRequires: doxygen
|
|
|
fb12699 |
BuildRequires: flex
|
|
|
d2afcfc |
BuildRequires: gcc-c++
|
|
|
d57bb15 |
BuildRequires: libomp-devel
|
|
|
d2afcfc |
BuildRequires: llvm-devel
|
|
|
d57bb15 |
BuildRequires: pkgconfig(libffi)
|
|
|
5faa42b |
BuildRequires: pkgconfig(ncurses)
|
|
|
84f746d |
BuildRequires: pkgconfig(python3)
|
|
|
fb12699 |
%ifarch x86_64
|
|
|
d7100a1 |
# Koji 64-bit buildroots do not contain packages from 32-bit builds, therefore
|
|
|
d7100a1 |
# the 'glibc-devel.i686' variant is provided as 'glibc32'.
|
|
|
d7100a1 |
BuildRequires: (glibc32 or glibc-devel(%__isa_name-32))
|
|
|
fb12699 |
%endif
|
|
|
4639c0b |
BuildRequires: pkgconfig(tbb)
|
|
|
3e49846 |
BuildRequires: pkgconfig(zlib)
|
|
|
3e49846 |
|
|
|
a44eb9b |
# Upstream only supports these architectures
|
|
|
b588397 |
ExclusiveArch: x86_64 aarch64
|
|
|
d2afcfc |
|
|
|
fb12699 |
%description
|
|
|
fb12699 |
A compiler for a variant of the C programming language, with extensions for
|
|
|
fb12699 |
"single program, multiple data" (SPMD) programming.
|
|
|
fb12699 |
|
|
|
c138618 |
%package devel
|
|
|
c138618 |
Summary: Development files for %{name}
|
|
|
c138618 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
c138618 |
|
|
|
c138618 |
%description devel
|
|
|
c138618 |
The %{name}-devel package contains libraries and header files for
|
|
|
775f7e9 |
applications that use %{name}.
|
|
|
775f7e9 |
|
|
|
775f7e9 |
%package static
|
|
|
775f7e9 |
Summary: Static libraries for %{name} development
|
|
|
8cf24ed |
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
|
|
775f7e9 |
|
|
|
775f7e9 |
%description static
|
|
|
775f7e9 |
The %{name}-static package includes static libraries needed
|
|
|
775f7e9 |
to develop programs that use %{name}.
|
|
|
775f7e9 |
|
|
|
fb12699 |
%prep
|
|
|
3dc8589 |
%if %{with_snapshot}
|
|
|
0d0e7d3 |
%autosetup -n %{name}-%{commit} -p1
|
|
|
3dc8589 |
%else
|
|
|
0d0e7d3 |
%autosetup -n %{name}-%{version} -p1
|
|
|
3dc8589 |
%endif
|
|
|
fb12699 |
|
|
|
00a47c5 |
# Use gcc rather clang by default
|
|
|
d2afcfc |
sed -i 's|set(CMAKE_C_COMPILER "clang")|set(CMAKE_C_COMPILER "gcc")|g' CMakeLists.txt
|
|
|
d2afcfc |
sed -i 's|set(CMAKE_CXX_COMPILER "clang++")|set(CMAKE_CXX_COMPILER "g++")|g' CMakeLists.txt
|
|
|
fb12699 |
|
|
|
5faa42b |
# Delete unrecognized command options from gcc-c++
|
|
|
5faa42b |
sed -i 's|-Wno-c99-extensions -Wno-deprecated-register||g' CMakeLists.txt
|
|
|
5faa42b |
|
|
|
3e49846 |
# Suppress warning message as error
|
|
|
3e49846 |
sed -i 's| -Werror ||g' CMakeLists.txt
|
|
|
3e49846 |
|
|
|
d2afcfc |
# Fix all Python shebangs recursively in .
|
|
|
a44eb9b |
%py3_shebang_fix .
|
|
|
84f746d |
|
|
|
d2afcfc |
%build
|
|
|
2f8ef1f |
%cmake \
|
|
|
5faa42b |
-DCMAKE_BUILD_TYPE=Release \
|
|
|
6fead96 |
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
|
|
de3f495 |
-DCMAKE_EXE_LINKER_FLAGS="%{optflags} -fPIE" \
|
|
|
2f8ef1f |
-DISPC_INCLUDE_EXAMPLES=OFF \
|
|
|
dd843b6 |
-DISPC_INCLUDE_TESTS=OFF \
|
|
|
70bf821 |
-DLEVEL_ZERO_INCLUDE_DIR=%{_includedir} \
|
|
|
70bf821 |
-DLEVEL_ZERO_LIB_LOADER=%{_libddir} \
|
|
|
70bf821 |
-DLLVM_ENABLE_ASSERTIONS=OFF
|
|
|
b588397 |
%cmake_build
|
|
|
de3f495 |
|
|
|
fb12699 |
%install
|
|
|
b588397 |
%cmake_install
|
|
|
fb12699 |
|
|
|
fb12699 |
%files
|
|
|
fb12699 |
%license LICENSE.txt
|
|
|
fb12699 |
%{_bindir}/%{name}
|
|
|
6fead96 |
%{_bindir}/check_isa
|
|
|
4639c0b |
%{_libdir}/lib%{name}rt.so.{1,%{version}}
|
|
|
4639c0b |
%{_libdir}/lib%{name}rt_device_cpu.so.{1,%{version}}
|
|
|
c138618 |
%files devel
|
|
|
c138618 |
%{_includedir}/%{name}rt/
|
|
|
c138618 |
%{_libdir}/cmake/%{name}rt-%{version}/
|
|
|
c138618 |
%{_libdir}/lib%{name}rt.so
|
|
|
4639c0b |
%{_libdir}/lib%{name}rt_device_cpu.so
|
|
|
fb12699 |
|
|
|
775f7e9 |
%files static
|
|
|
775f7e9 |
%license LICENSE.txt
|
|
|
775f7e9 |
%{_libdir}/lib%{name}rt_static.a
|
|
|
775f7e9 |
|
|
|
fb12699 |
%changelog
|
|
|
69a21fe |
%autochangelog
|