# # 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 2017 %global month 01 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, moarvm-devel Requires: moarvm >= 0.%{year}.%{month} %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 run-time 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 #BuildRequires: jna Requires: java #Requires: jna %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 # needed to build on arm sed -i -e "s/= java$/= java -Xmx2048m/" tools/build/Makefile-JVM.in #rm -r 3rdparty/jna # make sure not to bundle 'jna' # src/vm/jvm/runners/nqp-j.bat this file is only for windows rm -r 3rdparty/libtommath 3rdparty/sha1 # this was for the parrot backend # prevent rpmlint errors in the doc subpackage find examples -maxdepth 1 -name "*.nqp" \ -exec %{__sed} -i -e '1 s&#!.*\(nqp\)&#!/usr/bin/\1&' {} \; # convert Windows newlines to Linx format (CR-LF -> LF) %{__perl} -pi -e 's/\r\n$/\n/g' examples/rubyish/t/recursion.t \ examples/rubyish/examples-rubyish/fractal-tree.rbi \ examples/rubyish/t/bitwise.t docs/ops.markdown \ examples/rubyish/t/inheritance.t examples/rubyish/t/line-spanning.t \ examples/rubyish/examples-rubyish/closure.rbi # correct file mode bits to prevent rpmlint warning %{__chmod} 644 docs/ops.markdown %{__perl} Configure.pl --backends=moar,jvm --prefix=%{_usr} # --with-jna=%%{_javadir}/jna.jar # There are different places for the libjnidispatch.so library for the # i686 and x86_64 architecture # /usr/lib/jna/libjnidispatch.so for i686 # /usr/lib64/jna/libjnidispatch.so for x86_64 # so the --with-jna option could not be used 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/060-bigint.t # jvm rm -f t/nativecall/01-basic.t #rm -f t/nqp/76-capture.t %ifarch ppc rm -f t/nqp/059-nqpop.t # fails on ppc %endif %{?!_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 * Wed Feb 01 2017 Gerd Pokorra 0.0.2017.01-1 - update to 2017.01 * Tue Jan 17 2017 Gerd Pokorra 0.0.2016.11-2 - better support updates with version dependent require for moarvm * Sat Dec 10 2016 Gerd Pokorra 0.0.2016.11-1 - also build for epel7 - update to 2016.11 * Sun Jul 24 2016 Gerd Pokorra 0.0.2016.07-2 - bundle jna again, because building rakudo on top off it would not work * Tue Jul 19 2016 Gerd Pokorra 0.0.2016.07-1 - remove commands to not bundle 'jna' rather use the new configuration option --with-jna - update to 2016.07 * Fri Feb 26 2016 Gerd Pokorra 0.0.2016.02-1 - update to 2016.02 * Mon Dec 07 2015 Gerd Pokorra 0.0.2015.11-3 - do not bundle 'jna' * Tue Dec 01 2015 Gerd Pokorra 0.0.2015.11-1 - jvm subpackage builds on all architectures - update 2015.11 * Mon Sep 28 2015 Gerd Pokorra 0.0.2015.09.1-1 - update to 2015.09.1 * Sun May 24 2015 Gerd Pokorra 0.0.2015.05-1 - update to 2015.05 * Thu Apr 30 2015 Gerd Pokorra 0.0.2015.04-3 - add subpackage doc - define __jar_repack nil * Wed Apr 29 2015 Gerd Pokorra 0.0.2015.04-2 - build architecture independent * Fri Aug 15 2014 Gerd Pokorra 0.0.2014.04-1 - update to 20014.04 * Fri Apr 04 2014 Gerd Pokorra 0.0.2014.03-4 - add subpackage jvm * Fri Apr 04 2014 Gerd Pokorra 0.0.2014.03-3 - add a comment while not all libtommath source files are deleted * Thu Apr 03 2014 Gerd Pokorra 0.0.2014.03-2 - add deleting of libtommath source files in prep section * Thu Apr 03 2014 Gerd Pokorra 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 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 0.0.2013.09-1 - update to 20013.09 - add docs and examples directories to dokumentation files * Thu Jan 31 2013 Gerd Pokorra 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 0.0.2012.10-1 - update to 2012.10 * Wed Nov 7 2012 Peter Robinson 0.0.2012.08.1-2 - compile with distro CFLAGs and -fPIC * Mon Sep 03 2012 Gerd Pokorra 0.0.2012.08.1-1 - update to 2012.08.1 * Tue Aug 14 2012 Gerd Pokorra 0.0.2012.07-5 - added check section - removed clean section - added ISC to License tag * Mon Aug 13 2012 Gerd Pokorra 0.0.2012.07-4 - changed License tag - removed defattr * Mon Aug 13 2012 Gerd Pokorra 0.0.2012.07-3 - replaced "define" with "global" - removed BuildRoot tag * Wed Aug 08 2012 Gerd Pokorra 0.0.2012.07-2 - fixed description error from rpmlint * Tue Aug 07 2012 Gerd Pokorra 0.0.2012.07-1 - did not build with _smp_mflags - initial .spec file created