Added nghttp2 in order to enable HTTP/2 support.
This commit is contained in:
parent
3d812d4728
commit
d3042b186a
18
build.sh
18
build.sh
@ -23,6 +23,7 @@ wget -4 -P "${DEPS_DIR}" https://zlib.net/zlib-1.2.11.tar.gz
|
|||||||
wget -4 -P "${DEPS_DIR}" https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.gz
|
wget -4 -P "${DEPS_DIR}" https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.gz
|
||||||
wget -4 -P "${DEPS_DIR}" https://github.com/google/brotli/archive/v1.0.9/brotli-1.0.9.tar.gz
|
wget -4 -P "${DEPS_DIR}" https://github.com/google/brotli/archive/v1.0.9/brotli-1.0.9.tar.gz
|
||||||
wget -4 -P "${DEPS_DIR}" https://www.openssl.org/source/openssl-1.1.1k.tar.gz
|
wget -4 -P "${DEPS_DIR}" https://www.openssl.org/source/openssl-1.1.1k.tar.gz
|
||||||
|
wget -4 -P "${DEPS_DIR}" https://github.com/nghttp2/nghttp2/releases/download/v1.43.0/nghttp2-1.43.0.tar.gz
|
||||||
wget -4 -P "${DEPS_DIR}" https://curl.se/download/curl-7.77.0.tar.gz
|
wget -4 -P "${DEPS_DIR}" https://curl.se/download/curl-7.77.0.tar.gz
|
||||||
wget -4 -P "${DEPS_DIR}" https://curl.se/ca/cacert.pem
|
wget -4 -P "${DEPS_DIR}" https://curl.se/ca/cacert.pem
|
||||||
|
|
||||||
@ -87,6 +88,21 @@ cp -vf include/crypto/*.h "${DEPS_DIR}/include/crypto"
|
|||||||
cp -vf include/openssl/*.h "${DEPS_DIR}/include/openssl"
|
cp -vf include/openssl/*.h "${DEPS_DIR}/include/openssl"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
# nghttp2
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
printf "\n==================== nghttp2 ====================\n\n"
|
||||||
|
readonly NGH2_DIR="${BASE_DIR}/nghttp2-src"
|
||||||
|
pkg_ngh2="$(find "${DEPS_DIR}" -maxdepth 1 -name 'nghttp2-*.tar.gz' | sort -rn | head -n1)"
|
||||||
|
rm -rf "${NGH2_DIR}" && mkdir "${NGH2_DIR}"
|
||||||
|
tar -xvf ${pkg_ngh2} --strip-components=1 -C "${NGH2_DIR}"
|
||||||
|
CFLAGS="-march=i386 -mtune=intel" OPENSSL_CFLAGS="-I${DEPS_DIR}/include" OPENSSL_LIBS="-L${DEPS_DIR}/lib -lssl -lcrypto" ZLIB_CFLAGS="-I${DEPS_DIR}/include" ZLIB_LIBS="-L${DEPS_DIR}/lib -lz" ./configure --enable-lib-only --disable-threads --disable-shared
|
||||||
|
make
|
||||||
|
mkdir -p "${DEPS_DIR}/include/nghttp2"
|
||||||
|
cp -v lib/.libs/libnghttp2.a "${DEPS_DIR}/lib"
|
||||||
|
cp -v lib/includes/nghttp2/*.h "${DEPS_DIR}/include/nghttp2"
|
||||||
|
popd
|
||||||
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# cURL
|
# cURL
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -97,7 +113,7 @@ rm -rf "${CURL_DIR}" && mkdir "${CURL_DIR}"
|
|||||||
tar -xvf ${pkg_curl} --strip-components=1 -C "${CURL_DIR}"
|
tar -xvf ${pkg_curl} --strip-components=1 -C "${CURL_DIR}"
|
||||||
pushd "${CURL_DIR}"
|
pushd "${CURL_DIR}"
|
||||||
patch -p1 -b < "${BASE_DIR}/patch/curl_mutex_init.diff"
|
patch -p1 -b < "${BASE_DIR}/patch/curl_mutex_init.diff"
|
||||||
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -I\"${DEPS_DIR}/include\"" LDFLAGS="-static -no-pthread -L\"${DEPS_DIR}/lib\"" LIBS="-latomic -lcrypt32" ./configure --disable-shared --disable-pthreads --enable-static --disable-ldap --with-zlib="${DEPS_DIR}" --with-zstd="${DEPS_DIR}" --with-brotli="${DEPS_DIR}" --with-openssl="${DEPS_DIR}" --with-ca-bundle="cacert.pem"
|
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -I\"${DEPS_DIR}/include\"" LDFLAGS="-static -no-pthread -L\"${DEPS_DIR}/lib\"" LIBS="-latomic -lcrypt32" ./configure --disable-shared --disable-pthreads --enable-static --disable-ldap --with-zlib="${DEPS_DIR}" --with-zstd="${DEPS_DIR}" --with-brotli="${DEPS_DIR}" --with-openssl="${DEPS_DIR}" --with-nghttp2="${DEPS_DIR}" --with-ca-bundle="cacert.pem"
|
||||||
make curl_LDFLAGS=-all-static
|
make curl_LDFLAGS=-all-static
|
||||||
cp -vf "${CURL_DIR}/src/curl.exe" "${BASE_DIR}/curl.exe"
|
cp -vf "${CURL_DIR}/src/curl.exe" "${BASE_DIR}/curl.exe"
|
||||||
cp -vf "${DEPS_DIR}/cacert.pem" "${BASE_DIR}/cacert.pem"
|
cp -vf "${DEPS_DIR}/cacert.pem" "${BASE_DIR}/cacert.pem"
|
||||||
|
Loading…
Reference in New Issue
Block a user