Re: [gentoo-user] Re: Patch via perl script in an ebuild?

2010-07-24 Thread Grant
 David, you mentioned in the bug that you couldn't get the patch to
 work clean.  I thought you got it working before when you posted the
 patched Typemap for me to download.  Did it work then but not now?

 http://bugs.gentoo.org/show_bug.cgi?id=305621

 - GrantSOAP-WSDL


>>> The patched Typemap created by hand works fine, but when you attempt
>>> to use a downloaded SOAP-WSDL and patch it failed for me, may need to
>>> manually create a patch for SOAP-WSDL.
>>>
>>> --
>>> David Abbott (dabbott)
>>
>> I'm sure I'm confused because of my weak understanding of this.  I
>> thought Typemap was a component of the downloaded SOAP-WSDL.  If not,
>> what is Typemap and how did you patch it by hand?
>>
>> - Grant
>>
>>
> Typemap is a branch of soap-wsdl;
> http://soap-wsdl.svn.sourceforge.net/viewvc/soap-wsdl/SOAP-WSDL/branches/
>
> SOAP::WSDL I don't think can even be used for this;
> http://search.cpan.org/~mkutter/SOAP-WSDL-2.00.10/lib/SOAP/WSDL.pm
>
> I am with you Grant, it is confusing, that is why I said google needs
> to make a patched version of Typemap to use with this and call it
> something line google-typemap-0.1 and keep it updated to use with
> their google-api-adwords-perl. This may happen as it appears the
> project is very active.
>
> http://code.google.com/p/google-api-adwords-perl/source/browse/trunk/README

I've updated the bug with the following good news: "The ebuild works
perfectly.  I've done extensive testing with the library now and all
is well."

- Grant



Re: [gentoo-user] Re: Patch via perl script in an ebuild?

2010-07-02 Thread Grant
>>> David, you mentioned in the bug that you couldn't get the patch to
>>> work clean.  I thought you got it working before when you posted the
>>> patched Typemap for me to download.  Did it work then but not now?
>>>
>>> http://bugs.gentoo.org/show_bug.cgi?id=305621
>>
>> Ah, I didn't know you had this already mostly figured out in a bug.
>> Full disclosure requested -- from the very beginning! :D
>>
>> After taking a quick peek: do those ebuilds succeed in installing
>> something? Since they don't follow CPAN conventions (esp. wrt naming)
>> I'm not sure what perl-module.eclass actually does for their
>> src_compile, src_install and other steps. Also, the "->" used in SRC
>> might have interesting side-effects to paths, as the tarball name no
>> longer matches its content directory's name.
>>
>> --
>> Arttu V. -- Running Gentoo is like running with scissors
>>
>>
> I don't think I will use the software, I was just helping to put the
> pieces together, Grant has been testing it as we move forward. Once we
> get the pieces together and if it will work as intended I think we
> could contact upstream to help with a more sensible approach to
> packaging the patch for the stock SOAP-WSDL, so updating will be
> easier to maintain.
> Just my 2c :)
>
>
> --
> David Abbott (dabbott)

You think Google will change the way it packages the SOAP-WSDL patch
if we request it?

- Grant



Re: [gentoo-user] Re: Patch via perl script in an ebuild?

2010-07-02 Thread David Abbott
On Fri, Jul 2, 2010 at 8:33 PM, Grant  wrote:
>>> David, you mentioned in the bug that you couldn't get the patch to
>>> work clean.  I thought you got it working before when you posted the
>>> patched Typemap for me to download.  Did it work then but not now?
>>>
>>> http://bugs.gentoo.org/show_bug.cgi?id=305621
>>>
>>> - GrantSOAP-WSDL
>>>
>>>
>> The patched Typemap created by hand works fine, but when you attempt
>> to use a downloaded SOAP-WSDL and patch it failed for me, may need to
>> manually create a patch for SOAP-WSDL.
>>
>> --
>> David Abbott (dabbott)
>
> I'm sure I'm confused because of my weak understanding of this.  I
> thought Typemap was a component of the downloaded SOAP-WSDL.  If not,
> what is Typemap and how did you patch it by hand?
>
> - Grant
>
>
Typemap is a branch of soap-wsdl;
http://soap-wsdl.svn.sourceforge.net/viewvc/soap-wsdl/SOAP-WSDL/branches/

