Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 2/3] perl: add vendorprefix
@ 2018-08-10 14:47 Christopher McCrory
  2018-08-10 18:13 ` François Perrad
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher McCrory @ 2018-08-10 14:47 UTC (permalink / raw)
  To: buildroot

This adds vendorprefix to configure args

Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
---
 package/perl/perl.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/perl/perl.mk b/package/perl/perl.mk
index b0eea3eff4..19a8f95f7b 100644
--- a/package/perl/perl.mk
+++ b/package/perl/perl.mk
@@ -48,6 +48,7 @@ PERL_CONF_OPTS = \
 	--target=$(GNU_TARGET_NAME) \
 	--target-tools-prefix=$(TARGET_CROSS) \
 	--prefix=/usr \
+	--vendorprefix=/usr \
 	-Dld="$(TARGET_CC)" \
 	-Dccflags="$(TARGET_CFLAGS)" \
 	-Dldflags="$(TARGET_LDFLAGS) -lm" \
@@ -92,6 +93,7 @@ endef
 HOST_PERL_CONF_OPTS = \
 	-des \
 	-Dprefix="$(HOST_DIR)" \
+	-Dvendorprefix="$(HOST_DIR)" \
 	-Dcc="$(HOSTCC)"
 
 define HOST_PERL_CONFIGURE_CMDS
@@ -111,6 +113,7 @@ $(eval $(generic-package))
 $(eval $(host-generic-package))
 
 define PERL_FINALIZE_TARGET
+	mkdir -p $(TARGET_DIR)/usr/lib/perl5/vendor_perl/$(PERL_VERSION)/$(PERL_ARCHNAME)
 	rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/pod
 	rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE
 	find $(TARGET_DIR)/usr/lib/perl5/ -name 'extralibs.ld' -print0 | xargs -0 rm -f
-- 
2.14.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 2/3] perl: add vendorprefix
  2018-08-10 14:47 [Buildroot] [PATCH 2/3] perl: add vendorprefix Christopher McCrory
@ 2018-08-10 18:13 ` François Perrad
  2018-08-10 18:45   ` Christopher McCrory
  0 siblings, 1 reply; 4+ messages in thread
From: François Perrad @ 2018-08-10 18:13 UTC (permalink / raw)
  To: buildroot

2018-08-10 16:47 GMT+02:00 Christopher McCrory <chrismcc@gmail.com>:

> This adds vendorprefix to configure args
>
> Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
>


What is the rational of this patch ?

Currently, core modules (ie. built directly with the perl distribution) are
installed in /usr/lib/perl5/5.xx.y,
others modules (built by the perl-package infrastructure) are installed in
/usr/lib/perl5/site-perl/5.xx.y.
Why adding /usr/lib/perl5/vendor-perl/5.xx.y ?

Fran?ois

---
>  package/perl/perl.mk | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/package/perl/perl.mk b/package/perl/perl.mk
> index b0eea3eff4..19a8f95f7b 100644
> --- a/package/perl/perl.mk
> +++ b/package/perl/perl.mk
> @@ -48,6 +48,7 @@ PERL_CONF_OPTS = \
>         --target=$(GNU_TARGET_NAME) \
>         --target-tools-prefix=$(TARGET_CROSS) \
>         --prefix=/usr \
> +       --vendorprefix=/usr \
>         -Dld="$(TARGET_CC)" \
>         -Dccflags="$(TARGET_CFLAGS)" \
>         -Dldflags="$(TARGET_LDFLAGS) -lm" \
> @@ -92,6 +93,7 @@ endef
>  HOST_PERL_CONF_OPTS = \
>         -des \
>         -Dprefix="$(HOST_DIR)" \
> +       -Dvendorprefix="$(HOST_DIR)" \
>         -Dcc="$(HOSTCC)"
>
>  define HOST_PERL_CONFIGURE_CMDS
> @@ -111,6 +113,7 @@ $(eval $(generic-package))
>  $(eval $(host-generic-package))
>
>  define PERL_FINALIZE_TARGET
> +       mkdir -p $(TARGET_DIR)/usr/lib/perl5/
> vendor_perl/$(PERL_VERSION)/$(PERL_ARCHNAME)
>         rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/pod
>         rm -rf $(TARGET_DIR)/usr/lib/perl5/$(
> PERL_VERSION)/$(PERL_ARCHNAME)/CORE
>         find $(TARGET_DIR)/usr/lib/perl5/ -name 'extralibs.ld' -print0 |
> xargs -0 rm -f
> --
> 2.14.4
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180810/8658f240/attachment.html>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 2/3] perl: add vendorprefix
  2018-08-10 18:13 ` François Perrad
