diff options
author | Pavel Vinogradov | 2021-11-12 22:04:55 -0500 |
---|---|---|
committer | Pavel Vinogradov | 2021-11-13 20:02:43 -0500 |
commit | 1248909719d7ff920c498b15fc3fe26cfb4b3fb8 (patch) | |
tree | e0870a3bbaf0247470462a62223f70a5d18008b1 /http | |
parent | dbeb4a1eaac1f88cc0b847c873ea311f1dc7388b (diff) |
http/ngtcp2: added option to build with quic enabled openssl
Diffstat (limited to 'http')
-rwxr-xr-x | http/ngtcp2/BUILD | 11 | ||||
-rwxr-xr-x | http/ngtcp2/DEPENDS | 3 | ||||
-rwxr-xr-x | http/ngtcp2/DETAILS | 5 | ||||
-rw-r--r-- | http/ngtcp2/HISTORY | 4 | ||||
-rwxr-xr-x | http/ngtcp2/INSTALL | 7 | ||||
-rwxr-xr-x | http/ngtcp2/PREPARE | 4 | ||||
-rwxr-xr-x | http/ngtcp2/PRE_BUILD | 6 | ||||
-rwxr-xr-x | http/ngtcp2/PRE_SUB_DEPENDS | 5 | ||||
-rwxr-xr-x | http/ngtcp2/REPAIR^none^PRE_SUB_DEPENDS | 5 | ||||
-rwxr-xr-x | http/ngtcp2/SUB_DEPENDS | 5 |
10 files changed, 54 insertions, 1 deletions
diff --git a/http/ngtcp2/BUILD b/http/ngtcp2/BUILD new file mode 100755 index 0000000000..2e56e2dd70 --- /dev/null +++ b/http/ngtcp2/BUILD @@ -0,0 +1,11 @@ +if [[ "${NGTCP2_WITHSSL}" == "y" ]]; then + cd "${SOURCE_DIRECTORY}/openssl" && + ./config enable-tls1_3 no-shared --prefix="${SOURCE_DIRECTORY}/openssl/build" && + make -j${MAKE_NJOBS:-1} && + make -j${MAKE_NJOBS:-1} install_sw && + OPTS+=" --with-openssl" && + export OPENSSL_CFLAGS="-I${SOURCE_DIRECTORY}/openssl/build/include" && + export OPENSSL_LIBS="-pthread -Wl,--whole-archive -ldl -lpthread -lrt ${SOURCE_DIRECTORY}/openssl/build/lib/libssl.a ${SOURCE_DIRECTORY}/openssl/build/lib/libcrypto.a -Wl,--no-whole-archive" && + cd "${SOURCE_DIRECTORY}" +fi && +default_build diff --git a/http/ngtcp2/DEPENDS b/http/ngtcp2/DEPENDS index ad25b70792..674300fda3 100755 --- a/http/ngtcp2/DEPENDS +++ b/http/ngtcp2/DEPENDS @@ -3,6 +3,9 @@ depends automake && depends git && depends pkgconfig && depends libtool && +if [[ "${NGTCP2_WITHSSL}" == "y" ]]; then + depends perl +fi && optional_depends gnutls \ "--with-gnutls" \ diff --git a/http/ngtcp2/DETAILS b/http/ngtcp2/DETAILS index c598d9a320..5fa717927f 100755 --- a/http/ngtcp2/DETAILS +++ b/http/ngtcp2/DETAILS @@ -6,6 +6,11 @@ SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-git" SOURCE_URL="git://github.com/${SPELL}/${SPELL}:${SPELL}-git:main" SOURCE_IGNORE="volatile" FORCE_DOWNLOAD="on" +if [[ "${NGTCP2_WITHSSL}" == "y" ]]; then + SOURCE2="${SPELL}-openssl-git.tar.xz" + SOURCE2_URL="git://github.com/quictls/openssl:${SPELL}-openssl-git:OpenSSL_1_1_1l+quic" + SOURCE2_IGNORE="volatile" +fi WEB_SITE="https://github.com/ngtcp2/ngtcp2" LICENSE[0]="MIT" ENTERED="20211107" diff --git a/http/ngtcp2/HISTORY b/http/ngtcp2/HISTORY index b53c9cd4dc..293fb6bee0 100644 --- a/http/ngtcp2/HISTORY +++ b/http/ngtcp2/HISTORY @@ -1,3 +1,7 @@ +2021-11-13 Pavel Vinogradov <public@sourcemage.org> + * BUILD, DEPENDS, DETAILS, INSTALL, PRE_BUILD, PREPARE, *SUB_DEPENDS: added + option to build with custom openssl with QUIC support + 2021-11-07 Pavel Vinogradov <public@sourcemage.org> * DEPENDS, DETAILS, PRE_BUILD, PREPARE: created diff --git a/http/ngtcp2/INSTALL b/http/ngtcp2/INSTALL new file mode 100755 index 0000000000..cff56d3dc9 --- /dev/null +++ b/http/ngtcp2/INSTALL @@ -0,0 +1,7 @@ +default_install && + +if [[ "${NGTCP2_WITHSSL}" == "y" ]]; then + mkdir -p "${INSTALL_ROOT}/usr/include/${SPELL}" && + cp -a "${SOURCE_DIRECTORY}/openssl/build/include/openssl" \ + "${INSTALL_ROOT}/usr/include/${SPELL}" +fi diff --git a/http/ngtcp2/PREPARE b/http/ngtcp2/PREPARE index f8b7d7e3e2..32b4316b38 100755 --- a/http/ngtcp2/PREPARE +++ b/http/ngtcp2/PREPARE @@ -1,2 +1,4 @@ . ${GRIMOIRE}/FUNCTIONS && -prepare_select_branch +prepare_select_branch && + +config_query NGTCP2_WITHSSL "Enable SSL crypto backend?" n diff --git a/http/ngtcp2/PRE_BUILD b/http/ngtcp2/PRE_BUILD index dcf04f5472..556c77e96a 100755 --- a/http/ngtcp2/PRE_BUILD +++ b/http/ngtcp2/PRE_BUILD @@ -1,4 +1,10 @@ default_pre_build && cd "${SOURCE_DIRECTORY}" && +if [[ "${NGTCP2_WITHSSL}" == "y" ]]; then + unpack_file '2' && + mv ${SPELL}-openssl-git openssl && + sed "/Cflags/s;$; -I\$\{includedir\}/${SPELL};" \ + -i crypto/openssl/libngtcp2_crypto_openssl.pc.in +fi && autoreconf -i diff --git a/http/ngtcp2/PRE_SUB_DEPENDS b/http/ngtcp2/PRE_SUB_DEPENDS new file mode 100755 index 0000000000..020ceb3f7d --- /dev/null +++ b/http/ngtcp2/PRE_SUB_DEPENDS @@ -0,0 +1,5 @@ +case ${THIS_SUB_DEPENDS} in +WITHSSL) [[ "${NGTCP2_WITHSSL}" = "y" ]] ;; + *) message "${PROBLEM_COLOR}bogus sub_depends: ${SPELL} ${THIS_SUB_DEPENDS}${DEFAULT_COLOR}" + return 1 ;; +esac diff --git a/http/ngtcp2/REPAIR^none^PRE_SUB_DEPENDS b/http/ngtcp2/REPAIR^none^PRE_SUB_DEPENDS new file mode 100755 index 0000000000..020ceb3f7d --- /dev/null +++ b/http/ngtcp2/REPAIR^none^PRE_SUB_DEPENDS @@ -0,0 +1,5 @@ +case ${THIS_SUB_DEPENDS} in +WITHSSL) [[ "${NGTCP2_WITHSSL}" = "y" ]] ;; + *) message "${PROBLEM_COLOR}bogus sub_depends: ${SPELL} ${THIS_SUB_DEPENDS}${DEFAULT_COLOR}" + return 1 ;; +esac diff --git a/http/ngtcp2/SUB_DEPENDS b/http/ngtcp2/SUB_DEPENDS new file mode 100755 index 0000000000..bfeb31e1cf --- /dev/null +++ b/http/ngtcp2/SUB_DEPENDS @@ -0,0 +1,5 @@ +case ${THIS_SUB_DEPENDS} in +WITHSSL) NGTCP2_WITHSSL="y" ;; + *) message "${PROBLEM_COLOR}bogus sub_depends: ${SPELL} ${THIS_SUB_DEPENDS}${DEFAULT_COLOR}" + return 1 ;; +esac |