Name: skip Version: 0.0.8 Release: 4%{?dist} Summary: Skip language compiler License: MIT URL: http://skiplang.com/ Source0: %{name}-%{version}.tar.xz Source1: folly-v2019.06.17.00.tar.gz Source2: googletest-release-1.8.0-31-gaa148eb2.tar.gz Source3: gflags-v2.2.1-7-g7759264.tar.gz Patch0: %{name}-Werror.patch Patch1: %{name}-system-libicu.patch Patch2: %{name}-sk-jemalloc.patch Patch3: %{name}-python3-fix.patch Requires: clang BuildRequires: chrpath BuildRequires: git BuildRequires: autoconf BuildRequires: libtool %{?rhel: BuildRequires: python2 BuildRequires: python2-virtualenv } %{!?rhel: BuildRequires: python-unversioned-command } BuildRequires: cmake BuildRequires: ninja-build BuildRequires: clang BuildRequires: libicu-devel BuildRequires: double-conversion-devel BuildRequires: libunwind-devel BuildRequires: boost-devel BuildRequires: jemalloc-devel BuildRequires: libevent-devel BuildRequires: openssl-devel BuildRequires: glog-devel BuildRequires: pcre-devel BuildConflicts: binutils-devel # otherwise the folly configure will pick libiberty and get confused %if 0%{?fedora} >= 30 %global use_system_gflags 1 %endif %description Skip is a general-purpose programming language that tracks side effects to provide caching with reactive invalidation, ergonomic and safe parallelism, and efficient garbage collection. Skip is statically typed and ahead-of-time compiled using LLVM to produce highly optimized executables. %prep %autosetup -p 1 tar xf %{SOURCE1} -C third-party/folly/src tar xf %{SOURCE2} -C third-party/googletest/src %{!?use_system_gflags: tar xf %{SOURCE3} -C third-party/gflags/src sed -e 's/find_package(Gflags/# find_package(Gflags/' \ -i third-party/folly/src/CMake/folly-deps.cmake } %build %{?rhel: # The build scripts use unversioned python commands, this make # sure we have a python executable in the PATH virtualenv-2 pyenv . pyenv/bin/activate } mkdir build cd build cmake \ %{!?use_system_gflags:-DGFLAGS_FOUND=FALSE} \ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \ .. %ninja_build %install rm -rf $RPM_BUILD_ROOT mkdir -p "$RPM_BUILD_ROOT/%{_bindir}" "$RPM_BUILD_ROOT/%{_libdir}/skip" cp build/bin/skip_server "$RPM_BUILD_ROOT/%{_bindir}" cp build/bin/skip_printer "$RPM_BUILD_ROOT/%{_bindir}" cp -R src/runtime/prelude "$RPM_BUILD_ROOT/%{_libdir}/skip" cp build/src/runtime/native/lib/preamble.ll "$RPM_BUILD_ROOT/%{_libdir}/skip" cp build/src/runtime/native/libskip_runtime.a "$RPM_BUILD_ROOT/%{_libdir}/skip" cp build/src/runtime/native/CMakeFiles/sk_standalone.src.dir/src/sk_standalone.cpp.o "$RPM_BUILD_ROOT/%{_libdir}/skip" cp build/third-party/install/lib/libfolly.a "$RPM_BUILD_ROOT/%{_libdir}/skip" mkdir -p "$RPM_BUILD_ROOT/%{_libdir}/skip/ide" cp -R ide/vim ide/emacs "$RPM_BUILD_ROOT/%{_libdir}/skip/ide" cat > "$RPM_BUILD_ROOT/%{_bindir}/sk" <> "$RPM_BUILD_ROOT/%{_bindir}/sk" chmod 755 "$RPM_BUILD_ROOT/%{_bindir}/sk" chrpath --delete "$RPM_BUILD_ROOT/%{_bindir}/skip_"* %files %license LICENSE %doc docs %{_bindir}/* %{_libdir}/skip %changelog * Wed Nov 13 2019 Olivier Andrieu - 0.0.8-4 - build for fedora 30/31 * Wed Nov 6 2019 Olivier Andrieu - 0.0.8-3 - adapt for centos8/el8 - remove the ide/nuclide directory to avoid a dependency on node - add the clang dependency * Thu Jun 6 2019 Olivier Andrieu - 0.0.8-1 - Initial package