[perl #63360] [PATCH] Update configure script and makefiles for installed Parrot
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 000..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 wayl...@wayland.id.au 0.20 +- Updated to latest version + +* Fri Mar 6 2009 wayland wayl...@wayland.id.au 0.17 +- created from parrot.spec +- Didn't redo any of the files stuff +- Played with things 'til it worked
[perl #63360] [PATCH] Update configure script and makefiles for installed Parrot
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 000..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
[perl #63360] [PATCH] Update configure script and makefiles for installed Parrot
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. diff --git a/Configure.pl b/Configure.pl index 07bbf0d..9b74269 100644 --- a/Configure.pl +++ b/Configure.pl @@ -7,8 +7,10 @@ use warnings; use Getopt::Long; MAIN: { -my %options; -GetOptions(\%options, 'help!', 'parrot-config=s', +my %options = ( +'rakudo-version' = 'build14', +); +GetOptions(\%options, 'help!', 'parrot-config=s', 'rakudo-version=s', 'gen-parrot!', 'gen-parrot-option=s@'); # Print help if it's requested @@ -52,7 +54,14 @@ MAIN: { $parrot_errors .= Unable to locate parrot_config\n; } elsif ($required $config{'revision'}) { -$parrot_errors .= Parrot revision r$required required (currently r$config{'revision'})\n; +# If Parrot was built from a tarball or package, the revision number +# is 0, so we'd need to use the Parrot version instead. But even +# that is unreliable, as someone may have built their own package +# from SVN. So just let them do their thing, and worry about it +# some other time. +if($config{'revision'} != 0) { +$parrot_errors .= Parrot revision r$required required (currently r$config{'revision'})\n; +} } if ($parrot_errors) { @@ -65,8 +74,16 @@ the location of parrot_config to be used to build Rakudo Perl. END } +my($short); +my(%rakudo_config) = (); +foreach(qw(rakudo-version)) { +$short = $_; + $short =~ s/-//g; +$rakudo_config{$short} = $options{$_}; +} + # Create the Makefile using the information we just got -create_makefile(%config); +create_makefiles(\%config, \%rakudo_config); my $make = $config{'make'}; { @@ -110,26 +127,44 @@ sub read_parrot_config { # Generate a Makefile from a configuration -sub create_makefile { -my %config = @_; - -my $maketext = slurp( 'build/Makefile.in' ); +sub create_makefiles { +my($config, $rakudo_config) = @_; +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; + +my($text); +foreach my $template (keys %makefiles) { +my $makefile = $makefiles{$template}; +print Creating $makefile\n; +$text = slurp($template); +$config-{'win32_libparrot_copy'} = $^O eq 'MSWin32' ? 'copy $(BUILD_DIR)\libparrot.dll .' : ''; +$text =~ s{\@(\w+)\...@}{ + defined($rakudo_config-{$1}) ? $rakudo_config-{$1} : $ +}eg; +if ($^O eq 'MSWin32') { +$text =~ s{/}{\\}g; +$text =~ s{\\\*}{*}g; +$text =~ s{http:\S+}{ do {my $t = $; $t =~ s'\\'/'g; $t} }eg; +} -$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; -$maketext =~ s{\\\*}{*}g; -$maketext =~ s{http:\S+}{ do {my $t = $; $t =~ s'\\'/'g; $t} }eg; +open(FILE, $template.tmp) or die Error opening file '$template.tmp' for writing: $!; +print FILE $text; +close(FILE); +system($build_tool $template.tmp $makefile); } -my $outfile = 'Makefile'; -print \nCreating $outfile ...\n; -open(my $MAKEOUT, '', $outfile) || -die Unable to write $outfile\n; -print {$MAKEOUT} $maketext; -close $MAKEOUT or die $!; - return; } @@ -157,6 +192,8 @@ General Options: Set parrot config option when using --gen-parrot --parrot-config=(config) Use configuration information from config +--rakudo-version=(version) + Version of Rakudo to call this build END return; diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 000..8ef4a34 --- /dev/null +++ b/MANIFEST @@ -0,0 +1,28 @@ +# Copied in a monkey-see-monkey-do fashion from Parrot. I (Tim Nelson) +# don't have a real grip on what's going on here; I just want it to work :) +perl6 [main]bin +src/pmc/perl6_group.so[main]runtime +src/ops/perl6_ops.so [main]runtime +src/ops/perl6_ops_cg.so [main]runtime +src/ops/perl6_ops_cgp.so [main]runtime
[perl #57978] Implement last/redo/next/continue control exceptions
On Sat Aug 16 07:29:31 2008, [EMAIL PROTECTED] wrote: - Needs last/redo/next/continue exceptions in PCT (PCT) This is done in rakudo; does that mean that this ticket is done?