diff mbox series

[RFC,1/2] perl-template-toolkit: new package

Message ID 20180813175645.11088-2-chrismcc@gmail.com
State Changes Requested
Headers show
Series Hack for perl module subdirectories | expand

Commit Message

Christopher McCrory Aug. 13, 2018, 5:56 p.m. UTC
Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
---
 DEVELOPERS                                         |  1 +
 package/Config.in                                  |  1 +
 package/perl-template-toolkit/Config.in            | 11 ++++++++
 .../perl-template-toolkit.hash                     |  6 ++++
 .../perl-template-toolkit/perl-template-toolkit.mk | 32 ++++++++++++++++++++++
 5 files changed, 51 insertions(+)
 create mode 100644 package/perl-template-toolkit/Config.in
 create mode 100644 package/perl-template-toolkit/perl-template-toolkit.hash
 create mode 100644 package/perl-template-toolkit/perl-template-toolkit.mk

Comments

Francois Perrad Aug. 14, 2018, 4:21 a.m. UTC | #1
2018-08-13 19:56 GMT+02:00 Christopher McCrory <chrismcc@gmail.com>:

> Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
> ---
>  DEVELOPERS                                         |  1 +
>  package/Config.in                                  |  1 +
>  package/perl-template-toolkit/Config.in            | 11 ++++++++
>  .../perl-template-toolkit.hash                     |  6 ++++
>  .../perl-template-toolkit/perl-template-toolkit.mk | 32
> ++++++++++++++++++++++
>  5 files changed, 51 insertions(+)
>  create mode 100644 package/perl-template-toolkit/Config.in
>  create mode 100644 package/perl-template-toolkit/
> perl-template-toolkit.hash
>  create mode 100644 package/perl-template-toolkit/perl-template-toolkit.mk
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 6d0e3ecceb..d35cf3fb72 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -501,6 +501,7 @@ F:  package/perl-params-util/
>  F:     package/perl-sub-install/
>  F:     package/perl-sys-meminfo/
>  F:     package/perl-sys-mmap/
> +F:     package/perl-template-toolkit/
>
>  N:     Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
>  F:     package/audit/
> diff --git a/package/Config.in b/package/Config.in
> index 85046ae56e..6437cc0451 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -728,6 +728,7 @@ menu "Perl libraries/modules"
>         source "package/perl-sub-install/Config.in"
>         source "package/perl-sys-meminfo/Config.in"
>         source "package/perl-sys-mmap/Config.in"
> +       source "package/perl-template-toolkit/Config.in"
>         source "package/perl-time-hires/Config.in"
>         source "package/perl-timedate/Config.in"
>         source "package/perl-try-tiny/Config.in"
> diff --git a/package/perl-template-toolkit/Config.in
> b/package/perl-template-toolkit/Config.in
> new file mode 100644
> index 0000000000..1caca074aa
> --- /dev/null
> +++ b/package/perl-template-toolkit/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_PERL_TEMPLATE_TOOLKIT
> +       bool "perl-template-toolkit"
> +       depends on !BR2_STATIC_LIBS
> +       select BR2_PACKAGE_PERL_APPCONFIG
> +       help
> +         comprehensive template processing system
> +
> +         https://metacpan.org/release/Template-Toolkit
> +
> +comment "perl-template-toolkit needs a toolchain w/ dynamic library"
> +       depends on BR2_STATIC_LIBS
> diff --git a/package/perl-template-toolkit/perl-template-toolkit.hash
> b/package/perl-template-toolkit/perl-template-toolkit.hash
> new file mode 100644
> index 0000000000..54d4553695
> --- /dev/null
> +++ b/package/perl-template-toolkit/perl-template-toolkit.hash
> @@ -0,0 +1,6 @@
> +# retrieved by scancpan from http://cpan.metacpan.org/
> +md5    a7fae5d4fe5918f33105d92a62134067 Template-Toolkit-2.27.tar.gz
> +sha256 1311a403264d0134c585af0309ff2a9d5074b8ece23ece5660d31ec96bf2c6dc
> Template-Toolkit-2.27.tar.gz
> +
> +# computed by scancpan
> +sha256 d897b2d98affd4f0489340e54ceb542383101e3d21408dfad025df71d770d842
> README
> diff --git a/package/perl-template-toolkit/perl-template-toolkit.mk
> b/package/perl-template-toolkit/perl-template-toolkit.mk
> new file mode 100644
> index 0000000000..875437dead
> --- /dev/null
> +++ b/package/perl-template-toolkit/perl-template-toolkit.mk
> @@ -0,0 +1,32 @@
> +###########################################################
> #####################
> +#
> +# perl-template-toolkit
> +#
> +###########################################################
> #####################
> +
> +PERL_TEMPLATE_TOOLKIT_VERSION = 2.27
> +PERL_TEMPLATE_TOOLKIT_SOURCE = Template-Toolkit-$(PERL_
> TEMPLATE_TOOLKIT_VERSION).tar.gz
> +PERL_TEMPLATE_TOOLKIT_SITE = $(BR2_CPAN_MIRROR)/authors/id/A/AB/ABW
> +PERL_TEMPLATE_TOOLKIT_DEPENDENCIES = perl-appconfig
> +PERL_TEMPLATE_TOOLKIT_LICENSE = Artistic or GPL-1.0+
> +PERL_TEMPLATE_TOOLKIT_LICENSE_FILES = README
> +
> +# There has got to be a better way... :(
> +# Some arguments to Makefile.PL do not get propagated to subdirectories
> +# similar to:
> +# https://rt.cpan.org/Public/Bug/Display.html?id=28632
> +define PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED
> +        $(SED) "s:^AR = .*:AR = $(TARGET_AR):g" $(@D)/xs/Makefile
> +        $(SED) "s:^FULL_AR = .*:FULL_AR = $(TARGET_AR):g"
> $(@D)/xs/Makefile
> +        $(SED) "s:^CC = .*:CC = $(TARGET_CC):g" $(@D)/xs/Makefile
> +        $(SED) "s:^CCFLAGS = .*:CCFLAGS = $(TARGET_CFLAGS):g"
> $(@D)/xs/Makefile
> +        $(SED) "s:^LD = .*:LD = $(TARGET_CC):g" $(@D)/xs/Makefile
> +        $(SED) "s:^LDDLFLAGS = .*:LDDLFLAGS = -shared
> $(TARGET_LDFLAGS):g" $(@D)/xs/Makefile
> +        $(SED) "s:^LDLFLAGS = .*:LDLFLAGS = $(TARGET_LDFLAGS):g"
> $(@D)/xs/Makefile
> +        $(SED) "s:^DESTDIR = .*:DESTDIR = $(TARGET_DIR):g"
> $(@D)/xs/Makefile
> +endef
>

