[nghttp2] Update and fixes (#19163)

* Format manifest

* Update to v1.44.0

* Modernize and fix portfile

* Fix usage in static windows triplets

* x-add-version
This commit is contained in:
Kai Pastor 2021-07-28 21:25:26 +02:00 committed by GitHub
parent e5fdfd3d36
commit 018c0fa159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 46 additions and 34 deletions

View File

@ -1,4 +0,0 @@
Source: nghttp2
Version: 1.42.0
Homepage: https://github.com/nghttp2/nghttp2
Description: Implementation of the Hypertext Transfer Protocol version 2 in C

View File

@ -1,46 +1,45 @@
set(LIB_NAME nghttp2)
set(LIB_VERSION 1.42.0)
set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nghttp2/nghttp2
REF v${LIB_VERSION}
SHA512 717494c9aa4eda64414535752df947d62311e7aed5cc6c4936400fcb2c9fc2818923668bcabc3e1bc61154d660f6765dad120e5a113d9eee3e934d66ee63a406
REF b799b063f882cc97f8484e95b41d0326260d9b93 # v1.44.0
SHA512 8e4a5d0b146606d1150b43c539244f615540bc25eab30bf67c673cccecdb3d4a02d99fb0136d81dc7ad4a579d9b38e62d91b1431884a8891c0d325c036cc4073
HEAD_REF master
)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(ENABLE_STATIC_LIB ON)
set(ENABLE_SHARED_LIB OFF)
else()
set(ENABLE_STATIC_LIB OFF)
set(ENABLE_SHARED_LIB ON)
endif()
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" ENABLE_STATIC_CRT)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC_LIB)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED_LIB)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DENABLE_LIB_ONLY=ON
-DENABLE_ASIO_LIB=OFF
-DENABLE_STATIC_LIB=${ENABLE_STATIC_LIB}
-DENABLE_SHARED_LIB=${ENABLE_SHARED_LIB}
"-DENABLE_STATIC_CRT=${ENABLE_STATIC_CRT}"
"-DENABLE_STATIC_LIB=${ENABLE_STATIC_LIB}"
"-DENABLE_SHARED_LIB=${ENABLE_SHARED_LIB}"
)
vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/share/man"
"${CURRENT_PACKAGES_DIR}/share/doc"
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/bin"
"${CURRENT_PACKAGES_DIR}/debug/bin"
)
file(APPEND "${CURRENT_PACKAGES_DIR}/include/nghttp2/nghttp2ver.h" [[
#ifndef NGHTTP2_STATICLIB
# define NGHTTP2_STATICLIB
#endif
]])
endif()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
vcpkg_copy_pdbs()
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

12
ports/nghttp2/vcpkg.json Normal file
View File

@ -0,0 +1,12 @@
{
"name": "nghttp2",
"version": "1.44.0",
"description": "Implementation of the Hypertext Transfer Protocol version 2 in C",
"homepage": "https://github.com/nghttp2/nghttp2",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
}
]
}

View File

@ -4357,7 +4357,7 @@
"port-version": 1
},
"nghttp2": {
"baseline": "1.42.0",
"baseline": "1.44.0",
"port-version": 0
},
"ngspice": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7d98b71b7948db8173a563483081700e706268b0",
"version": "1.44.0",
"port-version": 0
},
{
"git-tree": "c962462a3cfe855132c4b1d565bc4e3c4a67797d",
"version-string": "1.42.0",