Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libmicrohttpd] update and various fixes #31740

Merged
merged 11 commits into from
Jun 8, 2023
29 changes: 18 additions & 11 deletions ports/libmicrohttpd/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
set(MICROHTTPD_VERSION 0.9.75)

vcpkg_download_distfile(ARCHIVE
URLS
"https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${MICROHTTPD_VERSION}.tar.gz"
"https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${MICROHTTPD_VERSION}.tar.gz"
FILENAME "libmicrohttpd-${MICROHTTPD_VERSION}.tar.gz"
SHA512 4dc62ed191342a61cc2767171bb1ff4050f390db14ef7100299888237b52ea0b04b939c843878fe7f5daec2b35a47b3c1b7e7c11fb32d458184fe6b19986a37c
"https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${VERSION}.tar.gz"
"https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${VERSION}.tar.gz"
FILENAME "libmicrohttpd-${VERSION}.tar.gz"
SHA512 001025c023dd94c4a0cf017ed575e65a577b5ce595e7e450346bfb75def77eaa8a4cfbeffb9f4b912e34165c2cfca147c02c895e067a4f6c5a321a12035758a5
)

vcpkg_extract_source_archive(
Expand All @@ -22,25 +20,34 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)

vcpkg_install_msbuild(
SOURCE_PATH "${SOURCE_PATH}"
PROJECT_SUBPATH w32/VS2015/libmicrohttpd.vcxproj
PROJECT_SUBPATH w32/VS-Any-Version/libmicrohttpd.vcxproj
RELEASE_CONFIGURATION "Release-${CFG_SUFFIX}"
DEBUG_CONFIGURATION "Debug-${CFG_SUFFIX}"
)

file(GLOB MICROHTTPD_HEADERS "${SOURCE_PATH}/src/include/microhttpd*.h")
file(GLOB MICROHTTPD_HEADERS "${SOURCE_PATH}/src/include/microhttpd.h")
file(COPY ${MICROHTTPD_HEADERS} DESTINATION "${CURRENT_PACKAGES_DIR}/include")
else()
vcpkg_list(SET config_args)
if(VCPKG_TARGET_IS_OSX AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(ENV{LIBS} "$ENV{LIBS} -framework Foundation -framework AppKit") # TODO: Get this from the extracted cmake vars somehow
endif()
if("https" IN_LIST FEATURES)
vcpkg_list(APPEND config_args "--enable-https")
else()
vcpkg_list(APPEND config_args "--disable-https")
endif()

vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
--disable-doc
--disable-nls
--disable-examples
--disable-curl
--disable-https
--with-gnutls=no
${config_args}
OPTIONS_DEBUG --enable-asserts
OPTIONS_RELEASE --disable-asserts
)

vcpkg_install_make()
Expand All @@ -49,4 +56,4 @@ else()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
endif()

file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
19 changes: 11 additions & 8 deletions ports/libmicrohttpd/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"name": "libmicrohttpd",
"version": "0.9.75",
"port-version": 1,
"version": "0.9.77",
"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",
"homepage": "https://www.gnu.org/software/libmicrohttpd/",
"supports": "!(arm | uwp)",
"dependencies": [
{
"name": "gettext",
"platform": "!windows"
"license": "LGPL-2.1-or-later",
"supports": "!uwp & !(windows & !mingw & ((static & !staticcrt) | (!static & staticcrt)))",
"features": {
"https": {
"description": "Enable HTTPS protocol support",
"supports": "!windows | mingw",
"dependencies": [
"libgnutls"
]
}
]
}
}
1 change: 0 additions & 1 deletion scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,6 @@ libmesh:x64-linux=skip
# Build fails since PIC is not enabled and some configuration tests do not work properly on UWP
libmicrodns:arm-uwp=fail
libmicrodns:x64-uwp=fail
libmicrohttpd:x64-windows-static-md=fail
libmikmod:arm-neon-android=fail
libmikmod:arm64-android=fail
libmikmod:x64-android=fail
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4261,8 +4261,8 @@
"port-version": 0
},
"libmicrohttpd": {
"baseline": "0.9.75",
"port-version": 1
"baseline": "0.9.77",
"port-version": 0
},
"libmikmod": {
"baseline": "3.3.11.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libmicrohttpd.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "99533d05bd2e457102ebabc8c74a065bc62eb900",
"version": "0.9.77",
"port-version": 0
},
{
"git-tree": "f1b42f3ba710ee2202398b46cc349adfa90cd3d9",
"version": "0.9.75",
Expand Down