From d885a33687f2832e8cc6c9f41583f7cb80fec1c5 Mon Sep 17 00:00:00 2001 From: Sergei Reznikov Date: Tue, 20 Oct 2015 14:18:55 +0300 Subject: [PATCH] libmicrohttpd: add recipe and patch for version 0.9.44 --- .../libmicrohttpd/libmicrohttpd-0.9.44.recipe | 87 +++++++++++++++++++ .../patches/libmicrohttpd-0.9.44.patchset | 30 +++++++ 2 files changed, 117 insertions(+) create mode 100644 net-libs/libmicrohttpd/libmicrohttpd-0.9.44.recipe create mode 100644 net-libs/libmicrohttpd/patches/libmicrohttpd-0.9.44.patchset diff --git a/net-libs/libmicrohttpd/libmicrohttpd-0.9.44.recipe b/net-libs/libmicrohttpd/libmicrohttpd-0.9.44.recipe new file mode 100644 index 000000000..51ae51dca --- /dev/null +++ b/net-libs/libmicrohttpd/libmicrohttpd-0.9.44.recipe @@ -0,0 +1,87 @@ +SUMMARY="A C library to run an HTTP server as part of another application" +DESCRIPTION="GNU libmicrohttpd is a small C library that is supposed to make \ +it easy to run an HTTP server as part of another application. GNU GNU \ +Libmicrohttpd is free software and part of the GNU project. Key features \ +that distinguish GNU Libmicrohttpd from other projects are: + +* C library: fast and small +* API is simple, expressive and fully reentrant +* Implementation is HTTP 1.1 compliant +* HTTP server can listen on multiple ports +* Four different threading models (select, poll, pthread, thread pool) +* Supported platforms include GNU/Linux, FreeBSD, OpenBSD, NetBSD, Android, +* OSX, W32, Symbian and z/OS +* Support for IPv6 +* Support for SHOUTcast +* Support for incremental processing of POST data (optional) +* Support for basic and digest authentication (optional) +* Support for SSL3 and TLS (requires libgcrypt and libgnutls, optional) +* Binary is only about 32k (without TLS/SSL support and other optional features) + +GNU Libmicrohttpd was started because the author needed an easy way to add a \ +concurrent HTTP server to other projects. Existing alternatives were either \ +non-free, not reentrant, standalone, of terrible code quality or a \ +combination thereof. Do not use GNU Libmicrohttpd if you are looking for a \ +standalone HTTP server, there are many other projects out there that provide \ +that kind of functionality already. However, if you want to be able to serve \ +simple WWW pages from within your C or C++ application, check it out." +HOMEPAGE="https://www.gnu.org/software/libmicrohttpd/" +COPYRIGHT="2015 Free Software Foundation, Inc." +LICENSE="GNU LGPL v2.1" +SOURCE_URI="http://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-$portVersion.tar.gz" +CHECKSUM_SHA256="f2739cc05112dc00a5ebe1a470174970ca3a3fd71dcd67fb7539af9d83b8411e" +REVISION="1" + +ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + libmicrohttpd$secondaryArchSuffix = $portVersion + lib:libmicrohttpd$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +PROVIDES_devel=" + libmicrohttpd${secondaryArchSuffix}_devel = $portVersion + devel:libmicrohttpd$secondaryArchSuffix = $portVersion + " +REQUIRES_devel=" + haiku${secondaryArchSuffix}_devel + libmicrohttpd$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel +# devel:libcurl$secondaryArchSuffix + devel:libgcrypt$secondaryArchSuffix + devel:libgpg_error$secondaryArchSuffix + devel:libgnutls$secondaryArchSuffix + devel:libssl$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + makefile_engine + cmd:awk + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +PATCHES="libmicrohttpd-0.9.44.patchset" + +BUILD() +{ + runConfigure ./configure + make $jobArgs +} + +INSTALL() +{ + make install + + prepareInstalledDevelLibs \ + libmicrohttpd + packageEntries devel \ + $developDir +} diff --git a/net-libs/libmicrohttpd/patches/libmicrohttpd-0.9.44.patchset b/net-libs/libmicrohttpd/patches/libmicrohttpd-0.9.44.patchset new file mode 100644 index 000000000..53c024544 --- /dev/null +++ b/net-libs/libmicrohttpd/patches/libmicrohttpd-0.9.44.patchset @@ -0,0 +1,30 @@ +From 2b2d15677b89e85fa3730287549974ad5c3b68b0 Mon Sep 17 00:00:00 2001 +From: Sergei Reznikov +Date: Mon, 19 Oct 2015 13:10:56 +0300 +Subject: Fix gcc2 build + + +diff --git a/doc/examples/responseheaders.c b/doc/examples/responseheaders.c +index 273a1e5..2e5a87d 100644 +--- a/doc/examples/responseheaders.c ++++ b/doc/examples/responseheaders.c +@@ -29,6 +29,7 @@ answer_to_connection (void *cls, struct MHD_Connection *connection, + int fd; + int ret; + struct stat sbuf; ++ char errorstr; + + if (0 != strcmp (method, "GET")) + return MHD_NO; +@@ -39,7 +40,7 @@ answer_to_connection (void *cls, struct MHD_Connection *connection, + /* error accessing file */ + if (fd != -1) + (void) close (fd); +- const char *errorstr = ++ errorstr = + "An internal server error has occured!\ + "; + response = +-- +2.2.2 +