Skip Menu |
 
Report information
Id: 63360
Status: resolved
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: allison [at] perl.org
Cc:
AdminCc:

Severity: (no value)
Tag: Patch
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [PATCH] Update configure script and makefiles for installed Parrot
Date: Fri, 20 Feb 2009 00:36:00 -0800
To: rakudobug [...] perl.org
From: Allison Randal <allison [...] perl.org>
The attached git patch updates Rakudo's Configure.pl and Makefile.in to configure and build on an installed Parrot. It also adds two makefile templates for building Rakudo's dynops and dynpmcs. Notes: - This patch will only work for Parrot r36904 or later. (Parrot needed changes to the install process and tools libraries to allow running a language build from an installed Parrot. Also added a script for full makefile template processing, including conditional lines #IF, #ELSIF, #ELSE, #UNLESS.) - It requires a 'dynext/' directory in the Rakudo build directory. ('dynext/', 'library/', and 'includes/' are the standard Parrot search paths, and will work in the language build directory or installed in 'languages/langname/' or '/install/path/languages/langname/') - The change *only* uses an installed Parrot (no longer uses Parrot build directory paths), but it can be installed anywhere (even within the Rakudo build directory, if desired). - There's still a problem with the installed test libraries. I'll look into it and provide an additional patch. Allison
From 1d65fcb4f184ca7d8c1feaeb16fef70c919f9e88 Mon Sep 17 00:00:00 2001 From: Allison Randal <allison@parrot.org> Date: Thu, 19 Feb 2009 23:45:12 -0800 Subject: [PATCH] Update Configure.pl and Makefile.in to configure and build from an installed Parrot. Add two new makefiles for building dynops and dynpmcs. --- Configure.pl | 41 +++++++++++++++------------- build/Makefile.in | 48 +++++++++++++------------------- build/ops_makefile.in | 56 +++++++++++++++++++++++++++++++++++++ build/pmc_makefile.in | 73 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 171 insertions(+), 47 deletions(-) create mode 100644 build/ops_makefile.in create mode 100644 build/pmc_makefile.in diff --git a/Configure.pl b/Configure.pl index 2b19fda..1fc5521 100644 --- a/Configure.pl +++ b/Configure.pl @@ -50,7 +50,7 @@ END } # Create the Makefile using the information we just got -create_makefile(%config); +create_makefiles(%config); # Done. done(); @@ -90,28 +90,31 @@ sub read_parrot_config { } -# Generate a Makefile from a configuration -sub create_makefile { +# Generate Makefiles from a configuration +sub create_makefiles { my %config = @_; - open my $ROOTIN, "<build/Makefile.in" or - die "Unable to read build/Makefile.in \n"; - my $maketext = join('', <$ROOTIN>); - close $ROOTIN; - - $config{'win32_libparrot_copy'} = $^O eq 'MSWin32' ? 'copy $(BUILD_DIR)\libparrot.dll .' : ''; - $maketext =~ s/@(\w+)@/$config{$1}/g; - if ($^O eq 'MSWin32') { - $maketext =~ s{/}{\\}g; + my %makefiles = ( + "build/Makefile.in" => "Makefile", + "build/pmc_makefile.in" => "src/pmc/Makefile", + "build/ops_makefile.in" => "src/ops/Makefile", + ); + my $build_tool = $config{perl} . " " + . $config{libdir} + . $config{versiondir} + . $config{slash} + . "tools" + . $config{slash} + . "dev" + . $config{slash} + . "gen_makefile.pl"; + + foreach my $template (keys %makefiles) { + my $makefile = $makefiles{$template}; + print "Creating $makefile\n"; + system("$build_tool $template $makefile"); } - - print "Creating Makefile\n"; - open(MAKEFILE, ">Makefile") || - die "Unable to write Makefile\n"; - print MAKEFILE $maketext; - close(MAKEFILE); } - sub done { my $make = $config{'make'}; print <<"END"; diff --git a/build/Makefile.in b/build/Makefile.in index 5a00f3e..b486b23 100644 --- a/build/Makefile.in +++ b/build/Makefile.in @@ -5,7 +5,10 @@ PARROT_ARGS = # values from parrot_config -BUILD_DIR = @build_dir@ +VERSION_DIR = @versiondir@ +LIB_DIR = @libdir@$(VERSION_DIR) +BIN_DIR = @bindir@ +TOOLS_DIR = @libdir@$(VERSION_DIR)@slash@tools@slash@lib LOAD_EXT = @load_ext@ O = @o@ EXE = @exe@ @@ -14,24 +17,21 @@ PERL = @perl@ RM_F = @rm_f@ # Various paths -PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext -PERL6GRAMMAR = $(BUILD_DIR)/runtime/parrot/library/PGE/Perl6Grammar.pbc -NQP = $(BUILD_DIR)/compilers/nqp/nqp.pbc -PCT = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc +PARROT_DYNEXT = $(LIB_DIR)/dynext +PERL6GRAMMAR = $(LIB_DIR)/library/PGE/Perl6Grammar.pbc +NQP = $(LIB_DIR)/languages/nqp/nqp.pbc +PCT = $(LIB_DIR)/library/PCT.pbc PMC_DIR = src/pmc -OPSDIR = src/ops +OPS_DIR = src/ops OPSLIB = perl6 -OPS_FILE = src/ops/perl6.ops +OPS_FILE = $(OPS_DIR)/perl6.ops # Set up extensions # Setup some commands -PARROT = $(BUILD_DIR)/parrot$(EXE) +PARROT = $(BIN_DIR)/parrot$(EXE) CAT = $(PERL) -MExtUtils::Command -e cat -BUILD_DYNPMC = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl -BUILD_DYNOPS = $(PERL) $(BUILD_DIR)/tools/build/dynoplibs.pl -RECONFIGURE = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl -PBC_TO_EXE = $(BUILD_DIR)/pbc_to_exe$(EXE) +PBC_TO_EXE = $(BIN_DIR)/pbc_to_exe$(EXE) SOURCES = perl6.pir \ src/gen_grammar.pir \ @@ -43,7 +43,7 @@ SOURCES = perl6.pir \ src/parser/methods.pir \ src/parser/quote_expression.pir \ $(PERL6_GROUP) \ - src/ops/perl6_ops$(LOAD_EXT) + $(OPS_DIR)/perl6_ops$(LOAD_EXT) BUILTINS_PIR = \ src/classes/ClassHOW.pir \ @@ -110,8 +110,6 @@ SETTING = \ src/setting/Pair.pm \ src/setting/Whatever.pm \ -PMCS = perl6str objectref perl6scalar mutablevar perl6multisub - PMC_SOURCES = $(PMC_DIR)/perl6str.pmc $(PMC_DIR)/objectref.pmc $(PMC_DIR)/perl6scalar.pmc \ $(PMC_DIR)/mutablevar.pmc $(PMC_DIR)/perl6multisub.pmc @@ -157,7 +155,7 @@ all: perl6$(EXE) # (We're not quite ready to make this a default target.) perl6$(EXE): perl6.pbc $(PBC_TO_EXE) perl6.pbc - @win32_libparrot_copy@ +#IF(win32): copy $(LIB_DIR)\libparrot.dll . spectest_checkout : t/spec @@ -190,7 +188,7 @@ Test.pir: Test.pm perl6.pbc $(PARROT) $(PARROT_ARGS) perl6.pbc --target=pir --output=Test.pir Test.pm $(PMC_DIR)/objectref.pmc : $(PMC_DIR)/objectref_pmc.template build/gen_objectref_pmc.pl - $(PERL) -I$(BUILD_DIR)/lib build/gen_objectref_pmc.pl $(PMC_DIR)/objectref_pmc.template \ + $(PERL) -I$(TOOLS_DIR) build/gen_objectref_pmc.pl $(PMC_DIR)/objectref_pmc.template \ $(PMC_DIR)/objectref.pmc src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg src/parser/grammar-oper.pg @@ -214,17 +212,11 @@ src/gen_junction.pir: build/gen_junction_pir.pl src/gen_setting.pm: build/gen_setting_pm.pl $(SETTING) $(PERL) build/gen_setting_pm.pl $(SETTING) > src/gen_setting.pm -$(PERL6_GROUP): $(PARROT) $(PMC_SOURCES) - cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS) - cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS) - cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS) - cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS) - -src/ops/perl6_ops$(LOAD_EXT) : $(OPS_FILE) - @cd $(OPSDIR) && $(BUILD_DYNOPS) generate $(OPSLIB) - @cd $(OPSDIR) && $(BUILD_DYNOPS) compile $(OPSLIB) - @cd $(OPSDIR) && $(BUILD_DYNOPS) linklibs $(OPSLIB) - @cd $(OPSDIR) && $(BUILD_DYNOPS) copy "--destination=$(PARROT_DYNEXT)" $(OPSLIB) +$(PERL6_GROUP): $(PARROT) $(PMC_SOURCES) $(PMC_DIR)/Makefile + $(MAKE) $(PMC_DIR) + +$(OPS_DIR)/perl6_ops$(LOAD_EXT) : $(OPS_FILE) $(OPS_DIR)/Makefile + $(MAKE) $(OPS_DIR) ## local copy of Parrot diff --git a/build/ops_makefile.in b/build/ops_makefile.in new file mode 100644 index 0000000..94e9298 --- /dev/null +++ b/build/ops_makefile.in @@ -0,0 +1,56 @@ +# Copyright (C) 2009, The Perl Foundation. +# $Id: $ + +PERL = @perl@ +RM_F = @rm_f@ +CHMOD = @chmod@ +CP = @cp@ +VERSION_DIR = @versiondir@ +INCLUDE_DIR = @includedir@$(VERSION_DIR) +LIB_DIR = @libdir@$(VERSION_DIR) +INSTALL_DIR = ..@slash@..@slash@dynext +O = @o@ +LOAD_EXT = @load_ext@ +CC = @cc@ -c +LD = @ld@ +LDFLAGS = @ldflags@ @ld_debug@ @rpath_blib@ @linkflags@ +LD_LOAD_FLAGS = @ld_load_flags@ +CFLAGS = @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@ +CC_OUT = @cc_o_out@ +LD_OUT = @ld_out@ +#IF(parrot_is_shared):LIBPARROT = @libparrot_ldflags@ +#ELSE:LIBPARROT = + +BUILD_TOOLS_DIR = $(LIB_DIR)@slash@tools@slash@build +OPS2C = $(PERL) $(BUILD_TOOLS_DIR)@slash@ops2c.pl + +INCLUDES = -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)@slash@pmc +LINKARGS = $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) + +OPS_FILE = perl6.ops + + +all : install + +generate : $(OPS_FILE) + $(OPS2C) C --dynamic $(OPS_FILE) + $(OPS2C) CSwitch --dynamic $(OPS_FILE) +#IF(cg_flag): $(OPS2C) CGoto --dynamic $(OPS_FILE) +#IF(cg_flag): $(OPS2C) CGP --dynamic $(OPS_FILE) + +compile : generate + $(CC) $(CC_OUT) perl6_ops$(O) $(INCLUDES) $(CFLAGS) perl6_ops.c + $(CC) $(CC_OUT) perl6_ops_switch$(O) $(INCLUDES) $(CFLAGS) perl6_ops_switch.c +#IF(cg_flag): $(CC) $(CC_OUT) perl6_ops_cg$(O) $(INCLUDES) $(CFLAGS) perl6_ops_cg.c +#IF(cg_flag): $(CC) $(CC_OUT) perl6_ops_cgp$(O) $(INCLUDES) $(CFLAGS) perl6_ops_cgp.c + +linklibs : compile + $(LD) $(LD_OUT) perl6_ops$(LOAD_EXT) perl6_ops$(O) $(LINKARGS) + $(LD) $(LD_OUT) perl6_ops_switch$(LOAD_EXT) perl6_ops_switch$(O) $(LINKARGS) +#IF(cg_flag): $(LD) $(LD_OUT) perl6_ops_cg$(LOAD_EXT) perl6_ops_cg$(O) $(LINKARGS) +#IF(cg_flag): $(LD) $(LD_OUT) perl6_ops_cgp$(LOAD_EXT) perl6_ops_cgp$(O) $(LINKARGS) + +install : linklibs +#IF(cygwin or hpux): CHMOD 0775 "*$(LOAD_EXT)" + $(CP) "*$(LOAD_EXT)" $(INSTALL_DIR) + diff --git a/build/pmc_makefile.in b/build/pmc_makefile.in new file mode 100644 index 0000000..40d71e2 --- /dev/null +++ b/build/pmc_makefile.in @@ -0,0 +1,73 @@ +# Copyright (C) 2009, The Perl Foundation. +# $Id: $ + +PERL = @perl@ +RM_F = @rm_f@ +CHMOD = @chmod@ +CP = @cp@ +VERSION_DIR = @versiondir@ +INCLUDE_DIR = @includedir@$(VERSION_DIR) +LIB_DIR = @libdir@$(VERSION_DIR) +SRC_DIR = @srcdir@$(VERSION_DIR) +INSTALL_DIR = ../../dynext +O = @o@ +LOAD_EXT = @load_ext@ +CC = @cc@ -c +LD = @ld@ +LDFLAGS = @ldflags@ @ld_debug@ +LD_LOAD_FLAGS = @ld_load_flags@ +CFLAGS = @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@ +CC_OUT = @cc_o_out@ +LD_OUT = @ld_out@ +#IF(parrot_is_shared):LIBPARROT = @libparrot_ldflags@ +#ELSE:LIBPARROT = + +BUILD_TOOLS_DIR = $(LIB_DIR)@slash@tools@slash@build +PMC2C_INCLUDES = --include $(SRC_DIR) --include $(SRC_DIR)@slash@pmc +PMC2C = $(PERL) $(BUILD_TOOLS_DIR)@slash@pmc2c.pl +PMC2CD = $(PMC2C) --dump $(PMC2C_INCLUDES) +PMC2CC = $(PMC2C) --c $(PMC2C_INCLUDES) + +INCLUDES = -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)@slash@pmc +LINKARGS = $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) + +PMC_SOURCES = \ + perl6str.pmc \ + objectref.pmc \ + perl6scalar.pmc \ + mutablevar.pmc \ + perl6multisub.pmc + +PERL6_GROUP = perl6_group + + +all : install + +generate : $(PMC_SOURCES) + $(PMC2CD) perl6str.pmc + $(PMC2CD) objectref.pmc + $(PMC2CD) perl6scalar.pmc + $(PMC2CD) mutablevar.pmc + $(PMC2CD) perl6multisub.pmc + $(PMC2CC) perl6str.pmc + $(PMC2CC) objectref.pmc + $(PMC2CC) perl6scalar.pmc + $(PMC2CC) mutablevar.pmc + $(PMC2CC) perl6multisub.pmc + $(PMC2C) --library $(PERL6_GROUP) --c $(PMC_SOURCES) + +compile : generate + $(CC) $(CC_OUT) perl6str$(O) $(INCLUDES) $(CFLAGS) perl6str.c + $(CC) $(CC_OUT) objectref$(O) $(INCLUDES) $(CFLAGS) objectref.c + $(CC) $(CC_OUT) perl6scalar$(O) $(INCLUDES) $(CFLAGS) perl6scalar.c + $(CC) $(CC_OUT) mutablevar$(O) $(INCLUDES) $(CFLAGS) mutablevar.c + $(CC) $(CC_OUT) perl6multisub$(O) $(INCLUDES) $(CFLAGS) perl6multisub.c + $(CC) $(CC_OUT) lib-$(PERL6_GROUP)$(O) $(INCLUDES) $(CFLAGS) $(PERL6_GROUP).c + +linklibs : compile + $(LD) $(LD_OUT) $(PERL6_GROUP)$(LOAD_EXT) lib-$(PERL6_GROUP)$(O) perl6str$(O) objectref$(O) perl6scalar$(O) mutablevar$(O) perl6multisub$(O) $(LINKARGS) + +install : linklibs +#IF(cygwin or hpux): CHMOD 0775 "*$(LOAD_EXT)" + $(CP) "*$(LOAD_EXT)" $(INSTALL_DIR) + -- 1.5.6.3
Download (untitled) / with headers
text/plain 354b
On Fri Feb 20 00:36:36 2009, allison@perl.org wrote: Show quoted text
> > - There's still a problem with the installed test libraries. I'll look > into it and provide an additional patch.
Ah, it wasn't a problem with the test libraries, just with Rakudo's t/harness (using a hardcoded path to the parrot executable). Attached git patch to fix the test target. Allison
From 90672654a8f2600dbc8b67f4f46286d1ed2b7279 Mon Sep 17 00:00:00 2001 From: Allison Randal <allison@parrot.org> Date: Mon, 23 Feb 2009 18:03:30 -0800 Subject: [PATCH] Also fix t/harness to use installed Parrot executable when requested, instead of looking for the executable in a 'parrot/' subdirectory. --- build/Makefile.in | 4 ++-- t/harness | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/build/Makefile.in b/build/Makefile.in index 3244ff0..9c88b2e 100644 --- a/build/Makefile.in +++ b/build/Makefile.in @@ -149,7 +149,7 @@ CLEANUPS = \ # NOTE: eventually, we should remove --keep-exit-code and --fudge # as the goal is that all tests must pass without fudge -HARNESS_WITH_FUDGE = $(PERL) t/harness --fudge --keep-exit-code +HARNESS_WITH_FUDGE = $(PERL) -I$(TOOLS_DIR) t/harness --bindir=$(BIN_DIR) --fudge --keep-exit-code HARNESS_WITH_FUDGE_JOBS = $(HARNESS_WITH_FUDGE) --jobs @@ -243,7 +243,7 @@ codetest: coretest: perl6.pbc # prove t/pmc - $(PERL) t/harness t/00-parrot t/01-sanity + $(PERL) -I$(TOOLS_DIR) t/harness --bindir=$(BIN_DIR) t/00-parrot t/01-sanity fulltest: coretest spectest codetest diff --git a/t/harness b/t/harness index 48f2aab..26327fe 100644 --- a/t/harness +++ b/t/harness @@ -20,21 +20,25 @@ our %harness_args = ( verbosity => 0, ); -if (-d 'parrot') { - $harness_args{exec} = ['parrot/parrot', 'perl6.pbc']; -} else { - $harness_args{compiler} = 'perl6.pbc'; -} - GetOptions( 'tests-from-file=s' => \my $list_file, 'fudge' => \my $do_fudge, 'verbosity=i' => \$harness_args{verbosity}, + 'bindir=s' => \$harness_args{bindir}, # A sensible default is num_cores + 1. # Many people have two cores these days. 'jobs:3' => \$harness_args{jobs}, ); +if ($harness_args{bindir}) { + $harness_args{exec} = [$harness_args{bindir}.'/parrot', 'perl6.pbc']; +} elsif (-d 'parrot') { + $harness_args{exec} = ['parrot/parrot', 'perl6.pbc']; +} else { + $harness_args{compiler} = 'perl6.pbc'; +} + + my @pass_through_options = grep m/^--?[^-]/, @ARGV; my @files = grep m/^[^-]/, @ARGV; -- 1.5.6.3
Download (untitled) / with headers
text/plain 284b
Attached an updated patch. pmichaud has stated that he will not accept multiple make files, which this contains. He's planning on updating the makefiles himself. In the meantime, this patch is something which works, but which I will update when pmichaud has updated the makefile.

