From cc4f453d56b924b1da862444c52f3fbb69163224 Mon Sep 17 00:00:00 2001
From: Vittorio Giovara <vittorio.giovara@savoirfairelinux.com>
Date: Thu, 12 Jun 2014 11:01:04 -0400
Subject: [PATCH] contrib: add gpg-error rules

Dependency required by gcrypt.

Change-Id: I5b8491377b480b7755c8db8bfbbce113314e90bd
Refs: #46617
---
 contrib/src/gpgerror/SHA512SUMS |  1 +
 contrib/src/gpgerror/rules.mak  | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 contrib/src/gpgerror/SHA512SUMS
 create mode 100644 contrib/src/gpgerror/rules.mak

diff --git a/contrib/src/gpgerror/SHA512SUMS b/contrib/src/gpgerror/SHA512SUMS
new file mode 100644
index 0000000000..e1f691e184
--- /dev/null
+++ b/contrib/src/gpgerror/SHA512SUMS
@@ -0,0 +1 @@
+db35cff54f12fef121f62bd989147acb8a2bc0711564e7153c1d10c5542e3530d3b3e172210320d312a8438372a099977dc72905e1fcdc29eddfacf8d34998fe  libgpg-error-1.13.tar.bz2
diff --git a/contrib/src/gpgerror/rules.mak b/contrib/src/gpgerror/rules.mak
new file mode 100644
index 0000000000..9d347a9021
--- /dev/null
+++ b/contrib/src/gpgerror/rules.mak
@@ -0,0 +1,22 @@
+# GPG-error library
+
+GPGERROR_VERSION := 1.13
+GPGERROR_URL := http://ftp.heanet.ie/mirrors/ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-$(GPGERROR_VERSION).tar.bz2
+
+ifeq ($(call need_pkg," >= 1.11"),)
+PKGS_FOUND += gpgerror
+endif
+
+$(TARBALLS)/libgpg-error-$(GPGERROR_VERSION).tar.bz2:
+	$(call download,$(GPGERROR_URL))
+
+.sum-gpgerror: libgpg-error-$(GPGERROR_VERSION).tar.bz2
+
+gpgerror: libgpg-error-$(GPGERROR_VERSION).tar.bz2 .sum-gpgerror
+	$(UNPACK)
+	$(MOVE)
+
+.gpgerror: gpgerror
+	cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
+	cd $< && $(MAKE) install
+	touch $@
-- 
GitLab