Upgrade to 1.46.0 40/269240/2 accepted/tizen_7.0_base accepted/tizen_7.0_base_hotfix tizen_7.0_base tizen_7.0_base_hotfix accepted/tizen/7.0/base/20221116.025901 accepted/tizen/7.0/base/hotfix/20221116.055310 accepted/tizen/base/20220116.220755 accepted/tizen/base/20221115.103738 submit/tizen_base/20220113.081617 tizen_7.0_m2_release
authorSeonah Moon <seonah1.moon@samsung.com>
Wed, 12 Jan 2022 02:02:18 +0000 (11:02 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Wed, 12 Jan 2022 02:02:49 +0000 (11:02 +0900)
Change-Id: Ia559526161bb0294ebf963b4a34aa590a78d6365

1  2 
configure.ac
packaging/nghttp2.spec
src/Makefile.am

diff --cc configure.ac
  AM_CONDITIONAL([HAVE_CUNIT], [ test "x${have_cunit}" = "xyes" ])
  
  # libev (for src)
- # libev does not have pkg-config file.  Check it in an old way.
- save_LIBS=$LIBS
- # android requires -lm for floor
- AC_CHECK_LIB([ev], [ev_time], [have_libev=yes], [have_libev=no], [-lm])
- if test "x${have_libev}" = "xyes"; then
-   AC_CHECK_HEADER([ev.h], [have_libev=yes], [have_libev=no])
-   if test "x${have_libev}" = "xyes"; then
-     LIBEV_LIBS=-lev
-     LIBEV_CFLAGS=
-     AC_SUBST([LIBEV_LIBS])
-     AC_SUBST([LIBEV_CFLAGS])
+ have_libev=no
+ if test "x${request_libev}" != "xno"; then
+   if test "x${LIBEV_LIBS}" = "x" && test "x${LIBEV_CFLAGS}" = "x"; then
+     # libev does not have pkg-config file.  Check it in an old way.
+     save_LIBS=$LIBS
+     # android requires -lm for floor
+    AC_CHECK_LIB([ev], [ev_time], [have_libev=yes], [have_libev=no], [-lm])
+    if test "x${have_libev}" = "xyes"; then
+       AC_CHECK_HEADER([ev.h], [have_libev=yes], [have_libev=no])
+       if test "x${have_libev}" = "xyes"; then
+         LIBEV_LIBS=-lev
+         LIBEV_CFLAGS=
+       fi
+     fi
+     LIBS=$save_LIBS
+   else
+     have_libev=yes
    fi
  fi
- LIBS=$save_LIBS
+ if test "x${request_libev}" = "xyes" &&
+    test "x${have_libev}" != "xyes"; then
+   AC_MSG_ERROR([libev was requested (--with-libev) but not found])
+ fi
  
  # openssl (for src)
- PKG_CHECK_MODULES([OPENSSL], [openssl1.1 >= 1.0.1],
-                   [have_openssl=yes], [have_openssl=no])
- if test "x${have_openssl}" = "xno"; then
-   AC_MSG_NOTICE($OPENSSL_PKG_ERRORS)
+ have_openssl=no
+ if test "x${request_openssl}" != "xno"; then
 -  PKG_CHECK_MODULES([OPENSSL], [openssl >= 1.0.1],
++  PKG_CHECK_MODULES([OPENSSL], [openssl1.1 >= 1.0.1],
+                     [have_openssl=yes], [have_openssl=no])
+   if test "x${have_openssl}" = "xno"; then
+     AC_MSG_NOTICE($OPENSSL_PKG_ERRORS)
+   else
+     save_CFLAGS="$CFLAGS"
+     save_LIBS="$LIBS"
+     CFLAGS="$OPENSSL_CFLAGS $CFLAGS"
+     LIBS="$OPENSSL_LIBS $LIBS"
+     # quictls/openssl has SSL_is_quic.
+     have_ssl_is_quic=no
+     AC_MSG_CHECKING([for SSL_is_quic])
+     AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+       #include <openssl/ssl.h>
+     ]], [[
+       SSL *ssl = NULL;
+       SSL_is_quic(ssl);
+     ]])],
+     [AC_MSG_RESULT([yes]); have_ssl_is_quic=yes],
+     [AC_MSG_RESULT([no]); have_ssl_is_quic=no])
+     # boringssl has SSL_set_quic_early_data_context.
+     AC_MSG_CHECKING([for SSL_set_quic_early_data_context])
+     AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+       #include <openssl/ssl.h>
+     ]], [[
+       SSL *ssl = NULL;
+       SSL_set_quic_early_data_context(ssl, NULL, 0);
+     ]])],
+     [AC_MSG_RESULT([yes]); have_boringssl_quic=yes],
+     [AC_MSG_RESULT([no]); have_boringssl_quic=no])
+     CFLAGS="$save_CFLAGS"
+     LIBS="$save_LIBS"
+   fi
+ fi
+ if test "x${request_openssl}" = "xyes" &&
+    test "x${have_openssl}" != "xyes"; then
+   AC_MSG_ERROR([openssl was requested (--with-openssl) but not found])
  fi
  
  # c-ares (for src)