SOAP::WSDL I don't think can even be used for this;
http://search.cpan.org/~mkutter/SOAP-WSDL-2.00.10/lib/SOAP/WSDL.pm

I am with you Grant, it is confusing, that is why I said google needs
to make a patched version of Typemap to use with this and call it
something line google-typemap-0.1 and keep it updated to use with
their google-api-adwords-perl. This may happen as it appears the
project is very active.

http://code.google.com/p/google-api-adwords-perl/source/browse/trunk/README

-- 
David Abbott (dabbott)



Re: [gentoo-user] Re: Patch via perl script in an ebuild?

2010-07-02 Thread Grant
>> David, you mentioned in the bug that you couldn't get the patch to
>> work clean.  I thought you got it working before when you posted the
>> patched Typemap for me to download.  Did it work then but not now?
>>
>> http://bugs.gentoo.org/show_bug.cgi?id=305621
>
> Ah, I didn't know you had this already mostly figured out in a bug.
> Full disclosure requested -- from the very beginning! :D

My mistake, I apologize.

> After taking a quick peek: do those ebuilds succeed in installing
> something? Since they don't follow CPAN conventions (esp. wrt naming)
> I'm not sure what perl-module.eclass actually does for their
> src_compile, src_install and other steps. Also, the "->" used in SRC
> might have interesting side-effects to paths, as the tarball name no
> longer matches its content directory's name.
>
> --
> Arttu V. -- Running Gentoo is like running with scissors

The google-api-adwords-perl ebuild in the bug works great for me so
far.  I've only done basic testing with it, but it appears to be
working.  I will be able to do more extensive testing hopefully over
the next few days.

- Grant



Re: [gentoo-user] Re: Patch via perl script in an ebuild?

2010-07-02 Thread Grant
>> David, you mentioned in the bug that you couldn't get the patch to
>> work clean.  I thought you got it working before when you posted the
>> patched Typemap for me to download.  Did it work then but not now?
>>
>> http://bugs.gentoo.org/show_bug.cgi?id=305621
>>
>> - GrantSOAP-WSDL
>>
>>
> The patched Typemap created by hand works fine, but when you attempt
> to use a downloaded SOAP-WSDL and patch it failed for me, may need to
> manually create a patch for SOAP-WSDL.
>
> --
> David Abbott (dabbott)

I'm sure I'm confused because of my weak understanding of this.  I
thought Typemap was a component of the downloaded SOAP-WSDL.  If not,
what is Typemap and how did you patch it by hand?

- Grant



Re: [gentoo-user] Re: Patch via perl script in an ebuild?

2010-07-02 Thread David Abbott
On Fri, Jul 2, 2010 at 8:15 AM, Arttu V.  wrote:
> On 7/2/10, Grant  wrote:
>> David, you mentioned in the bug that you couldn't get the patch to
>> work clean.  I thought you got it working before when you posted the
>> patched Typemap for me to download.  Did it work then but not now?
>>
>> http://bugs.gentoo.org/show_bug.cgi?id=305621
>
> Ah, I didn't know you had this already mostly figured out in a bug.
> Full disclosure requested -- from the very beginning! :D
>
> After taking a quick peek: do those ebuilds succeed in installing
> something? Since they don't follow CPAN conventions (esp. wrt naming)
> I'm not sure what perl-module.eclass actually does for their
> src_compile, src_install and other steps. Also, the "->" used in SRC
> might have interesting side-effects to paths, as the tarball name no
> longer matches its content directory's name.
>
> --
> Arttu V. -- Running Gentoo is like running with scissors
>
>
I don't think I will use the software, I was just helping to put the
pieces together, Grant has been testing it as we move forward. Once we
get the pieces together and if it will work as intended I think we
could contact upstream to help with a more sensible approach to
packaging the patch for the stock SOAP-WSDL, so updating will be
easier to maintain.
Just my 2c :)


-- 
David Abbott (dabbott)



