perl: add vendorprefix
PATCH 2/3 perl: add vendorprefix
This adds vendorprefix to configure args
--- package/perl/perl.mk | 3 +++ 1 file changed, 3 insertions(+)
package/perl/perl.mk +3 -0
@@ -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
Signature · 1 line
2.14.4
PATCH 2/3 perl: add vendorprefix
2018-08-10 16:47 GMT+02:00 Christopher McCrory <[email protected]>:
Quoted 4 lines
This adds vendorprefix to configure args
Signed-off-by Christopher McCrory <[email protected]>
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
---
Quoted 32 lines
package/perl/perl.mk | 3 +++ 1 file changed, 3 insertions(+)package/perl/perl.mk +3
-0@@ -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
Quoted 6 lines
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>
PATCH 2/3 perl: add vendorprefix
Quoted 10 lines · Fran?ois Perrad
2018-08-10 16:47 GMT+02:00 Christopher McCrory <[email protected]>:
Quoted 4 lines
This adds vendorprefix to configure args
Signed-off-by Christopher McCrory <[email protected]>
Quoted 8 lines
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.
Quoted 43 lines
Fran?ois
---
Quoted 38 lines
package/perl/perl.mk | 3 +++ 1 file changed, 3 insertions(+)package/perl/perl.mk +3
-0@@ -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
Signature · 7 lines
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>
PATCH 2/3 perl: add vendorprefix
2018-08-10 20:45 GMT+02:00 Christopher McCrory <[email protected]>:
Quoted 38 lines
Quoted 10 lines · Fran?ois Perrad
2018-08-10 16:47 GMT+02:00 Christopher McCrory <[email protected]>:
Quoted 4 lines
This adds vendorprefix to configure args
Signed-off-by Christopher McCrory <[email protected]>Quoted 8 lines
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.
Quoted 4 lines
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
Quoted 48 lines
Quoted 33 lines
Fran?ois
---
Quoted 26 lines
package/perl/perl.mk | 3 +++ 1 file changed, 3 insertions(+)package/perl/perl.mk +2
-0@@ -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))Quoted 13 lines
Quoted 6 lines
package/perl/perl.mk +1
-0define 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
Quoted 6 lines
find $(TARGET_DIR)/usr/lib/perl5/ -name 'extralibs.ld' -print0 |xargs -0 rm -f
--
2.14.4
Quoted 6 lines
--
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>