[liblocale-gettext-perl] 01/02: Modernize the cross building support

Niko Tyni ntyni at moszumanska.debian.org
Sun May 22 10:14:55 UTC 2016


This is an automated email from the git hooks/post-receive script.

ntyni pushed a commit to branch master
in repository liblocale-gettext-perl.

commit fd4d8cb8db18d32852eabfac0913c2a36af21412
Author: Niko Tyni <ntyni at debian.org>
Date:   Sun May 22 12:32:18 2016 +0300

    Modernize the cross building support
    
    See #717433.
    
    Build profile restrictions require build dependencies on dpkg-dev (>=
    1.17.14) and debhelper (>=  debhelper 9.20141010).
---
 debian/control | 2 +-
 debian/rules   | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index 212f316..8261b80 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: required
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Niko Tyni <ntyni at debian.org>, gregor herrmann <gregoa at debian.org>
 Standards-Version: 3.9.5
-Build-Depends: debhelper (>= 9.20120312~)
+Build-Depends: debhelper (>= 9.20141010~), dpkg-dev (>= 1.17.14), perl:any, perl-cross-config <cross>
 Homepage: https://metacpan.org/release/gettext
 Vcs-Git: https://anonscm.debian.org/git/pkg-perl/packages/liblocale-gettext-perl.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/liblocale-gettext-perl.git
diff --git a/debian/rules b/debian/rules
index 953ca24..408b6d8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,9 +5,12 @@ DEB_HOST_GNU_TYPE       := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
   PERL_VER := $(shell perl -MConfig -e'print "$$Config{version}\n"')
-  export PERL5LIB=/usr/$(DEB_HOST_GNU_TYPE)/lib/perl/$(PERL_VER)
+  export PERL5LIB=/usr/lib/$(DEB_HOST_GNU_TYPE)/perl/cross-config-$(PERL_VER)
+  CONFIGPM := $(PERL5LIB)/Config.pm
+  CONFIGHEAVY := $(PERL5LIB)/Config_heavy.pl
 
-  ifneq (true,$(shell [ -f $(PERL5LIB)/Config.pm -a -f $(PERL5LIB)/Config_heavy.pl ] && echo true))
+  # sanity check, should be satisfied by the perl-cross-config build dependency
+  ifneq ($(CONFIGPM):$(CONFIGHEAVY),$(wildcard $(CONFIGPM)):$(wildcard $(CONFIGHEAVY)))
     $(error Config.pm & Config_heavy.pl for cross building not found in $(PERL5LIB))
   endif
 endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/liblocale-gettext-perl.git



More information about the Pkg-perl-cvs-commits mailing list