%global year 2013
%global month 01
%global parrot_version 5.0.0
%global PAR_LIB_DIR %{_libdir}/parrot/%{parrot_version}
%global parrot_dynext %{PAR_LIB_DIR}/dynext
Name: nqp
Version: 0.0.%{year}.%{month}
Release: 1%{?dist}
Summary: Not Quite Perl (6)
Group: Development/Libraries
License: Artistic 2.0 and ISC and WTFPL
URL: https://github.com/perl6/nqp
Source0: http://rakudo.org/downloads/nqp/nqp-%{year}.%{month}.tar.gz
BuildRequires: readline-devel, gmp-devel, libicu-devel
BuildRequires: perl(Test::Harness)
BuildRequires: parrot >= %{parrot_version}
BuildRequires: parrot-devel >= %{parrot_version}
BuildRequires: parrot-tools >= %{parrot_version}
Requires: parrot >= %{parrot_version}
%description
This is "Not Quite Perl" -- a compiler for quickly generating PIR routines
from Perl6-like code. The key feature of NQP is that it's
designed to be a very small compiler (as compared with, say, perl6
or Rakudo) and is focused on being a high-level way to create
compilers and libraries for virtual machines (such as the Parrot
Virtual Machine). Unlike a full-fledged implementation of Perl 6,
NQP strives to have as small a run-time footprint as it can, while
still providing a Perl 6 object model and regular expression engine
for the virtual machine.
%prep
%setup -q -n %{name}-%{year}.%{month}
%build
%{__perl} Configure.pl
CFLAGS="$RPM_OPT_FLAGS -fPIC" %{__make} # %{?_smp_mflags}
%install
%{__make} install DESTDIR=$RPM_BUILD_ROOT
# Force executable permission on shared objects so they get stripped
%{__chmod} 755 $RPM_BUILD_ROOT%{parrot_dynext}/nqp*.so
%check
%ifarch %{ix86}
# This test fails on this architecture
%{__rm} -f t/nqp/60-bigint.t
%endif
%{?!_without_tests: make test}
%files
%doc CREDITS LICENSE README
%{_bindir}/nqp
# The unversioned shared system library files are needed for the essential work
# of the nqp executable, otherwise the executing of nqp fails
# with error message "PARROT VM: Could not load bytecode ..."
%{parrot_dynext}/nqp_group.so
%{parrot_dynext}/nqp_ops.so
%{parrot_dynext}/nqp_bigint_ops.so
%{parrot_dynext}/nqp_dyncall_ops.so
%{PAR_LIB_DIR}/languages/nqp
%{PAR_LIB_DIR}/library/ModuleLoader.pbc
%{_includedir}/parrot/%{parrot_version}/dynpmc/pmc_*
%changelog
* Thu Jan 31 2013 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2013.01-1
- update to 2013.01
- add additional header files
- change the source to the new URL
* Wed Nov 07 2012 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2012.10-1
- update to 2012.10
* Wed Nov 7 2012 Peter Robinson <pbrobinson@fedoraproject.org> 0.0.2012.08.1-2
- compile with distro CFLAGs and -fPIC
* Mon Sep 03 2012 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2012.08.1-1
- update to 2012.08.1
* Tue Aug 14 2012 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2012.07-5
- added check section
- removed clean section
- added ISC to License tag
* Mon Aug 13 2012 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2012.07-4
- changed License tag
- removed defattr
* Mon Aug 13 2012 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2012.07-3
- replaced "define" with "global"
- removed BuildRoot tag
* Wed Aug 08 2012 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2012.07-2
- fixed description error from rpmlint
* Tue Aug 07 2012 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2012.07-1
- did not build with _smp_mflags
- initial .spec file created