@ 2018-08-10 18:45   ` Christopher McCrory
  2018-08-11 10:14     ` François Perrad
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher McCrory @ 2018-08-10 18:45 UTC (permalink / raw)
  To: buildroot

On Fri, Aug 10, 2018 at 11:13 AM, Fran?ois Perrad <francois.perrad@gadz.org>
wrote:

>
>
> 2018-08-10 16:47 GMT+02:00 Christopher McCrory <chrismcc@gmail.com>:
>
>> This adds vendorprefix to configure args
>>
>> Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
>>
>
>
> What is the rational of this patch ?
>
> Currently, core modules (ie. built directly with the perl distribution)
> are installed in /usr/lib/perl5/5.xx.y,
> others modules (built by the perl-package infrastructure) are installed in
> /usr/lib/perl5/site-perl/5.xx.y.
> Why adding /usr/lib/perl5/vendor-perl/5.xx.y ?
>


I'm far from a perl expert.  Short answer is so it is there.

Longer answer, I'm trying to package ZoneMinder for buildroot.  It is a
complicated package to say the least.  It is written in C++, configured
with cmake, and perl, and php.  It uses the vendor perl directories.  So
when it installs, instead of using TARGET_DIR/usr/lib/perl5/site_perl/...
it uses  TARGET_DIR/ .  So all the perl bits end up in the top directory,
which is sub optimal.  The ZoneMinder authors provide prebuilt binaries for
the major distributions because it is very difficult to successfully
compile from source.  Cross compiling with buildroot adds even more
challenges.  Adding a vendor directory to perl like most other
distributions is the easiest solution by far.

That said, if you don't want to add this change, I would understand.





>
> Fran?ois
>
> ---
>>  package/perl/perl.mk | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/package/perl/perl.mk b/package/perl/perl.mk
>> index b0eea3eff4..19a8f95f7b 100644
>> --- a/package/perl/perl.mk
>> +++ b/package/perl/perl.mk
>> @@ -48,6 +48,7 @@ PERL_CONF_OPTS = \
>>         --target=$(GNU_TARGET_NAME) \
>>         --target-tools-prefix=$(TARGET_CROSS) \
>>         --prefix=/usr \
>> +       --vendorprefix=/usr \
>>         -Dld="$(TARGET_CC)" \
>>         -Dccflags="$(TARGET_CFLAGS)" \
>>         -Dldflags="$(TARGET_LDFLAGS) -lm" \
>> @@ -92,6 +93,7 @@ endef
>>  HOST_PERL_CONF_OPTS = \
>>         -des \
>>         -Dprefix="$(HOST_DIR)" \
>> +       -Dvendorprefix="$(HOST_DIR)" \
>>         -Dcc="$(HOSTCC)"
>>
>>  define HOST_PERL_CONFIGURE_CMDS
>> @@ -111,6 +113,7 @@ $(eval $(generic-package))
>>  $(eval $(host-generic-package))
>>
>>  define PERL_FINALIZE_TARGET
>> +       mkdir -p $(TARGET_DIR)/usr/lib/perl5/ve
>> ndor_perl/$(PERL_VERSION)/$(PERL_ARCHNAME)
>>         rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/pod
>>         rm -rf $(TARGET_DIR)/usr/lib/perl5/$(
>> PERL_VERSION)/$(PERL_ARCHNAME)/CORE
>>         find $(TARGET_DIR)/usr/lib/perl5/ -name 'extralibs.ld' -print0 |
>> xargs -0 rm -f
>> --
>> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180810/59ed2f26/attachment.html>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 2/3] perl: add vendorprefix
  2018-08-10 18:45   ` Christopher McCrory
@ 2018-08-11 10:14     ` François Perrad
  0 siblings, 0 replies; 4+ messages in thread
From: François Perrad @ 2018-08-11 10:14 UTC (permalink / raw)
  To: buildroot

2018-08-10 20:45 GMT+02:00 Christopher McCrory <chrismcc@gmail.com>:

