Re: [PROPOSED PATCH] Add Parrot::Embed to Repository

2006-08-17 Thread François PERRAD

At 12:58 16/08/2006 -0700, jerry gay wrote:

On 8/15/06, chromatic <[EMAIL PROTECTED]> wrote:

Here's a proposed patch that seems to work okay for me on Linux.  It's not
great or beautiful, mostly because of the Makefile hackery.  It's a starting
point though.  I suspect Windows might complain.

windows indeed complains. not only about missing prereq
(ExtUtils::PkgConfig,) but ...and you've got to see this coming...
missing pkg-config. i don't know anything about pkg-config, and i
don't know anything about Module::Build, so i can't take this beyond
the small makefile fix i needed on the last line of the
config/gen/makefiles/ext.in (s<>.)


For installing Module::Build over ActivePerl 5.8.7 Build 815, I need to 
install from CPAN:

 Pod-Escapes 1.04
 Pod-Single 3.04
 Pod-Readme 0.081
 podlators 2.04
 PAR-Dist 0.16
 ExtUtils-CBuilder 0.18
 ExtUtils-ParseXS 2.15
 Module-Signature 0.44 (not the latest 0.55)
 Module-Build 0.2805

François


~jerry







Re: [PROPOSED PATCH] Add Parrot::Embed to Repository

2006-08-17 Thread chromatic
On Thursday 17 August 2006 00:28, Francois PERRAD wrote:

> I try it on Win2000 with MinGW.
> 1) ExtUtils::PkgConfig is a wrapper over pkg-config, and pkg-config is not
> available on Windows

Okay, that's a problem.  It's actually a big problem, for two reasons.

First, linking against libparrot requires knowing its location and the 
compiler flags.  When building this within the parrot/ directory, I could 
just parse parrot.rc.  However, when building outside of parrot/, such as 
when downloading from the CPAN, pkg_config is the way to go, if possible.

I'll add some logic to improve this situation.

> 2) Module::Build is not installed in the distribution ActiveState Perl
> 5.8.8 Build 817, and this module has a lot of dependence

It can go in Bundle::Parrot.

> 3) I think the best way is to use an old fashion Makefile.PL and not a
> Build.PL

EU::MM is, hands-down, the biggest bucket of suck in the entire Perl 5 core.  
(Yes, the interface is worse than File::Find and yes the implementation is 
worse than B::Bytecode, which at least you can count on always failing to 
work.)  When the great old ones arrive from the dark spaces between 
dimensions, I plan to throw its source code at them to distract them from 
eating the earth.  It'll work too; it's not really good for anything else.[1]

-- c

[1] Disclaimer: if all you're doing is installing a pure-Perl module, not 
compiling anything or doing any sort of customization, you don't have to 
realize that what you're really doing is using Perl to write cross-platform 
shell scripts, if at all possible, and I still don't know how to phrase the 
horror that is MY, it's not quite so bad.


Re: [PROPOSED PATCH] Add Parrot::Embed to Repository

2006-08-17 Thread Francois PERRAD

At 15:48 15/08/2006 -0700, chromatic wrote:

Here's a proposed patch that seems to work okay for me on Linux.  It's not
great or beautiful, mostly because of the Makefile hackery.  It's a starting
point though.  I suspect Windows might complain.


I try it on Win2000 with MinGW.
1) ExtUtils::PkgConfig is a wrapper over pkg-config, and pkg-config is not 
available on Windows
2) Module::Build is not installed in the distribution ActiveState Perl 
5.8.8 Build 817, and this module has a lot of dependence

3) I think the best way is to use an old fashion Makefile.PL and not a Build.PL

François Perrad.


I don't have any particular attachment to any approach here, only that this
get in the repository somehow.

-- c






Re: [PROPOSED PATCH] Add Parrot::Embed to Repository

2006-08-16 Thread jerry gay

On 8/15/06, chromatic <[EMAIL PROTECTED]> wrote:

Here's a proposed patch that seems to work okay for me on Linux.  It's not
great or beautiful, mostly because of the Makefile hackery.  It's a starting
point though.  I suspect Windows might complain.


