File emscripten-fastcomp.spec of Package emscripten-fastcomp
#
# spec file for package emscripten-fastcomp
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: emscripten-fastcomp
Version: 1.38.28
Release: 0
Summary: LLVM and clang fork for Emscripten
License: University of Illinois/NCSA OSL
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Development/Tools
URL: https://github.com/emscripten-core/emscripten-fastcomp
Source: https://github.com/emscripten-core/emscripten-fastcomp/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: https://github.com/emscripten-core/emscripten-fastcomp-clang/archive/%{version}.tar.gz#/%{name}-clang-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: gcc-c++
###BuildRequires: git
BuildRequires: gtest
BuildRequires: java-11-openjdk-devel
BuildRequires: libxml2-devel
BuildRequires: nodejs10-devel
BuildRequires: pkgconfig
BuildRequires: python-devel
BuildRequires: python2-PyYAML
BuildRequires: python2-Pygments
%description
LLVM/clang fork for Emscripten
%package -n %{name}-devel
Summary: Development files for %{name}
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Development/Tools
Requires: %{name} = %{version}
%description -n %{name}-devel
Development files for %{name}.
%prep
%setup -q
mkdir -pv tools/clang
tar xzf %{SOURCE1} -C tools/clang --strip-components=1
%build
### useless, I think I need to build some libraries as static instead
### (e.g. libLLVMSupport)
###export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/build/%{_lib}
###
%cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCLANG_BUILD_SHARED_LIBS:BOOL=ON \
-DLLVM_TARGETS_TO_BUILD="host;JSBackend" \
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DCLANG_INCLUDE_TESTS=OFF \
-DLLVM_REQUIRES_RTTI=ON \
-DLLVM_ENABLE_TIMESTAMPS=OFF \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_ENABLE_PIC=ON \
-DLLVM_LIBDIR_SUFFIX=64
# -DLLVM_TARGETS_TO_BUILD="X86;JSBackend"
# -DCLANG_INCLUDE_EXAMPLES=OFF -DCLANG_INCLUDE_TESTS=OFF ..
#make --enable-optimized
%make_jobs
%install
%cmake_install
%files
%license LICENSE.TXT
%doc README.txt readme-emscripten-fastcomp.txt CODE_OWNERS.TXT CREDITS.TXT LLVMBuild.txt RELEASE_TESTERS.TXT
%{_bindir}/bugpoint
%{_bindir}/c-index-test
%{_bindir}/clang*
%{_bindir}/git-clang-format
%{_bindir}/llc
%{_bindir}/lli
%{_bindir}/llvm*
%{_bindir}/sancov
%{_bindir}/sanstats
%{_bindir}/scan-build
%{_bindir}/scan-view
%{_bindir}/obj2yaml
%{_bindir}/opt
%{_bindir}/verify-uselistorder
%{_bindir}/yaml2obj
%{_libdir}/BugpointPasses.so
%{_libdir}/LLVMHello.so
%{_libdir}/libLTO.so.*
%{_libdir}/libclang.so.*
%dir %{_sharedir}/clang
%{_sharedir}/clang/*
%dir %{_sharedir}/opt-viewer
%{_sharedir}/opt-viewer/*
%dir %{_sharedir}/scan-build
%{_sharedir}/scan-build/*
%{_mandir}/man1/scan-build.1%{?ext_man}
%dir %{_sharedir}/scan-view
%{_sharedir}/scan-view/*
%files -n %{name}-devel
%{_libdir}/libLLVM*.a
%{_libdir}/libclang*.a
%{_libdir}/libLTO.so
%{_libdir}/libclang.so
%dir %{_includedir}/clang
%{_includedir}/clang/*
%dir %{_includedir}/clang-c
%{_includedir}/clang-c/*
%dir %{_includedir}/llvm
%{_includedir}/llvm/*
%dir %{_includedir}/llvm-c
%{_includedir}/llvm-c/*
%dir %{_libdir}/clang
%{_libdir}/clang/*
%dir %{_libdir}/cmake/llvm
%{_libdir}/cmake/llvm/*
%changelog