Hi Parrot folks,
I'm trying to package both parrot and rakudo packages, where
rakudo should be built with an installed parrot.
While doing so I stumbled over a couple of problems:
1) rakudo needs the "devel" files plus pqp and pct for building,
they currently don't get installed by parrot's "make install".
I patched install_files.pl to include those files.
2) rakudo currently needs the deprecated dynoplibs.pl/dynpmc.pl.
3) pbc_to_exe needs parrot_config.o, so I marked
parrot_config.o/install_config.o/null_config.o with a
[devel]lib tag.
4) pbc_to_exe searches for files in parrot's build_dir, this
makes no sense if pbc_to_exe is installed.
I patched it so that it compares "prefix" with "build_dir",
if they differ, pbc_to_exe uses the "installed" locations.
5) I also strip perl's '-Wl,-rpath' from the ccldflags, as
that rpath doesn't belong to parrot.
Comments?
Cheers,
Michael.
--
Michael Schroeder [email protected]
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
--- ./tools/dev/install_files.pl.orig 2009-04-03 13:49:21.000000000 +0000
+++ ./tools/dev/install_files.pl 2009-04-03 14:54:42.000000000 +0000
@@ -170,7 +170,7 @@ while (<>) {
$meta =~ s/^\[(.*?)\]//;
next unless $package; # Skip if this file belongs to no package
- next unless $package =~ /main|library|pge/;
+ next unless $package =~ /main|library|pge|nqp|pct|devel/;
my %meta;
@meta{ split( /,/, $meta ) } = ();
@@ -181,6 +181,9 @@ while (<>) {
$dest =~ s/^runtime\/parrot\///;
$dest = File::Spec->catdir( $options{libdir}, $parrotdir, $dest );
}
+ elsif ( $package eq 'devel' && !$meta{doc} && (!$meta{include} || $dest =~ /^src\//)) {
+ $dest = File::Spec->catdir( $options{libdir}, $parrotdir, $dest );
+ }
elsif ( $meta{lib} ) {
if ( $dest =~ /^install_/ ) {
$dest =~ s/^install_//; # parrot with different config
--- ./MANIFEST.generated.orig 2009-04-08 08:58:41.000000000 +0000
+++ ./MANIFEST.generated 2009-04-08 09:04:30.000000000 +0000
@@ -190,12 +190,15 @@ runtime/parrot/library/Stream/Writer.pbc
runtime/parrot/library/TGE.pbc [tge]
src/call_list.txt [devel]src
src/glut_callbacks.c []
+src/install_config.o [devel]lib
src/jit_emit.h []
src/nci.c []
src/null_config.c []
+src/null_config.o [devel]lib
src/ops/core_ops_cgp.c []
src/ops/core_ops_switch.c []
src/parrot_config.c []
+src/parrot_config.o [devel]lib
src/pmc/boolean.dump [devel]src
src/pmc/continuation.dump [devel]src
src/pmc/default.dump [devel]src
@@ -226,5 +229,6 @@ src/pmc/string.dump
src/pmc/sub.dump [devel]src
src/pmc/undef.dump [devel]src
src/string_private_cstring.h []
-tools/build/dynpmc.pl []
+tools/build/dynoplibs.pl [devel]
+tools/build/dynpmc.pl [devel]
vtable.dump [devel]src
--- ./config/init/defaults.pm.orig 2009-04-08 08:38:09.000000000 +0000
+++ ./config/init/defaults.pm 2009-04-08 08:40:09.000000000 +0000
@@ -72,6 +72,10 @@ sub runstep {
# to their 'use English' names as documented in 'perlvar'.)
$conf->data->set_p5( OSNAME => $^O );
+ # strip rpath flags from ccdlflags
+ my $ccdlflags = $Config{ccdlflags};
+ $ccdlflags =~ s/\s*-Wl,-rpath,\S*//g;
+
# We need a Glossary somewhere!
$conf->data->set(
debugging => $conf->options->get('debugging') ? 1 : 0,
@@ -112,7 +116,7 @@ sub runstep {
# Linker Flags to have this binary work with the shared and dynamically
# loadable libraries we're building. On HP-UX, for example, we need to
# allow dynamic libraries to access the binary's symbols
- link_dynamic => $Config{ccdlflags}, # e.g. -Wl,-E on HP-UX
+ link_dynamic => $ccdlflags, # e.g. -Wl,-E on HP-UX
# ld: Tool used to build shared libraries and dynamically loadable
# modules. Often $cc on Unix-ish systems, but apparently sometimes
--- ./tools/dev/pbc_to_exe.pir.orig 2009-04-07 15:56:26.000000000 +0000
+++ ./tools/dev/pbc_to_exe.pir 2009-04-08 08:52:44.000000000 +0000
@@ -226,17 +226,22 @@ MAIN
.param int install :optional
$P0 = '_config'()
- .local string cc, ccflags, cc_o_out, osname, build_dir, slash
+ .local string cc, ccflags, cc_o_out, osname, build_dir, versiondir, prefix, slash
cc = $P0['cc']
ccflags = $P0['ccflags']
cc_o_out = $P0['cc_o_out']
osname = $P0['osname']
build_dir = $P0['build_dir']
+ versiondir = $P0['versiondir']
+ prefix = $P0['prefix']
slash = $P0['slash']
.local string includedir, pathquote
+ includedir = concat '/usr/include', versiondir
+ unless prefix == build_dir goto is_installed
includedir = concat build_dir, slash
includedir = concat includedir, 'include'
+ is_installed:
pathquote = ''
unless osname == 'MSWin32' goto not_windows
pathquote = '"'
@@ -276,7 +281,7 @@ MAIN
$P0 = '_config'()
.local string cc, link, link_dynamic, linkflags, ld_out, libparrot, libs, o
- .local string rpath, osname, build_dir, slash, icushared
+ .local string rpath, osname, build_dir, versiondir, prefix, slash, icushared
cc = $P0['cc']
link = $P0['link']
link_dynamic = $P0['link_dynamic']
@@ -288,12 +293,18 @@ MAIN
rpath = $P0['rpath_blib']
osname = $P0['osname']
build_dir = $P0['build_dir']
+ versiondir = $P0['versiondir']
+ prefix = $P0['prefix']
slash = $P0['slash']
icushared = $P0['icu_shared']
.local string config, pathquote, exeprefix
exeprefix = substr exefile, 0, 12
+ config = concat '/usr/lib', versiondir
+ config .= slash
+ unless prefix == build_dir goto is_installed
config = concat build_dir, slash
+ is_installed:
config .= 'src'
config .= slash
if exeprefix == 'installable_' goto config_install
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev