From b3373efef08c287679a8ca0e56b998b5606c62a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= Date: Sun, 7 Dec 2014 20:02:18 +0100 Subject: [PATCH 07/10] contrib/gcrypt: simplify compilation by disabling /doc and work-around a libtool limitation --- contrib/src/gcrypt/disable-doc-compilation.patch | 43 ++++++++++++++++++++++ contrib/src/gcrypt/rules.mak | 2 + .../gcrypt/work-around-libtool-limitation.patch | 25 +++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 contrib/src/gcrypt/disable-doc-compilation.patch create mode 100644 contrib/src/gcrypt/work-around-libtool-limitation.patch diff --git a/contrib/src/gcrypt/disable-doc-compilation.patch b/contrib/src/gcrypt/disable-doc-compilation.patch new file mode 100644 index 0000000..7113a31 --- /dev/null +++ b/contrib/src/gcrypt/disable-doc-compilation.patch @@ -0,0 +1,43 @@ +diff -ru libgcrypt/Makefile.am libgcrypt/Makefile.am +--- libgcrypt/Makefile.am 2014-08-18 08:46:51.000000000 +0200 ++++ libgcrypt/Makefile.am 2014-12-07 19:54:02.000000000 +0100 +@@ -25,11 +25,11 @@ + # (A suitable gitlog-to-changelog script can be found in GnuPG master.) + GITLOG_TO_CHANGELOG=gitlog-to-changelog + +-DIST_SUBDIRS = m4 compat mpi cipher random src doc tests +-SUBDIRS = compat mpi cipher random src doc tests ++DIST_SUBDIRS = m4 compat mpi cipher random src tests ++SUBDIRS = compat mpi cipher random src tests + + EXTRA_DIST = autogen.sh autogen.rc README.GIT LICENSES \ +- ChangeLog-2011 build-aux/ChangeLog-2011 doc/ChangeLog-2011 \ ++ ChangeLog-2011 build-aux/ChangeLog-2011 \ + m4/ChangeLog-2011 cipher/ChangeLog-2011 src/ChangeLog-2011 \ + random/ChangeLog-2011 tests/ChangeLog-2011 mpi/ChangeLog-2011 \ + build-aux/git-log-footer build-aux/git-log-fix +Only in libgcrypt: Makefile.am.orig +Only in libgcrypt: Makefile.am.rej +diff -ru libgcrypt-raw/configure.ac libgcrypt/configure.ac +--- libgcrypt-raw/configure.ac 2014-12-07 19:51:54.000000000 +0100 ++++ libgcrypt/configure.ac 2014-12-07 19:52:48.000000000 +0100 +@@ -2043,7 +2043,6 @@ + mpi/Makefile + cipher/Makefile + random/Makefile +-doc/Makefile + src/Makefile + src/gcrypt.h + src/libgcrypt-config +diff -ru libgcrypt-raw/configure.ac.orig libgcrypt/configure.ac.orig +--- libgcrypt-raw/configure.ac.orig 2014-12-07 19:51:54.000000000 +0100 ++++ libgcrypt/configure.ac.orig 2014-12-07 19:52:37.000000000 +0100 +@@ -1219,7 +1219,7 @@ + AC_COMPILE_IFELSE([AC_LANG_SOURCE( + [[__asm__("xorl \$(123456789/12345678), %ebp;\n\t");]])], + [gcry_cv_gcc_as_const_division_with_wadivide_ok=yes])]) +- if test "$gcry_cv_gcc_as_const_division_ok_with_wadivide_ok" = "no" ; then ++ if test "$gcry_cv_gcc_as_const_division_with_wadivide_ok" = "no" ; then + # '-Wa,--divide' did not work, restore old flags. + CPPFLAGS="$_gcc_cppflags_save" + fi diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak index 4b2cce0..a3f1545 100644 --- a/contrib/src/gcrypt/rules.mak +++ b/contrib/src/gcrypt/rules.mak @@ -13,6 +13,8 @@ libgcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt $(UNPACK) $(APPLY) $(SRC)/gcrypt/fix-amd64-assembly-on-solaris.patch $(APPLY) $(SRC)/gcrypt/0001-Fix-assembly-division-check.patch + $(APPLY) $(SRC)/gcrypt/work-around-libtool-limitation.patch + $(APPLY) $(SRC)/gcrypt/disable-doc-compilation.patch $(MOVE) DEPS_gcrypt = gpg-error diff --git a/contrib/src/gcrypt/work-around-libtool-limitation.patch b/contrib/src/gcrypt/work-around-libtool-limitation.patch new file mode 100644 index 0000000..df97ffb --- /dev/null +++ b/contrib/src/gcrypt/work-around-libtool-limitation.patch @@ -0,0 +1,25 @@ +diff -ru libgcrypt-broken/cipher/Makefile.am libgcrypt/cipher/Makefile.am +--- libgcrypt-broken/cipher/Makefile.am 2013-11-06 23:05:24.000000000 +0100 ++++ libgcrypt/cipher/Makefile.am 2013-11-06 23:21:25.000000000 +0100 +@@ -19,6 +19,8 @@ + + # Process this file with automake to produce Makefile.in + ++LIBTOOL=@LIBTOOL@ --tag=CC ++ + EXTRA_DIST = Manifest + + # Need to include ../src in addition to top_srcdir because gcrypt.h is +diff -ru libgcrypt-broken/mpi/Makefile.am libgcrypt/mpi/Makefile.am +--- libgcrypt-broken/mpi/Makefile.am 2013-11-06 23:05:24.000000000 +0100 ++++ libgcrypt/mpi/Makefile.am 2013-11-06 23:22:04.000000000 +0100 +@@ -23,6 +23,9 @@ + + # Need to include ../src in addition to top_srcdir because gcrypt.h is + # a built header. ++ ++LIBTOOL=@LIBTOOL@ --tag=CC ++ + AM_CPPFLAGS = -I../src -I$(top_srcdir)/src + AM_CFLAGS = $(GPG_ERROR_CFLAGS) + -- 2.4.4