windows indeed complains. not only about missing prereq
(ExtUtils::PkgConfig,) but ...and you've got to see this coming...
missing pkg-config. i don't know anything about pkg-config, and i
don't know anything about Module::Build, so i can't take this beyond
the small makefile fix i needed on the last line of the
config/gen/makefiles/ext.in (s<>.)

~jerry


Re: [PROPOSED PATCH] Add Parrot::Embed to Repository

2006-08-16 Thread jerry gay

On 8/16/06, chromatic <[EMAIL PROTECTED]> wrote:

On Wednesday 16 August 2006 08:57, jerry gay wrote:

> i'll happily test, but i can't apply it, as it seems not to be in the
> format my patch util expects. did you use C? i don't see the
> familiar "Index: " headers.

It's a standard svk diff.  That's really weird.  Is this any better?


my tortoisesvn patch command doesn't like it, either. so i downloaded
gnu patch for windows, and that seems to like it better. applied, and
rebuilding now. however, i'm currently also recovering from the stm
merge, which has uncovered some threading failures on windows.
hopefully those will be either hidden from view or resolved shortly,
and i'll be able to provide you with some useful feedback.
~jerry


Re: [PROPOSED PATCH] Add Parrot::Embed to Repository

2006-08-16 Thread chromatic
On Wednesday 16 August 2006 08:57, jerry gay wrote:

> i'll happily test, but i can't apply it, as it seems not to be in the
> format my patch util expects. did you use C? i don't see the
> familiar "Index: " headers.

It's a standard svk diff.  That's really weird.  Is this any better?

-- c
--- MANIFEST	(revision 20216)
+++ MANIFEST	(local)
@@ -201,6 +201,7 @@
 config/gen/makefiles/dynpmc.in  []
 config/gen/makefiles/dynpmc_pl.in   []
 config/gen/makefiles/editor.in  []
+config/gen/makefiles/ext.in []
 config/gen/makefiles/languages.in   []
 config/gen/makefiles/parrot.pc.in   []
 config/gen/makefiles/past.in[]
@@ -637,6 +638,15 @@
 examples/tge/branch/lib/Branch.pir  [main]doc
 examples/tge/branch/lib/Leaf.pir[main]doc
 examples/tge/branch/transform.pir   [main]doc
+ext/Parrot-Embed/t/embed.t  [devel]
+ext/Parrot-Embed/t/greet.pir[devel]
+ext/Parrot-Embed/lib/Parrot/Embed.xs[devel]
+ext/Parrot-Embed/lib/Parrot/Embed.pm[devel]
+ext/Parrot-Embed/Changes[devel]
+ext/Parrot-Embed/MANIFEST   [devel]
+ext/Parrot-Embed/typemap[devel]
+ext/Parrot-Embed/Build.PL   [devel]
+ext/Parrot-Embed/README [devel]
 include/parrot/builtin.h[main]include
 include/parrot/caches.h [main]include
 include/parrot/cclass.h [main]include
--- config/gen/makefiles/root.in	(revision 20216)
+++ config/gen/makefiles/root.in	(local)
@@ -186,6 +186,7 @@
 compilers/tge/Makefile \
 compilers/bcg/Makefile \
 editor/Makefile \
+ext/Makefile \
 languages/Makefile \
 languages/amber/Makefile \
 languages/APL/Makefile \