If you put this block of code in a function (in pkg-perl.mk) with the
filename as parameter,
you could just call it, in each module
    define PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED
         $(call,foo,$(@D)/xs/Makefile)
    endef

François


> +
> +PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_HOOKS += PERL_TEMPLATE_TOOLKIT_POST_
> CONFIGURE_SED
> +
> +
> +$(eval $(perl-package))
> --
> 2.14.4
>
>
<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2018-08-13 19:56 GMT+02:00 Christopher McCrory <span dir="ltr">&lt;<a href="mailto:chrismcc@gmail.com" target="_blank">chrismcc@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Christopher McCrory &lt;<a href="mailto:chrismcc@gmail.com">chrismcc@gmail.com</a>&gt;<br>
---<br>
 DEVELOPERS                                         |  1 +<br>
 package/Config.in                                  |  1 +<br>
 package/perl-template-toolkit/<wbr>Config.in            | 11 ++++++++<br>
 .../perl-template-toolkit.hash                     |  6 ++++<br>
 .../perl-template-toolkit/<a href="http://perl-template-toolkit.mk" rel="noreferrer" target="_blank">perl<wbr>-template-toolkit.mk</a> | 32 ++++++++++++++++++++++<br>
 5 files changed, 51 insertions(+)<br>
 create mode 100644 package/perl-template-toolkit/<wbr>Config.in<br>
 create mode 100644 package/perl-template-toolkit/<wbr>perl-template-toolkit.hash<br>
 create mode 100644 package/perl-template-toolkit/<a href="http://perl-template-toolkit.mk" rel="noreferrer" target="_blank"><wbr>perl-template-toolkit.mk</a><br>
<br>
diff --git a/DEVELOPERS b/DEVELOPERS<br>
index 6d0e3ecceb..d35cf3fb72 100644<br>
--- a/DEVELOPERS<br>
+++ b/DEVELOPERS<br>
@@ -501,6 +501,7 @@ F:  package/perl-params-util/<br>
 F:     package/perl-sub-install/<br>
 F:     package/perl-sys-meminfo/<br>
 F:     package/perl-sys-mmap/<br>
+F:     package/perl-template-toolkit/<br>
<br>
 N:     Clayton Shotwell &lt;<a href="mailto:clayton.shotwell@rockwellcollins.com">clayton.shotwell@<wbr>rockwellcollins.com</a>&gt;<br>
 F:     package/audit/<br>
diff --git a/package/Config.in b/package/Config.in<br>
index 85046ae56e..6437cc0451 100644<br>
--- a/package/Config.in<br>
+++ b/package/Config.in<br>
@@ -728,6 +728,7 @@ menu &quot;Perl libraries/modules&quot;<br>
        source &quot;package/perl-sub-install/<wbr>Config.in&quot;<br>
        source &quot;package/perl-sys-meminfo/<wbr>Config.in&quot;<br>
        source &quot;package/perl-sys-mmap/Config.<wbr>in&quot;<br>
+       source &quot;package/perl-template-<wbr>toolkit/Config.in&quot;<br>
        source &quot;package/perl-time-hires/<wbr>Config.in&quot;<br>
        source &quot;package/perl-timedate/Config.<wbr>in&quot;<br>
        source &quot;package/perl-try-tiny/Config.<wbr>in&quot;<br>