>
>
> On Fri, Aug 10, 2018 at 11:13 AM, Fran?ois Perrad <
> francois.perrad at gadz.org> wrote:
>
>>
>>
>> 2018-08-10 16:47 GMT+02:00 Christopher McCrory <chrismcc@gmail.com>:
>>
>>> This adds vendorprefix to configure args
>>>
>>> Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
>>>
>>
>>
>> What is the rational of this patch ?
>>
>> Currently, core modules (ie. built directly with the perl distribution)
>> are installed in /usr/lib/perl5/5.xx.y,
>> others modules (built by the perl-package infrastructure) are installed
>> in /usr/lib/perl5/site-perl/5.xx.y.
>> Why adding /usr/lib/perl5/vendor-perl/5.xx.y ?
>>
>
>
> I'm far from a perl expert.  Short answer is so it is there.
>
> Longer answer, I'm trying to package ZoneMinder for buildroot.  It is a
> complicated package to say the least.  It is written in C++, configured
> with cmake, and perl, and php.  It uses the vendor perl directories.  So
> when it installs, instead of using TARGET_DIR/usr/lib/perl5/site_perl/...
> it uses  TARGET_DIR/ .  So all the perl bits end up in the top directory,
> which is sub optimal.  The ZoneMinder authors provide prebuilt binaries for
> the major distributions because it is very difficult to successfully
> compile from source.  Cross compiling with buildroot adds even more
> challenges.  Adding a vendor directory to perl like most other
> distributions is the easiest solution by far.
>
> That said, if you don't want to add this change, I would understand.
>
>
>
OK, for configuring vendorprefix.

But a target-finalize hook is not the right place to create a directory
(see https://buildroot.org/downloads/manual/manual.html#hooks).

You could create the directory usr/lib/perl5/vendor_perl in the
INSTALL_TARGET_CMDS of your package ZoneMinder.

Fran?ois


>
>
>
>>
>> Fran?ois
>>
>> ---
>>>  package/perl/perl.mk | 3 +++
>>>  1 file changed, 3 insertions(+)
>>>
>>> diff --git a/package/perl/perl.mk b/package/perl/perl.mk
>>> index b0eea3eff4..19a8f95f7b 100644
>>> --- a/package/perl/perl.mk
>>> +++ b/package/perl/perl.mk
>>> @@ -48,6 +48,7 @@ PERL_CONF_OPTS = \
>>>         --target=$(GNU_TARGET_NAME) \
>>>         --target-tools-prefix=$(TARGET_CROSS) \
>>>         --prefix=/usr \
>>> +       --vendorprefix=/usr \
>>>         -Dld="$(TARGET_CC)" \
>>>         -Dccflags="$(TARGET_CFLAGS)" \
>>>         -Dldflags="$(TARGET_LDFLAGS) -lm" \
>>> @@ -92,6 +93,7 @@ endef
>>>  HOST_PERL_CONF_OPTS = \
>>>         -des \
>>>         -Dprefix="$(HOST_DIR)" \
>>> +       -Dvendorprefix="$(HOST_DIR)" \
>>>         -Dcc="$(HOSTCC)"
>>>
>>>  define HOST_PERL_CONFIGURE_CMDS
>>> @@ -111,6 +113,7 @@ $(eval $(generic-package))
>>>  $(eval $(host-generic-package))
>>>
>>>  define PERL_FINALIZE_TARGET
>>> +       mkdir -p $(TARGET_DIR)/usr/lib/perl5/ve
>>> ndor_perl/$(PERL_VERSION)/$(PERL_ARCHNAME)
>>>         rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/pod
>>>         rm -rf $(TARGET_DIR)/usr/lib/perl5/$(
>>> PERL_VERSION)/$(PERL_ARCHNAME)/CORE
>>>         find $(TARGET_DIR)/usr/lib/perl5/ -name 'extralibs.ld' -print0 |
>>> xargs -0 rm -f
>>> --
>>> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180811/08cd4358/attachment.html>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-11 10:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-10 14:47 [Buildroot] [PATCH 2/3] perl: add vendorprefix Christopher McCrory
2018-08-10 18:13 ` François Perrad
2018-08-10 18:45   ` Christopher McCrory
2018-08-11 10:14     ` François Perrad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox