Skip to content

Commit

Permalink
Update nghttp2 from 1.55.1 to 1.64.0 (#6724)
Browse files Browse the repository at this point in the history
  • Loading branch information
achamayou authored Jan 7, 2025
1 parent 68ba22c commit 03f6005
Show file tree
Hide file tree
Showing 46 changed files with 8,528 additions and 6,736 deletions.
69 changes: 49 additions & 20 deletions 3rdparty/exported/nghttp2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set(NGHTTP2_SOURCES
nghttp2_stream.c nghttp2_outbound_item.c
nghttp2_session.c nghttp2_submit.c
nghttp2_helper.c
nghttp2_npn.c
nghttp2_alpn.c
nghttp2_hd.c nghttp2_hd_huffman.c nghttp2_hd_huffman_data.c
nghttp2_version.c
nghttp2_priority_spec.c
Expand All @@ -24,11 +24,19 @@ set(NGHTTP2_SOURCES
nghttp2_http.c
nghttp2_rcbuf.c
nghttp2_extpri.c
nghttp2_ratelim.c
nghttp2_time.c
nghttp2_debug.c
sfparse.c
)

set(NGHTTP2_RES "")
set(STATIC_LIB "nghttp2_static")
set(SHARED_LIB "nghttp2")

if(BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS AND MSVC AND NOT STATIC_LIB_SUFFIX)
set(STATIC_LIB_SUFFIX "_static")
endif()

if(WIN32)
configure_file(
Expand All @@ -39,40 +47,61 @@ if(WIN32)
set(NGHTTP2_RES ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
endif()

set(EXPORT_SET "${PROJECT_NAME}-targets")

# Public shared library
if(ENABLE_SHARED_LIB)
add_library(nghttp2 SHARED ${NGHTTP2_SOURCES} ${NGHTTP2_RES})
set_target_properties(nghttp2 PROPERTIES
if(BUILD_SHARED_LIBS)
add_library(${SHARED_LIB} SHARED ${NGHTTP2_SOURCES} ${NGHTTP2_RES})

set_target_properties(${SHARED_LIB} PROPERTIES
COMPILE_FLAGS "${WARNCFLAGS}"
VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION}
C_VISIBILITY_PRESET hidden
)
target_include_directories(nghttp2 INTERFACE
"${CMAKE_CURRENT_BINARY_DIR}/includes"
"${CMAKE_CURRENT_SOURCE_DIR}/includes"

target_include_directories(${SHARED_LIB} INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/includes>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/includes>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

install(TARGETS nghttp2
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(TARGETS ${SHARED_LIB} EXPORT ${EXPORT_SET})
list(APPEND nghttp2_exports ${SHARED_LIB})
endif()

if(HAVE_CUNIT OR ENABLE_STATIC_LIB)
# Static library (for unittests because of symbol visibility)
add_library(nghttp2_static STATIC ${NGHTTP2_SOURCES})
set_target_properties(nghttp2_static PROPERTIES
# Static library (for unittests because of symbol visibility)
if(BUILD_STATIC_LIBS)
add_library(${STATIC_LIB} STATIC ${NGHTTP2_SOURCES})

set_target_properties(${STATIC_LIB} PROPERTIES
COMPILE_FLAGS "${WARNCFLAGS}"
VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION}
ARCHIVE_OUTPUT_NAME nghttp2${STATIC_LIB_SUFFIX}
)
target_compile_definitions(nghttp2_static PUBLIC "-DNGHTTP2_STATICLIB")
if(ENABLE_STATIC_LIB)
install(TARGETS nghttp2_static
DESTINATION "${CMAKE_INSTALL_LIBDIR}")
endif()

target_include_directories(${STATIC_LIB} INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/includes>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/includes>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

target_compile_definitions(${STATIC_LIB} PUBLIC "-DNGHTTP2_STATICLIB")

install(TARGETS ${STATIC_LIB} EXPORT ${EXPORT_SET})
list(APPEND nghttp2_exports ${STATIC_LIB})
endif()

if(BUILD_SHARED_LIBS)
set(LIB_SELECTED ${SHARED_LIB})
else()
set(LIB_SELECTED ${STATIC_LIB})
endif()

add_library(${PROJECT_NAME}::nghttp2 ALIAS ${LIB_SELECTED})

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libnghttp2.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")

install(EXPORT ${EXPORT_SET}
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
NAMESPACE ${PROJECT_NAME}::)
8 changes: 6 additions & 2 deletions 3rdparty/exported/nghttp2/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ OBJECTS = nghttp2_pq.c nghttp2_map.c nghttp2_queue.c \
nghttp2_stream.c nghttp2_outbound_item.c \
nghttp2_session.c nghttp2_submit.c \
nghttp2_helper.c \
nghttp2_npn.c \
nghttp2_alpn.c \
nghttp2_hd.c nghttp2_hd_huffman.c nghttp2_hd_huffman_data.c \
nghttp2_version.c \
nghttp2_priority_spec.c \
Expand All @@ -51,14 +51,16 @@ OBJECTS = nghttp2_pq.c nghttp2_map.c nghttp2_queue.c \
nghttp2_http.c \
nghttp2_rcbuf.c \
nghttp2_extpri.c \
nghttp2_ratelim.c \
nghttp2_time.c \
nghttp2_debug.c \
sfparse.c

HFILES = nghttp2_pq.h nghttp2_int.h nghttp2_map.h nghttp2_queue.h \
nghttp2_frame.h \
nghttp2_buf.h \
nghttp2_session.h nghttp2_helper.h nghttp2_stream.h nghttp2_int.h \
nghttp2_npn.h \
nghttp2_alpn.h \
nghttp2_submit.h nghttp2_outbound_item.h \
nghttp2_net.h \
nghttp2_hd.h nghttp2_hd_huffman.h \
Expand All @@ -69,6 +71,8 @@ HFILES = nghttp2_pq.h nghttp2_int.h nghttp2_map.h nghttp2_queue.h \
nghttp2_http.h \
nghttp2_rcbuf.h \
nghttp2_extpri.h \
nghttp2_ratelim.h \
nghttp2_time.h \
nghttp2_debug.h \
sfparse.h

Expand Down
54 changes: 36 additions & 18 deletions 3rdparty/exported/nghttp2/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,12 @@ am__objects_1 =
am__objects_2 = nghttp2_pq.lo nghttp2_map.lo nghttp2_queue.lo \
nghttp2_frame.lo nghttp2_buf.lo nghttp2_stream.lo \
nghttp2_outbound_item.lo nghttp2_session.lo nghttp2_submit.lo \
nghttp2_helper.lo nghttp2_npn.lo nghttp2_hd.lo \
nghttp2_helper.lo nghttp2_alpn.lo nghttp2_hd.lo \
nghttp2_hd_huffman.lo nghttp2_hd_huffman_data.lo \
nghttp2_version.lo nghttp2_priority_spec.lo nghttp2_option.lo \
nghttp2_callbacks.lo nghttp2_mem.lo nghttp2_http.lo \
nghttp2_rcbuf.lo nghttp2_extpri.lo nghttp2_debug.lo sfparse.lo
nghttp2_rcbuf.lo nghttp2_extpri.lo nghttp2_ratelim.lo \
nghttp2_time.lo nghttp2_debug.lo sfparse.lo
am_libnghttp2_la_OBJECTS = $(am__objects_1) $(am__objects_2)
libnghttp2_la_OBJECTS = $(am_libnghttp2_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
Expand All @@ -182,21 +183,22 @@ am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/nghttp2_buf.Plo \
./$(DEPDIR)/nghttp2_callbacks.Plo \
am__depfiles_remade = ./$(DEPDIR)/nghttp2_alpn.Plo \
./$(DEPDIR)/nghttp2_buf.Plo ./$(DEPDIR)/nghttp2_callbacks.Plo \
./$(DEPDIR)/nghttp2_debug.Plo ./$(DEPDIR)/nghttp2_extpri.Plo \
./$(DEPDIR)/nghttp2_frame.Plo ./$(DEPDIR)/nghttp2_hd.Plo \
./$(DEPDIR)/nghttp2_hd_huffman.Plo \
./$(DEPDIR)/nghttp2_hd_huffman_data.Plo \
./$(DEPDIR)/nghttp2_helper.Plo ./$(DEPDIR)/nghttp2_http.Plo \
./$(DEPDIR)/nghttp2_map.Plo ./$(DEPDIR)/nghttp2_mem.Plo \
./$(DEPDIR)/nghttp2_npn.Plo ./$(DEPDIR)/nghttp2_option.Plo \
./$(DEPDIR)/nghttp2_option.Plo \
./$(DEPDIR)/nghttp2_outbound_item.Plo \
./$(DEPDIR)/nghttp2_pq.Plo \
./$(DEPDIR)/nghttp2_priority_spec.Plo \
./$(DEPDIR)/nghttp2_queue.Plo ./$(DEPDIR)/nghttp2_rcbuf.Plo \
./$(DEPDIR)/nghttp2_session.Plo ./$(DEPDIR)/nghttp2_stream.Plo \
./$(DEPDIR)/nghttp2_submit.Plo ./$(DEPDIR)/nghttp2_version.Plo \
./$(DEPDIR)/nghttp2_queue.Plo ./$(DEPDIR)/nghttp2_ratelim.Plo \
./$(DEPDIR)/nghttp2_rcbuf.Plo ./$(DEPDIR)/nghttp2_session.Plo \
./$(DEPDIR)/nghttp2_stream.Plo ./$(DEPDIR)/nghttp2_submit.Plo \
./$(DEPDIR)/nghttp2_time.Plo ./$(DEPDIR)/nghttp2_version.Plo \
./$(DEPDIR)/sfparse.Plo
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
Expand Down Expand Up @@ -304,8 +306,6 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CUNIT_CFLAGS = @CUNIT_CFLAGS@
CUNIT_LIBS = @CUNIT_LIBS@
CXX = @CXX@
CXX1XCXXFLAGS = @CXX1XCXXFLAGS@
CXXCPP = @CXXCPP@
Expand All @@ -329,7 +329,7 @@ EXTRA_DEFS = @EXTRA_DEFS@
FGREP = @FGREP@
FILECMD = @FILECMD@
GREP = @GREP@
HAVE_CXX14 = @HAVE_CXX14@
HAVE_CXX20 = @HAVE_CXX20@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
Expand All @@ -343,6 +343,10 @@ LD = @LD@
LDFLAGS = @LDFLAGS@
LIBBPF_CFLAGS = @LIBBPF_CFLAGS@
LIBBPF_LIBS = @LIBBPF_LIBS@
LIBBROTLIDEC_CFLAGS = @LIBBROTLIDEC_CFLAGS@
LIBBROTLIDEC_LIBS = @LIBBROTLIDEC_LIBS@
LIBBROTLIENC_CFLAGS = @LIBBROTLIENC_CFLAGS@
LIBBROTLIENC_LIBS = @LIBBROTLIENC_LIBS@
LIBCARES_CFLAGS = @LIBCARES_CFLAGS@
LIBCARES_LIBS = @LIBCARES_LIBS@
LIBEVENT_OPENSSL_CFLAGS = @LIBEVENT_OPENSSL_CFLAGS@
Expand All @@ -358,6 +362,8 @@ LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS = @LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS@
LIBNGTCP2_CRYPTO_BORINGSSL_LIBS = @LIBNGTCP2_CRYPTO_BORINGSSL_LIBS@
LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS = @LIBNGTCP2_CRYPTO_QUICTLS_CFLAGS@
LIBNGTCP2_CRYPTO_QUICTLS_LIBS = @LIBNGTCP2_CRYPTO_QUICTLS_LIBS@
LIBNGTCP2_CRYPTO_WOLFSSL_CFLAGS = @LIBNGTCP2_CRYPTO_WOLFSSL_CFLAGS@
LIBNGTCP2_CRYPTO_WOLFSSL_LIBS = @LIBNGTCP2_CRYPTO_WOLFSSL_LIBS@
LIBNGTCP2_LIBS = @LIBNGTCP2_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
Expand Down Expand Up @@ -411,6 +417,8 @@ TESTLDADD = @TESTLDADD@
VERSION = @VERSION@
WARNCFLAGS = @WARNCFLAGS@
WARNCXXFLAGS = @WARNCXXFLAGS@
WOLFSSL_CFLAGS = @WOLFSSL_CFLAGS@
WOLFSSL_LIBS = @WOLFSSL_LIBS@
ZLIB_CFLAGS = @ZLIB_CFLAGS@
ZLIB_LIBS = @ZLIB_LIBS@
abs_builddir = @abs_builddir@
Expand Down Expand Up @@ -500,7 +508,7 @@ OBJECTS = nghttp2_pq.c nghttp2_map.c nghttp2_queue.c \
nghttp2_stream.c nghttp2_outbound_item.c \
nghttp2_session.c nghttp2_submit.c \
nghttp2_helper.c \
nghttp2_npn.c \
nghttp2_alpn.c \
nghttp2_hd.c nghttp2_hd_huffman.c nghttp2_hd_huffman_data.c \
nghttp2_version.c \
nghttp2_priority_spec.c \
Expand All @@ -510,14 +518,16 @@ OBJECTS = nghttp2_pq.c nghttp2_map.c nghttp2_queue.c \
nghttp2_http.c \
nghttp2_rcbuf.c \
nghttp2_extpri.c \
nghttp2_ratelim.c \
nghttp2_time.c \
nghttp2_debug.c \
sfparse.c

HFILES = nghttp2_pq.h nghttp2_int.h nghttp2_map.h nghttp2_queue.h \
nghttp2_frame.h \
nghttp2_buf.h \
nghttp2_session.h nghttp2_helper.h nghttp2_stream.h nghttp2_int.h \
nghttp2_npn.h \
nghttp2_alpn.h \
nghttp2_submit.h nghttp2_outbound_item.h \
nghttp2_net.h \
nghttp2_hd.h nghttp2_hd_huffman.h \
Expand All @@ -528,6 +538,8 @@ HFILES = nghttp2_pq.h nghttp2_int.h nghttp2_map.h nghttp2_queue.h \
nghttp2_http.h \
nghttp2_rcbuf.h \
nghttp2_extpri.h \
nghttp2_ratelim.h \
nghttp2_time.h \
nghttp2_debug.h \
sfparse.h

Expand Down Expand Up @@ -615,6 +627,7 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_alpn.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_buf.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_callbacks.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_debug.Plo@am__quote@ # am--include-marker
Expand All @@ -627,16 +640,17 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_http.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_map.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_mem.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_npn.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_option.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_outbound_item.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_pq.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_priority_spec.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_queue.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_ratelim.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_rcbuf.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_session.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_stream.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_submit.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_time.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_version.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfparse.Plo@am__quote@ # am--include-marker

Expand Down Expand Up @@ -898,7 +912,8 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am

distclean: distclean-recursive
-rm -f ./$(DEPDIR)/nghttp2_buf.Plo
-rm -f ./$(DEPDIR)/nghttp2_alpn.Plo
-rm -f ./$(DEPDIR)/nghttp2_buf.Plo
-rm -f ./$(DEPDIR)/nghttp2_callbacks.Plo
-rm -f ./$(DEPDIR)/nghttp2_debug.Plo
-rm -f ./$(DEPDIR)/nghttp2_extpri.Plo
Expand All @@ -910,16 +925,17 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/nghttp2_http.Plo
-rm -f ./$(DEPDIR)/nghttp2_map.Plo
-rm -f ./$(DEPDIR)/nghttp2_mem.Plo
-rm -f ./$(DEPDIR)/nghttp2_npn.Plo
-rm -f ./$(DEPDIR)/nghttp2_option.Plo
-rm -f ./$(DEPDIR)/nghttp2_outbound_item.Plo
-rm -f ./$(DEPDIR)/nghttp2_pq.Plo
-rm -f ./$(DEPDIR)/nghttp2_priority_spec.Plo
-rm -f ./$(DEPDIR)/nghttp2_queue.Plo
-rm -f ./$(DEPDIR)/nghttp2_ratelim.Plo
-rm -f ./$(DEPDIR)/nghttp2_rcbuf.Plo
-rm -f ./$(DEPDIR)/nghttp2_session.Plo
-rm -f ./$(DEPDIR)/nghttp2_stream.Plo
-rm -f ./$(DEPDIR)/nghttp2_submit.Plo
-rm -f ./$(DEPDIR)/nghttp2_time.Plo
-rm -f ./$(DEPDIR)/nghttp2_version.Plo
-rm -f ./$(DEPDIR)/sfparse.Plo
-rm -f Makefile
Expand Down Expand Up @@ -967,7 +983,8 @@ install-ps-am:
installcheck-am:

maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/nghttp2_buf.Plo
-rm -f ./$(DEPDIR)/nghttp2_alpn.Plo
-rm -f ./$(DEPDIR)/nghttp2_buf.Plo
-rm -f ./$(DEPDIR)/nghttp2_callbacks.Plo
-rm -f ./$(DEPDIR)/nghttp2_debug.Plo
-rm -f ./$(DEPDIR)/nghttp2_extpri.Plo
Expand All @@ -979,16 +996,17 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/nghttp2_http.Plo
-rm -f ./$(DEPDIR)/nghttp2_map.Plo
-rm -f ./$(DEPDIR)/nghttp2_mem.Plo
-rm -f ./$(DEPDIR)/nghttp2_npn.Plo
-rm -f ./$(DEPDIR)/nghttp2_option.Plo
-rm -f ./$(DEPDIR)/nghttp2_outbound_item.Plo
-rm -f ./$(DEPDIR)/nghttp2_pq.Plo
-rm -f ./$(DEPDIR)/nghttp2_priority_spec.Plo
-rm -f ./$(DEPDIR)/nghttp2_queue.Plo
-rm -f ./$(DEPDIR)/nghttp2_ratelim.Plo
-rm -f ./$(DEPDIR)/nghttp2_rcbuf.Plo
-rm -f ./$(DEPDIR)/nghttp2_session.Plo
-rm -f ./$(DEPDIR)/nghttp2_stream.Plo
-rm -f ./$(DEPDIR)/nghttp2_submit.Plo
-rm -f ./$(DEPDIR)/nghttp2_time.Plo
-rm -f ./$(DEPDIR)/nghttp2_version.Plo
-rm -f ./$(DEPDIR)/sfparse.Plo
-rm -f Makefile
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/exported/nghttp2/Makefile.msvc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ NGHTTP2_SRC := nghttp2_pq.c \
nghttp2_session.c \
nghttp2_submit.c \
nghttp2_helper.c \
nghttp2_npn.c \
nghttp2_alpn.c \
nghttp2_hd.c \
nghttp2_hd_huffman.c \
nghttp2_hd_huffman_data.c \
Expand Down
Loading

0 comments on commit 03f6005

Please sign in to comment.