diff --git a/package/perl-template-<wbr>toolkit/Config.in b/package/perl-template-<wbr>toolkit/Config.in<br>
new file mode 100644<br>
index 0000000000..1caca074aa<br>
--- /dev/null<br>
+++ b/package/perl-template-<wbr>toolkit/Config.in<br>
@@ -0,0 +1,11 @@<br>
+config BR2_PACKAGE_PERL_TEMPLATE_<wbr>TOOLKIT<br>
+       bool &quot;perl-template-toolkit&quot;<br>
+       depends on !BR2_STATIC_LIBS<br>
+       select BR2_PACKAGE_PERL_APPCONFIG<br>
+       help<br>
+         comprehensive template processing system<br>
+<br>
+         <a href="https://metacpan.org/release/Template-Toolkit" rel="noreferrer" target="_blank">https://metacpan.org/release/<wbr>Template-Toolkit</a><br>
+<br>
+comment &quot;perl-template-toolkit needs a toolchain w/ dynamic library&quot;<br>
+       depends on BR2_STATIC_LIBS<br>
diff --git a/package/perl-template-<wbr>toolkit/perl-template-toolkit.<wbr>hash b/package/perl-template-<wbr>toolkit/perl-template-toolkit.<wbr>hash<br>
new file mode 100644<br>
index 0000000000..54d4553695<br>
--- /dev/null<br>
+++ b/package/perl-template-<wbr>toolkit/perl-template-toolkit.<wbr>hash<br>
@@ -0,0 +1,6 @@<br>
+# retrieved by scancpan from <a href="http://cpan.metacpan.org/" rel="noreferrer" target="_blank">http://cpan.metacpan.org/</a><br>
+md5    a7fae5d4fe5918f33105d92a621340<wbr>67 Template-Toolkit-2.27.tar.gz<br>
+sha256 1311a403264d0134c585af0309ff2a<wbr>9d5074b8ece23ece5660d31ec96bf2<wbr>c6dc Template-Toolkit-2.27.tar.gz<br>
+<br>
+# computed by scancpan<br>
+sha256 d897b2d98affd4f0489340e54ceb54<wbr>2383101e3d21408dfad025df71d770<wbr>d842 README<br>
diff --git a/package/perl-template-<wbr>toolkit/<a href="http://perl-template-toolkit.mk" rel="noreferrer" target="_blank">perl-template-toolkit.<wbr>mk</a> b/package/perl-template-<wbr>toolkit/<a href="http://perl-template-toolkit.mk" rel="noreferrer" target="_blank">perl-template-toolkit.<wbr>mk</a><br>
new file mode 100644<br>
index 0000000000..875437dead<br>
--- /dev/null<br>
+++ b/package/perl-template-<wbr>toolkit/<a href="http://perl-template-toolkit.mk" rel="noreferrer" target="_blank">perl-template-toolkit.<wbr>mk</a><br>
@@ -0,0 +1,32 @@<br>
+#############################<wbr>##############################<wbr>#####################<br>
+#<br>
+# perl-template-toolkit<br>
+#<br>
+#############################<wbr>##############################<wbr>#####################<br>
+<br>
+PERL_TEMPLATE_TOOLKIT_VERSION = 2.27<br>
+PERL_TEMPLATE_TOOLKIT_SOURCE = Template-Toolkit-$(PERL_<wbr>TEMPLATE_TOOLKIT_VERSION).tar.<wbr>gz<br>
+PERL_TEMPLATE_TOOLKIT_SITE = $(BR2_CPAN_MIRROR)/authors/id/<wbr>A/AB/ABW<br>
+PERL_TEMPLATE_TOOLKIT_<wbr>DEPENDENCIES = perl-appconfig<br>
+PERL_TEMPLATE_TOOLKIT_LICENSE = Artistic or GPL-1.0+<br>
+PERL_TEMPLATE_TOOLKIT_<wbr>LICENSE_FILES = README<br>
+<br>
+# There has got to be a better way... :(<br>
+# Some arguments to Makefile.PL do not get propagated to subdirectories<br>
+# similar to:<br>
+# <a href="https://rt.cpan.org/Public/Bug/Display.html?id=28632" rel="noreferrer" target="_blank">https://rt.cpan.org/Public/<wbr>Bug/Display.html?id=28632</a><br>
+define PERL_TEMPLATE_TOOLKIT_POST_<wbr>CONFIGURE_SED<br>
+        $(SED) &quot;s:^AR = .*:AR = $(TARGET_AR):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^FULL_AR = .*:FULL_AR = $(TARGET_AR):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^CC = .*:CC = $(TARGET_CC):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^CCFLAGS = .*:CCFLAGS = $(TARGET_CFLAGS):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^LD = .*:LD = $(TARGET_CC):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^LDDLFLAGS = .*:LDDLFLAGS = -shared $(TARGET_LDFLAGS):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^LDLFLAGS = .*:LDLFLAGS = $(TARGET_LDFLAGS):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^DESTDIR = .*:DESTDIR = $(TARGET_DIR):g&quot; $(@D)/xs/Makefile<br>
+endef<br></blockquote><div><br></div><div>If you put this block of code in a function (in <a href="http://pkg-perl.mk">pkg-perl.mk</a>) with the filename as parameter,</div><div>you could just call it, in each module</div><div>    define PERL_TEMPLATE_TOOLKIT_POST_<wbr>CONFIGURE_SED</div><div>         $(call,foo,$(@D)/xs/Makefile)<br></div><div>    endef</div><div><br></div><div>François<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
+PERL_TEMPLATE_TOOLKIT_POST_<wbr>CONFIGURE_HOOKS += PERL_TEMPLATE_TOOLKIT_POST_<wbr>CONFIGURE_SED<br>
+<br>
+<br>
+$(eval $(perl-package))<br>
<span class="HOEnZb"><font color="#888888">-- <br>
2.14.4<br>
<br>
</font></span></blockquote></div><br></div></div>
Christopher McCrory Aug. 15, 2018, 12:03 p.m. UTC | #2
hello

On Mon, Aug 13, 2018 at 9:21 PM, François Perrad <francois.perrad@gadz.org>
wrote:

>
>
> 2018-08-13 19:56 GMT+02:00 Christopher McCrory <chrismcc@gmail.com>:
>
>> Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
>> ---
>>
>>
<snip>


> +# There has got to be a better way... :(
>> +# Some arguments to Makefile.PL do not get propagated to subdirectories
>> +# similar to:
>> +# https://rt.cpan.org/Public/Bug/Display.html?id=28632
>> +define PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED
>> +        $(SED) "s:^AR = .*:AR = $(TARGET_AR):g" $(@D)/xs/Makefile
>> +        $(SED) "s:^FULL_AR = .*:FULL_AR = $(TARGET_AR):g"
>> $(@D)/xs/Makefile
>> +        $(SED) "s:^CC = .*:CC = $(TARGET_CC):g" $(@D)/xs/Makefile
>> +        $(SED) "s:^CCFLAGS = .*:CCFLAGS = $(TARGET_CFLAGS):g"
>> $(@D)/xs/Makefile
>> +        $(SED) "s:^LD = .*:LD = $(TARGET_CC):g" $(@D)/xs/Makefile
>> +        $(SED) "s:^LDDLFLAGS = .*:LDDLFLAGS = -shared
>> $(TARGET_LDFLAGS):g" $(@D)/xs/Makefile
>> +        $(SED) "s:^LDLFLAGS = .*:LDLFLAGS = $(TARGET_LDFLAGS):g"
>> $(@D)/xs/Makefile
>> +        $(SED) "s:^DESTDIR = .*:DESTDIR = $(TARGET_DIR):g"
>> $(@D)/xs/Makefile
>> +endef
>>
>
> If you put this block of code in a function (in pkg-perl.mk) with the
> filename as parameter,
> you could just call it, in each module
>     define PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED
>          $(call,foo,$(@D)/xs/Makefile)
>     endef
>
>
My makefile skills aren't good enough to handle the subtleties of the
entire buildroot process.  Is that something you want to handle?  Or use
these as is until someone has some time to work on the pkg-perl.mk bits? Or
other?

Thanks for looking at all these packages I sent.


> François
>
>
>> +
>> +PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_HOOKS +=
>> PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED
>> +
>> +
>> +$(eval $(perl-package))
>> --
>> 2.14.4
>>
>>
>
Francois Perrad Aug. 15, 2018, 6:06 p.m. UTC | #3
2018-08-15 14:03 GMT+02:00 Christopher McCrory <chrismcc@gmail.com>:

> hello
>
> On Mon, Aug 13, 2018 at 9:21 PM, François Perrad <francois.perrad@gadz.org
> > wrote:
>
>>
>>
>> 2018-08-13 19:56 GMT+02:00 Christopher McCrory <chrismcc@gmail.com>:
>>
>>> Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
>>> ---
>>>
>>>
> <snip>
>
>
>> +# There has got to be a better way... :(
>>> +# Some arguments to Makefile.PL do not get propagated to subdirectories
>>> +# similar to:
>>> +# https://rt.cpan.org/Public/Bug/Display.html?id=28632
>>> +define PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED
>>> +        $(SED) "s:^AR = .*:AR = $(TARGET_AR):g" $(@D)/xs/Makefile
>>> +        $(SED) "s:^FULL_AR = .*:FULL_AR = $(TARGET_AR):g"
>>> $(@D)/xs/Makefile
>>> +        $(SED) "s:^CC = .*:CC = $(TARGET_CC):g" $(@D)/xs/Makefile
>>> +        $(SED) "s:^CCFLAGS = .*:CCFLAGS = $(TARGET_CFLAGS):g"
>>> $(@D)/xs/Makefile
>>> +        $(SED) "s:^LD = .*:LD = $(TARGET_CC):g" $(@D)/xs/Makefile
>>> +        $(SED) "s:^LDDLFLAGS = .*:LDDLFLAGS = -shared
>>> $(TARGET_LDFLAGS):g" $(@D)/xs/Makefile
>>> +        $(SED) "s:^LDLFLAGS = .*:LDLFLAGS = $(TARGET_LDFLAGS):g"
>>> $(@D)/xs/Makefile
>>> +        $(SED) "s:^DESTDIR = .*:DESTDIR = $(TARGET_DIR):g"
>>> $(@D)/xs/Makefile
>>> +endef
>>>
>>
>> If you put this block of code in a function (in pkg-perl.mk) with the
>> filename as parameter,
>> you could just call it, in each module
>>     define PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED
>>          $(call,foo,$(@D)/xs/Makefile)
>>     endef
>>
>>
> My makefile skills aren't good enough to handle the subtleties of the
> entire buildroot process.  Is that something you want to handle?  Or use
> these as is until someone has some time to work on the pkg-perl.mk bits?
> Or other?
>
>
It is just like that :

define patch_sub_makefile
    $(SED) "s:^AR = .*:AR = $(TARGET_AR):g" $(1)
    $(SED) "s:^FULL_AR = .*:FULL_AR = $(TARGET_AR):g" $(1)
    $(SED) "s:^CC = .*:CC = $(TARGET_CC):g" $(1)
    $(SED) "s:^CCFLAGS = .*:CCFLAGS = $(TARGET_CFLAGS):g" $(1)
    $(SED) "s:^LD = .*:LD = $(TARGET_CC):g" $(1)
    $(SED) "s:^LDDLFLAGS = .*:LDDLFLAGS = -shared $(TARGET_LDFLAGS):g" $(1)
    $(SED) "s:^LDLFLAGS = .*:LDLFLAGS = $(TARGET_LDFLAGS):g" $(1)
    $(SED) "s:^DESTDIR = .*:DESTDIR = $(TARGET_DIR):g" $(1)