Re: [gentoo-user] Re: Patch via perl script in an ebuild?

2010-07-02 Thread Arttu V.
On 7/2/10, Grant  wrote:
> David, you mentioned in the bug that you couldn't get the patch to
> work clean.  I thought you got it working before when you posted the
> patched Typemap for me to download.  Did it work then but not now?
>
> http://bugs.gentoo.org/show_bug.cgi?id=305621

Ah, I didn't know you had this already mostly figured out in a bug.
Full disclosure requested -- from the very beginning! :D

After taking a quick peek: do those ebuilds succeed in installing
something? Since they don't follow CPAN conventions (esp. wrt naming)
I'm not sure what perl-module.eclass actually does for their
src_compile, src_install and other steps. Also, the "->" used in SRC
might have interesting side-effects to paths, as the tarball name no
longer matches its content directory's name.

-- 
Arttu V. -- Running Gentoo is like running with scissors



Re: [gentoo-user] Re: Patch via perl script in an ebuild?

2010-07-02 Thread David Abbott
On Thu, Jul 1, 2010 at 11:45 PM, Grant  wrote:
> [snip]
>
>> # Copyright 1999-2010 Gentoo Foundation
>> # Distributed under the terms of the GNU General Public License v2
>> # $Header: $
>>
>> EAPI="3"
>>
>> inherit perl-module
>>
>> DESCRIPTION="SOAP-WSDL provides a SOAP client with WSDL support."
>> HOMEPAGE="http://soap-wsdl.svn.sourceforge.net";
>> SRC_URI="http://soap-wsdl.svn.sourceforge.net/viewvc/soap-wsdl/SOAP-WSDL/branches/Typemap.tar.gz
>> -> ${P}.tar.gz"
>> LICENSE="Apache-2.0"
>> SLOT="0"
>> KEYWORDS="~amd64 ~x86"
>> IUSE="google"
>>
>> DEPEND="${RDEPEND}
>>        virtual/perl-Module-Build"
>> RDEPEND="dev-perl/SOAP-Lite
>>        dev-perl/Class-Std-Fast"
>>
>> src_prepare() {
>>        if use google ; then
>>                epatch "${FILESDIR}/${PN}.patch" | die "google patch failed"
>>        fi
>> }
>
> David, you mentioned in the bug that you couldn't get the patch to
> work clean.  I thought you got it working before when you posted the
> patched Typemap for me to download.  Did it work then but not now?
>
> http://bugs.gentoo.org/show_bug.cgi?id=305621
>
> - GrantSOAP-WSDL
>
>
The patched Typemap created by hand works fine, but when you attempt
to use a downloaded SOAP-WSDL and patch it failed for me, may need to
manually create a patch for SOAP-WSDL.

-- 
David Abbott (dabbott)



Re: [gentoo-user] Re: Patch via perl script in an ebuild?

2010-07-01 Thread Grant
[snip]

> # Copyright 1999-2010 Gentoo Foundation
> # Distributed under the terms of the GNU General Public License v2
> # $Header: $
>
> EAPI="3"
>
> inherit perl-module
>
> DESCRIPTION="SOAP-WSDL provides a SOAP client with WSDL support."
> HOMEPAGE="http://soap-wsdl.svn.sourceforge.net";
> SRC_URI="http://soap-wsdl.svn.sourceforge.net/viewvc/soap-wsdl/SOAP-WSDL/branches/Typemap.tar.gz
> -> ${P}.tar.gz"
> LICENSE="Apache-2.0"
> SLOT="0"
> KEYWORDS="~amd64 ~x86"
> IUSE="google"
>
> DEPEND="${RDEPEND}
>        virtual/perl-Module-Build"
> RDEPEND="dev-perl/SOAP-Lite
>        dev-perl/Class-Std-Fast"
>
> src_prepare() {
>        if use google ; then
>                epatch "${FILESDIR}/${PN}.patch" | die "google patch failed"
>        fi
> }

David, you mentioned in the bug that you couldn't get the patch to
work clean.  I thought you got it working before when you posted the
patched Typemap for me to download.  Did it work then but not now?

http://bugs.gentoo.org/show_bug.cgi?id=305621