index eca6728,0000000..ac13dc5
mode 100644,000000..100644
--- /dev/null
@@@ -1,91 -1,0 +1,91 @@@
- Version: 1.41.0
 +%define _unpackaged_files_terminate_build 0
 +Prefix: %{_usr}
 +Name: nghttp2
++Version: 1.46.0
 +Release: 1
 +Summary: This is an experimental implementation of Hypertext Transfer Protocol version 2.
 +Group: System Environment/Libraries
 +License: MIT
 +URL: https://nghttp2.org/
 +Source0: %{name}-%{version}.tar.gz
 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 +
 +BuildRequires: pkgconfig >= 0.20, zlib >= 1.2.3, gcc, gcc-c++, make
 +BuildRequires: libopenssl1.1-devel
 +BuildRequires: libxml2-devel
 +%if "%{tizen_profile_name}" != "tv"
 +BuildRequires: boost-devel
 +BuildRequires: libcares-devel
 +BuildRequires: zlib-devel
 +BuildRequires: libev-devel
 +%endif
 +
 +%description
 +
 +%package devel
 +Summary: Development files for %{name}
 +Group: Development/Libraries
 +Requires: %{name} = %{version}-%{release}
 +
 +%description devel
 +The %{name}-devel package contains libraries and header files for
 +developing applications that use %{name}.
 +
 +%if "%{tizen_profile_name}" != "tv"
 +%package tools
 +Summary: Tool files for %{name}
 +Group: Development/Libraries
 +Requires: %{name} = %{version}-%{release}
 +
 +%description tools
 +The %{name}-tools package contains tool files for %{name}.
 +%endif
 +
 +
 +%prep
 +%setup -q
 +
 +%build
 +autoreconf -i
 +%{__automake}
 +%{__autoconf}
 +%configure \
 +%if "%{tizen_profile_name}" != "tv"
 +      --enable-asio-lib \
 +      --enable-app \
 +%endif
 +      --disable-xmltest \
 +      --disable-static
 +%{__make} %{?_smp_mflags}
 +
 +%install
 +rm -rf $RPM_BUILD_ROOT
 +%{__make} install DESTDIR=$RPM_BUILD_ROOT
 +
 +find %{buildroot}%{_bindir}/ -type f -not -name 'nghttpx' -delete
 +%{remove_docs}
 +
 +%clean
 +rm -rf $RPM_BUILD_ROOT
 +
 +%post -p /sbin/ldconfig
 +
 +%postun -p /sbin/ldconfig
 +
 +%files
 +%manifest %{name}.manifest
 +%{_libdir}/*.so*
 +%exclude %{_libdir}/*.la
 +%license COPYING
 +
 +%if "%{tizen_profile_name}" != "tv"
 +%files tools
 +%defattr(-,root,root,-)
 +%{_bindir}/nghttpx
 +%endif
 +
 +%files devel
 +%defattr(-,root,root,-)
 +%{_includedir}/*
 +%{_libdir}/*.so
 +%{_libdir}/pkgconfig/*.pc
diff --cc src/Makefile.am
@@@ -46,9 -52,11 +52,12 @@@ AM_CPPFLAGS = 
        @OPENSSL_CFLAGS@ \
        @LIBCARES_CFLAGS@ \
        @JANSSON_CFLAGS@ \
+       @LIBBPF_CFLAGS@ \
        @ZLIB_CFLAGS@ \
 -      @DEFS@
+       @EXTRA_DEFS@ \
 +      @DEFS@ \
 +      -fPIE
+ AM_LDFLAGS = @LIBTOOL_LDFLAGS@
  
  LDADD = $(top_builddir)/lib/libnghttp2.la \
        $(top_builddir)/third-party/liburl-parser.la \
@@@ -263,8 -293,8 +295,9 @@@ libnghttp2_asio_la_SOURCES = 
        asio_client_stream.cc asio_client_stream.h \
        asio_client_tls_context.cc asio_client_tls_context.h
  
 -libnghttp2_asio_la_CPPFLAGS = ${AM_CPPFLAGS} ${BOOST_CPPFLAGS}
 -libnghttp2_asio_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined -version-info 1:0:0
++
 +libnghttp2_asio_la_CPPFLAGS = ${AM_CPPFLAGS} ${BOOST_CPPFLAGS} -fPIE
- libnghttp2_asio_la_LDFLAGS = -no-undefined -version-info 1:0:0 -pie
++libnghttp2_asio_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined -version-info 1:0:0 -pie
  libnghttp2_asio_la_LIBADD = \
        $(top_builddir)/lib/libnghttp2.la \
        $(top_builddir)/third-party/liburl-parser.la \