summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric Sandall2019-08-09 07:22:43 +0000
committerEric Sandall2019-08-09 07:22:43 +0000
commitdcd574ea097a4b369092344a7eed145380d1a248 (patch)
tree6cfbaa5f611c9e5a5926881f8de7721f42b80fb9 /net
parent42e90e7ce7ebf19117e33af111ed12dc1eca1005 (diff)
nettle: Updated to 2.80
Apply nettle-3.5.patch from https://github.com/themiron/dnsmasq/commit/6fd9aba7abe1e084123bc5002959350897774ace Fix compilation against nettle 3.5
Diffstat (limited to 'net')
-rwxr-xr-xnet/dnsmasq/DETAILS2
-rw-r--r--net/dnsmasq/HISTORY6
-rwxr-xr-xnet/dnsmasq/PRE_BUILD4
-rw-r--r--net/dnsmasq/nettle-3.5.patch35
4 files changed, 46 insertions, 1 deletions
diff --git a/net/dnsmasq/DETAILS b/net/dnsmasq/DETAILS
index 4e9cebf008..9c976f6dad 100755
--- a/net/dnsmasq/DETAILS
+++ b/net/dnsmasq/DETAILS
@@ -1,5 +1,5 @@
SPELL=dnsmasq
- VERSION=2.78
+ VERSION=2.80
SOURCE=$SPELL-$VERSION.tar.xz
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
SOURCE_URL[0]=http://www.thekelleys.org.uk/dnsmasq/$SOURCE
diff --git a/net/dnsmasq/HISTORY b/net/dnsmasq/HISTORY
index 85ddd4a454..36ee3c76cb 100644
--- a/net/dnsmasq/HISTORY
+++ b/net/dnsmasq/HISTORY
@@ -1,3 +1,9 @@
+2019-08-09 Eric Sandall <sandalle@sourcemage.org>
+ * DETAILS: Updated to 2.80
+ * PRE_BUILD: Apply nettle-3.5.patch
+ * nettle-3.5.patch: From https://github.com/themiron/dnsmasq/commit/6fd9aba7abe1e084123bc5002959350897774ace
+ Fix compilation against nettle 3.5
+
2019-05-18 Ismael Luceno <ismael@sourcemage.org>
* DEPENDS: Update dependency; s/gettext/GETTEXT/
diff --git a/net/dnsmasq/PRE_BUILD b/net/dnsmasq/PRE_BUILD
new file mode 100755
index 0000000000..7b5605add3
--- /dev/null
+++ b/net/dnsmasq/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+cd "${SOURCE_DIRECTORY}" &&
+message "${MESSAGE_COLOR}Fixing compilation against nettle 3.5+...${DEFAULT_COLOR}" &&
+patch -p1 < "${SPELL_DIRECTORY}"/nettle-3.5.patch
diff --git a/net/dnsmasq/nettle-3.5.patch b/net/dnsmasq/nettle-3.5.patch
new file mode 100644
index 0000000000..1ac413b8de
--- /dev/null
+++ b/net/dnsmasq/nettle-3.5.patch
@@ -0,0 +1,35 @@
+# From https://github.com/themiron/dnsmasq/commit/6fd9aba7abe1e084123bc5002959350897774ace
+diff --git a/src/crypto.c b/src/crypto.c
+index 1f1c12b..9cfe371 100644
+--- a/src/crypto.c
++++ b/src/crypto.c
+@@ -296,6 +296,10 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
+ static struct ecc_point *key_256 = NULL, *key_384 = NULL;
+ static mpz_t x, y;
+ static struct dsa_signature *sig_struct;
++#if NETTLE_VERSION_MAJOR == 3 && NETTLE_VERSION_MINOR < 4
++#define nettle_get_secp_256r1() (&nettle_secp_256r1)
++#define nettle_get_secp_384r1() (&nettle_secp_384r1)
++#endif
+
+ if (!sig_struct)
+ {
+@@ -315,7 +319,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
+ if (!(key_256 = whine_malloc(sizeof(struct ecc_point))))
+ return 0;
+
+- nettle_ecc_point_init(key_256, &nettle_secp_256r1);
++ nettle_ecc_point_init(key_256, nettle_get_secp_256r1());
+ }
+
+ key = key_256;
+@@ -328,7 +332,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
+ if (!(key_384 = whine_malloc(sizeof(struct ecc_point))))
+ return 0;
+
+- nettle_ecc_point_init(key_384, &nettle_secp_384r1);
++ nettle_ecc_point_init(key_384, nettle_get_secp_384r1());
+ }
+
+ key = key_384;
+