%global year 2022 %global month 12 Name: moarvm Version: %{year}.%{month} Release: 1%{dist} Summary: Virtual machine for Rakudo and NQP License: Artistic-2.0 URL: https://moarvm.org/ Source: https://github.com/MoarVM/MoarVM/releases/download/%{version}/MoarVM-%{version}.tar.gz %if 0%{?fedora} >= 33 || 0%{?mageia} >= 8 || 0%{?rhel} >= 8 || 0%{?suse_version} > 1500 %define has_libuv 1 %else %define has_libuv 0 %endif %if 0%{?rhel} > 0 && 0%{?rhel} < 8 %define has_libzstd 0 %else %define has_libzstd 1 %endif BuildRequires: gcc make perl BuildRequires: libffi-devel libatomic_ops-devel BuildRequires: libtommath-devel libuv-devel %undefine _package_note_file %description MoarVM, short for "Metamodel On A Runtime Virtual Machine", is a virtual machine for the Rakudo compiler and the NQP compiler toolchain. %package devel Summary: Header files for MoarVM development Requires: %{name}%{?_isa} = %{version}-%{release} %description devel files of moarvm-devel. %prep %autosetup -n MoarVM-%{version} rm -rf 3rdparty/libuv rm -rf 3rdparty/libatomicops rm -rf 3rdparty/dyncall rm -rf 3rdparty/libtommath #rm -rf 3rdparty/mimalloc %build %{__perl} Configure.pl --prefix=%{_usr} --libdir=%{_libdir} \ --has-libuv \ --has-libffi \ --has-libatomic_ops \ --has-libtommath \ --mimalloc %make_build %install %make_install # Move the 3rd party include files into the moar subdirectory. We don't want # to clash with include files that are provided by the operating system. # Rakudo and NQP prepend the moar subdirectory to their include path. for i in libatomic_ops libtommath libuv mimalloc; do if [ -d %{buildroot}%{_includedir}/$i ]; then mv %{buildroot}%{_includedir}/$i/* %{buildroot}%{_includedir}/moar/ rmdir %{buildroot}%{_includedir}/$i fi done %files /usr/bin/moar /usr/lib64/libmoar.so /usr/share/nqp %files devel /usr/include/moar/ /usr/share/pkgconfig/moar.pc %changelog