endef

define PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED
    $(call patch_sub_makefile,$(@D)/xs/Makefile)
endef

François



> Thanks for looking at all these packages I sent.
>
>
>> François
>>
>>
>>> +
>>> +PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_HOOKS +=
>>> PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED
>>> +
>>> +
>>> +$(eval $(perl-package))
>>> --
>>> 2.14.4
>>>
>>>
>>
>
>
> --
> Christopher McCrory
> To the optimist, the glass is half full.
> To the pessimist, the glass is half empty.
> To the engineer, the glass is twice as big as it needs to be.
>
<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2018-08-15 14:03 GMT+02:00 Christopher McCrory <span dir="ltr">&lt;<a href="mailto:chrismcc@gmail.com" target="_blank">chrismcc@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">hello<br><div class="gmail_extra"><br><div class="gmail_quote"><span class="gmail-">On Mon, Aug 13, 2018 at 9:21 PM, François Perrad <span dir="ltr">&lt;<a href="mailto:francois.perrad@gadz.org" target="_blank">francois.perrad@gadz.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="gmail-m_-1511480080898418814h5">2018-08-13 19:56 GMT+02:00 Christopher McCrory <span dir="ltr">&lt;<a href="mailto:chrismcc@gmail.com" target="_blank">chrismcc@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Signed-off-by: Christopher McCrory &lt;<a href="mailto:chrismcc@gmail.com" target="_blank">chrismcc@gmail.com</a>&gt;<br>
---<br><br></blockquote></div></div></div></div></div></blockquote><div><br></div></span><div>&lt;snip&gt;<br></div><span class="gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="gmail-m_-1511480080898418814h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+# There has got to be a better way... :(<br>
+# Some arguments to Makefile.PL do not get propagated to subdirectories<br>
+# similar to:<br>
+# <a href="https://rt.cpan.org/Public/Bug/Display.html?id=28632" rel="noreferrer" target="_blank">https://rt.cpan.org/Public/Bug<wbr>/Display.html?id=28632</a><br>
+define PERL_TEMPLATE_TOOLKIT_POST_CON<wbr>FIGURE_SED<br>
+        $(SED) &quot;s:^AR = .*:AR = $(TARGET_AR):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^FULL_AR = .*:FULL_AR = $(TARGET_AR):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^CC = .*:CC = $(TARGET_CC):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^CCFLAGS = .*:CCFLAGS = $(TARGET_CFLAGS):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^LD = .*:LD = $(TARGET_CC):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^LDDLFLAGS = .*:LDDLFLAGS = -shared $(TARGET_LDFLAGS):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^LDLFLAGS = .*:LDLFLAGS = $(TARGET_LDFLAGS):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^DESTDIR = .*:DESTDIR = $(TARGET_DIR):g&quot; $(@D)/xs/Makefile<br>
+endef<br></blockquote><div><br></div></div></div><div>If you put this block of code in a function (in <a href="http://pkg-perl.mk" target="_blank">pkg-perl.mk</a>) with the filename as parameter,</div><div>you could just call it, in each module</div><div>    define PERL_TEMPLATE_TOOLKIT_POST_CON<wbr>FIGURE_SED</div><div>         $(call,foo,$(@D)/xs/Makefile)<br></div><div>    endef</div><span class="gmail-m_-1511480080898418814HOEnZb"><font color="#888888"><div><br></div></font></span></div></div></div></blockquote><div><br></div></span><div>My makefile skills aren&#39;t good enough to handle the subtleties of the entire buildroot process.  Is that something you want to handle?  Or use these as is until someone has some time to work on the <a href="http://pkg-perl.mk" target="_blank">pkg-perl.mk</a> bits? Or other?<br></div><div><br></div></div></div></div></blockquote><div><br></div><div>It is just like that :<br></div><div><br></div><div>define patch_sub_makefile<br>    $(SED) &quot;s:^AR = .*:AR = $(TARGET_AR):g&quot; $(1)<br>    $(SED) &quot;s:^FULL_AR = .*:FULL_AR = $(TARGET_AR):g&quot; $(1)<br>    $(SED) &quot;s:^CC = .*:CC = $(TARGET_CC):g&quot; $(1)<br>    $(SED) &quot;s:^CCFLAGS = .*:CCFLAGS = $(TARGET_CFLAGS):g&quot; $(1)<br>    $(SED) &quot;s:^LD = .*:LD = $(TARGET_CC):g&quot; $(1)<br>    $(SED) &quot;s:^LDDLFLAGS = .*:LDDLFLAGS = -shared $(TARGET_LDFLAGS):g&quot; $(1)<br>    $(SED) &quot;s:^LDLFLAGS = .*:LDLFLAGS = $(TARGET_LDFLAGS):g&quot; $(1)<br>    $(SED) &quot;s:^DESTDIR = .*:DESTDIR = $(TARGET_DIR):g&quot; $(1)<br>endef<br><br>define PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED<br>    $(call patch_sub_makefile,$(@D)/xs/Makefile)<br>endef<br><br></div><div>François<br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div>Thanks for looking at all these packages I sent.<br></div><span class="gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-m_-1511480080898418814HOEnZb"><font color="#888888"><div></div><div>François<br></div></font></span><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+<br>
+PERL_TEMPLATE_TOOLKIT_POST_CO<wbr>NFIGURE_HOOKS += PERL_TEMPLATE_TOOLKIT_POST_CON<wbr>FIGURE_SED<br>
+<br>
+<br>
+$(eval $(perl-package))<br>
<span class="gmail-m_-1511480080898418814m_-8193924172945615657HOEnZb"><font color="#888888">-- <br>
2.14.4<br>
<br>
</font></span></blockquote></span></div><br></div></div>
</blockquote></span></div><span class="gmail-HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="gmail-m_-1511480080898418814gmail_signature">Christopher McCrory<br>To the optimist, the glass is half full.<br>To the pessimist, the glass is half empty.<br>To the engineer, the glass is twice as big as it needs to be.</div>
</font></span></div></div>
</blockquote></div><br></div></div>
Christopher McCrory Aug. 15, 2018, 8:24 p.m. UTC | #4
Sorry for top posting, on phone

