[rakudo-star] build on top of NQP

Gerd Pokorra gerd at fedoraproject.org
Thu Aug 30 10:33:03 UTC 2012


commit 9c967b1085c3ab85de878080273161ca4779d4f6
Author: gerd <gp at zimt.uni-siegen.de>
Date:   Thu Aug 30 12:26:05 2012 +0200

    build on top of NQP

 rakudo-star.spec |  134 ++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 99 insertions(+), 35 deletions(-)
---
diff --git a/rakudo-star.spec b/rakudo-star.spec
index 2c65d71..68736f2 100644
--- a/rakudo-star.spec
+++ b/rakudo-star.spec
@@ -3,12 +3,12 @@
 %global parrot_version 4.6.0
 
 %define PAR_LIB_DIR %{_libdir}/parrot/%{parrot_version}
-%define parrot_dynext %{PAR_LIB_DIR}/dynext
+%define parrot_dynext %{_libdir}/parrot/%{parrot_version}/dynext
 %define parrot_lang_perl6 %{_libdir}/parrot/%{parrot_version}/languages/perl6
 
 Name:           rakudo-star
 Version:        0.0.%{year}.%{month}_%{parrot_version}
-Release:        1%{?dist}.1
+Release:        2%{?dist}.1
 Summary:        Rakudo, Perl6-modules, Blizkost and documentation
 License:        Artistic 2.0
 Group:          Development/Languages
@@ -30,6 +30,8 @@ BuildRequires:  parrot >= %{parrot_version}
 BuildRequires:  parrot-devel >= %{parrot_version}
 BuildRequires:  parrot-tools >= %{parrot_version}
 
+BuildRequires:  nqp >= 0.0.%{year}.%{month}
+
 # Needed for building blizkost
 BuildRequires:  perl(ExtUtils::Embed)
 
@@ -62,27 +64,92 @@ The documentation includes a PDF-document that describes the using of Perl 6.
 
 
 %build
-cd nqp-%{year}.%{month}
 %{__perl} Configure.pl
-make
 
 # add flags like '-g' to CFLAGS
-#%{__sed} -i -e "/^CFLAGS/ s/$/ $RPM_OPT_FLAGS/" Makefile
-#%{__sed} -i -e "/^CFLAGS/ s/$/ @optimize@/" rakudo/build/Makefile.in
+%{__sed} -i -e "/^CFLAGS/ s/$/ $RPM_OPT_FLAGS/" Makefile
+#%{__sed} -i -e "/^CFLAGS/ s/$/ @optimize@/" rakudo-%{year}.%{month}/tools/build/Makefile.in
 
-#%{__make}
-#%{__make} blizkost
+%{__make}
 
 
 %install
 %{__rm} -rf $RPM_BUILD_ROOT
 
-cd nqp-%{year}.%{month}
-make install DESTDIR=$RPM_BUILD_ROOT
 
+# Rakudo installation
+%{__sed} -i -e 's&$(DESTDIR)$(DOCDIR)/rakudo&$(DESTDIR)$(DOCDIR)/rakudo-star-%{version}&' rakudo-%{year}.%{month}/Makefile
+
+%{__make} rakudo-install DESTDIR=$RPM_BUILD_ROOT
+
+
+# Blizkost installation
+#%{__mkdir} -p $RPM_BUILD_ROOT/usr/bin
+#%{__make} blizkost-install DESTDIR=$RPM_BUILD_ROOT
+#%{__rm} -f $RPM_BUILD_ROOT/usr/share/doc/parrot/%{parrot_version}/languages/perl5/README
+
+
+# First install modules files to "m_install" subdirectory und then copy it
+# to $RPM_BUILD_ROOT, to avoid having the $RPM_BUILD_ROOT in installed files
+export PERL6LIB=$( pwd )/m_install%{parrot_lang_perl6}/lib
+export LD_LIBRARY_PATH=$( pwd )/rakudo/dynext
+%{__mkdir} -p m_install/usr/bin
+%{__ln_s} ../../../perl6 m_install/usr/bin/perl6
+%{__make} modules-install DESTDIR=$( pwd )/m_install
+%{__rm} m_install/usr/bin/perl6
+# move ufo
+%{__mv} m_install/usr/bin m_install%{parrot_lang_perl6}
+
+# Now copy to $RPM_BUILD_ROOT
+%{__cp} -r m_install/* $RPM_BUILD_ROOT
+
+
+# Force executable permission on shared objects so they get stripped
+%{__chmod} 755 $RPM_BUILD_ROOT%{parrot_dynext}/perl6*.so
+#%{__chmod} 755 $RPM_BUILD_ROOT%{parrot_dynext}/blizkost_group.so
 
-%check
 
+# install desktop files
+%define DESK_TARGET $RPM_BUILD_ROOT%{_datadir}/applications/
+%{__mkdir} -p %{DESK_TARGET}
+# specs-URL
+%{__tar} xzf %{SOURCE1} --directory=%{DESK_TARGET} perl6_specs_link.desktop
+# UsingPerl6-PDF-document
+%{__tar} xzf %{SOURCE1} --to-stdout rakudo_guide_pdf.desk.in | %{__sed} "s|@VERSION@|%{version}|g" > %{DESK_TARGET}rakudo_guide_pdf.desktop
+
+desktop-file-install --delete-original --add-category="Documentation"  \
+    --dir=%{DESK_TARGET} %{DESK_TARGET}perl6_specs_link.desktop
+desktop-file-install --delete-original --add-category="Documentation"  \
+    --dir=%{DESK_TARGET} %{DESK_TARGET}rakudo_guide_pdf.desktop
+
+
+%check
+%{?!_without_tests:
+%{__make} rakudo-test
+
+# testing the modules
+export PERL6LIB=$( pwd )/m_install%{parrot_lang_perl6}/lib:$( pwd )/rakudo-%{year}.%{month}/blib
+export LD_LIBRARY_PATH=$( pwd )/rakudo-%{year}.%{month}/dynext:$( pwd )/rakudo-%{year}.%{month}/blib
+#%{__cp} rakudo/Test.p* m_install%{parrot_lang_perl6}/lib
+#
+#prove -e ./perl6 modules/Bailador/t
+#prove -e ./perl6 -r modules/Algorithm-Viterbi/t
+# Configure.p* -> modules/mainline/lib/Test/
+#prove -e ./perl6 -r modules/perl6-File-Find/t
+#prove -e ./perl6 -r modules/form/t
+#prove -e ./perl6 -r modules/json/t
+# this test fails with koji
+#    prove -e ./perl6 -r modules/perl6-lwp-simple/t
+#prove -e ./perl6 -r modules/Perl6-MIME-Base64/t
+#prove -e ./perl6 -r modules/Math-Model/t
+#prove -e ./perl6 -r modules/Math-RungeKutta/t
+#prove -e ./perl6 -r modules/MiniDBI/t
+#prove -e ./perl6 -r modules/svg/t
+#prove -e ./perl6 -r modules/svg-plot/t
+#prove -e ./perl6 -r modules/perl6-Term-ANSIColor/t
+#prove -e ./perl6 -r modules/xml-writer/t
+#prove -e ./perl6 -r modules/yaml-pm6/t
+}
 
 %clean
 %{__rm} -rf $RPM_BUILD_ROOT
@@ -91,35 +158,32 @@ make install DESTDIR=$RPM_BUILD_ROOT
 %files
 %defattr(-,root,root,-)
 %doc LICENSE README docs/CREDITS docs/cheatsheet.txt docs/UsingPerl6-draft.pdf
+%{_bindir}/perl6
+%{parrot_dynext}/perl6_group.so
+%{parrot_dynext}/perl6_ops.so
+%{parrot_lang_perl6}
+%{PAR_LIB_DIR}/languages/nqp/lib/Perl6/*
+%{_mandir}/man1/perl6.1.gz
+%{_mandir}/man1/rakudo.1.gz
 
-%{_bindir}/nqp
-%{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
-%{PAR_LIB_DIR}/library/PASTRegex.pbc
+# Blizkost files
+#%{_bindir}/parrot-blizkost
+#%{_libdir}/parrot/%{parrot_version}/languages/perl5
+#%{parrot_dynext}/blizkost_group.so
 
+# modules part
+# %%{_bindir}/ufo is moved to %%{parrot_lang_perl6}/bin/ufo
+# the other modules files are in %%{parrot_lang_perl6}/lib placed with
+# %%{parrot_lang_perl6} above
 
-%changelog
-* Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.0.2011.07_3.6.0-5.1
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+# desktop files
+%{_datadir}/applications/perl6_specs_link.desktop
+%{_datadir}/applications/rakudo_guide_pdf.desktop
 
-* Wed Apr 25 2012 Gerd Pokorra <gp at zimt.uni-siegen.de> - 0.0.2011.07_3.6.0-4.1
-- rebuild with new ICU library
 
-* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.0.2011.07_3.6.0-3.2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
-
-* Wed Oct 26 2011 Marcela Mašláňová <mmaslano at redhat.com> - 0.0.2011.07_3.6.0-2.2
-- rebuild with new gmp without compat lib
-
-* Wed Oct 12 2011 Peter Schiffer <pschiffe at redhat.com> - 0.0.2011.07_3.6.0-2.1
-- rebuild with new gmp
-
-* Fri Sep 09 2011 Gerd Pokorra <gp at zimt.uni-siegen.de> - 0.0.2011.07_3.6.0-2
-- rebuild with new icu
+%changelog
+* Wed Apr 30 2012 Gerd Pokorra <gp at zimt.uni-siegen.de> - 0.0.2012.07_4.6.0-2.1
+- build on top of own NQP
 
 * Fri Aug 05 2011 Gerd Pokorra <gp at zimt.uni-siegen.de> - 0.0.2011.07_3.6.0-1
 - updated to 2011.07


More information about the scm-commits mailing list