Blob Blame History Raw
#
# noarch:	moar,jvm
#

#
# disables the check: brp-java-repack-jars
# needed that the following error do not happen at the 'rakudo' build
# also the the command 'nqp-j --version' fails with that error:
#  Unhandled exception: java.lang.RuntimeException: Bytecode jar contains
#  unexpected file META-INF/
#     in  (src/stage2/gen/NQP.nqp)
#
%define __jar_repack %{nil}


%global year 2015
%global month 11


Name:		nqp
Version:	0.0.%{year}.%{month}
Release:	1%{?dist}
Summary:	Not Quite Perl (6)

BuildArch:	noarch

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:	perl(Test::Harness)
BuildRequires:	perl(ExtUtils::Command)

BuildRequires:	moarvm
BuildRequires:	moarvm-devel

Requires:	moarvm


%description
This is "Not Quite Perl" -- a lightweight Perl 6-like environment for virtual
machines. The key feature of NQP is that it's designed to be a very small
environment (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 JVM and MoarVM). Unlike a full-fledged implementation of Perl 6, NQP
strives to have as small a runtime footprint as it can, while still providing
a Perl 6 object model and regular expression engine for the virtual machine.


#--

%package jvm
Summary:	Not Quite Perl (6) build on JVM
Group:		Development/Libraries

BuildArch:	noarch

BuildRequires:	perl(Text::ParseWords)
BuildRequires:	perl(Test::Harness)

BuildRequires:	jpackage-utils
BuildRequires:	java
BuildRequires:	java-devel

Requires:	java


%description jvm
Not Quite Perl (6) build on JVM

#--

%package doc
Summary:	Documentation for Not Quite Perl (6)
Group:		Documentation

BuildArch:	noarch


%description doc
Documentation and also examples about NQP.

#--


%prep
%setup -q -n %{name}-%{year}.%{month}


%build
%{__perl} Configure.pl --backends=moar,jvm --prefix=%{_usr}
CFLAGS="$RPM_OPT_FLAGS -fPIC" %{__make} %{?_smp_mflags}


%install
%{__make} install DESTDIR=$RPM_BUILD_ROOT


%check
# fails at prove -r --exec "./nqp-m" ...
rm -f t/hll/06-sprintf.t
rm -f t/nqp/19-file-ops.t
rm -f t/nqp/90-findmethod.t
%{?!_without_tests: make test}


%files
%doc CREDITS LICENSE README.pod
%{_bindir}/nqp
%{_bindir}/nqp-m
%dir %{_datadir}/nqp
%dir %{_datadir}/nqp/lib
%{_datadir}/nqp/lib/*.moarvm
%{_datadir}/nqp/lib/profiler/template.html


%files jvm
%{_bindir}/nqp-j
%{_bindir}/eval-client.pl
%dir %{_datadir}/nqp
%dir %{_datadir}/nqp/lib
%{_datadir}/nqp/lib/*.jar
%{_datadir}/nqp/runtime


%files doc
%doc docs examples


%changelog
* Tue Dec 01 2015 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2015.11-1
- jvm subpackage builds on all architectures
- update 2015.11

* Mon Sep 28 2015 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2015.09.1-1
- update to 2015.09.1

* Sun May 24 2015 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2015.05-1
- update to 2015.05

* Thu Apr 30 2015 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2015.04-3
- add subpackage doc
- define __jar_repack nil

* Wed Apr 29 2015 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2015.04-2
- build architecture independent

* Fri Aug 15 2014 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2014.04-1
- update to 20014.04

* Fri Apr 04 2014 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2014.03-4
- add subpackage jvm

* Fri Apr 04 2014 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2014.03-3
- add a comment while not all libtommath source files are deleted

* Thu Apr 03 2014 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2014.03-2
- add deleting of libtommath source files in prep section

* Thu Apr 03 2014 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2014.03-1
- update to 20014.03
- run tests only on x86_64 architecture
- add flag has-libtommath to Configure.pl and a patch for it

* Wed Feb 19 2014 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2014.01-1
- update to 20014.01
- rebuild for new ICU
- the executable is renamed from nqp to nqp-p

* Fri Oct 04 2013 Gerd Pokorra <gp@zimt.uni-siegen.de> 0.0.2013.09-1
- update to 20013.09
- add docs and examples directories to dokumentation files

* 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