I'll gen up a patch with this tomorrow.  You are awesome!

On Wed, Aug 15, 2018, 11:06 AM François Perrad <francois.perrad@gadz.org>
wrote:

>
>
> 2018-08-15 14:03 GMT+02:00 Christopher McCrory <chrismcc@gmail.com>:
>
>> hello
>>
>> On Mon, Aug 13, 2018 at 9:21 PM, François Perrad <
>> francois.perrad@gadz.org> wrote:
>>
>>>
>>>
>>> 2018-08-13 19:56 GMT+02:00 Christopher McCrory <chrismcc@gmail.com>:
>>>
>>>> Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
>>>> ---
>>>>
>>>>
>> <snip>
>>
>>
>>> +# There has got to be a better way... :(
>>>> +# Some arguments to Makefile.PL do not get propagated to subdirectories
>>>> +# similar to:
>>>> +# https://rt.cpan.org/Public/Bug/Display.html?id=28632
>>>> +define PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED
>>>> +        $(SED) "s:^AR = .*:AR = $(TARGET_AR):g" $(@D)/xs/Makefile
>>>> +        $(SED) "s:^FULL_AR = .*:FULL_AR = $(TARGET_AR):g"
>>>> $(@D)/xs/Makefile
>>>> +        $(SED) "s:^CC = .*:CC = $(TARGET_CC):g" $(@D)/xs/Makefile
>>>> +        $(SED) "s:^CCFLAGS = .*:CCFLAGS = $(TARGET_CFLAGS):g"
>>>> $(@D)/xs/Makefile
>>>> +        $(SED) "s:^LD = .*:LD = $(TARGET_CC):g" $(@D)/xs/Makefile
>>>> +        $(SED) "s:^LDDLFLAGS = .*:LDDLFLAGS = -shared
>>>> $(TARGET_LDFLAGS):g" $(@D)/xs/Makefile
>>>> +        $(SED) "s:^LDLFLAGS = .*:LDLFLAGS = $(TARGET_LDFLAGS):g"
>>>> $(@D)/xs/Makefile
>>>> +        $(SED) "s:^DESTDIR = .*:DESTDIR = $(TARGET_DIR):g"
>>>> $(@D)/xs/Makefile
>>>> +endef
>>>>
>>>
>>> If you put this block of code in a function (in pkg-perl.mk) with the
>>> filename as parameter,
>>> you could just call it, in each module
>>>     define PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED
>>>          $(call,foo,$(@D)/xs/Makefile)
>>>     endef
>>>
>>>
>> My makefile skills aren't good enough to handle the subtleties of the
>> entire buildroot process.  Is that something you want to handle?  Or use
>> these as is until someone has some time to work on the pkg-perl.mk bits?
>> Or other?
>>
>>
> It is just like that :
>
> define patch_sub_makefile
>     $(SED) "s:^AR = .*:AR = $(TARGET_AR):g" $(1)
>     $(SED) "s:^FULL_AR = .*:FULL_AR = $(TARGET_AR):g" $(1)
>     $(SED) "s:^CC = .*:CC = $(TARGET_CC):g" $(1)
>     $(SED) "s:^CCFLAGS = .*:CCFLAGS = $(TARGET_CFLAGS):g" $(1)
>     $(SED) "s:^LD = .*:LD = $(TARGET_CC):g" $(1)
>     $(SED) "s:^LDDLFLAGS = .*:LDDLFLAGS = -shared $(TARGET_LDFLAGS):g" $(1)
>     $(SED) "s:^LDLFLAGS = .*:LDLFLAGS = $(TARGET_LDFLAGS):g" $(1)
>     $(SED) "s:^DESTDIR = .*:DESTDIR = $(TARGET_DIR):g" $(1)
> endef
>
> define PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED
>     $(call patch_sub_makefile,$(@D)/xs/Makefile)
> endef
>
> François
>
>
>
>> Thanks for looking at all these packages I sent.
>>
>>
>>> François
>>>
>>>
>>>> +
>>>> +PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_HOOKS +=
>>>> PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED
>>>> +
>>>> +
>>>> +$(eval $(perl-package))
>>>> --
>>>> 2.14.4
>>>>
>>>>
>>>
>>
>>
>> --
>> Christopher McCrory
>> To the optimist, the glass is half full.
>> To the pessimist, the glass is half empty.
>> To the engineer, the glass is twice as big as it needs to be.
>>
>
>
<div dir="auto">Sorry for top posting, on phone <div dir="auto"><br></div><div dir="auto">I&#39;ll gen up a patch with this tomorrow.  You are awesome!</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 15, 2018, 11:06 AM François Perrad &lt;<a href="mailto:francois.perrad@gadz.org">francois.perrad@gadz.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2018-08-15 14:03 GMT+02:00 Christopher McCrory <span dir="ltr">&lt;<a href="mailto:chrismcc@gmail.com" target="_blank" rel="noreferrer">chrismcc@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">hello<br><div class="gmail_extra"><br><div class="gmail_quote"><span class="m_8829469362701203780gmail-">On Mon, Aug 13, 2018 at 9:21 PM, François Perrad <span dir="ltr">&lt;<a href="mailto:francois.perrad@gadz.org" target="_blank" rel="noreferrer">francois.perrad@gadz.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_8829469362701203780gmail-m_-1511480080898418814h5">2018-08-13 19:56 GMT+02:00 Christopher McCrory <span dir="ltr">&lt;<a href="mailto:chrismcc@gmail.com" target="_blank" rel="noreferrer">chrismcc@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Signed-off-by: Christopher McCrory &lt;<a href="mailto:chrismcc@gmail.com" target="_blank" rel="noreferrer">chrismcc@gmail.com</a>&gt;<br>
---<br><br></blockquote></div></div></div></div></div></blockquote><div><br></div></span><div>&lt;snip&gt;<br></div><span class="m_8829469362701203780gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="m_8829469362701203780gmail-m_-1511480080898418814h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+# There has got to be a better way... :(<br>
+# Some arguments to Makefile.PL do not get propagated to subdirectories<br>
+# similar to:<br>
+# <a href="https://rt.cpan.org/Public/Bug/Display.html?id=28632" rel="noreferrer noreferrer" target="_blank">https://rt.cpan.org/Public/Bug/Display.html?id=28632</a><br>
+define PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED<br>
+        $(SED) &quot;s:^AR = .*:AR = $(TARGET_AR):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^FULL_AR = .*:FULL_AR = $(TARGET_AR):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^CC = .*:CC = $(TARGET_CC):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^CCFLAGS = .*:CCFLAGS = $(TARGET_CFLAGS):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^LD = .*:LD = $(TARGET_CC):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^LDDLFLAGS = .*:LDDLFLAGS = -shared $(TARGET_LDFLAGS):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^LDLFLAGS = .*:LDLFLAGS = $(TARGET_LDFLAGS):g&quot; $(@D)/xs/Makefile<br>
+        $(SED) &quot;s:^DESTDIR = .*:DESTDIR = $(TARGET_DIR):g&quot; $(@D)/xs/Makefile<br>
+endef<br></blockquote><div><br></div></div></div><div>If you put this block of code in a function (in <a href="http://pkg-perl.mk" target="_blank" rel="noreferrer">pkg-perl.mk</a>) with the filename as parameter,</div><div>you could just call it, in each module</div><div>    define PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED</div><div>         $(call,foo,$(@D)/xs/Makefile)<br></div><div>    endef</div><span class="m_8829469362701203780gmail-m_-1511480080898418814HOEnZb"><font color="#888888"><div><br></div></font></span></div></div></div></blockquote><div><br></div></span><div>My makefile skills aren&#39;t good enough to handle the subtleties of the entire buildroot process.  Is that something you want to handle?  Or use these as is until someone has some time to work on the <a href="http://pkg-perl.mk" target="_blank" rel="noreferrer">pkg-perl.mk</a> bits? Or other?<br></div><div><br></div></div></div></div></blockquote><div><br></div><div>It is just like that :<br></div><div><br></div><div>define patch_sub_makefile<br>    $(SED) &quot;s:^AR = .*:AR = $(TARGET_AR):g&quot; $(1)<br>    $(SED) &quot;s:^FULL_AR = .*:FULL_AR = $(TARGET_AR):g&quot; $(1)<br>    $(SED) &quot;s:^CC = .*:CC = $(TARGET_CC):g&quot; $(1)<br>    $(SED) &quot;s:^CCFLAGS = .*:CCFLAGS = $(TARGET_CFLAGS):g&quot; $(1)<br>    $(SED) &quot;s:^LD = .*:LD = $(TARGET_CC):g&quot; $(1)<br>    $(SED) &quot;s:^LDDLFLAGS = .*:LDDLFLAGS = -shared $(TARGET_LDFLAGS):g&quot; $(1)<br>    $(SED) &quot;s:^LDLFLAGS = .*:LDLFLAGS = $(TARGET_LDFLAGS):g&quot; $(1)<br>    $(SED) &quot;s:^DESTDIR = .*:DESTDIR = $(TARGET_DIR):g&quot; $(1)<br>endef<br><br>define PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED<br>    $(call patch_sub_makefile,$(@D)/xs/Makefile)<br>endef<br><br></div><div>François<br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div>Thanks for looking at all these packages I sent.<br></div><span class="m_8829469362701203780gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="m_8829469362701203780gmail-m_-1511480080898418814HOEnZb"><font color="#888888"><div></div><div>François<br></div></font></span><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+<br>
+PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_HOOKS += PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED<br>
+<br>
+<br>
+$(eval $(perl-package))<br>
<span class="m_8829469362701203780gmail-m_-1511480080898418814m_-8193924172945615657HOEnZb"><font color="#888888">-- <br>
2.14.4<br>
<br>
</font></span></blockquote></span></div><br></div></div>
</blockquote></span></div><span class="m_8829469362701203780gmail-HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_8829469362701203780gmail-m_-1511480080898418814gmail_signature">Christopher McCrory<br>To the optimist, the glass is half full.<br>To the pessimist, the glass is half empty.<br>To the engineer, the glass is twice as big as it needs to be.</div>
</font></span></div></div>
</blockquote></div><br></div></div>
</blockquote></div>
diff mbox series

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index 6d0e3ecceb..d35cf3fb72 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -501,6 +501,7 @@  F:	package/perl-params-util/
 F:	package/perl-sub-install/
 F:	package/perl-sys-meminfo/
 F:	package/perl-sys-mmap/
