From 157044a35e9a6eca953900e02815ade0495cbc63 Mon Sep 17 00:00:00 2001 From: Morgan Thomas Date: Tue, 4 May 2021 08:41:33 -0700 Subject: [PATCH 1/3] libmicrohttpd: update to 0.9.73 This update breaks some C++ implementations (see https://github.com/kismetwireless/kismet/issues/281 and https://github.com/void-linux/void-packages/commit/05ed2cb76ba90544e9910e5dbbcabd19d97a1a99). I've checked all the packages that depend on libmicrohttpd; all but two (psensor and retroshare) build against libmicrohttpd >= 0.9.71 by now, and those two are easy enough to patch. The relevant change is just switching some API return types from `int` to an enum with the same values, so there isn't any concern about ABI compatibility with the change (and in fact it's only a warning on a C compiler). --- srcpkgs/libmicrohttpd/template | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/srcpkgs/libmicrohttpd/template b/srcpkgs/libmicrohttpd/template index fa988788d76d..f6f1e0824fc5 100644 --- a/srcpkgs/libmicrohttpd/template +++ b/srcpkgs/libmicrohttpd/template @@ -1,8 +1,7 @@ # Template file for 'libmicrohttpd' pkgname=libmicrohttpd -version=0.9.70 -reverts="0.9.71_1" -revision=2 +version=0.9.73 +revision=1 build_style=gnu-configure makedepends="libgcrypt-devel gnutls-devel libcurl-devel" short_desc="Library embedding HTTP server functionality" @@ -10,7 +9,7 @@ maintainer="Orphaned " license="LGPL-2.1-or-later" homepage="https://www.gnu.org/software/libmicrohttpd/" distfiles="${GNU_SITE}/libmicrohttpd/${pkgname}-${version}.tar.gz" -checksum=90d0a3d396f96f9bc41eb0f7e8187796049285fabef82604acd4879590977307 +checksum=a37b2f1b88fd1bfe74109586be463a434d34e773530fc2a74364cfcf734c032e LDFLAGS=" -lgnutls" From a7bd0e44ba89f68ea36572c8f4d796cc70dcedb4 Mon Sep 17 00:00:00 2001 From: Morgan Thomas Date: Tue, 4 May 2021 08:45:41 -0700 Subject: [PATCH 2/3] psensor: patch for compatibility with libmicrohttpd >= 0.9.71 --- srcpkgs/psensor/patches/mhd_result_enum.patch | 11 +++++++++++ srcpkgs/psensor/template | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/psensor/patches/mhd_result_enum.patch diff --git a/srcpkgs/psensor/patches/mhd_result_enum.patch b/srcpkgs/psensor/patches/mhd_result_enum.patch new file mode 100644 index 000000000000..133716066a07 --- /dev/null +++ b/srcpkgs/psensor/patches/mhd_result_enum.patch @@ -0,0 +1,11 @@ +--- src/server/server.c.orig 2021-05-03 14:22:41.152648985 -0700 ++++ src/server/server.c 2021-05-03 14:23:00.865645454 -0700 +@@ -306,7 +306,7 @@ + MHD_RESPMEM_MUST_FREE); + } + +-static int cbk_http_request(void *cls, ++static enum MHD_Result cbk_http_request(void *cls, + struct MHD_Connection *connection, + const char *url, + const char *method, diff --git a/srcpkgs/psensor/template b/srcpkgs/psensor/template index 67e810091579..718a13ee7729 100644 --- a/srcpkgs/psensor/template +++ b/srcpkgs/psensor/template @@ -1,7 +1,7 @@ # Template file for 'psensor' pkgname=psensor version=1.2.0 -revision=2 +revision=3 build_style=gnu-configure hostmakedepends="pkg-config help2man glib-devel" makedepends="gtk+3-devel udisks2-devel libgtop-devel json-c-devel libsensors-devel libatasmart-devel libcurl-devel libnotify-devel libappindicator-devel libmicrohttpd-devel" @@ -12,3 +12,4 @@ license="GPL-2.0-only" homepage="https://wpitchoune.net/psensor" distfiles="https://wpitchoune.net/${pkgname}/files/${pkgname}-${version}.tar.gz" checksum=99708b313be2cf2d997aacfb6ab13288384c8c3f76266825093013bf568babea +disable_parallel_build=1 From 034d7bbe8a9651f58164f109171fdb425d78e3ff Mon Sep 17 00:00:00 2001 From: Morgan Thomas Date: Tue, 4 May 2021 08:47:12 -0700 Subject: [PATCH 3/3] retroshare: patch for compatibility with libmicrohttpd >= 0.9.71 --- .../retroshare/patches/mhd_result_enum.patch | 96 +++++++++++++++++++ srcpkgs/retroshare/template | 2 +- 2 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/retroshare/patches/mhd_result_enum.patch diff --git a/srcpkgs/retroshare/patches/mhd_result_enum.patch b/srcpkgs/retroshare/patches/mhd_result_enum.patch new file mode 100644 index 000000000000..0da034802b7e --- /dev/null +++ b/srcpkgs/retroshare/patches/mhd_result_enum.patch @@ -0,0 +1,96 @@ +--- libresapi/src/api/ApiServerMHD.cpp.orig 2021-05-04 08:25:21.960601037 -0700 ++++ libresapi/src/api/ApiServerMHD.cpp 2021-05-04 08:26:27.071424663 -0700 +@@ -113,7 +113,7 @@ + // return MHD_NO to terminate connection + // return MHD_YES otherwise + // this function will get called by MHD until a response was queued +- virtual int handleRequest( struct MHD_Connection *connection, ++ virtual enum MHD_Result handleRequest( struct MHD_Connection *connection, + const char *url, const char *method, const char *version, + const char *upload_data, size_t *upload_data_size) = 0; + }; +@@ -125,7 +125,7 @@ + MHDUploadHandler(ApiServer* s): mState(BEGIN), mApiServer(s){} + virtual ~MHDUploadHandler(){} + // return MHD_NO or MHD_YES +- virtual int handleRequest( struct MHD_Connection *connection, ++ virtual enum MHD_Result handleRequest( struct MHD_Connection *connection, + const char */*url*/, const char *method, const char */*version*/, + const char *upload_data, size_t *upload_data_size) + { +@@ -184,7 +184,7 @@ + MHDApiHandler(ApiServer* s): mState(BEGIN), mApiServer(s){} + virtual ~MHDApiHandler(){} + // return MHD_NO or MHD_YES +- virtual int handleRequest( struct MHD_Connection *connection, ++ virtual enum MHD_Result handleRequest( struct MHD_Connection *connection, + const char *url, const char *method, const char */*version*/, + const char *upload_data, size_t *upload_data_size) + { +@@ -265,7 +265,7 @@ + uint64_t mSize; + + // return MHD_NO or MHD_YES +- virtual int handleRequest( struct MHD_Connection *connection, ++ virtual enum MHD_Result handleRequest( struct MHD_Connection *connection, + const char *url, const char */*method*/, const char */*version*/, + const char */*upload_data*/, size_t */*upload_data_size*/) + { +@@ -327,7 +327,7 @@ + #endif // ENABLE_FILESTREAMER + + // MHD will call this for each element of the http header +-static int _extract_host_header_it_cb(void *cls, ++static enum MHD_Result _extract_host_header_it_cb(void *cls, + enum MHD_ValueKind kind, + const char *key, + const char *value) +@@ -522,12 +522,12 @@ + mDaemon = 0; + } + +-int ApiServerMHD::static_acceptPolicyCallback(void *cls, const sockaddr *addr, socklen_t addrlen) ++enum MHD_Result ApiServerMHD::static_acceptPolicyCallback(void *cls, const sockaddr *addr, socklen_t addrlen) + { + return ((ApiServerMHD*)cls)->acceptPolicyCallback(addr, addrlen); + } + +-int ApiServerMHD::static_accessHandlerCallback(void* cls, struct MHD_Connection * connection, ++enum MHD_Result ApiServerMHD::static_accessHandlerCallback(void* cls, struct MHD_Connection * connection, + const char *url, const char *method, const char *version, + const char *upload_data, size_t *upload_data_size, + void **con_cls) +@@ -543,13 +543,13 @@ + } + + +-int ApiServerMHD::acceptPolicyCallback(const sockaddr* /*addr*/, socklen_t /*addrlen*/) ++enum MHD_Result ApiServerMHD::acceptPolicyCallback(const sockaddr* /*addr*/, socklen_t /*addrlen*/) + { + // accept all connetions + return MHD_YES; + } + +-int ApiServerMHD::accessHandlerCallback(MHD_Connection *connection, ++enum MHD_Result ApiServerMHD::accessHandlerCallback(MHD_Connection *connection, + const char *url, const char *method, const char *version, + const char *upload_data, size_t *upload_data_size, + void **con_cls) +--- libresapi/src/api/ApiServerMHD.h.orig 2021-05-04 08:25:24.368594515 -0700 ++++ libresapi/src/api/ApiServerMHD.h 2021-05-04 08:25:25.942590251 -0700 +@@ -58,11 +58,11 @@ + + private: + // static callbacks for libmicrohttpd, they call the members below +- static int static_acceptPolicyCallback(void* cls, const struct sockaddr * addr, socklen_t addrlen); +- static int static_accessHandlerCallback(void* cls, struct MHD_Connection * connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **con_cls); ++ static enum MHD_Result static_acceptPolicyCallback(void* cls, const struct sockaddr * addr, socklen_t addrlen); ++ static enum MHD_Result static_accessHandlerCallback(void* cls, struct MHD_Connection * connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **con_cls); + static void static_requestCompletedCallback(void *cls, struct MHD_Connection* connection, void **con_cls, enum MHD_RequestTerminationCode toe); +- int acceptPolicyCallback(const struct sockaddr * addr, socklen_t addrlen); +- int accessHandlerCallback(struct MHD_Connection * connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **con_cls); ++ enum MHD_Result acceptPolicyCallback(const struct sockaddr * addr, socklen_t addrlen); ++ enum MHD_Result accessHandlerCallback(struct MHD_Connection * connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **con_cls); + void requestCompletedCallback(struct MHD_Connection *connection, void **con_cls, MHD_RequestTerminationCode toe); + bool mConfigOk; + std::string mRootDir; diff --git a/srcpkgs/retroshare/template b/srcpkgs/retroshare/template index 870bad191a35..e65594a4b16e 100644 --- a/srcpkgs/retroshare/template +++ b/srcpkgs/retroshare/template @@ -1,7 +1,7 @@ # Template file for 'retroshare' pkgname=retroshare version=0.6.5 -revision=5 +revision=6 wrksrc="RetroShare-${version}" build_style=qmake configure_args="RS_UPNP_LIB=miniupnpc"