summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2018-02-16 12:33:36 +0000
committerwiz <wiz@pkgsrc.org>2018-02-16 12:33:36 +0000
commitac7234d35bc852bd66889909e0440c7c2e9aba14 (patch)
tree1f395e5f6d448c10a80bf26687765d4b4cc15c1d /net
parent068eb179ba8a716af09b6a35e56491d0113bbeef (diff)
downloadpkgsrc-ac7234d35bc852bd66889909e0440c7c2e9aba14.tar.gz
transmission*: fix build with openssl-1.1.
From upstream via Peter Hjalmarsson via https://bugzilla.redhat.com/show_bug.cgi?id=1468077 Bump PKGREVISION.
Diffstat (limited to 'net')
-rw-r--r--net/transmission-gtk/Makefile4
-rw-r--r--net/transmission-qt/Makefile4
-rw-r--r--net/transmission/Makefile4
-rw-r--r--net/transmission/distinfo3
-rw-r--r--net/transmission/patches/patch-libtransmission_crypto-utils-openssl.c115
5 files changed, 123 insertions, 7 deletions
diff --git a/net/transmission-gtk/Makefile b/net/transmission-gtk/Makefile
index 6e1ccdb0cca..747483f0933 100644
--- a/net/transmission-gtk/Makefile
+++ b/net/transmission-gtk/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.26 2018/01/16 09:37:00 wiz Exp $
+# $NetBSD: Makefile,v 1.27 2018/02/16 12:33:37 wiz Exp $
PKGNAME= transmission-gtk-${VERSION}
-PKGREVISION= 10
+PKGREVISION= 11
USE_LANGUAGES= c c++
INSTALL_ENV+= INSTALL_ROOT=${DESTDIR}${PREFIX}
diff --git a/net/transmission-qt/Makefile b/net/transmission-qt/Makefile
index 11547e22fe3..b863cea5120 100644
--- a/net/transmission-qt/Makefile
+++ b/net/transmission-qt/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.30 2018/01/16 09:37:00 wiz Exp $
+# $NetBSD: Makefile,v 1.31 2018/02/16 12:33:37 wiz Exp $
PKGNAME= transmission-qt-${VERSION}
-PKGREVISION= 13
+PKGREVISION= 14
USE_LANGUAGES= c c++
MAKE_ENV+= QTDIR=${QTDIR}
diff --git a/net/transmission/Makefile b/net/transmission/Makefile
index fbb00253792..c9c07dcb3b3 100644
--- a/net/transmission/Makefile
+++ b/net/transmission/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.13 2018/01/16 09:37:00 wiz Exp $
+# $NetBSD: Makefile,v 1.14 2018/02/16 12:33:36 wiz Exp $
CONFLICTS+= Transmission-[0-9]*
+PKGREVISION= 7
pre-configure:
touch ${WRKSRC}/po/Makefile
@@ -8,6 +9,5 @@ pre-configure:
CONFIGURE_ARGS+= --disable-mac
CONFIGURE_ARGS+= --without-gtk
-PKGREVISION= 6
.include "../../net/transmission/Makefile.common"
.include "../../mk/bsd.pkg.mk"
diff --git a/net/transmission/distinfo b/net/transmission/distinfo
index 151107075ff..6631bbcd1ce 100644
--- a/net/transmission/distinfo
+++ b/net/transmission/distinfo
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.13 2018/01/16 09:37:00 wiz Exp $
+$NetBSD: distinfo,v 1.14 2018/02/16 12:33:36 wiz Exp $
SHA1 (transmission-2.92.tar.xz) = 2140feba45c4471392033d21b86b6f3ef780d88e
RMD160 (transmission-2.92.tar.xz) = 6da78ce333fa2ea69aa4954c3b052a818ce7c93e
SHA512 (transmission-2.92.tar.xz) = 4d99476bee88cedcc4238a0eee64a4089016933cbfc1cfb1cca023ad4ebcfe46375c9e7651a17af4aeaaf1feb19cbd8166aa56ef7992d9e745a7bbcbe8efca11
Size (transmission-2.92.tar.xz) = 3378116 bytes
SHA1 (patch-ab) = 796faa7c61762dc3ffe563748e55160c827149d2
+SHA1 (patch-libtransmission_crypto-utils-openssl.c) = 3157e1410ecab0ebdad6609bbc088df8caf4a184
SHA1 (patch-libtransmission_platform-quota.c) = 2d9758d24c4329021e0774ac9f8bb3dd94592965
SHA1 (patch-libtransmission_quark.c) = 70b8d8d3de0ae480433464a1dbee4488af3b64d9
SHA1 (patch-libtransmission_quark.h) = 5c4b0a24e2e142a3504c232b333fa7665fe8178f
diff --git a/net/transmission/patches/patch-libtransmission_crypto-utils-openssl.c b/net/transmission/patches/patch-libtransmission_crypto-utils-openssl.c
new file mode 100644
index 00000000000..f40b2ed3b45
--- /dev/null
+++ b/net/transmission/patches/patch-libtransmission_crypto-utils-openssl.c
@@ -0,0 +1,115 @@
+$NetBSD: patch-libtransmission_crypto-utils-openssl.c,v 1.1 2018/02/16 12:33:37 wiz Exp $
+
+Fix build with openssl-1.1.
+From upstream via Peter Hjalmarsson via
+https://bugzilla.redhat.com/show_bug.cgi?id=1468077
+
+--- libtransmission/crypto-utils-openssl.c.orig 2015-12-29 00:47:32.449150371 +0000
++++ libtransmission/crypto-utils-openssl.c
+@@ -230,6 +230,61 @@ tr_rc4_process (tr_rc4_ctx_t handle,
+ ****
+ ***/
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000
++static inline int
++DH_set0_pqg (DH * dh,
++ BIGNUM * p,
++ BIGNUM * q,
++ BIGNUM * g)
++{
++ /* If the fields p and g in d are NULL, the corresponding input
++ * parameters MUST be non-NULL. q may remain NULL.
++ */
++ if ((dh->p == NULL && p == NULL)
++ || (dh->g == NULL && g == NULL))
++ return 0;
++
++ if (p != NULL) {
++ BN_free (dh->p);
++ dh->p = p;
++ }
++ if (q != NULL) {
++ BN_free (dh->q);
++ dh->q = q;
++ }
++ if (g != NULL) {
++ BN_free (dh->g);
++ dh->g = g;
++ }
++
++ if (q != NULL) {
++ dh->length = BN_num_bits (q);
++ }
++
++ return 1;
++}
++
++static inline int
++DH_set_length (DH * dh,
++ long length)
++{
++ dh->length = length;
++ return 1;
++}
++
++static inline void
++DH_get0_key(const DH * dh,
++ const BIGNUM ** pub_key,
++ const BIGNUM ** priv_key)
++{
++ if (pub_key != NULL)
++ *pub_key = dh->pub_key;
++ if (priv_key != NULL)
++ *priv_key = dh->priv_key;
++}
++
++#endif
++
+ tr_dh_ctx_t
+ tr_dh_new (const uint8_t * prime_num,
+ size_t prime_num_length,
+@@ -237,13 +292,19 @@ tr_dh_new (const uint8_t * prime_num,
+ size_t generator_num_length)
+ {
+ DH * handle = DH_new ();
++ BIGNUM * p, * g;
+
+ assert (prime_num != NULL);
+ assert (generator_num != NULL);
++ p = BN_bin2bn (prime_num, prime_num_length, NULL);
++ g = BN_bin2bn (generator_num, generator_num_length, NULL);
+
+- if (!check_pointer (handle->p = BN_bin2bn (prime_num, prime_num_length, NULL)) ||
+- !check_pointer (handle->g = BN_bin2bn (generator_num, generator_num_length, NULL)))
++ if (!check_pointer (p) ||
++ !check_pointer (g) ||
++ !DH_set0_pqg (handle, p, NULL, g))
+ {
++ BN_free (p);
++ BN_free (g);
+ DH_free (handle);
+ handle = NULL;
+ }
+@@ -268,16 +329,20 @@ tr_dh_make_key (tr_dh_ctx_t raw_handle
+ {
+ DH * handle = raw_handle;
+ int dh_size, my_public_key_length;
++ const BIGNUM * hand_pub_key;
+
+ assert (handle != NULL);
+ assert (public_key != NULL);
+
+- handle->length = private_key_length * 8;
++
++ DH_set_length(handle, private_key_length * 8);
+
+ if (!check_result (DH_generate_key (handle)))
+ return false;
+
+- my_public_key_length = BN_bn2bin (handle->pub_key, public_key);
++ DH_get0_key (handle, &hand_pub_key, NULL);
++
++ my_public_key_length = BN_bn2bin (hand_pub_key, public_key);
+ dh_size = DH_size (handle);
+
+ tr_dh_align_key (public_key, my_public_key_length, dh_size);