Message body is not shown because it is too large.

Download (untitled) / with headers
text/plain 354b
pmichaud has done some work on getting this all to work with a single makefile. He's done it in this branch: http://github.com/rakudo/rakudo/tree/ins Last thing I heard, he implied that it works for him, but needs some testing, especially on win32. I don't have a win32 box, so if someone with a win32 box could help with this, that would be great!
Download (untitled) / with headers
text/plain 211b
Ok, I've gotten a diff of pmichaud's changes on the ins branch, and attached it to this comment. I have no idea why he got rid of the EXE variable, though; that's probably guaranteed to make it fail on win32.

Message body is not shown because it is too large.

On Sun Jul 19 21:22:54 2009, wayland wrote: Show quoted text
> Ok, I've gotten a diff of pmichaud's changes on the ins branch, and > attached it to this comment. I have no idea why he got rid of the EXE > variable, though; that's probably guaranteed to make it fail on win32.
Pmichaud create a new ins2 branch that was to be an improvement on the ins branch. I applied these diffs to head, and then made some modifications of my own. The attached patch is all the mods in ins2 + the mods needed to make Rakudo work as an RPM. The patch contains a MANIFEST.generated which pmichaud has specifically said that he does not like. To eliminate this, it would be necessary only to rewrite "make install" so that it's different. This would also eliminate the "install_files.pl" script. The changes to Makefile.in should probably all be applied regardless, except the "install" target. The rakudo.spec file should need no changes; it just calls "make install". I don't have a clear enough picture of what pmichaud wants in his "make install" section, which is why I've left it to him. HTH some.