+F:	package/perl-template-toolkit/
 
 N:	Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
 F:	package/audit/
diff --git a/package/Config.in b/package/Config.in
index 85046ae56e..6437cc0451 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -728,6 +728,7 @@  menu "Perl libraries/modules"
 	source "package/perl-sub-install/Config.in"
 	source "package/perl-sys-meminfo/Config.in"
 	source "package/perl-sys-mmap/Config.in"
+	source "package/perl-template-toolkit/Config.in"
 	source "package/perl-time-hires/Config.in"
 	source "package/perl-timedate/Config.in"
 	source "package/perl-try-tiny/Config.in"
diff --git a/package/perl-template-toolkit/Config.in b/package/perl-template-toolkit/Config.in
new file mode 100644
index 0000000000..1caca074aa
--- /dev/null
+++ b/package/perl-template-toolkit/Config.in
@@ -0,0 +1,11 @@ 
+config BR2_PACKAGE_PERL_TEMPLATE_TOOLKIT
+	bool "perl-template-toolkit"
+	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_PERL_APPCONFIG
+	help
+	  comprehensive template processing system
+
+	  https://metacpan.org/release/Template-Toolkit
+
+comment "perl-template-toolkit needs a toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS
diff --git a/package/perl-template-toolkit/perl-template-toolkit.hash b/package/perl-template-toolkit/perl-template-toolkit.hash
new file mode 100644
index 0000000000..54d4553695
--- /dev/null
+++ b/package/perl-template-toolkit/perl-template-toolkit.hash
@@ -0,0 +1,6 @@ 
+# retrieved by scancpan from http://cpan.metacpan.org/
+md5    a7fae5d4fe5918f33105d92a62134067 Template-Toolkit-2.27.tar.gz
+sha256 1311a403264d0134c585af0309ff2a9d5074b8ece23ece5660d31ec96bf2c6dc Template-Toolkit-2.27.tar.gz
+
+# computed by scancpan
+sha256 d897b2d98affd4f0489340e54ceb542383101e3d21408dfad025df71d770d842 README
diff --git a/package/perl-template-toolkit/perl-template-toolkit.mk b/package/perl-template-toolkit/perl-template-toolkit.mk
new file mode 100644
index 0000000000..875437dead
--- /dev/null
+++ b/package/perl-template-toolkit/perl-template-toolkit.mk
@@ -0,0 +1,32 @@ 
+################################################################################
+#
+# perl-template-toolkit
+#
+################################################################################
+
+PERL_TEMPLATE_TOOLKIT_VERSION = 2.27
+PERL_TEMPLATE_TOOLKIT_SOURCE = Template-Toolkit-$(PERL_TEMPLATE_TOOLKIT_VERSION).tar.gz
+PERL_TEMPLATE_TOOLKIT_SITE = $(BR2_CPAN_MIRROR)/authors/id/A/AB/ABW
+PERL_TEMPLATE_TOOLKIT_DEPENDENCIES = perl-appconfig
+PERL_TEMPLATE_TOOLKIT_LICENSE = Artistic or GPL-1.0+
+PERL_TEMPLATE_TOOLKIT_LICENSE_FILES = README
+
+# There has got to be a better way... :(
+# Some arguments to Makefile.PL do not get propagated to subdirectories
+# similar to:
+# https://rt.cpan.org/Public/Bug/Display.html?id=28632
+define PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED
+        $(SED) "s:^AR = .*:AR = $(TARGET_AR):g" $(@D)/xs/Makefile
+        $(SED) "s:^FULL_AR = .*:FULL_AR = $(TARGET_AR):g" $(@D)/xs/Makefile
+        $(SED) "s:^CC = .*:CC = $(TARGET_CC):g" $(@D)/xs/Makefile
+        $(SED) "s:^CCFLAGS = .*:CCFLAGS = $(TARGET_CFLAGS):g" $(@D)/xs/Makefile
+        $(SED) "s:^LD = .*:LD = $(TARGET_CC):g" $(@D)/xs/Makefile
+        $(SED) "s:^LDDLFLAGS = .*:LDDLFLAGS = -shared $(TARGET_LDFLAGS):g" $(@D)/xs/Makefile
+        $(SED) "s:^LDLFLAGS = .*:LDLFLAGS = $(TARGET_LDFLAGS):g" $(@D)/xs/Makefile
+        $(SED) "s:^DESTDIR = .*:DESTDIR = $(TARGET_DIR):g" $(@D)/xs/Makefile
+endef
+
+PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_HOOKS += PERL_TEMPLATE_TOOLKIT_POST_CONFIGURE_SED
+
+
+$(eval $(perl-package))