--- config/gen/makefiles/ext.in	(revision 20216)
+++ config/gen/makefiles/ext.in	(local)
@@ -0,0 +1,64 @@
+# $Id: /parrotcode/offline/config/gen/makefiles/languages.in 19764 2006-08-03T18:17:04.907999Z chromatic  $
+
+# setup of commands
[EMAIL PROTECTED]@
+PERL  = @perl@
+MAKE  = @make_c@
+RM_F  = @rm_f@
+
+# add new languages here
+# remove obsolete languages here
+EXT = \
+Parrot-Embed
+
+# the default target
+all: $(EXT)
+
+# hard-code these for now
+test: Parrot-Embed
+	- cd Parrot-Embed && $(PERL) Build test
+
+clean: Parrot-Embed
+	- cd Parrot-Embed && $(PERL) Build clean
+
+# This is a listing of all targets, that are meant to be called by users
+help:
+	@echo ""
+	@echo "Following targets are available for the user:"
+	@echo ""
+	@echo "  all:  Make a lot of language implementations."
+	@echo "This is the default."
+	@echo "  test: Unified test suite for a lot of languages."
+	@echo ""
+	@echo "  clean:Clean up a lot of languages."
+	@echo ""
+	@echo "  help: Print this help message."
+	@echo ""
+	@echo "  smoke:Run the test suite and send smoke.html to "
+	@echo "http://smoke.parrotcode.org/";
+	@echo ""
+	@echo "  smoke-clean:  clean up smoke.html"
+	@echo ""
+	@echo ""
+	@echo "Following languages are available:"
+	@echo "  $(LANGUAGES)"
+	@echo "A particular language  can be built, tested and cleand up"
+	@echo "  make "
+	@echo "  make .test"
+	@echo "  make .clean"
+	@echo "For the status of individual languages see LANGUAGES.STATUS.pod"
+	@echo ""
+
+clean: \
+Parrot-Embed.clean
+
+#
+# Extension specific targets
+#
+
+# The *.dummy targets are a replacement for the target .PHONY in 'GNU make'
+
+Parrot-Embed : Parrot-Embed.dummy
+
+Parrot-Embed.dummy:
+	- cd ext/Parrot-Embed && $(PERL) Build.PL && $(PERL) Build
--- config/gen/makefiles.pm	(revision 20216)
+++ config/gen/makefiles.pm	(local)
@@ -117,6 +117,11 @@
 replace_slashes => 1
 );
 genfile(
+'config/gen/makefiles/ext.in'   => 'ext/Makefile',
+commentType => '#',
+replace_slashes => 1
+);
+genfile(
 'config/gen/makefiles/parrot.pc.in' => 'parrot.pc'
 );
 
