diff --git a/pkgs/applications/radio/pothos/cstring.patch b/pkgs/applications/radio/pothos/cstring.patch new file mode 100644 index 0000000000000..4e8957c3f122b --- /dev/null +++ b/pkgs/applications/radio/pothos/cstring.patch @@ -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 + #include ++#include + + #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 + #include ++#include + + #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 + #include + #include ++#include + + /*********************************************************************** + * |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 + #include + #include //min/max ++#include + + /*********************************************************************** + * |PothosDoc SDR Demo Controller diff --git a/pkgs/applications/radio/pothos/default.nix b/pkgs/applications/radio/pothos/default.nix index 641df521c7fd8..0cb55472d3428 100644 --- a/pkgs/applications/radio/pothos/default.nix +++ b/pkgs/applications/radio/pothos/default.nix @@ -41,8 +41,13 @@ mkDerivation rec { url = "https://github.com/pothosware/PothosCore/commit/092d1209b0fd0aa8a1733706c994fa95e66fd017.patch"; hash = "sha256-bZXG8kD4+1LgDV8viZrJ/DMjg8UvW7b5keJQDXurfkA="; }) + # various source files are missing imports of + ./cstring.patch ]; + # poco 1.14 requires c++17 + NIX_CFLAGS_COMPILE = [ "-std=gnu++17" ]; + nativeBuildInputs = [ cmake pkg-config diff --git a/pkgs/by-name/po/poco/disable-internal-pcre-files-for-static-builds.patch b/pkgs/by-name/po/poco/disable-internal-pcre-files-for-static-builds.patch new file mode 100644 index 0000000000000..bdc57a6ce8e3f --- /dev/null +++ b/pkgs/by-name/po/poco/disable-internal-pcre-files-for-static-builds.patch @@ -0,0 +1,23 @@ +diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt +index d5f3b267d..dfaf99a10 100644 +--- a/Foundation/CMakeLists.txt ++++ b/Foundation/CMakeLists.txt +@@ -31,11 +31,13 @@ if(POCO_UNBUNDLED) + find_package(ZLIB REQUIRED) + find_package(Utf8Proc REQUIRED) + +- #HACK: Unicode.cpp requires functions from these files. The can't be taken from the library +- POCO_SOURCES(SRCS RegExp +- src/pcre2_ucd.c +- src/pcre2_tables.c +- ) ++ if(NOT POCO_STATIC AND BUILD_SHARED_LIBS) ++ #HACK: Unicode.cpp requires functions from these files. The can't be taken from the library ++ POCO_SOURCES(SRCS RegExp ++ src/pcre2_ucd.c ++ src/pcre2_tables.c ++ ) ++ endif() + + else() + # pcre2 diff --git a/pkgs/by-name/po/poco/package.nix b/pkgs/by-name/po/poco/package.nix index 86a8eba7aff37..3f1c71b535149 100644 --- a/pkgs/by-name/po/poco/package.nix +++ b/pkgs/by-name/po/poco/package.nix @@ -10,18 +10,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 +33,10 @@ stdenv.mkDerivation rec { buildInputs = [ unixODBC + utf8proc libmysqlclient ]; + propagatedBuildInputs = [ zlib pcre2 @@ -50,8 +53,15 @@ 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 + "-DPOCO_UNBUNDLED=ON" + ]; + + patches = [ + # poco builds its own version of pcre, disable it for static builds + # https://github.com/pocoproject/poco/issues/4871 + ./disable-internal-pcre-files-for-static-builds.patch ]; postFixup = ''