mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-19 22:30:23 +00:00
gloox: fixed darwin (#520703)
This commit is contained in:
@@ -19,27 +19,42 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
sha256 = "sha256-WRvRLCSe3gtQoe9rmawN6O+cG6T9Lhhvl6dAIVzFlmw=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Clang rejects `{ 0 }` as SSL_export_keying_material's context pointer
|
||||
# argument. Use a plain `0` rather than `nullptr`: gloox's ./configure
|
||||
# unconditionally adds `-ansi` (C++98) on all non-Windows platforms, and
|
||||
# while Clang tolerates `nullptr` there as an extension, GCC hard-errors
|
||||
# on it as an undeclared identifier.
|
||||
./tls-openssl-clang.patch
|
||||
];
|
||||
|
||||
# needed since gcc12
|
||||
postPatch = ''
|
||||
sed '1i#include <ctime>' -i \
|
||||
src/tests/{tag/tag_perf.cpp,zlib/zlib_perf.cpp} \
|
||||
src/examples/*.cpp
|
||||
substituteInPlace \
|
||||
src/tests/tag/tag_perf.cpp \
|
||||
src/tests/zlib/zlib_perf.cpp \
|
||||
--replace-fail \
|
||||
"#include <sys/time.h>" \
|
||||
$'#include <ctime>\n#include <sys/time.h>'
|
||||
|
||||
substituteInPlace src/examples/*.cpp \
|
||||
--replace-fail \
|
||||
"#include <stdio.h>" \
|
||||
$'#include <ctime>\n#include <stdio.h>'
|
||||
'';
|
||||
|
||||
buildInputs =
|
||||
[ ]
|
||||
++ lib.optional zlibSupport zlib
|
||||
++ lib.optional sslSupport openssl
|
||||
++ lib.optional idnSupport libidn;
|
||||
buildInputs = lib.flatten [
|
||||
(lib.optional zlibSupport zlib)
|
||||
(lib.optional sslSupport openssl)
|
||||
(lib.optional idnSupport libidn)
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Portable high-level Jabber/XMPP library for C++";
|
||||
mainProgram = "gloox-config";
|
||||
homepage = "http://camaya.net/gloox";
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = [ ];
|
||||
maintainers = [ lib.maintainers.philocalyst ];
|
||||
platforms = lib.platforms.unix;
|
||||
# The last successful Darwin Hydra build was in 2023
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
})
|
||||
|
||||
12
pkgs/by-name/gl/gloox/tls-openssl-clang.patch
Normal file
12
pkgs/by-name/gl/gloox/tls-openssl-clang.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/src/tlsopensslclient.cpp b/src/tlsopensslclient.cpp
|
||||
--- a/src/tlsopensslclient.cpp
|
||||
+++ b/src/tlsopensslclient.cpp
|
||||
@@ -51,7 +51,7 @@
|
||||
{
|
||||
unsigned char buf[32];
|
||||
const char* const label = "EXPORTER-Channel-Binding";
|
||||
- SSL_export_keying_material( m_ssl, buf, 32, label, strlen( label ), { 0 }, 1, 0 );
|
||||
+ SSL_export_keying_material( m_ssl, buf, 32, label, strlen( label ), 0, 0, 0 );
|
||||
return std::string( reinterpret_cast<char* const>( buf ), 32 );
|
||||
}
|
||||
else
|
||||
Reference in New Issue
Block a user