--- ext/Parrot-Embed/Build.PL	(revision 20216)
+++ ext/Parrot-Embed/Build.PL	(local)
@@ -0,0 +1,41 @@
+use strict;
+use warnings;
+
+use Module::Build;
+use ExtUtils::PkgConfig;
+
+my %pkg_info = ExtUtils::PkgConfig->find( 'parrot' );
+
+my $class = Module::Build->subclass(
+	code => <<'END_HERE',
+	use Cwd;
+
+	sub ACTION_build
+	{
+		my $self= shift;
+		my $old_dir = cwd();
+		chdir 't';
+
+		system(qw( parrot -o greet.pbc greet.pir ) ) == 0
+			or die "Cannot compile PBC for test: $?";
+
+

Re: [PROPOSED PATCH] Add Parrot::Embed to Repository

2006-08-16 Thread jerry gay

On 8/15/06, chromatic <[EMAIL PROTECTED]> wrote:

Here's a proposed patch that seems to work okay for me on Linux.  It's not
great or beautiful, mostly because of the Makefile hackery.  It's a starting
point though.  I suspect Windows might complain.


i'll happily test, but i can't apply it, as it seems not to be in the
format my patch util expects. did you use C? i don't see the
familiar "Index: " headers.
~jerry


[PROPOSED PATCH] Add Parrot::Embed to Repository

2006-08-15 Thread chromatic
Here's a proposed patch that seems to work okay for me on Linux.  It's not 
great or beautiful, mostly because of the Makefile hackery.  It's a starting 
point though.  I suspect Windows might complain.

I don't have any particular attachment to any approach here, only that this 
get in the repository somehow.

-- c

=== MANIFEST
==
--- MANIFEST	(revision 20216)
+++ MANIFEST	(local)
@@ -201,6 +201,7 @@
 config/gen/makefiles/dynpmc.in  []
 config/gen/makefiles/dynpmc_pl.in   []
 config/gen/makefiles/editor.in  []
+config/gen/makefiles/ext.in []
 config/gen/makefiles/languages.in   []
 config/gen/makefiles/parrot.pc.in   []
 config/gen/makefiles/past.in[]
@@ -637,6 +638,15 @@
 examples/tge/branch/lib/Branch.pir  [main]doc
 examples/tge/branch/lib/Leaf.pir[main]doc
 examples/tge/branch/transform.pir   [main]doc
+ext/Parrot-Embed/t/embed.t  [devel]
+ext/Parrot-Embed/t/greet.pir[devel]
+ext/Parrot-Embed/lib/Parrot/Embed.xs[devel]
+ext/Parrot-Embed/lib/Parrot/Embed.pm[devel]
+ext/Parrot-Embed/Changes[devel]
+ext/Parrot-Embed/MANIFEST   [devel]
+ext/Parrot-Embed/typemap[devel]
+ext/Parrot-Embed/Build.PL   [devel]
+ext/Parrot-Embed/README [devel]
 include/parrot/builtin.h[main]include
 include/parrot/caches.h [main]include
 include/parrot/cclass.h [main]include
=== config/gen/makefiles/root.in
==
--- config/gen/makefiles/root.in	(revision 20216)
+++ config/gen/makefiles/root.in	(local)
@@ -186,6 +186,7 @@
 compilers/tge/Makefile \
 compilers/bcg/Makefile \
 editor/Makefile \
+ext/Makefile \
 languages/Makefile \
 languages/amber/Makefile \
 languages/APL/Makefile \
=== config/gen/makefiles/ext.in
==
--- config/gen/makefiles/ext.in	(revision 20216)
+++ config/gen/makefiles/ext.in	(local)
@@ -0,0 +1,64 @@
+# $Id: /parrotcode/offline/config/gen/makefiles/languages.in 19764 2006-08-03T18:17:04.907999Z chromatic  $
+
+# setup of commands
[EMAIL PROTECTED]@
+PERL  = @perl@
+MAKE  = @make_c@
+RM_F  = @rm_f@
+
+# add new languages here
+# remove obsolete languages here
+EXT = \
+Parrot-Embed
+
+# the default target
+all: $(EXT)
+
+# hard-code these for now
+test: Parrot-Embed
+	- cd Parrot-Embed && $(PERL) Build test
+
+clean: Parrot-Embed
+	- cd Parrot-Embed && $(PERL) Build clean
+
+# This is a listing of all targets, that are meant to be called by users
+help:
+	@echo ""
+	@echo "Following targets are available for the user:"
+	@echo ""
+	@echo "  all:  Make a lot of language implementations."
+	@echo "This is the default."
+	@echo "  test: Unified test suite for a lot of languages."
+	@echo ""
+	@echo "  clean:Clean up a lot of languages."
+	@echo ""
+	@echo "  help: Print this help message."
+	@echo ""
+	@echo "  smoke:Run the test suite and send smoke.html to "
+	@echo "http://smoke.parrotcode.org/";
+	@echo ""
+	@echo "  smoke-clean:  clean up smoke.html"
+	@echo ""
+	@echo ""
+	@echo "Following languages are available:"
+	@echo "  $(LANGUAGES)"
+	@echo "A particular language  can be built, tested and cleand up"
+	@echo "  make "
+	@echo "  make .test"
+	@echo "  make .clean"
+	@echo "For the status of individual languages see LANGUAGES.STATUS.pod"
+	@echo ""
+
+clean: \
+Parrot-Embed.clean
+
+#
+# Extension specific targets
+#
+
+# The *.dummy targets are a replacement for the target .PHONY in 'GNU make'
+
+Parrot-Embed : Parrot-Embed.dummy
+
+Parrot-Embed.dummy:
+	- cd ext/Parrot-Embed && $(PERL) Build.PL && $(PERL) Build
=== config/gen/makefiles.pm
==
--- config/gen/makefiles.pm	(revision 20216)
+++ config/gen/makefiles.pm	(local)
@@ -117,6 +117,11 @@
 replace_slashes => 1
 );
 genfile(
+'config/gen/makefiles/ext.in'   => 'ext/Makefile',
+commentType => '#',
+replace_slashes => 1
+);
+genfile(
 'config/gen/makefiles/parrot.pc.in' => 'parrot.pc'
 );
 
=== ext/Parrot-Embed/Build.PL
==
--- e