3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

gnu: linuxdcpp: Reanimate.

* gnu/packages/direct-connect.scm (linuxdcpp)[source]: Add patch and
snippet to fix build.
* gnu/packages/patches/linuxdcpp-openssl-1.1.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
This commit is contained in:
Tobias Geerinckx-Rice 2022-01-04 16:01:58 +01:00
parent f7e6e93662
commit 14564f5847
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79
3 changed files with 43 additions and 2 deletions

View file

@ -1427,6 +1427,7 @@ dist_patch_DATA = \
%D%/packages/patches/linux-libre-support-for-Pinebook-Pro.patch \
%D%/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch \
%D%/packages/patches/linux-pam-no-setfsuid.patch \
%D%/packages/patches/linuxdcpp-openssl-1.1.patch \
%D%/packages/patches/lirc-localstatedir.patch \
%D%/packages/patches/lirc-reproducible-build.patch \
%D%/packages/patches/llhttp-bootstrap-CVE-2020-8287.patch \

View file

@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2022 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@ -18,9 +19,11 @@
(define-module (gnu packages direct-connect)
#:use-module (guix build-system scons)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (gnu packages)
#:use-module (gnu packages boost)
#:use-module (gnu packages compression)
#:use-module (gnu packages gettext)
@ -42,8 +45,19 @@
"https://launchpad.net/linuxdcpp/1.1/1.1.0/+download/linuxdcpp-"
version ".tar.bz2"))
(sha256
(base32
"12i92hirmwryl1qy0n3jfrpziwzb82f61xca9jcjwyilx502f0b6"))))
(base32 "12i92hirmwryl1qy0n3jfrpziwzb82f61xca9jcjwyilx502f0b6"))
(patches (search-patches "linuxdcpp-openssl-1.1.patch"))
(modules '((guix build utils)))
(snippet
#~(begin
(substitute* "SConstruct"
;; This compares single char[]acters in the version string, and
;; broke when GCC went into double digits.
(("conf.CheckCXXVersion\\([^\\)]*\\)")
"True")
;; Not all valid C++98 code is valid C++14 (and higher) code.
(("'-D_REENTRANT'" match)
(string-append match ", '-std=gnu++98'")))))))
(build-system scons-build-system)
(arguments
`(#:scons ,scons-python2

View file

@ -0,0 +1,26 @@
--- a/dcpp/CryptoManager.cpp.orig 2011-04-17 17:57:09 UTC
+++ b/dcpp/CryptoManager.cpp
@@ -107,12 +107,20 @@ CryptoManager::CryptoManager()
};
if(dh) {
- dh->p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), 0);
- dh->g = BN_bin2bn(dh4096_g, sizeof(dh4096_g), 0);
+ BIGNUM *p, *g;
- if (!dh->p || !dh->g) {
+ p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), 0);
+ g = BN_bin2bn(dh4096_g, sizeof(dh4096_g), 0);
+
+ if (!p || !g) {
dh.reset();
} else {
+#if OPENSSL_VERSION_NUMBER < 0x10100005L
+ dh->p = p;
+ dh->g = g;
+#else
+ DH_set0_pqg(dh, p, NULL, g);
+#endif
SSL_CTX_set_options(serverContext, SSL_OP_SINGLE_DH_USE);
SSL_CTX_set_options(serverVerContext, SSL_OP_SINGLE_DH_USE);
SSL_CTX_set_tmp_dh(serverContext, (DH*)dh);