fix build of gpg for newer autotools
authorKonrad Rosenbaum <konrad@silmor.de>
Fri, 2 Aug 2013 19:59:00 +0000 (21:59 +0200)
committerKonrad Rosenbaum <konrad@silmor.de>
Fri, 2 Aug 2013 19:59:00 +0000 (21:59 +0200)
aurora/autogen.diff [new file with mode: 0644]
aurora/build-gpg.sh

diff --git a/aurora/autogen.diff b/aurora/autogen.diff
new file mode 100644 (file)
index 0000000..b77d384
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/autogen.sh b/autogen.sh
+index 8256fd2..7cd9383 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -276,7 +276,7 @@ $ACLOCAL -I m4 $ACLOCAL_FLAGS
+ echo "Running autoheader..."
+ $AUTOHEADER
+ echo "Running automake --gnu ..."
+-$AUTOMAKE --gnu;
++$AUTOMAKE --add-missing --gnu;
+ echo "Running autoconf${FORCE} ..."
+ $AUTOCONF${FORCE}
index 961af6b..4ff1698 100755 (executable)
@@ -5,6 +5,17 @@ fmake(){
         echo -e 'all:\n\techo ok\n\n%:\n\techo ok $@\n\n' >./$1/Makefile
 }
 
+Autocorrect(){
+        echo Patching autogen.sh ...
+        patch -N -f -p1 <../autogen.diff || true
+}
+
+test -f /proc/cpuinfo__ && {
+  CPUS=$(expr $(grep ^processor </proc/cpuinfo |tail -1 |cut -d : -f 2) + 2)
+  export MAKEFLAGS="-j $CPUS"
+  echo Using $CPUS CPUs for Make.
+}
+
 echo Cleaning up old binaries
 rm -rf gpg
 
@@ -26,6 +37,7 @@ echo
 echo Building libgpg-error
 git clean -dfx
 git reset --hard
+Autocorrect
 ./autogen.sh
 ./configure --disable-static --enable-shared --disable-nls --disable-rpath --disable-languages --without-libiconv-prefix --without-libintl-prefix --prefix=`pwd`/../gpg
 fmake doc
@@ -38,6 +50,7 @@ echo
 echo Building libassuan
 git clean -dfx
 git reset --hard
+Autocorrect
 ./autogen.sh
 ./configure --disable-static --enable-shared --with-libgpg-error-prefix=`pwd`/../gpg --prefix=`pwd`/../gpg
 fmake doc
@@ -49,6 +62,7 @@ echo
 echo Building GPGME
 git clean -dfx
 git reset --hard
+Autocorrect
 ./autogen.sh
 ./configure --disable-static --enable-shared --disable-glibtest --disable-gpgsm-test --disable-gpgconf-test --disable-g13-test --with-gpg=`pwd`/../gpg/bin/gpg --prefix=`pwd`/../gpg --with-libassuan-prefix=`pwd`/../gpg --with-libgpg-error-prefix=`pwd`/../gpg
 fmake doc