%global svnrel r364621 %global commit c45b9dfe5257f8dfec9a193c07073ee95210ecc1 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global checkout git%{shortcommit} %global shortname clc # this stop us generating an empty debuginfo %global debug_package %{nil} Name: libclc Version: 0.2.0 Release: 100.0.1.%{svnrel}%{?dist} Summary: An open source implementation of the OpenCL 1.1 library requirements License: BSD URL: https://libclc.llvm.org #Source0: https://github.com/llvm-mirror/%{name}/archive/%{commit}/%{name}-%{checkout}.tar.gz Source0: https://github.com/llvm-mirror/%{name}/archive/libclc-%{svnrel}.tar.xz ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 %{power64} s390x BuildRequires: clang-devel BuildRequires: libedit-devel BuildRequires: llvm-devel >= 3.9 BuildRequires: python BuildRequires: zlib-devel %description libclc is an open source, BSD licensed implementation of the library requirements of the OpenCL C programming language, as specified by the OpenCL 1.1 Specification. The following sections of the specification impose library requirements: * 6.1: Supported Data Types * 6.2.3: Explicit Conversions * 6.2.4.2: Reinterpreting Types Using as_type() and as_typen() * 6.9: Preprocessor Directives and Macros * 6.11: Built-in Functions * 9.3: Double Precision Floating-Point * 9.4: 64-bit Atomics * 9.5: Writing to 3D image memory objects * 9.6: Half Precision Floating-Point libclc is intended to be used with the Clang compiler's OpenCL frontend. libclc is designed to be portable and extensible. To this end, it provides generic implementations of most library requirements, allowing the target to override the generic implementation at the granularity of individual functions. libclc currently only supports the PTX target, but support for more targets is welcome. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %setup -q -n %{name}-%{svnrel} %build export CFLAGS="%{build_cflags} -D__extern_always_inline=inline" %set_build_flags ./configure.py --prefix=%{_prefix} --libexecdir=%{_libdir}/%{shortname}/ --pkgconfigdir=%{_libdir}/pkgconfig/ sed -i.bak 's|%{_libdir}/llvm/clang|%{_bindir}/clang|g' Makefile %make_build %install %make_install %files %license LICENSE.TXT %doc README.TXT CREDITS.TXT %dir %{_libdir}/%{shortname} %{_libdir}/%{shortname}/*.bc %{_includedir}/%{shortname} %files devel %{_libdir}/pkgconfig/%{name}.pc %changelog