From 38e7e0367e647fa3c0a8e6eeae89a9f6193a9115 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 18 May 2021 09:16:53 +0200 Subject: [vcpkg baseline][libmicrohttpd] Control dependencies, doc, examples, test (#17653) * Quote filepath expressions * Add mingw support * Disable https, doc, examples, (curl) tests * Declare gettext dependency * x-add-version * Disable gnutls in addition to disabling https * x-add-version --- ports/libmicrohttpd/CONTROL | 6 ------ ports/libmicrohttpd/portfile.cmake | 18 ++++++++++++------ ports/libmicrohttpd/vcpkg.json | 14 ++++++++++++++ 3 files changed, 26 insertions(+), 12 deletions(-) delete mode 100644 ports/libmicrohttpd/CONTROL create mode 100644 ports/libmicrohttpd/vcpkg.json (limited to 'ports/libmicrohttpd') diff --git a/ports/libmicrohttpd/CONTROL b/ports/libmicrohttpd/CONTROL deleted file mode 100644 index 3a77ac72b..000000000 --- a/ports/libmicrohttpd/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: libmicrohttpd -Version: 0.9.63 -Port-Version: 5 -Homepage: https://www.gnu.org/software/libmicrohttpd/ -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 -Supports: !(arm|uwp) \ No newline at end of file diff --git a/ports/libmicrohttpd/portfile.cmake b/ports/libmicrohttpd/portfile.cmake index 993ba722b..2b09dac0f 100644 --- a/ports/libmicrohttpd/portfile.cmake +++ b/ports/libmicrohttpd/portfile.cmake @@ -11,12 +11,12 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive_ex( - ARCHIVE ${ARCHIVE} + ARCHIVE "${ARCHIVE}" OUT_SOURCE_PATH SOURCE_PATH PATCHES fix-msvc-project.patch ) -if (VCPKG_TARGET_IS_WINDOWS) +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(CFG_SUFFIX "dll") else() @@ -30,19 +30,25 @@ if (VCPKG_TARGET_IS_WINDOWS) DEBUG_CONFIGURATION "Debug-${CFG_SUFFIX}" ) - file(GLOB MICROHTTPD_HEADERS ${SOURCE_PATH}/src/include/microhttpd*.h) - file(COPY ${MICROHTTPD_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(GLOB MICROHTTPD_HEADERS "${SOURCE_PATH}/src/include/microhttpd*.h") + file(COPY ${MICROHTTPD_HEADERS} DESTINATION "${CURRENT_PACKAGES_DIR}/include") else() 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() vcpkg_configure_make( SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + --disable-doc + --disable-examples + --disable-curl + --disable-https + --with-gnutls=no ) vcpkg_install_make() - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") endif() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libmicrohttpd/vcpkg.json b/ports/libmicrohttpd/vcpkg.json new file mode 100644 index 000000000..d8a44ce57 --- /dev/null +++ b/ports/libmicrohttpd/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "libmicrohttpd", + "version": "0.9.63", + "port-version": 6, + "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" + } + ] +} -- cgit v1.2.3