poco: 1.13.3 -> 1.14.1; fix build with new poco in dependent packages (#383163)

This commit is contained in:
Jon Seager
2025-03-03 21:16:26 +00:00
committed by GitHub
8 changed files with 326 additions and 117 deletions
+157 -94
View File
@@ -1,111 +1,173 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, qt5, cmake
, avahi, boost, libopus, libsndfile, protobuf, speex, libcap
, alsa-lib, python3
, rnnoise
, nixosTests
, poco
, flac
, libogg
, libvorbis
, stdenv_32bit
, iceSupport ? true, zeroc-ice
, jackSupport ? false, libjack2
, pipewireSupport ? true, pipewire
, pulseSupport ? true, libpulseaudio
, speechdSupport ? false, speechd-minimal
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
pkg-config,
qt5,
cmake,
avahi,
boost,
libopus,
libsndfile,
protobuf,
speex,
libcap,
utf8proc,
alsa-lib,
python3,
rnnoise,
nixosTests,
poco,
flac,
libogg,
libvorbis,
stdenv_32bit,
iceSupport ? true,
zeroc-ice,
jackSupport ? false,
libjack2,
pipewireSupport ? true,
pipewire,
pulseSupport ? true,
libpulseaudio,
speechdSupport ? false,
speechd-minimal,
}:
let
generic = overrides: source: (overrides.stdenv or stdenv).mkDerivation (source // overrides // {
pname = overrides.type;
version = source.version;
generic =
overrides: source:
(overrides.stdenv or stdenv).mkDerivation (
source
// overrides
// {
pname = overrides.type;
version = source.version;
nativeBuildInputs = [ cmake pkg-config python3 qt5.wrapQtAppsHook qt5.qttools ]
++ (overrides.nativeBuildInputs or [ ]);
nativeBuildInputs = [
cmake
pkg-config
python3
qt5.wrapQtAppsHook
qt5.qttools
] ++ (overrides.nativeBuildInputs or [ ]);
buildInputs = [ avahi boost poco protobuf ]
++ (overrides.buildInputs or [ ]);
buildInputs = [
avahi
boost
poco
protobuf
] ++ (overrides.buildInputs or [ ]);
cmakeFlags = [
"-D g15=OFF"
"-D CMAKE_CXX_STANDARD=17" # protobuf >22 requires C++ 17
] ++ (overrides.configureFlags or [ ]);
cmakeFlags = [
"-D g15=OFF"
"-D CMAKE_CXX_STANDARD=17" # protobuf >22 requires C++ 17
] ++ (overrides.configureFlags or [ ]);
preConfigure = ''
patchShebangs scripts
'';
preConfigure = ''
patchShebangs scripts
'';
passthru.tests.connectivity = nixosTests.mumble;
passthru.tests.connectivity = nixosTests.mumble;
meta = with lib; {
description = "Low-latency, high quality voice chat software";
homepage = "https://mumble.info";
license = licenses.bsd3;
maintainers = with maintainers; [ felixsinger lilacious ];
platforms = platforms.linux;
};
});
meta = with lib; {
description = "Low-latency, high quality voice chat software";
homepage = "https://mumble.info";
license = licenses.bsd3;
maintainers = with maintainers; [
felixsinger
lilacious
];
platforms = platforms.linux;
};
}
);
client = source: generic {
type = "mumble";
client =
source:
generic {
type = "mumble";
nativeBuildInputs = [ qt5.qttools ];
buildInputs = [ flac libogg libopus libsndfile libvorbis qt5.qtsvg rnnoise speex ]
++ lib.optional (!jackSupport) alsa-lib
++ lib.optional jackSupport libjack2
++ lib.optional speechdSupport speechd-minimal
++ lib.optional pulseSupport libpulseaudio
++ lib.optional pipewireSupport pipewire;
nativeBuildInputs = [ qt5.qttools ];
buildInputs =
[
flac
libogg
libopus
libsndfile
libvorbis
qt5.qtsvg
rnnoise
speex
utf8proc
]
++ lib.optional (!jackSupport) alsa-lib
++ lib.optional jackSupport libjack2
++ lib.optional speechdSupport speechd-minimal
++ lib.optional pulseSupport libpulseaudio
++ lib.optional pipewireSupport pipewire;
configureFlags = [
"-D server=OFF"
"-D bundled-celt=ON"
"-D bundled-opus=OFF"
"-D bundled-speex=OFF"
"-D bundle-qt-translations=OFF"
"-D update=OFF"
"-D overlay-xcompile=OFF"
"-D oss=OFF"
"-D warnings-as-errors=OFF" # conversion error workaround
] ++ lib.optional (!speechdSupport) "-D speechd=OFF"
++ lib.optional (!pulseSupport) "-D pulseaudio=OFF"
++ lib.optional (!pipewireSupport) "-D pipewire=OFF"
++ lib.optional jackSupport "-D alsa=OFF -D jackaudio=ON";
configureFlags =
[
"-D server=OFF"
"-D bundled-celt=ON"
"-D bundled-opus=OFF"
"-D bundled-speex=OFF"
"-D bundle-qt-translations=OFF"
"-D update=OFF"
"-D overlay-xcompile=OFF"
"-D oss=OFF"
"-D warnings-as-errors=OFF" # conversion error workaround
]
++ lib.optional (!speechdSupport) "-D speechd=OFF"
++ lib.optional (!pulseSupport) "-D pulseaudio=OFF"
++ lib.optional (!pipewireSupport) "-D pipewire=OFF"
++ lib.optional jackSupport "-D alsa=OFF -D jackaudio=ON";
env.NIX_CFLAGS_COMPILE = lib.optionalString speechdSupport "-I${speechd-minimal}/include/speech-dispatcher";
env.NIX_CFLAGS_COMPILE = lib.optionalString speechdSupport "-I${speechd-minimal}/include/speech-dispatcher";
postFixup = ''
wrapProgram $out/bin/mumble \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath (lib.optional pulseSupport libpulseaudio ++ lib.optional pipewireSupport pipewire)}"
'';
} source;
postFixup = ''
wrapProgram $out/bin/mumble \
--prefix LD_LIBRARY_PATH : "${
lib.makeLibraryPath (
lib.optional pulseSupport libpulseaudio ++ lib.optional pipewireSupport pipewire
)
}"
'';
} source;
server = source: generic {
type = "murmur";
server =
source:
generic {
type = "murmur";
configureFlags = [
"-D client=OFF"
] ++ lib.optional (!iceSupport) "-D ice=OFF"
++ lib.optionals iceSupport [
"-D Ice_HOME=${lib.getDev zeroc-ice};${lib.getLib zeroc-ice}"
"-D CMAKE_PREFIX_PATH=${lib.getDev zeroc-ice};${lib.getLib zeroc-ice}"
"-D Ice_SLICE_DIR=${lib.getDev zeroc-ice}/share/ice/slice"
configureFlags =
[
"-D client=OFF"
]
++ lib.optional (!iceSupport) "-D ice=OFF"
++ lib.optionals iceSupport [
"-D Ice_HOME=${lib.getDev zeroc-ice};${lib.getLib zeroc-ice}"
"-D CMAKE_PREFIX_PATH=${lib.getDev zeroc-ice};${lib.getLib zeroc-ice}"
"-D Ice_SLICE_DIR=${lib.getDev zeroc-ice}/share/ice/slice"
];
buildInputs = [ libcap ] ++ lib.optional iceSupport zeroc-ice;
} source;
overlay =
source:
generic {
stdenv = stdenv_32bit;
type = "mumble-overlay";
configureFlags = [
"-D server=OFF"
"-D client=OFF"
"-D overlay=ON"
];
buildInputs = [ libcap ]
++ lib.optional iceSupport zeroc-ice;
} source;
overlay = source: generic {
stdenv = stdenv_32bit;
type = "mumble-overlay";
configureFlags = [
"-D server=OFF"
"-D client=OFF"
"-D overlay=ON"
];
} source;
} source;
source = rec {
version = "1.5.735";
@@ -119,8 +181,9 @@ let
fetchSubmodules = true;
};
};
in {
mumble = lib.recursiveUpdate (client source) {meta.mainProgram = "mumble";};
murmur = lib.recursiveUpdate (server source) {meta.mainProgram = "mumble-server";};
in
{
mumble = lib.recursiveUpdate (client source) { meta.mainProgram = "mumble"; };
murmur = lib.recursiveUpdate (server source) { meta.mainProgram = "mumble-server"; };
overlay = overlay source;
}
@@ -0,0 +1,50 @@
Submodule blocks contains modified content
diff --git a/blocks/file/BinaryFileSink.cpp b/blocks/file/BinaryFileSink.cpp
index 31c9a41..0083b0d 100644
--- a/blocks/file/BinaryFileSink.cpp
+++ b/blocks/file/BinaryFileSink.cpp
@@ -13,6 +13,7 @@
#endif //_MSC_VER
#include <stdio.h>
#include <cerrno>
+#include <cstring>
#ifndef O_BINARY
#define O_BINARY 0
diff --git a/blocks/file/BinaryFileSource.cpp b/blocks/file/BinaryFileSource.cpp
index 0151231..379d383 100644
--- a/blocks/file/BinaryFileSource.cpp
+++ b/blocks/file/BinaryFileSource.cpp
@@ -13,6 +13,7 @@
#endif //_MSC_VER
#include <stdio.h>
#include <cerrno>
+#include <cstring>
#ifndef O_BINARY
#define O_BINARY 0
diff --git a/blocks/file/TextFileSink.cpp b/blocks/file/TextFileSink.cpp
index b4b2f08..2be66e2 100644
--- a/blocks/file/TextFileSink.cpp
+++ b/blocks/file/TextFileSink.cpp
@@ -6,6 +6,7 @@
#include <complex>
#include <fstream>
#include <cerrno>
+#include <cstring>
/***********************************************************************
* |PothosDoc Text File Sink
Submodule soapy contains modified content
diff --git a/soapy/DemoController.cpp b/soapy/DemoController.cpp
index 4ce8ead..9a4e742 100644
--- a/soapy/DemoController.cpp
+++ b/soapy/DemoController.cpp
@@ -6,6 +6,7 @@
#include <iostream>
#include <chrono>
#include <algorithm> //min/max
+#include <cstring>
/***********************************************************************
* |PothosDoc SDR Demo Controller
@@ -18,6 +18,7 @@
alsa-lib,
muparserx,
python3,
utf8proc,
}:
mkDerivation rec {
@@ -41,8 +42,14 @@ mkDerivation rec {
url = "https://github.com/pothosware/PothosCore/commit/092d1209b0fd0aa8a1733706c994fa95e66fd017.patch";
hash = "sha256-bZXG8kD4+1LgDV8viZrJ/DMjg8UvW7b5keJQDXurfkA=";
})
# various source files are missing imports of <cstring>
# https://github.com/pothosware/PothosBlocks/issues/80
./cstring.patch
];
# poco 1.14 requires c++17
NIX_CFLAGS_COMPILE = [ "-std=gnu++17" ];
nativeBuildInputs = [
cmake
pkg-config
@@ -62,6 +69,7 @@ mkDerivation rec {
alsa-lib
muparserx
python3
utf8proc
];
postInstall = ''
+10 -1
View File
@@ -3,6 +3,7 @@
cairo,
cppunit,
fetchFromGitHub,
fetchpatch,
fetchNpmDeps,
lib,
libcap,
@@ -63,7 +64,15 @@ stdenv.mkDerivation (finalAttrs: {
"--with-lokit-path=${libreoffice-collabora.src}/include"
];
patches = [ ./fix-file-server-regex.patch ];
patches = [
./fix-file-server-regex.patch
# Remove after next release
(fetchpatch {
name = "add-missing-includes-for-poco-1.14.1";
url = "https://patch-diff.githubusercontent.com/raw/CollaboraOnline/online/pull/11196.patch";
hash = "sha256-ke4dOxITFHK3xMXIdp+zzUEGYMyDxMJrbbXTN+LaoVU=";
})
];
postPatch = ''
cp ${./package-lock.json} ${finalAttrs.npmRoot}/package-lock.json
@@ -0,0 +1,37 @@
diff --git a/src/configuration.cpp b/src/configuration.cpp
index 2196121..0c5cf27 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -11,6 +11,7 @@
#include <fstream>
#include <unordered_map>
#include <configuration.hpp>
+#include <Poco/JSON/JSONException.h>
#include "platform.hpp"
#include "runtime.hpp"
#include "terminal/SDLTerminal.hpp"
diff --git a/src/main.cpp b/src/main.cpp
index 9ab0814..38976a2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -34,6 +34,7 @@ static void* releaseNotesThread(void* data);
#include <Poco/URI.h>
#include <Poco/Checksum.h>
#include <Poco/JSON/Parser.h>
+#include <Poco/JSON/JSONException.h>
#ifndef __EMSCRIPTEN__
#include <Poco/Net/HTTPSClientSession.h>
#include <Poco/Net/HTTPRequest.h>
diff --git a/src/util.hpp b/src/util.hpp
index b8ab2d1..c643b96 100644
--- a/src/util.hpp
+++ b/src/util.hpp
@@ -21,6 +21,8 @@ extern "C" {
#include <string>
#include <vector>
#include <Poco/JSON/JSON.h>
+#include <Poco/JSON/Object.h>
+#include <Poco/JSON/Array.h>
#include <Poco/JSON/Parser.h>
#include <Poco/Net/HTTPResponse.h>
#include <Computer.hpp>
+43 -18
View File
@@ -1,17 +1,18 @@
{ lib
, stdenv
, fetchFromGitHub
, callPackage
, patchelf
, unzip
, poco
, openssl
, SDL2
, SDL2_mixer
, ncurses
, libpng
, pngpp
, libwebp
{
lib,
stdenv,
fetchFromGitHub,
callPackage,
patchelf,
unzip,
poco,
openssl,
SDL2,
SDL2_mixer,
ncurses,
libpng,
pngpp,
libwebp,
}:
let
@@ -41,8 +42,20 @@ stdenv.mkDerivation rec {
hash = "sha256-DbxAsXxpsa42dF6DaLmgIa+Hs/PPqJ4dE97PoKxG2Ig=";
};
nativeBuildInputs = [ patchelf unzip ];
buildInputs = [ poco openssl SDL2 SDL2_mixer ncurses libpng pngpp libwebp ];
nativeBuildInputs = [
patchelf
unzip
];
buildInputs = [
poco
openssl
SDL2
SDL2_mixer
ncurses
libpng
pngpp
libwebp
];
strictDeps = true;
preBuild = ''
@@ -57,6 +70,12 @@ stdenv.mkDerivation rec {
runHook postBuild
'';
patches = [
# fix includes of poco headers
# https://github.com/MCJack123/craftos2/issues/391
./fix-poco-header-includes.patch
];
dontStrip = true;
installPhase = ''
@@ -87,9 +106,15 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Implementation of the CraftOS-PC API written in C++ using SDL";
homepage = "https://www.craftos-pc.cc";
license = with licenses; [ mit free ];
license = with licenses; [
mit
free
];
platforms = platforms.linux;
maintainers = with maintainers; [ siraben tomodachi94 ];
maintainers = with maintainers; [
siraben
tomodachi94
];
mainProgram = "craftos";
};
}
+2
View File
@@ -24,6 +24,7 @@
qt6,
slang,
stdenv,
utf8proc,
xterm,
}:
@@ -120,6 +121,7 @@ stdenv.mkDerivation {
protobuf
qt6.qtbase
qt6.qtwayland
utf8proc
];
nativeBuildInputs = [
+19 -4
View File
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
zlib,
@@ -10,18 +11,19 @@
sqlite,
openssl,
unixODBC,
utf8proc,
libmysqlclient,
}:
stdenv.mkDerivation rec {
pname = "poco";
version = "1.13.3";
version = "1.14.1";
src = fetchFromGitHub {
owner = "pocoproject";
repo = "poco";
sha256 = "sha256-ryBQjzg1DyYd/LBZzjHxq8m/7ZXRSKNNGRkIII0eHK0=";
hash = "sha256-acq2eja61sH/QHwMPmiDNns2jvXRTk0se/tHj9XRSiU=";
rev = "poco-${version}-release";
};
@@ -32,8 +34,10 @@ stdenv.mkDerivation rec {
buildInputs = [
unixODBC
utf8proc
libmysqlclient
];
propagatedBuildInputs = [
zlib
pcre2
@@ -50,8 +54,19 @@ stdenv.mkDerivation rec {
MYSQL_DIR = libmysqlclient;
MYSQL_INCLUDE_DIR = "${MYSQL_DIR}/include/mysql";
configureFlags = [
"--unbundled"
cmakeFlags = [
# use nix provided versions of sqlite, zlib, pcre, expat, ... instead of bundled versions
(lib.cmakeBool "POCO_UNBUNDLED" true)
];
patches = [
# Remove on next release
(fetchpatch {
name = "disable-included-pcre-if-pcre-is-linked-staticly";
# this happens when building pkgsStatic.poco
url = "https://patch-diff.githubusercontent.com/raw/pocoproject/poco/pull/4879.patch";
hash = "sha256-VFWuRuf0GPYFp43WKI8utl+agP+7a5biLg7m64EMnVo=";
})
];
postFixup = ''