Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] pkg-perl: fix for Perl XS packages configured by a Makefile.PL
Date: Tue, 22 Apr 2014 08:01:40 +0200	[thread overview]
Message-ID: <535605C4.2030109@mind.be> (raw)
In-Reply-To: <1398006356-5425-1-git-send-email-francois.perrad@gadz.org>

 Hi Francois,

On 20/04/14 17:05, Francois Perrad wrote:
> for native package, ExtUtils::MakeMaker detects all include filenames on system perl,
> all these includes will be required by the generated Makefile but on STAGING_DIR.
> 
> patchlevel-debian.h is not a part of the Perl distribution,
> but it was added by some Linux distributions (Debian, Ubuntu, ...)
> In this case, we create an empty file on STAGING_DIR.

 Contrary to Thomas, I do understand the explanation, so here's a
hopefully improved one:

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.

> 
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  package/pkg-perl.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/pkg-perl.mk b/package/pkg-perl.mk
> index 447f364..876ffdb 100644
> --- a/package/pkg-perl.mk
> +++ b/package/pkg-perl.mk
> @@ -88,6 +88,7 @@ define $(2)_CONFIGURE_CMDS
>  			INSTALLVENDORMAN1DIR=/usr/share/man/man1 \
>  			INSTALLVENDORMAN3DIR=/usr/share/man/man3 \
>  			$$($(2)_CONF_OPT); \
> +		touch $(STAGING_DIR)/usr/lib/perl5/$$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE/patchlevel-debian.h; \

 Wouldn't it be better to do this in a post-install-staging hook in perl
itself? Now, this file will be touched over and over again for each perl
package.


 Also, you probably should repeat the commit log's explanation here.

 Regards,
 Arnout

>  	fi
>  endef
>  else
> 


-- 
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

  parent reply	other threads:[~2014-04-22  6:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-20 15:05 [Buildroot] [PATCH 1/2] pkg-perl: fix for Perl XS packages configured by a Makefile.PL Francois Perrad
2014-04-20 15:05 ` [Buildroot] [PATCH 2/2] perl-cross: bump to version 0.8.5 Francois Perrad
2014-04-20 15:37   ` Thomas Petazzoni
2014-04-20 17:12     ` François Perrad
2014-04-20 18:44       ` Thomas Petazzoni
2014-04-20 15:38 ` [Buildroot] [PATCH 1/2] pkg-perl: fix for Perl XS packages configured by a Makefile.PL Thomas Petazzoni
2014-04-22  6:01 ` Arnout Vandecappelle [this message]
2014-04-22 16:58   ` François Perrad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=535605C4.2030109@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox