Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Make building RPMS and other Linux packages easier #17

Merged
merged 4 commits into from

2 participants

@hoelzro

This pull request includes several commits to make the creation of Linux distribution packages easier. Namely...

  • If using DESTDIR to package up Rakudo Star in an RPM or similar format, the Makefile currently ends up writing the package build directory into the shebang line of the installed scripts. This is probably not a good idea.

  • When installing into a packaging staging directory and precompiling modules, the compiler doesn't know where to find the modules it has installed thus far. I changed module-install.pl to help them figure it out.

  • When building the Perl6 debugger, NQP has some trouble locating some resources that are in the staging directory but not in their final destination. This commit explicitly tells NQP where to find them.

The latest commit requires a fairly new version of NQP, so I understand if this can't be merged right away.

There are still things to do; there are annotations in the PIR output for the modules that indicate the staging directory, and hardcoded paths that point to the staging directory for loading dependencies in PIR. I hope to resolve these in later commits.

hoelzro added some commits
@hoelzro hoelzro Remove DESTDIR prefix from bin-install line
If using DESTDIR to package up Rakudo Star in an RPM or similar
format, the Makefile currently ends up writing the package build
directory into the shebang line of the installed scripts.  This
is probably not a good idea.
5d804c4
@hoelzro hoelzro Set PERL6LIB to destination dir when precompiling
This allows package managers to install modules to a staging
directory with the process blowing up
428f9a8
@hoelzro hoelzro Explicitly specify module path when building debugger cd13191
@hoelzro hoelzro Set --dynext when building debugger
This requires a fairly new version of NQP
b2e6559
@pmichaud pmichaud merged commit 173db46 into rakudo:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 18, 2012
  1. @hoelzro

    Remove DESTDIR prefix from bin-install line

    hoelzro authored
    If using DESTDIR to package up Rakudo Star in an RPM or similar
    format, the Makefile currently ends up writing the package build
    directory into the shebang line of the installed scripts.  This
    is probably not a good idea.
Commits on Dec 19, 2012
  1. @hoelzro

    Set PERL6LIB to destination dir when precompiling

    hoelzro authored
    This allows package managers to install modules to a staging
    directory with the process blowing up
Commits on Dec 20, 2012
  1. @hoelzro
Commits on Dec 29, 2012
  1. @hoelzro

    Set --dynext when building debugger

    hoelzro authored
    This requires a fairly new version of NQP
This page is out of date. Refresh to see the latest.
Showing with 17 additions and 11 deletions.
  1. +4 −2 tools/build/Makefile.in
  2. +13 −9 tools/build/module-install.pl
View
6 tools/build/Makefile.in
@@ -79,7 +79,7 @@ modules-install: rakudo-install
@echo "== Installing modules"
$(PERL) tools/build/module-install.pl $(DESTDIR)$(PERL6_INSTALL) $(DESTDIR)$(PERL6_LANG_DIR)/lib $(MODULES)
@echo "== Installing binaries"
- $(PERL) tools/build/bin-install.pl $(DESTDIR)$(PERL6_INSTALL) $(DESTDIR)$(PARROT_BIN_DIR) modules/ufo/bin/ufo modules/panda/bin/panda modules/doc/bin/p6doc
+ $(PERL) tools/build/bin-install.pl $(PERL6_INSTALL) $(DESTDIR)$(PARROT_BIN_DIR) modules/ufo/bin/ufo modules/panda/bin/panda modules/doc/bin/p6doc
modules-test:
$(PERL) tools/build/modules-test.pl $(CURDIR) $(DESTDIR)$(PERL6_INSTALL) modules/MODULES.txt
@@ -88,8 +88,10 @@ perl6-debug: $(RD_EXE)
$(RD_EXE): modules-install
$(NQP_EXE) --vmlibs=perl6_group,perl6_ops --target=pir \
+ --dynext=$(DESTDIR)$(PARROT_LIB_DIR)/dynext/ \
+ --module-path=$(DESTDIR)$(PARROT_LIB_DIR)/languages/nqp/lib \
--output=$(RD_PIR) $(RD_DIR)/bin/perl6-debug.nqp
- $(PARROT_EXE) -o $(RD_PBC) $(RD_PIR)
+ $(PARROT_EXE) --dynext $(DESTDIR)$(PARROT_LIB_DIR)/dynext/ -o $(RD_PBC) $(RD_PIR)
$(PBC_TO_EXE) $(RD_PBC)
$(CHMOD) 755 $(RD_EXE)
View
22 tools/build/module-install.pl
@@ -69,15 +69,19 @@ sub path_to_module_name {
$_;
}
-print "== Precompiling modules\n";
-chdir 'rakudo';
-foreach my $pm (@pmfiles) {
- my $out = $pm;
- $out =~ s/\.pm6?$/.pir/;
- my @cmd = ($perl6bin, '--target=pir', "--output=$out", $pm);
- print join(' ', @cmd), "\n";
- system(@cmd);
-}
+do {
+ local $ENV{'PERL6LIB'} = $perl6lib;
+
+ print "== Precompiling modules\n";
+ chdir 'rakudo';
+ foreach my $pm (@pmfiles) {
+ my $out = $pm;
+ $out =~ s/\.pm6?$/.pir/;
+ my @cmd = ($perl6bin, '--target=pir', "--output=$out", $pm);
+ print join(' ', @cmd), "\n";
+ system(@cmd);
+ }
+};
# According to "Introduction to Algorithms" by Cormen et al., topological
Something went wrong with that request. Please try again.