Skip to contentSkip to conversation

pkg-perl: fix for Perl XS packages configured by Makefile.PL

PATCH New Francois Perrad 3 participants 6 messages Apr 24, 2014 – Jun 11, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 pkg-perl: fix for Perl XS packages configured by Makefile.PL

ExtUtils::MakeMaker adds all the header files used by the perl as dependencies to the generated Makefile. This means that the generated Makefile will depend on the system's header files.

Usually this is not a problem, because when building the target package, these header files will indeed be found in $(STAGING_DIR). However, some distro's add an extra header file to the system's perl. This header is also included in the generated Makefile, which makes the build fail because it doesn't exist in $(STAGING_DIR).

As a work-around, explicitly create this header file in $(STAGING_DIR). It doesn't hurt to create it even if the system perl doesn't need it.

---
 package/perl/perl.mk | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
package/perl/perl.mk +21 -0
index 51aeb14..64ad7d3 100644
@@ -94,4 +94,25 @@ define PERL_INSTALL_TARGET_CMDS
 	$(MAKE1) -C $(@D) DESTDIR="$(TARGET_DIR)" install.perl
 endef
 
+# perl infra: fix for Perl XS packages configured by Makefile.PL
+#
+# ExtUtils::MakeMaker adds all the header files used by the perl as
+# dependencies to the generated Makefile. This means that the generated
+# Makefile will depend on the system's header files.
+#
+# Usually this is not a problem, because when building the target package,
+# these header files will indeed be found in $(STAGING_DIR). However, some
+# distro's add an extra header file to the system's perl. This header is
+# also included in the generated Makefile, which makes the build fail
+# because it doesn't exist in $(STAGING_DIR).
+#
+# As a work-around, explicitly create this header file in $(STAGING_DIR).
+# It doesn't hurt to create it even if the system perl doesn't need it.
+#
+define PERL_ADD_PATCHLEVEL_DEBIAN_H
+	touch $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE/patchlevel-debian.h
+endef
+
+PERL_POST_INSTALL_STAGING_HOOKS += PERL_ADD_PATCHLEVEL_DEBIAN_H
+
 $(eval $(generic-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 2/2 perl-cross: bump to version 0.8.5

The perl-cross tarball allows to patch the Perl distribution (in a _POST_EXTRACT_HOOKS). The github helper gives a copy of the project which allows to build this tarball. So, the github helper can not be used here.

---
 package/perl/perl.mk | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
package/perl/perl.mk +4 -3
index 64ad7d3..d9e506e 100644
@@ -12,9 +12,10 @@ PERL_LICENSE = Artistic or GPLv1+
 PERL_LICENSE_FILES = Artistic Copying README
 PERL_INSTALL_STAGING = YES
 
-PERL_CROSS_VERSION = 0.8.3
-PERL_CROSS_BASE_VERSION = 5.$(PERL_VERSION_MAJOR).1
-PERL_CROSS_SITE    = http://download.berlios.de/perlcross
+PERL_CROSS_VERSION = 0.8.5
+PERL_CROSS_BASE_VERSION = 5.$(PERL_VERSION_MAJOR).2
+# DO NOT refactor with the github helper (the result is not the same)
+PERL_CROSS_SITE    = http://raw.github.com/arsv/perl-cross/releases
 PERL_CROSS_SOURCE  = perl-$(PERL_CROSS_BASE_VERSION)-cross-$(PERL_CROSS_VERSION).tar.gz
 PERL_CROSS_OLD_POD = perl$(subst .,,$(PERL_CROSS_BASE_VERSION))delta.pod
 PERL_CROSS_NEW_POD = perl$(subst .,,$(PERL_VERSION))delta.pod
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 2/2 perl-cross: bump to version 0.8.5

Quoted 3 lines · Francois Perrad

The perl-cross tarball allows to patch the Perl distribution (in a _POST_EXTRACT_HOOKS). The github helper gives a copy of the project which allows to build this tarball. So, the github helper can not be used here.

Commit log should be wrapped at 72 columns. Also, please mention that
you changed the site as well (because berlios closes down).

However, the only difference I see between using the github helper and
using the release URL is that that the github helper installs three extra files. I don't see how these three files interfere with building. So unless there's something I missed, I'd use the github helper.

Regards,
Arnout

Quoted 25 lines
---
 package/perl/perl.mk | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
package/perl/perl.mk +4 -3
index 64ad7d3..d9e506e 100644
@@ -12,9 +12,10 @@ PERL_LICENSE = Artistic or GPLv1+
 PERL_LICENSE_FILES = Artistic Copying README
 PERL_INSTALL_STAGING = YES
 
-PERL_CROSS_VERSION = 0.8.3
-PERL_CROSS_BASE_VERSION = 5.$(PERL_VERSION_MAJOR).1
-PERL_CROSS_SITE    = http://download.berlios.de/perlcross
+PERL_CROSS_VERSION = 0.8.5
+PERL_CROSS_BASE_VERSION = 5.$(PERL_VERSION_MAJOR).2
+# DO NOT refactor with the github helper (the result is not the same)
+PERL_CROSS_SITE    = http://raw.github.com/arsv/perl-cross/releases
 PERL_CROSS_SOURCE  = perl-$(PERL_CROSS_BASE_VERSION)-cross-$(PERL_CROSS_VERSION).tar.gz
 PERL_CROSS_OLD_POD = perl$(subst .,,$(PERL_CROSS_BASE_VERSION))delta.pod
 PERL_CROSS_NEW_POD = perl$(subst .,,$(PERL_VERSION))delta.pod
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#3 lore raw

PATCH v2 2/2 perl-cross: bump to version 0.8.5

In reply to Francois Perrad
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Francois" == Francois Perrad <[email protected]> writes:

The perl-cross tarball allows to patch the Perl distribution (in a _POST_EXTRACT_HOOKS). The github helper gives a copy of the project which allows to build this tarball. So, the github helper can not be used here.

Committed with the description adjusted, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH v2 1/2 pkg-perl: fix for Perl XS packages configured by Makefile.PL

In reply to Francois Perrad
Quoted 10 lines · Francois Perrad

ExtUtils::MakeMaker adds all the header files used by the perl as dependencies to the generated Makefile. This means that the generated Makefile will depend on the system's header files.

Usually this is not a problem, because when building the target package, these header files will indeed be found in $(STAGING_DIR). However, some distro's add an extra header file to the system's perl. This header is also included in the generated Makefile, which makes the build fail because it doesn't exist in $(STAGING_DIR).

Quoted 4 lines

As a work-around, explicitly create this header file in $(STAGING_DIR). It doesn't hurt to create it even if the system perl doesn't need it.

(as usual, not tested, but I don't even see the error that this patch fixes, for lack of target perl packages).

Regards,
Arnout

Quoted 35 lines
---
 package/perl/perl.mk | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
package/perl/perl.mk +21 -0
index 51aeb14..64ad7d3 100644
@@ -94,4 +94,25 @@ define PERL_INSTALL_TARGET_CMDS
 	$(MAKE1) -C $(@D) DESTDIR="$(TARGET_DIR)" install.perl
 endef
 
+# perl infra: fix for Perl XS packages configured by Makefile.PL
+#
+# ExtUtils::MakeMaker adds all the header files used by the perl as
+# dependencies to the generated Makefile. This means that the generated
+# Makefile will depend on the system's header files.
+#
+# Usually this is not a problem, because when building the target package,
+# these header files will indeed be found in $(STAGING_DIR). However, some
+# distro's add an extra header file to the system's perl. This header is
+# also included in the generated Makefile, which makes the build fail
+# because it doesn't exist in $(STAGING_DIR).
+#
+# As a work-around, explicitly create this header file in $(STAGING_DIR).
+# It doesn't hurt to create it even if the system perl doesn't need it.
+#
+define PERL_ADD_PATCHLEVEL_DEBIAN_H
+	touch $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE/patchlevel-debian.h
+endef
+
+PERL_POST_INSTALL_STAGING_HOOKS += PERL_ADD_PATCHLEVEL_DEBIAN_H
+
 $(eval $(generic-package))
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#5 lore raw

PATCH v2 1/2 pkg-perl: fix for Perl XS packages configured by Makefile.PL

In reply to Francois Perrad
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Francois" == Francois Perrad <[email protected]> writes:

ExtUtils::MakeMaker adds all the header files used by the perl as dependencies to the generated Makefile. This means that the generated Makefile will depend on the system's header files.

Usually this is not a problem, because when building the target package, these header files will indeed be found in $(STAGING_DIR). However, some distro's add an extra header file to the system's perl. This header is also included in the generated Makefile, which makes the build fail because it doesn't exist in $(STAGING_DIR).

Quoted 4 lines

As a work-around, explicitly create this header file in $(STAGING_DIR). It doesn't hurt to create it even if the system perl doesn't need it.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard