Hello Stefano,

Stefano Lattarini wrote, On 02/22/2013 02:30 AM:
> On 02/22/2013 12:08 AM, Assaf Gordon wrote:
>>
> I think this explanation should go in the commit message of the second patch,
> as it makes clear why such patch is needed.
> 

Good idea, attached an improved patch.

>>
>> Sadly, autotools-install still doesn't complete, because gettext0.18.1
>> fails to compile with stpncpy() related problem (exactly as solved in
>> coreutils [2]) but that's is not a coreutil bug.
>>
> Is the issue still present with the latest gettext version (1.18.2)?  If not,
> you could update the '$tarballs' definition to point to that instead.

No, 0.18.2 doesn't compile either.
Eric Blake already found the fix for this, I'll just send the gettext people a 
bug report.

> 
> Also, I see that the Automake version referenced by '$tarballs' is still
> 1.12.3; I think it should be updated to the latest available version
> (1.13.2 at the moment of writing).
> 

I can send a separate patch for that, but perhaps others would chime in as to 
whether this should be done?
I assume changing version (1.12 vs 1.13) should be done when it's explicitly 
needed?

-gordon
>From ba2c30e47e808c60bd5e899caca1207dae5aa95a Mon Sep 17 00:00:00 2001
From: Assaf Gordon <[email protected]>
Date: Thu, 21 Feb 2013 17:50:28 -0500
Subject: [PATCH 1/2] maint: print errors with autotools-install fails

* scripts/autotools-install: call die() when configure/make fail. Point
the user to the relevant error log file.
---
 scripts/autotools-install |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/autotools-install b/scripts/autotools-install
index bd49664..419806d 100755
--- a/scripts/autotools-install
+++ b/scripts/autotools-install
@@ -148,8 +148,12 @@ for pkg in $pkgs; do
   rm -rf $dir
   gzip -dc $pkg | tar xf -
   cd $dir
-  ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix >makerr-config 2>&1
-  $MAKE >makerr-build 2>&1
+  ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix >makerr-config 2>&1 \
+    || die "configuring package $dir failed. " \
+            "check '$tmpdir/$dir/makerr-config' for possible details."
+  $MAKE >makerr-build 2>&1 \
+    || die "building package $dir failed. " \
+            "check '$tmpdir/$dir/makerr-build' for possible details."
   if test $make_check = yes; then
     case $pkg in
       # FIXME: these are out of date and very system-sensitive
-- 
1.7.7.4


>From 49c577432325de449239ce5ed5e2b82e401eee14 Mon Sep 17 00:00:00 2001
From: Assaf Gordon <[email protected]>
Date: Thu, 21 Feb 2013 17:58:55 -0500
Subject: [PATCH 2/2] maint: add special config flags for pkg-config

* scripts/autotools-install: force pkg-config to use internal 'glib'
files when compiling from source.

Recent "pkg-config" has a cyclic requirement of "glib", explained in the
pkg-config's README:
http://cgit.freedesktop.org/pkg-config/tree/README?id=pkg-config-0.27.1

  pkg-config depends on glib.  Note that glib build-depends on
  pkg-config, but you can just set the corresponding environment
  variables to build it.

  If this requirement is too cumbersome, a bundled copy of a recent
  glib stable release is included.
  Pass --with-internal-glib to configure to use this copy.
---
 scripts/autotools-install |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/scripts/autotools-install b/scripts/autotools-install
index 419806d..2b626ff 100755
--- a/scripts/autotools-install
+++ b/scripts/autotools-install
@@ -144,11 +144,13 @@ pkgs=`get_sources`
 export PATH=$prefix/bin:$PATH
 for pkg in $pkgs; do
   echo building/installing $pkg...
+  extra=
+  case $pkg in pkg-config*) extra="--with-internal-glib";; esac
   dir=`basename $pkg .tar.gz`
   rm -rf $dir
   gzip -dc $pkg | tar xf -
   cd $dir
-  ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix >makerr-config 2>&1 \
+  ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix $extra>makerr-config 2>&1 \
     || die "configuring package $dir failed. " \
             "check '$tmpdir/$dir/makerr-config' for possible details."
   $MAKE >makerr-build 2>&1 \
-- 
1.7.7.4

Reply via email to