- Grant



Re: [gentoo-user] Re: Patch via perl script in an ebuild?

2010-07-01 Thread Grant
[snip]

> Am I making any sense?

I think all of that is right on.  I need to find out why the patch
isn't working though.

> Theoretically (if you insist), you could still use the perl's
> Text::Patch route as well, but (if I'm not entirely wrong, see the
> excerpted attempted patch run above) the patch would still need to be
> touched up to match properly with the _3 dev release code. And it
> would add a dependency to Text::Patch, and make an odd call to perl in
> the middle of the ebuild. (I assume it must be made explicitly as I
> don't know if perl-module.eclass has any automation for this. Probably
> not since AFAICT Text::Patch isn't even installed by default).

Do you think it would be better to create a real patch than to use the
perl patch (after we figure out why it isn't working)?  I would think
it would be easier to use the perl patch in case a different version
is released so we don't have to re-create the patch each time.  A
Text::Patch dep wouldn't be so bad.  What do you think?

- Grant



Re: [gentoo-user] Re: Patch via perl script in an ebuild?

2010-07-01 Thread David Abbott
On Thu, Jul 1, 2010 at 2:40 PM, Arttu V.  wrote:
> On 7/1/10, Grant  wrote:
>> Thank you Arttu.  Here is the link to the SOAP::WSDL:
>>
>> http://soap-wsdl.svn.sourceforge.net/viewvc/soap-wsdl/SOAP-WSDL/branches/Typemap.tar.gz?view=tar&pathrev=846
>>
>> from the README:
>>
>> http://code.google.com/p/google-api-adwords-perl/source/browse/trunk/README
>
> Ok, I see they're shipping the same version which is available from
> CPAN as the dev version (2.00.99_3). But the patch is still not made
> for its code ... maybe it is for _2 or _1?
>
> The patch keeps failing out of the box:
>
> cpan -i Text::Patch
> tar xvzf Typemap.tar.gz
> tar xvzf awapi_perl_lib_1.3.2.tar.gz
> ~/tempski $ awapi_perl_lib_1.3.2/bin/soap_wsdl_patches.pl Typemap
> Trying to patch
> Typemap/lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Operation.tt...
> patch successful.
> Trying to patch
> Typemap/lib/SOAP/WSDL/Generator/Template/XSD/Server.tt... patch
> successful.
> Trying to patch
> Typemap/lib/SOAP/WSDL/Generator/Template/Plugin/XSD.pm... patch
> successful.
> Trying to patch
> Typemap/lib/SOAP/WSDL/XSD/Typelib/Builtin/anyType.pm... patch
> successful.
> Trying to patch
> Typemap/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm...Hunk #2 failed at
> line 425.
> ~/tempski $
>
> Anyway, only three files' small chunks fail from the patch, and
> they're short and mostly just semantically adding some formerly
> non-existent subroutines and changing the return values of others.
>
> I think with some manual labour we could turn that patch into a fixed
> regular patch, which we could then apply in an ebuild for SOAP::WSDL
> via a USE flag. For example, something along these lines for
> dev-perl/SOAP-WSDL-2.00.99.3.ebuild (licenses etc might be wrong):
>
> # Copyright 1999-2010 Gentoo Foundation
> # Distributed under the terms of the GNU General Public License v2
> # $Header: $
>
> EAPI=2
>
> MODULE_AUTHOR=MKUTTER
> MY_P="${P:0:17}_3"
> inherit eutils perl-module
>
> DESCRIPTION="SOAP::WSDL module"
>
> LICENSE="Artistic"
> SLOT="0"
> KEYWORDS="amd64 x86"
> IUSE="adwords"
>
> src_prepare() {
>        perl-module_src_prepare
>        use adwords && epatch "${FILESDIR}/${PV}-adwords.patch"
> }
>
>
> This SOAP-WSDL package could then in turn be made a dependency for
> your real google-adwords package (dev-perl/Google-Adwords?):
>
> RDEPENDS="dev-perl/SOAP-WSDL[adwords]"
>
> Am I making any sense?
>
> Theoretically (if you insist), you could still use the perl's
> Text::Patch route as well, but (if I'm not entirely wrong, see the
> excerpted attempted patch run above) the patch would still need to be
> touched up to match properly with the _3 dev release code. And it
> would add a dependency to Text::Patch, and make an odd call to perl in
> the middle of the ebuild. (I assume it must be made explicitly as I
> don't know if perl-module.eclass has any automation for this. Probably
> not since AFAICT Text::Patch isn't even installed by default).
>
> HTH
>
> --
> Arttu V. -- Running Gentoo is like running with scissors
>
>
I was thinking along the same lines, my use was "google"
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="3"

inherit perl-module

DESCRIPTION="SOAP-WSDL provides a SOAP client with WSDL support."
HOMEPAGE="http://soap-wsdl.svn.sourceforge.net";
SRC_URI="http://soap-wsdl.svn.sourceforge.net/viewvc/soap-wsdl/SOAP-WSDL/branches/Typemap.tar.gz
-> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="google"

DEPEND="${RDEPEND}
virtual/perl-Module-Build"
RDEPEND="dev-perl/SOAP-Lite
dev-perl/Class-Std-Fast"

src_prepare() {
if use google ; then
epatch "${FILESDIR}/${PN}.patch" | die "google patch failed"
fi
}


-- 
David Abbott (dabbott)



Re: [gentoo-user] Re: Patch via perl script in an ebuild?

2010-07-01 Thread Arttu V.
On 7/1/10, Grant  wrote:
> Thank you Arttu.  Here is the link to the SOAP::WSDL:
>
> http://soap-wsdl.svn.sourceforge.net/viewvc/soap-wsdl/SOAP-WSDL/branches/Typemap.tar.gz?view=tar&pathrev=846
>
> from the README:
>
> http://code.google.com/p/google-api-adwords-perl/source/browse/trunk/README

Ok, I see they're shipping the same version which is available from
CPAN as the dev version (2.00.99_3). But the patch is still not made
for its code ... maybe it is for _2 or _1?

The patch keeps failing out of the box:

cpan -i Text::Patch
tar xvzf Typemap.tar.gz
tar xvzf awapi_perl_lib_1.3.2.tar.gz
~/tempski $ awapi_perl_lib_1.3.2/bin/soap_wsdl_patches.pl Typemap
Trying to patch
Typemap/lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Operation.tt...
patch successful.
Trying to patch
Typemap/lib/SOAP/WSDL/Generator/Template/XSD/Server.tt... patch
successful.
Trying to patch
Typemap/lib/SOAP/WSDL/Generator/Template/Plugin/XSD.pm... patch
successful.
Trying to patch
Typemap/lib/SOAP/WSDL/XSD/Typelib/Builtin/anyType.pm... patch
successful.
Trying to patch
Typemap/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm...Hunk #2 failed at
line 425.
~/tempski $

Anyway, only three files' small chunks fail from the patch, and
they're short and mostly just semantically adding some formerly
non-existent subroutines and changing the return values of others.

I think with some manual labour we could turn that patch into a fixed
regular patch, which we could then apply in an ebuild for SOAP::WSDL
via a USE flag. For example, something along these lines for
dev-perl/SOAP-WSDL-2.00.99.3.ebuild (licenses etc might be wrong):

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2

MODULE_AUTHOR=MKUTTER
MY_P="${P:0:17}_3"
inherit eutils perl-module

DESCRIPTION="SOAP::WSDL module"

LICENSE="Artistic"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="adwords"

src_prepare() {
perl-module_src_prepare
use adwords && epatch "${FILESDIR}/${PV}-adwords.patch"
}


This SOAP-WSDL package could then in turn be made a dependency for
your real google-adwords package (dev-perl/Google-Adwords?):

RDEPENDS="dev-perl/SOAP-WSDL[adwords]"

Am I making any sense?

Theoretically (if you insist), you could still use the perl's
Text::Patch route as well, but (if I'm not entirely wrong, see the
excerpted attempted patch run above) the patch would still need to be
touched up to match properly with the _3 dev release code. And it
would add a dependency to Text::Patch, and make an odd call to perl in
the middle of the ebuild. (I assume it must be made explicitly as I
don't know if perl-module.eclass has any automation for this. Probably
not since AFAICT Text::Patch isn't even installed by default).

HTH

-- 
Arttu V. -- Running Gentoo is like running with scissors



Re: [gentoo-user] Re: Patch via perl script in an ebuild?

2010-07-01 Thread Grant
>>> I need to install the google-api-adwords-perl library, and it requires
>>> that SOAP-WSDL is patched with the soap_wsdl_patches.pl perl script.
>>> Can I have SOAP-WSDL patched via the perl script in an ebuild?
>>>
>>> - Grant
>>>
>> Here is the perl script:
>>
>> http://pastebin.com/YM3G5sKn
>>
>> Can anyone with perl and ebuild knowledge determine if the script
>> could be incorporated into an ebuild?  David Abbott and I are working
>> on getting google-api-adwords-perl into portage and this is a
>> dependency.
>
> (Some preliminary setup work, like cpan -i Text::Patch SOAP::WSDL.)
>
> Running the patch after fixing its paths ... will result invariably in:
> Trying to patch
> /usr/lib64/perl5/site_perl/5.10.1/SOAP/WSDL/XSD/Typelib/Builtin/anySimpleType.pm...Hunk
> #1 failed at line 13.
>
> I'm no authority on perl, but AFAICT that patch does not match against
> either SOAP::WSDL latest stable sources nor latest SOAP::WSDL dev release
> code from CPAN. Actually, I couldn't find tarballs from CPAN which would
> match with the failing lines of that patch. There might've been some earlier
> 2.00-series releases, but they're ... long gone?
>
> Any idea of the version of SOAP::WSDL they are using for this at Google?

Thank you Arttu.  Here is the link to the SOAP::WSDL:

http://soap-wsdl.svn.sourceforge.net/viewvc/soap-wsdl/SOAP-WSDL/branches/Typemap.tar.gz?view=tar&pathrev=846

from the README:

http://code.google.com/p/google-api-adwords-perl/source/browse/trunk/README

- Grant



Re: [gentoo-user] Re: Patch via perl script in an ebuild?

2010-06-30 Thread Arttu V.

Grant wrote:Grant wrote:
>> I need to install the google-api-adwords-perl library, and it requires
>> that SOAP-WSDL is patched with the soap_wsdl_patches.pl perl script.
>> Can I have SOAP-WSDL patched via the perl script in an ebuild?
>>
>> - Grant
>>
> Here is the perl script:
>
> http://pastebin.com/YM3G5sKn
>
> Can anyone with perl and ebuild knowledge determine if the script
> could be incorporated into an ebuild?  David Abbott and I are working
> on getting google-api-adwords-perl into portage and this is a
> dependency.

(Some preliminary setup work, like cpan -i Text::Patch SOAP::WSDL.)

Running the patch after fixing its paths ... will result invariably in:
Trying to patch 
/usr/lib64/perl5/site_perl/5.10.1/SOAP/WSDL/XSD/Typelib/Builtin/anySimpleType.pm...Hunk 
#1 failed at line 13.


I'm no authority on perl, but AFAICT that patch does not match against 
either SOAP::WSDL latest stable sources nor latest SOAP::WSDL dev 
release code from CPAN. Actually, I couldn't find tarballs from CPAN 
which would match with the failing lines of that patch. There might've 
been some earlier 2.00-series releases, but they're ... long gone?


Any idea of the version of SOAP::WSDL they are using for this at Google?

--
Arttu V. -- Running Gentoo is like running with scissors



[gentoo-user] Re: Patch via perl script in an ebuild?

2010-06-30 Thread Grant
> I need to install the google-api-adwords-perl library, and it requires
> that SOAP-WSDL is patched with the soap_wsdl_patches.pl perl script.
> Can I have SOAP-WSDL patched via the perl script in an ebuild?
>
> - Grant

Here is the perl script:

http://pastebin.com/YM3G5sKn

Can anyone with perl and ebuild knowledge determine if the script
could be incorporated into an ebuild?  David Abbott and I are working
on getting google-api-adwords-perl into portage and this is a
dependency.

- Grant