aboutsummaryrefslogtreecommitdiffstats
path: root/community/pdns
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-10-26 20:55:56 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-10-27 10:14:45 +0000
commit7f650b94c54a7511f2d6a081087b3e8e8665eb94 (patch)
tree936e1ac30b219bda0fc2bb9145ab2fbfeb344663 /community/pdns
parentbe63ce868ac00571010a57eb14fd4af2d8688020 (diff)
downloadaports-7f650b94c54a7511f2d6a081087b3e8e8665eb94.tar.bz2
aports-7f650b94c54a7511f2d6a081087b3e8e8665eb94.tar.xz
community/pdns: fix build with libressl
Diffstat (limited to 'community/pdns')
-rw-r--r--community/pdns/APKBUILD6
-rw-r--r--community/pdns/libressl.patch46
2 files changed, 51 insertions, 1 deletions
diff --git a/community/pdns/APKBUILD b/community/pdns/APKBUILD
index 5d6fd9986e..7720d0ae4c 100644
--- a/community/pdns/APKBUILD
+++ b/community/pdns/APKBUILD
@@ -4,7 +4,7 @@
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=pdns
pkgver=4.0.1
-pkgrel=0
+pkgrel=1
pkgdesc="PowerDNS Authoritative Server"
url="http://www.powerdns.com/"
arch="all"
@@ -25,6 +25,7 @@ subpackages="$pkgname-doc
pkgusers="pdns"
pkggroups="pdns"
source="http://downloads.powerdns.com/releases/pdns-$pkgver.tar.bz2
+ libressl.patch
pdns.initd
pdns.conf
"
@@ -92,11 +93,14 @@ _mv_backend() {
}
md5sums="d34a390672aa043f8a287e5bb2284f4a pdns-4.0.1.tar.bz2
+262a16352b63b3bb89eda6ff01292f52 libressl.patch
db11dfe72474858f706155c817f2ded5 pdns.initd
351bac7f784a1a40e768466d9e6f1a79 pdns.conf"
sha256sums="d191eed4a6664430e85969f49835c59e810ecbb7b3eb506e64c6b2734091edd7 pdns-4.0.1.tar.bz2
+81b86dca30af161d0bb6f944e7e89b84f21494bf9534c2a223baff71cd84f53e libressl.patch
081835f812e419b153a9cc716ad55b9cb22c6c185b748e0aafc40430fa5e8b5e pdns.initd
5fdf423f829dca0b50bc81bab773d7ec4ee6627e35f861124d8c2ccd79a2f50c pdns.conf"
sha512sums="77fce9963a05198afeb569f92fbb0f6a1cb3426c28dd77b0921128189c80d9a72ebdbfc249dfc0b5b89cc7a65a83887a0388d6cc3461453b1e3096e563afdd1e pdns-4.0.1.tar.bz2
+21e88422c6a7cd7d9fbe0de972f85d7ea6e5c3b63e96d742d5cbee99de21f35a1ccd5cdde713a31a932414cc9e43d1b20dcd8d9cfd8f9ce3827915d03f6ba497 libressl.patch
71257be925fe57b15ebf29a7810cd70581cb867416ab9562300a1bbc3eb94fcb92ea2eb95f15e3ee3bd409468911077c50f90a2501801b0c8c49ed979f41f3a4 pdns.initd
9913551bb4d685aaced806134b1037d85ce759e7d9e780e256e67651d9d346aad5e608b4a45a4933f0ba879605b69d06e579c38b7f917f7a9be37c7797c5953b pdns.conf"
diff --git a/community/pdns/libressl.patch b/community/pdns/libressl.patch
new file mode 100644
index 0000000000..0fecb70814
--- /dev/null
+++ b/community/pdns/libressl.patch
@@ -0,0 +1,46 @@
+From 115f658ee2000a4cdcc13e999da50b3634c6a907 Mon Sep 17 00:00:00 2001
+From: Remi Gacogne <remi.gacogne@powerdns.com>
+Date: Fri, 12 Aug 2016 09:52:08 +0200
+Subject: [PATCH] Fix build with LibreSSL, for which OPENSSL_VERSION_NUMBER is
+ irrelevant
+
+---
+ pdns/dns_random.cc | 4 ++--
+ pdns/opensslsigners.cc | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/pdns/dns_random.cc b/pdns/dns_random.cc
+index 623e3aa..4a8ef82 100644
+--- a/pdns/dns_random.cc
++++ b/pdns/dns_random.cc
+@@ -2,7 +2,7 @@
+ #include "config.h"
+ #endif
+ #include <openssl/aes.h>
+-#if OPENSSL_VERSION_NUMBER > 0x1000100fL
++#if OPENSSL_VERSION_NUMBER > 0x1000100fL && !defined LIBRESSL_VERSION_NUMBER
+ // Older OpenSSL does not have CRYPTO_ctr128_encrypt. Before 1.1.0 the header
+ // file did not have the necessary extern "C" wrapper. In 1.1.0, AES_ctr128_encrypt
+ // was removed.
+@@ -53,7 +53,7 @@ unsigned int dns_random(unsigned int n)
+ if(!g_initialized)
+ abort();
+ uint32_t out;
+-#if OPENSSL_VERSION_NUMBER > 0x1000100fL
++#if OPENSSL_VERSION_NUMBER > 0x1000100fL && !defined LIBRESSL_VERSION_NUMBER
+ CRYPTO_ctr128_encrypt((const unsigned char*)&g_in, (unsigned char*) &out, sizeof(g_in), &aes_key, g_counter, g_stream, &g_offset, (block128_f) AES_encrypt);
+ #else
+ AES_ctr128_encrypt((const unsigned char*)&g_in, (unsigned char*) &out, sizeof(g_in), &aes_key, g_counter, g_stream, &g_offset);
+diff --git a/pdns/opensslsigners.cc b/pdns/opensslsigners.cc
+index 3496992..18b78cd 100644
+--- a/pdns/opensslsigners.cc
++++ b/pdns/opensslsigners.cc
+@@ -12,7 +12,7 @@
+ #include "opensslsigners.hh"
+ #include "dnssecinfra.hh"
+
+-#if OPENSSL_VERSION_NUMBER < 0x1010000fL
++#if (OPENSSL_VERSION_NUMBER < 0x1010000fL || defined LIBRESSL_VERSION_NUMBER)
+ /* OpenSSL < 1.1.0 needs support for threading/locking in the calling application. */
+ static pthread_mutex_t *openssllocks;
+