File rakudo.spec of Package rakudo

#
# spec file for package rakudo
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#


%global nqp_version %(rpm -q --queryformat='%%{version}' nqp)

Name:           rakudo
Version:        2025.10+git27.g89dff65d3
Release:        2.1
Summary:        Raku (formerly Perl 6) implemenation that runs on MoarVM
License:        Artistic-2.0
Group:          Development/Languages/Other
URL:            http://rakudo.org/
Source0:        rakudo-%{version}.tar.xz
Patch0:         rakudo-test-log.diff
BuildRequires:  fdupes
BuildRequires:  moarvm-devel >= 2022.02
BuildRequires:  nqp >= 2025.10+git1.gea336280d
BuildRequires:  perl(YAML::Tiny)
Provides:       perl6 = %{version}-%{release}
Requires:       nqp = %{nqp_version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%ifarch s390x
BuildRequires:  libffi-devel
%endif

%description
Rakudo, is an implementation of the Raku (formerly Perl 6)
specification that runs on the Moar virtual machine.

%prep
%setup -q
%patch0 -p1

%build
perl Configure.pl --prefix="%{_prefix}" --ignore-errors
VERBOSE_BUILD=1 make

%check
rm t/08-performance/99-misc.t
make test

%install
%make_install
mkdir -p "%{buildroot}/%{_datadir}/perl6/bin"
cp tools/install-dist.p6 "%{buildroot}/%{_datadir}/perl6/bin/install-perl6-dist"
chmod +x "%{buildroot}/%{_datadir}/perl6/bin/install-perl6-dist"
sed -i -e '1s:!/usr/bin/env :!/usr/bin/:' "%{buildroot}/%{_datadir}/perl6/bin"/*
rm "%{buildroot}/%{_bindir}/raku"
rm "%{buildroot}/%{_bindir}/raku-debug"
ln -s rakudo "%{buildroot}/%{_bindir}/raku"
ln -s rakudo-debug "%{buildroot}/%{_bindir}/raku-debug"
%fdupes %{buildroot}/%{_bindir}
%fdupes %{buildroot}/%{_datadir}/perl6/runtime

%files
%defattr(-,root,root)
%doc CREDITS
%license LICENSE
%{_bindir}/*
%{_datadir}/perl6

%changelog
openSUSE Build Service is sponsored by