Message body is not shown because it is too large.

Download (untitled) / with headers
text/plain 315b
Ok, here's a new patch against the updated ins2 branch. pmichaud has done some "make install" stuff, and I've added to it as required for building RPMs. Other than adding a few useful files to the installation image (ie. the setting *.pm files could come in handy), it should have no effect on non-RPM installs.
diff --git a/build/Makefile.in b/build/Makefile.in index 9ee3f7b..68c03b4 100644 --- a/build/Makefile.in +++ b/build/Makefile.in @@ -1,6 +1,8 @@ # Copyright (C) 2006-2009, The Perl Foundation. # $Id$ +DESTDIR := + PARROT_ARGS = # values from parrot_config @@ -204,13 +206,20 @@ all: $(PERL6EXE) # the install target install: all - $(MKPATH) $(PERL6_LANG_DIR)/lib - $(CP) perl6.pbc $(PERL6_LANG_DIR) - $(CP) Test.pm $(PERL6_LANG_DIR)/lib - $(CP) lib/*.pm $(PERL6_LANG_DIR)/lib - $(CP) $(DYNPMC) $(DYNOPS) $(PARROT_LIB_DIR)/dynext - $(CP) $(PERL6EXE) $(PARROT_BIN_DIR) - $(CHMOD) 755 $(PARROT_BIN_DIR)/$(PERL6EXE) + $(MKPATH) $(DESTDIR)/$(PERL6_LANG_DIR)/lib + $(CP) perl6.pbc $(DESTDIR)/$(PERL6_LANG_DIR) + $(CP) Test.pm $(DESTDIR)/$(PERL6_LANG_DIR)/lib + $(CP) lib/*.pm $(DESTDIR)/$(PERL6_LANG_DIR)/lib + $(CP) src/setting/*.pm $(DESTDIR)/$(PERL6_LANG_DIR)/lib + $(MKPATH) $(DESTDIR)/$(PERL6_LANG_DIR)/lib/IO + $(CP) src/setting/IO/*.pm $(DESTDIR)/$(PERL6_LANG_DIR)/lib/IO + $(MKPATH) $(DESTDIR)/$(PERL6_LANG_DIR)/lib/IO/Socket + $(CP) src/setting/IO/Socket/*.pm $(DESTDIR)/$(PERL6_LANG_DIR)/lib/IO/Socket + $(MKPATH) $(DESTDIR)/$(PARROT_LIB_DIR)/dynext + $(CP) $(DYNPMC) $(DYNOPS) $(DESTDIR)/$(PARROT_LIB_DIR)/dynext + $(MKPATH) $(DESTDIR)/$(PARROT_BIN_DIR) + $(CP) $(PERL6EXE) $(DESTDIR)/$(PARROT_BIN_DIR) + $(CHMOD) 755 $(DESTDIR)/$(PARROT_BIN_DIR)/$(PERL6EXE) xmas: perl6$(EXE) diff --git a/build/rakudo.spec b/build/rakudo.spec new file mode 100644 index 0000000..fb06656 --- /dev/null +++ b/build/rakudo.spec @@ -0,0 +1,119 @@ +%define parrot_version 1.4.0 + +Name: rakudo +Version: build20 +Release: 1 +Summary: Rakudo Perl 6 +License: Artistic 2.0 +Group: Development/Libraries +URL: http://www.rakudo.org/ +Source0: http://www.pmichaud.com/perl6/rakudo-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: parrot >= %parrot_version +BuildRequires: parrot-devel >= %parrot_version + +%define parrot_versiondirname %{parrot_version}-devel +%define parrot_versiondirpath %{_libdir}/parrot/%{parrot_versiondirname} + +%define parrot_dynext %{parrot_versiondirpath}/dynext + +#%define rakudo_libs %{_libdir}/perl6/rakudo +%define rakudo_libs %{parrot_versiondirpath}/languages/perl6/lib + +# Versions don't go easily in install_files.pl yet +#%define relative_rakudo_dynext %{name}/%{version} +%define relative_rakudo_dynext %{name}/dynext +%define rakudo_dynext %{parrot_dynext}/%{relative_rakudo_dynext} + +%description +Rakudo Perl 6 is an implementation of the Perl 6 specification which +runs on the Parrot virtual machine. Perl 6 is a programming language +which supersedes earlier versions of Perl. + +%prep +%setup -q + +%build +echo Building with root $RPM_BUILD_ROOT +%{__perl} Configure.pl +make + +%install +rm -rf $RPM_BUILD_ROOT + +make install DESTDIR=$RPM_BUILD_ROOT +#echo first find +#find $RPM_BUILD_ROOT + +#pushd $RPM_BUILD_ROOT/%{parrot_dynext} +#for i in %{relative_rakudo_dynext}/*.so; do +# ln -s $i +#done +#popd + +#echo second find +#find $RPM_BUILD_ROOT + +%check +# make test < /dev/null +# %{?_with_fulltest:make fulltest < /dev/null} +# make test || : +# %{?_with_fulltest:make fulltest || :} + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc CREDITS README +%doc docs +%{parrot_dynext}/perl6_group.so +%{parrot_dynext}/perl6_ops.so +%{parrot_dynext}/perl6_ops_cg.so +%{parrot_dynext}/perl6_ops_cgp.so +%{parrot_dynext}/perl6_ops_switch.so +#%{rakudo_dynext}/perl6_group.so +#%{rakudo_dynext}/perl6_ops.so +#%{rakudo_dynext}/perl6_ops_cg.so +#%{rakudo_dynext}/perl6_ops_cgp.so +#%{rakudo_dynext}/perl6_ops_switch.so +%{_bindir}/perl6 +%{parrot_versiondirpath}/languages/perl6/perl6.pbc +%{rakudo_libs}/Test.pm +%{rakudo_libs}/Any-list.pm +%{rakudo_libs}/Any-num.pm +%{rakudo_libs}/Any-str.pm +%{rakudo_libs}/Array.pm +%{rakudo_libs}/Bool.pm +%{rakudo_libs}/Buf.pm +%{rakudo_libs}/Hash.pm +%{rakudo_libs}/Int.pm +%{rakudo_libs}/IO.pm +%{rakudo_libs}/IO/Socket.pm +%{rakudo_libs}/IO/Socket/INET.pm +%{rakudo_libs}/Junction.pm +%{rakudo_libs}/List.pm +%{rakudo_libs}/Match.pm +%{rakudo_libs}/Num.pm +%{rakudo_libs}/Object.pm +%{rakudo_libs}/Operators.pm +%{rakudo_libs}/Pair.pm +%{rakudo_libs}/Range.pm +%{rakudo_libs}/Safe.pm +%{rakudo_libs}/Str.pm +%{rakudo_libs}/Temporal.pm +%{rakudo_libs}/traits.pm +%{rakudo_libs}/Whatever.pm + +%changelog +* Wed Jul 22 2009 wayland <wayland@wayland.id.au> 0.20 +- Updated to latest version + +* Fri Mar 6 2009 wayland <wayland@wayland.id.au> 0.17 +- created from parrot.spec +- Didn't redo any of the files stuff +- Played with things 'til it worked
Attached patch is updated according to pmichauds comments on IRC recently.
diff --git a/build/Makefile.in b/build/Makefile.in index 9ee3f7b..97452a0 100644 --- a/build/Makefile.in +++ b/build/Makefile.in @@ -1,6 +1,8 @@ # Copyright (C) 2006-2009, The Perl Foundation. # $Id$ +DESTDIR = + PARROT_ARGS = # values from parrot_config @@ -204,13 +206,15 @@ all: $(PERL6EXE) # the install target install: all - $(MKPATH) $(PERL6_LANG_DIR)/lib - $(CP) perl6.pbc $(PERL6_LANG_DIR) - $(CP) Test.pm $(PERL6_LANG_DIR)/lib - $(CP) lib/*.pm $(PERL6_LANG_DIR)/lib - $(CP) $(DYNPMC) $(DYNOPS) $(PARROT_LIB_DIR)/dynext - $(CP) $(PERL6EXE) $(PARROT_BIN_DIR) - $(CHMOD) 755 $(PARROT_BIN_DIR)/$(PERL6EXE) + $(MKPATH) $(DESTDIR)/$(PERL6_LANG_DIR)/lib + $(CP) perl6.pbc $(DESTDIR)/$(PERL6_LANG_DIR) + $(CP) Test.pm $(DESTDIR)/$(PERL6_LANG_DIR)/lib + $(CP) lib/*.pm $(DESTDIR)/$(PERL6_LANG_DIR)/lib + $(MKPATH) $(DESTDIR)/$(PARROT_LIB_DIR)/dynext + $(CP) $(DYNPMC) $(DYNOPS) $(DESTDIR)/$(PARROT_LIB_DIR)/dynext + $(MKPATH) $(DESTDIR)/$(PARROT_BIN_DIR) + $(CP) $(PERL6EXE) $(DESTDIR)/$(PARROT_BIN_DIR) + $(CHMOD) 755 $(DESTDIR)/$(PARROT_BIN_DIR)/$(PERL6EXE) xmas: perl6$(EXE) diff --git a/build/rakudo.spec b/build/rakudo.spec new file mode 100644 index 0000000..39239e5 --- /dev/null +++ b/build/rakudo.spec @@ -0,0 +1,96 @@ +%define parrot_version 1.4.0 + +Name: rakudo +Version: build20 +Release: 1 +Summary: Rakudo Perl 6 +License: Artistic 2.0 +Group: Development/Libraries +URL: http://www.rakudo.org/ +Source0: http://www.pmichaud.com/perl6/rakudo-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: parrot >= %parrot_version +BuildRequires: parrot-devel >= %parrot_version + +%define parrot_versiondirname %{parrot_version}-devel +%define parrot_versiondirpath %{_libdir}/parrot/%{parrot_versiondirname} + +%define parrot_dynext %{parrot_versiondirpath}/dynext + +#%define rakudo_libs %{_libdir}/perl6/rakudo +%define rakudo_libs %{parrot_versiondirpath}/languages/perl6/lib + +# Versions don't go easily in install_files.pl yet +#%define relative_rakudo_dynext %{name}/%{version} +%define relative_rakudo_dynext %{name}/dynext +%define rakudo_dynext %{parrot_dynext}/%{relative_rakudo_dynext} + +%description +Rakudo Perl 6 is an implementation of the Perl 6 specification which +runs on the Parrot virtual machine. Perl 6 is a programming language +which supersedes earlier versions of Perl. + +%prep +%setup -q + +%build +echo Building with root $RPM_BUILD_ROOT +%{__perl} Configure.pl +make + +%install +rm -rf $RPM_BUILD_ROOT + +make install DESTDIR=$RPM_BUILD_ROOT +#echo first find +#find $RPM_BUILD_ROOT + +#pushd $RPM_BUILD_ROOT/%{parrot_dynext} +#for i in %{relative_rakudo_dynext}/*.so; do +# ln -s $i +#done +#popd + +#echo second find +#find $RPM_BUILD_ROOT + +%check +# make test < /dev/null +# %{?_with_fulltest:make fulltest < /dev/null} +# make test || : +# %{?_with_fulltest:make fulltest || :} + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc CREDITS README +%doc docs +%{parrot_dynext}/perl6_group.so +%{parrot_dynext}/perl6_ops.so +%{parrot_dynext}/perl6_ops_cg.so +%{parrot_dynext}/perl6_ops_cgp.so +%{parrot_dynext}/perl6_ops_switch.so +#%{rakudo_dynext}/perl6_group.so +#%{rakudo_dynext}/perl6_ops.so +#%{rakudo_dynext}/perl6_ops_cg.so +#%{rakudo_dynext}/perl6_ops_cgp.so +#%{rakudo_dynext}/perl6_ops_switch.so +%{_bindir}/perl6 +%{parrot_versiondirpath}/languages/perl6/perl6.pbc +%{rakudo_libs}/Test.pm +%{rakudo_libs}/Safe.pm + +%changelog +* Wed Jul 22 2009 wayland <wayland@wayland.id.au> 0.20 +- Updated to latest version + +* Fri Mar 6 2009 wayland <wayland@wayland.id.au> 0.17 +- created from parrot.spec +- Didn't redo any of the files stuff +- Played with things 'til it worked
Download (untitled) / with headers
text/plain 295b
On Tue Jul 28 19:03:45 2009, wayland wrote: Show quoted text
> Attached patch is updated according to pmichauds comments on IRC
recently. Patch applied to ins2 branch in ce21ff. As soon as we get the Sun compiler issues resolved (RT #66560) I think we may be able to merge to trunk and close this ticket. Pm
Download (untitled) / with headers
text/plain 103b
rakudo has been building with an installed parrot long since. Thanks for the patches, closing ticket...


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org