Some fixed for building curl with ngtcp2 library.

This commit is contained in:
LoRd_MuldeR 2022-06-22 21:39:57 +02:00
parent 59d206f434
commit a5f6cce9b0

View File

@ -42,7 +42,7 @@ rm -rf "${LIBS_DIR}" && mkdir -p "${LIBS_DIR}/.pkg" "${LIBS_DIR}/bin" "${LIBS_DI
wget -4 -O "${LIBS_DIR}/.pkg/zlib.tar.gz" https://zlib.net/zlib-1.2.12.tar.gz
wget -4 -O "${LIBS_DIR}/.pkg/zstd.tar.gz" https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz
wget -4 -O "${LIBS_DIR}/.pkg/brotli.tar.gz" https://github.com/google/brotli/archive/v1.0.9/brotli-1.0.9.tar.gz
wget -4 -O "${LIBS_DIR}/.pkg/openssl.tar.gz" https://www.openssl.org/source/openssl-1.1.1o.tar.gz
wget -4 -O "${LIBS_DIR}/.pkg/openssl.tar.gz" https://github.com/quictls/openssl/archive/refs/heads/OpenSSL_1_1_1p+quic.tar.gz
wget -4 -O "${LIBS_DIR}/.pkg/rtmpdump.tar.gz" http://git.ffmpeg.org/gitweb/rtmpdump.git/snapshot/f1b83c10d8beb43fcc70a6e88cf4325499f25857.tar.gz
wget -4 -O "${LIBS_DIR}/.pkg/libiconv.tar.gz" https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz
wget -4 -O "${LIBS_DIR}/.pkg/gettext.tar.gz" https://ftp.gnu.org/pub/gnu/gettext/gettext-0.21.tar.gz
@ -195,7 +195,7 @@ readonly TCP2_DIR="${BASE_DIR}/ngtcp2-${MY_CPU}"
rm -rf "${TCP2_DIR}" && mkdir "${TCP2_DIR}"
tar -xvf "${LIBS_DIR}/.pkg/ngtcp2.tar.gz" --strip-components=1 -C "${TCP2_DIR}"
pushd "${TCP2_DIR}"
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" OPENSSL_CFLAGS="-I${LIBS_DIR}/include" OPENSSL_LIBS="-L${LIBS_DIR}/lib -lssl -lcrypto" ZLIB_CFLAGS="-I${LIBS_DIR}/include" ZLIB_LIBS="-L${LIBS_DIR}/lib -lz" ./configure --prefix="${LIBS_DIR}" --enable-lib-only --disable-threads --disable-shared
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" OPENSSL_CFLAGS="-I${LIBS_DIR}/include" OPENSSL_LIBS="-L${LIBS_DIR}/lib -lssl -lcrypto -lws2_32 -lz" ZLIB_CFLAGS="-I${LIBS_DIR}/include" ZLIB_LIBS="-L${LIBS_DIR}/lib -lz" ./configure --prefix="${LIBS_DIR}" --enable-lib-only --with-openssl --disable-shared
make && make install
popd
@ -236,7 +236,7 @@ patch -p1 -b < "${BASE_DIR}/patch/curl_getenv.diff"
patch -p1 -b < "${BASE_DIR}/patch/curl_threads.diff"
patch -p1 -b < "${BASE_DIR}/patch/curl_tool_doswin.diff"
patch -p1 -b < "${BASE_DIR}/patch/curl_tool_parsecfg.diff"
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -I${LIBS_DIR}/include" CPPFLAGS="-D_WIN32_WINNT=0x0501 -DNGHTTP2_STATICLIB -DUNICODE -D_UNICODE" LDFLAGS="-municode -mconsole -Wl,--trace -static -no-pthread -L${LIBS_DIR}/lib" LIBS="-liconv -lcrypt32 -lwinmm" PKG_CONFIG_PATH="${LIBS_DIR}/lib/pkgconfig" ./configure --enable-static --disable-shared --disable-pthreads --disable-libcurl-option --disable-openssl-auto-load-config --with-zlib --with-zstd --with-brotli --with-openssl --with-librtmp --with-libssh2 --with-nghttp2="${LIBS_DIR}" --with-ngtcp2="${LIBS_DIR}" --with-nghttp3="${LIBS_DIR}" --with-libidn2 --with-gsasl --without-ca-bundle
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -I${LIBS_DIR}/include" CPPFLAGS="-D_WIN32_WINNT=0x0501 -DNGHTTP2_STATICLIB -DNGHTTP3_STATICLIB -DNGTCP2_STATICLIB -DUNICODE -D_UNICODE" LDFLAGS="-municode -mconsole -Wl,--trace -static -no-pthread -L${LIBS_DIR}/lib" LIBS="-liconv -lcrypt32 -lwinmm" PKG_CONFIG_PATH="${LIBS_DIR}/lib/pkgconfig" ./configure --enable-static --disable-shared --disable-pthreads --disable-libcurl-option --disable-openssl-auto-load-config --with-zlib --with-zstd --with-brotli --with-openssl --with-librtmp --with-libssh2 --with-nghttp2="${LIBS_DIR}" --with-ngtcp2="${LIBS_DIR}" --with-nghttp3="${LIBS_DIR}" --with-libidn2 --with-gsasl --without-ca-bundle
make V=1
strip -s src/curl.exe
popd
@ -270,6 +270,10 @@ unix2dos -n "${IDN2_DIR}/README.md" legal/libidn2.README.md
unix2dos -n "${NGH2_DIR}/AUTHORS" legal/nghttp2.AUTHORS.txt
unix2dos -n "${NGH2_DIR}/COPYING" legal/nghttp2.COPYING.txt
unix2dos -n "${NGH2_DIR}/README.rst" legal/nghttp2.README.rst
unix2dos -n "${NGH3_DIR}/COPYING" legal/nghttp3.COPYING.txt
unix2dos -n "${NGH3_DIR}/README.rst" legal/nghttp3.README.rst
unix2dos -n "${TCP2_DIR}/COPYING" legal/ngtcp2.COPYING.txt
unix2dos -n "${TCP2_DIR}/README.rst" legal/ngtcp2.README.rst
unix2dos -n "${OSSL_DIR}/AUTHORS" legal/openssl.AUTHORS.txt
unix2dos -n "${OSSL_DIR}/LICENSE" legal/openssl.LICENSE.txt
unix2dos -n "${OSSL_DIR}/README" legal/openssl.README.txt