--- /dev/null
+From e8e37f6be871d84069658d0c48979d7a12395171 Mon Sep 17 00:00:00 2001
+From: Christian Aistleitner <christian@quelltextlich.at>
+Date: Sun, 14 Jul 2013 12:50:07 +0200
+Subject: [PATCH] Fix building with GNU Automake 1.13+
+
+* configure.ac: Force serial tests for GNU Automake 1.13+.
+(serial_tests): New.
+--
+
+GNU Automake switched the default test harness to parallel beginning
+with GNU Automake 1.13. Until we upgrade our tests, we force
+serial-tests beginning with GNU Automake 1.13.
+
+This commit is a minor adaption of libguestfs's (GPLv2+) commit
+a1c89bf03dd432f0e4c8c26fe01fd9b2a50df97e by Richard W.M. Jones.
+
+Signed-off-by: Christian Aistleitner <christian@quelltextlich.at>
+---
+ configure.ac | 22 +++++++++++++++++++++-
+ 1 file changed, 21 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 13541bb..59f8281 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -73,7 +73,27 @@ PACKAGE=$PACKAGE_NAME
+ VERSION=$PACKAGE_VERSION
+
+ AC_CONFIG_SRCDIR([src/libgcrypt.vers])
+-AM_INIT_AUTOMAKE
++
++dnl Initialize automake. automake < 1.12 didn't have serial-tests and
++dnl gives an error if it sees this, but for automake >= 1.13
++dnl serial-tests is required so we have to include it. Solution is to
++dnl test for the version of automake (by running an external command)
++dnl and provide it if necessary. Note we have to do this entirely using
++dnl m4 macros since automake queries this macro by running
++dnl 'autoconf --trace'.
++m4_define([serial_tests], [
++ m4_esyscmd([automake --version | awk 'NR==1 {
++ split ($NF, V_ARR, ".");
++ V_INT=1000000*V_ARR[1]+1000*V_ARR[2]+V_ARR[3]
++ if (V_INT >= 1013000)
++ # GNU Automake is version 1.13 or newer
++ print "serial-tests";
++ }'
++ ])
++])
++
++dnl As we need expansion of the serial_tests macro, do not [quote] it.
++AM_INIT_AUTOMAKE(serial_tests)
+ AC_CONFIG_HEADER(config.h)
+ AC_CONFIG_MACRO_DIR([m4])
+ AC_CONFIG_LIBOBJ_DIR([compat])
+--
+1.8.1.5
+
--- /dev/null
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/openvpn-9999.ebuild,v 1.7 2013/05/03 07:56:29 djc Exp $
+
+EAPI=4
+
+inherit autotools flag-o-matic user git-2
+
+DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
+EGIT_REPO_URI="git://git.gnupg.org/${PN}.git"
+HOMEPAGE="http://gnupg.org/"
+
+LICENSE="GPL-2"
+SLOT="2.1"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+REQUIRED_USE=""
+
+DEPEND="
+ sys-apps/texinfo
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/0002-Fix-building-with-GNU-Automake-1.13.patch";
+}
+
+src_configure() {
+ ./autogen.sh
+
+ ./configure \
+ --enable-maintainer-mode
+}
+
+src_compile()
+{
+ make
+}