Improved handling of paths.
This commit is contained in:
parent
4c028b351d
commit
1214031e62
13
.gitignore
vendored
13
.gitignore
vendored
@ -1,11 +1,2 @@
|
|||||||
/*-src
|
/build/**/*
|
||||||
/*-x64
|
/_release
|
||||||
/*-x86
|
|
||||||
/*.exe
|
|
||||||
/*.pem
|
|
||||||
/*.txt
|
|
||||||
/*.zip
|
|
||||||
/.bin
|
|
||||||
/.libs
|
|
||||||
/.local
|
|
||||||
/.release
|
|
||||||
|
113
build.sh
113
build.sh
@ -37,38 +37,41 @@ esac
|
|||||||
# Initialize paths
|
# Initialize paths
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
readonly BASE_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
readonly BASE_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||||
readonly LIBS_DIR="${BASE_DIR}/.local/${MY_CPU}"
|
readonly WORK_DIR="${BASE_DIR}/build/${MY_CPU}"
|
||||||
find "${BASE_DIR}" -maxdepth 1 -type d -name "*-${MY_CPU}" -exec rm -rf "{}" \;
|
readonly PKGS_DIR="${WORK_DIR}/_pkg"
|
||||||
rm -rf "${LIBS_DIR}" && mkdir -p "${LIBS_DIR}/.pkg" "${LIBS_DIR}/bin" "${LIBS_DIR}/include" "${LIBS_DIR}/lib/pkgconfig" "${LIBS_DIR}/share"
|
readonly LIBS_DIR="${WORK_DIR}/_lib"
|
||||||
|
rm -rf "${WORK_DIR}" && mkdir -p "${WORK_DIR}"
|
||||||
|
rm -rf "${PKGS_DIR}" && mkdir -p "${PKGS_DIR}"
|
||||||
|
rm -rf "${LIBS_DIR}" && mkdir -p "${LIBS_DIR}/bin" "${LIBS_DIR}/include" "${LIBS_DIR}/lib/pkgconfig" "${LIBS_DIR}/share"
|
||||||
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# Download
|
# Download
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/zlib.tar.gz" https://zlib.net/zlib-1.3.1.tar.gz
|
wget -4 -O "${PKGS_DIR}/zlib.tar.gz" https://zlib.net/zlib-1.3.1.tar.gz
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/zstd.tar.gz" https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz
|
wget -4 -O "${PKGS_DIR}/zstd.tar.gz" https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/brotli.tar.gz" https://github.com/google/brotli/archive/refs/tags/v1.1.0.tar.gz
|
wget -4 -O "${PKGS_DIR}/brotli.tar.gz" https://github.com/google/brotli/archive/refs/tags/v1.1.0.tar.gz
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/openssl.tar.gz" https://github.com/quictls/openssl/archive/refs/heads/OpenSSL_1_1_1w+quic.tar.gz
|
wget -4 -O "${PKGS_DIR}/openssl.tar.gz" https://github.com/quictls/openssl/archive/refs/heads/OpenSSL_1_1_1w+quic.tar.gz
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/rtmpdump.tar.gz" https://distfiles.macports.org/rtmpdump/f1b83c10d8beb43fcc70a6e88cf4325499f25857.tar.gz
|
wget -4 -O "${PKGS_DIR}/rtmpdump.tar.gz" https://distfiles.macports.org/rtmpdump/f1b83c10d8beb43fcc70a6e88cf4325499f25857.tar.gz
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/libiconv.tar.gz" https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz
|
wget -4 -O "${PKGS_DIR}/libiconv.tar.gz" https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/gettext.tar.gz" https://ftp.gnu.org/pub/gnu/gettext/gettext-0.22.4.tar.gz
|
wget -4 -O "${PKGS_DIR}/gettext.tar.gz" https://ftp.gnu.org/pub/gnu/gettext/gettext-0.22.4.tar.gz
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/libssh2.tar.gz" https://www.libssh2.org/download/libssh2-1.11.0.tar.gz
|
wget -4 -O "${PKGS_DIR}/libssh2.tar.gz" https://www.libssh2.org/download/libssh2-1.11.0.tar.gz
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/nghttp2.tar.gz" https://github.com/nghttp2/nghttp2/releases/download/v1.59.0/nghttp2-1.59.0.tar.gz
|
wget -4 -O "${PKGS_DIR}/nghttp2.tar.gz" https://github.com/nghttp2/nghttp2/releases/download/v1.59.0/nghttp2-1.59.0.tar.gz
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/nghttp3.tar.gz" https://github.com/ngtcp2/nghttp3/releases/download/v1.1.0/nghttp3-1.1.0.tar.gz
|
wget -4 -O "${PKGS_DIR}/nghttp3.tar.gz" https://github.com/ngtcp2/nghttp3/releases/download/v1.1.0/nghttp3-1.1.0.tar.gz
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/ngtcp2.tar.gz" https://github.com/ngtcp2/ngtcp2/releases/download/v1.2.0/ngtcp2-1.2.0.tar.gz
|
wget -4 -O "${PKGS_DIR}/ngtcp2.tar.gz" https://github.com/ngtcp2/ngtcp2/releases/download/v1.2.0/ngtcp2-1.2.0.tar.gz
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/libidn2.tar.gz" https://ftp.gnu.org/gnu/libidn/libidn2-2.3.7.tar.gz
|
wget -4 -O "${PKGS_DIR}/libidn2.tar.gz" https://ftp.gnu.org/gnu/libidn/libidn2-2.3.7.tar.gz
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/libpsl.tar.gz" https://github.com/rockdaboot/libpsl/releases/download/0.21.5/libpsl-0.21.5.tar.gz
|
wget -4 -O "${PKGS_DIR}/libpsl.tar.gz" https://github.com/rockdaboot/libpsl/releases/download/0.21.5/libpsl-0.21.5.tar.gz
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/libgsasl.tar.gz" https://ftp.gnu.org/gnu/gsasl/libgsasl-1.10.0.tar.gz
|
wget -4 -O "${PKGS_DIR}/libgsasl.tar.gz" https://ftp.gnu.org/gnu/gsasl/libgsasl-1.10.0.tar.gz
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/curl.tar.gz" https://curl.se/download/curl-${MY_VERSION}.tar.gz
|
wget -4 -O "${PKGS_DIR}/curl.tar.gz" https://curl.se/download/curl-${MY_VERSION}.tar.gz
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/cacert.pem" https://curl.se/ca/cacert.pem
|
wget -4 -O "${PKGS_DIR}/cacert.pem" https://curl.se/ca/cacert.pem
|
||||||
wget -4 -O "${LIBS_DIR}/.pkg/manpage.html" https://curl.se/docs/manpage.html
|
wget -4 -O "${PKGS_DIR}/manpage.html" https://curl.se/docs/manpage.html
|
||||||
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# zlib
|
# zlib
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== zlib ====================\n\n"
|
printf "\n==================== zlib ====================\n\n"
|
||||||
readonly ZLIB_DIR="${BASE_DIR}/zlib-${MY_CPU}"
|
readonly ZLIB_DIR="${WORK_DIR}/zlib"
|
||||||
rm -rf "${ZLIB_DIR}" && mkdir "${ZLIB_DIR}"
|
rm -rf "${ZLIB_DIR}" && mkdir "${ZLIB_DIR}"
|
||||||
tar -xvf "${LIBS_DIR}/.pkg/zlib.tar.gz" --strip-components=1 -C "${ZLIB_DIR}"
|
tar -xvf "${PKGS_DIR}/zlib.tar.gz" --strip-components=1 -C "${ZLIB_DIR}"
|
||||||
pushd "${ZLIB_DIR}"
|
pushd "${ZLIB_DIR}"
|
||||||
make -f win32/Makefile.gcc LOC="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501"
|
make -f win32/Makefile.gcc LOC="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501"
|
||||||
make -f win32/Makefile.gcc install BINARY_PATH="${LIBS_DIR}/include" INCLUDE_PATH="${LIBS_DIR}/include" LIBRARY_PATH="${LIBS_DIR}/lib"
|
make -f win32/Makefile.gcc install BINARY_PATH="${LIBS_DIR}/include" INCLUDE_PATH="${LIBS_DIR}/include" LIBRARY_PATH="${LIBS_DIR}/lib"
|
||||||
@ -78,9 +81,9 @@ popd
|
|||||||
# Zstandard
|
# Zstandard
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== Zstandard ====================\n\n"
|
printf "\n==================== Zstandard ====================\n\n"
|
||||||
readonly ZSTD_DIR="${BASE_DIR}/zstd-${MY_CPU}"
|
readonly ZSTD_DIR="${WORK_DIR}/zstd"
|
||||||
rm -rf "${ZSTD_DIR}" && mkdir "${ZSTD_DIR}"
|
rm -rf "${ZSTD_DIR}" && mkdir "${ZSTD_DIR}"
|
||||||
tar -xvf "${LIBS_DIR}/.pkg/zstd.tar.gz" --strip-components=1 -C "${ZSTD_DIR}" || true
|
tar -xvf "${PKGS_DIR}/zstd.tar.gz" --strip-components=1 -C "${ZSTD_DIR}" || true
|
||||||
pushd "${ZSTD_DIR}"
|
pushd "${ZSTD_DIR}"
|
||||||
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" make lib V=1
|
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" make lib V=1
|
||||||
cp -vf lib/libzstd.a "${LIBS_DIR}/lib"
|
cp -vf lib/libzstd.a "${LIBS_DIR}/lib"
|
||||||
@ -92,9 +95,9 @@ popd
|
|||||||
# Brotli
|
# Brotli
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== Brotli ====================\n\n"
|
printf "\n==================== Brotli ====================\n\n"
|
||||||
readonly BROT_DIR="${BASE_DIR}/brotli-${MY_CPU}"
|
readonly BROT_DIR="${WORK_DIR}/brotli"
|
||||||
rm -rf "${BROT_DIR}" && mkdir "${BROT_DIR}"
|
rm -rf "${BROT_DIR}" && mkdir "${BROT_DIR}"
|
||||||
tar -xvf "${LIBS_DIR}/.pkg/brotli.tar.gz" --strip-components=1 -C "${BROT_DIR}"
|
tar -xvf "${PKGS_DIR}/brotli.tar.gz" --strip-components=1 -C "${BROT_DIR}"
|
||||||
mkdir "${BROT_DIR}/out"
|
mkdir "${BROT_DIR}/out"
|
||||||
pushd "${BROT_DIR}/out"
|
pushd "${BROT_DIR}/out"
|
||||||
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib -static" cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=TRUE -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="${LIBS_DIR}" ..
|
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib -static" cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=TRUE -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="${LIBS_DIR}" ..
|
||||||
@ -105,9 +108,9 @@ popd
|
|||||||
# OpenSSL
|
# OpenSSL
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== OpenSSL ====================\n\n"
|
printf "\n==================== OpenSSL ====================\n\n"
|
||||||
readonly OSSL_DIR="${BASE_DIR}/openssl-${MY_CPU}"
|
readonly OSSL_DIR="${WORK_DIR}/openssl"
|
||||||
rm -rf "${OSSL_DIR}" && mkdir "${OSSL_DIR}"
|
rm -rf "${OSSL_DIR}" && mkdir "${OSSL_DIR}"
|
||||||
tar -xvf "${LIBS_DIR}/.pkg/openssl.tar.gz" --strip-components=1 -C "${OSSL_DIR}"
|
tar -xvf "${PKGS_DIR}/openssl.tar.gz" --strip-components=1 -C "${OSSL_DIR}"
|
||||||
[[ "${MY_CPU}" == "x64" ]] && readonly ossl_flag="no-sse2" || readonly ossl_flag="386"
|
[[ "${MY_CPU}" == "x64" ]] && readonly ossl_flag="no-sse2" || readonly ossl_flag="386"
|
||||||
[[ "${MY_CPU}" == "x64" ]] && readonly ossl_mngw="mingw64" || readonly ossl_mngw="mingw"
|
[[ "${MY_CPU}" == "x64" ]] && readonly ossl_mngw="mingw64" || readonly ossl_mngw="mingw"
|
||||||
pushd "${OSSL_DIR}"
|
pushd "${OSSL_DIR}"
|
||||||
@ -119,9 +122,9 @@ popd
|
|||||||
# librtmp
|
# librtmp
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== librtmp ====================\n\n"
|
printf "\n==================== librtmp ====================\n\n"
|
||||||
readonly RTMP_DIR="${BASE_DIR}/librtmp-${MY_CPU}"
|
readonly RTMP_DIR="${WORK_DIR}/librtmp"
|
||||||
rm -rf "${RTMP_DIR}" && mkdir "${RTMP_DIR}"
|
rm -rf "${RTMP_DIR}" && mkdir "${RTMP_DIR}"
|
||||||
tar -xvf "${LIBS_DIR}/.pkg/rtmpdump.tar.gz" --strip-components=1 -C "${RTMP_DIR}"
|
tar -xvf "${PKGS_DIR}/rtmpdump.tar.gz" --strip-components=1 -C "${RTMP_DIR}"
|
||||||
pushd "${RTMP_DIR}"
|
pushd "${RTMP_DIR}"
|
||||||
patch -p1 -b < "${BASE_DIR}/patch/librtmp_openssl.diff"
|
patch -p1 -b < "${BASE_DIR}/patch/librtmp_openssl.diff"
|
||||||
make SYS=mingw SHARED= prefix="${LIBS_DIR}" XCFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" XLDFLAGS="-L${LIBS_DIR}/lib" XLIBS="-lws2_32"
|
make SYS=mingw SHARED= prefix="${LIBS_DIR}" XCFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" XLDFLAGS="-L${LIBS_DIR}/lib" XLIBS="-lws2_32"
|
||||||
@ -132,9 +135,9 @@ popd
|
|||||||
# libiconv
|
# libiconv
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== libiconv ====================\n\n"
|
printf "\n==================== libiconv ====================\n\n"
|
||||||
readonly ICNV_DIR="${BASE_DIR}/libiconv-${MY_CPU}"
|
readonly ICNV_DIR="${WORK_DIR}/libiconv"
|
||||||
rm -rf "${ICNV_DIR}" && mkdir "${ICNV_DIR}"
|
rm -rf "${ICNV_DIR}" && mkdir "${ICNV_DIR}"
|
||||||
tar -xvf "${LIBS_DIR}/.pkg/libiconv.tar.gz" --strip-components=1 -C "${ICNV_DIR}"
|
tar -xvf "${PKGS_DIR}/libiconv.tar.gz" --strip-components=1 -C "${ICNV_DIR}"
|
||||||
pushd "${ICNV_DIR}"
|
pushd "${ICNV_DIR}"
|
||||||
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" ./configure --prefix="${LIBS_DIR}" --disable-rpath --disable-shared
|
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" ./configure --prefix="${LIBS_DIR}" --disable-rpath --disable-shared
|
||||||
make && make install
|
make && make install
|
||||||
@ -144,9 +147,9 @@ popd
|
|||||||
# gettext
|
# gettext
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== gettext ====================\n\n"
|
printf "\n==================== gettext ====================\n\n"
|
||||||
readonly GTXT_DIR="${BASE_DIR}/gettext-${MY_CPU}"
|
readonly GTXT_DIR="${WORK_DIR}/gettext"
|
||||||
rm -rf "${GTXT_DIR}" && mkdir "${GTXT_DIR}"
|
rm -rf "${GTXT_DIR}" && mkdir "${GTXT_DIR}"
|
||||||
tar -xvf "${LIBS_DIR}/.pkg/gettext.tar.gz" --strip-components=1 -C "${GTXT_DIR}"
|
tar -xvf "${PKGS_DIR}/gettext.tar.gz" --strip-components=1 -C "${GTXT_DIR}"
|
||||||
pushd "${GTXT_DIR}/gettext-runtime"
|
pushd "${GTXT_DIR}/gettext-runtime"
|
||||||
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" ./configure --prefix="${LIBS_DIR}" --disable-shared --disable-libasprintf --without-emacs --disable-java --disable-native-java --disable-csharp --disable-openmp
|
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" ./configure --prefix="${LIBS_DIR}" --disable-shared --disable-libasprintf --without-emacs --disable-java --disable-native-java --disable-csharp --disable-openmp
|
||||||
make && make install
|
make && make install
|
||||||
@ -156,9 +159,9 @@ popd
|
|||||||
# libssh2
|
# libssh2
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== libssh2 ====================\n\n"
|
printf "\n==================== libssh2 ====================\n\n"
|
||||||
readonly SSH2_DIR="${BASE_DIR}/libssh2-${MY_CPU}"
|
readonly SSH2_DIR="${WORK_DIR}/libssh2"
|
||||||
rm -rf "${SSH2_DIR}" && mkdir "${SSH2_DIR}"
|
rm -rf "${SSH2_DIR}" && mkdir "${SSH2_DIR}"
|
||||||
tar -xvf "${LIBS_DIR}/.pkg/libssh2.tar.gz" --strip-components=1 -C "${SSH2_DIR}"
|
tar -xvf "${PKGS_DIR}/libssh2.tar.gz" --strip-components=1 -C "${SSH2_DIR}"
|
||||||
pushd "${SSH2_DIR}"
|
pushd "${SSH2_DIR}"
|
||||||
patch -p1 -b < "${BASE_DIR}/patch/ssh2_session.diff"
|
patch -p1 -b < "${BASE_DIR}/patch/ssh2_session.diff"
|
||||||
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" ./configure --prefix="${LIBS_DIR}" --disable-examples-build --disable-shared --with-libz
|
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" ./configure --prefix="${LIBS_DIR}" --disable-examples-build --disable-shared --with-libz
|
||||||
@ -169,9 +172,9 @@ popd
|
|||||||
# nghttp2
|
# nghttp2
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== nghttp2 ====================\n\n"
|
printf "\n==================== nghttp2 ====================\n\n"
|
||||||
readonly NGH2_DIR="${BASE_DIR}/nghttp2-${MY_CPU}"
|
readonly NGH2_DIR="${WORK_DIR}/nghttp2"
|
||||||
rm -rf "${NGH2_DIR}" && mkdir "${NGH2_DIR}"
|
rm -rf "${NGH2_DIR}" && mkdir "${NGH2_DIR}"
|
||||||
tar -xvf "${LIBS_DIR}/.pkg/nghttp2.tar.gz" --strip-components=1 -C "${NGH2_DIR}"
|
tar -xvf "${PKGS_DIR}/nghttp2.tar.gz" --strip-components=1 -C "${NGH2_DIR}"
|
||||||
pushd "${NGH2_DIR}"
|
pushd "${NGH2_DIR}"
|
||||||
patch -p1 -b < "${BASE_DIR}/patch/nghttp2_time.diff"
|
patch -p1 -b < "${BASE_DIR}/patch/nghttp2_time.diff"
|
||||||
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -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} -DNDEBUG -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
|
||||||
@ -182,9 +185,9 @@ popd
|
|||||||
# nghttp3
|
# nghttp3
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== nghttp3 ====================\n\n"
|
printf "\n==================== nghttp3 ====================\n\n"
|
||||||
readonly NGH3_DIR="${BASE_DIR}/nghttp3-${MY_CPU}"
|
readonly NGH3_DIR="${WORK_DIR}/nghttp3"
|
||||||
rm -rf "${NGH3_DIR}" && mkdir "${NGH3_DIR}"
|
rm -rf "${NGH3_DIR}" && mkdir "${NGH3_DIR}"
|
||||||
tar -xvf "${LIBS_DIR}/.pkg/nghttp3.tar.gz" --strip-components=1 -C "${NGH3_DIR}"
|
tar -xvf "${PKGS_DIR}/nghttp3.tar.gz" --strip-components=1 -C "${NGH3_DIR}"
|
||||||
pushd "${NGH3_DIR}"
|
pushd "${NGH3_DIR}"
|
||||||
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -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} -DNDEBUG -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
|
||||||
make && make install
|
make && make install
|
||||||
@ -194,9 +197,9 @@ popd
|
|||||||
# ngtcp2
|
# ngtcp2
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== ngtcp2 ====================\n\n"
|
printf "\n==================== ngtcp2 ====================\n\n"
|
||||||
readonly TCP2_DIR="${BASE_DIR}/ngtcp2-${MY_CPU}"
|
readonly TCP2_DIR="${WORK_DIR}/ngtcp2"
|
||||||
rm -rf "${TCP2_DIR}" && mkdir "${TCP2_DIR}"
|
rm -rf "${TCP2_DIR}" && mkdir "${TCP2_DIR}"
|
||||||
tar -xvf "${LIBS_DIR}/.pkg/ngtcp2.tar.gz" --strip-components=1 -C "${TCP2_DIR}"
|
tar -xvf "${PKGS_DIR}/ngtcp2.tar.gz" --strip-components=1 -C "${TCP2_DIR}"
|
||||||
pushd "${TCP2_DIR}"
|
pushd "${TCP2_DIR}"
|
||||||
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -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
|
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -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
|
make && make install
|
||||||
@ -206,9 +209,9 @@ popd
|
|||||||
# libidn2
|
# libidn2
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== libidn2 ====================\n\n"
|
printf "\n==================== libidn2 ====================\n\n"
|
||||||
readonly IDN2_DIR="${BASE_DIR}/libidn2-${MY_CPU}"
|
readonly IDN2_DIR="${WORK_DIR}/libidn2"
|
||||||
rm -rf "${IDN2_DIR}" && mkdir "${IDN2_DIR}"
|
rm -rf "${IDN2_DIR}" && mkdir "${IDN2_DIR}"
|
||||||
tar -xvf "${LIBS_DIR}/.pkg/libidn2.tar.gz" --strip-components=1 -C "${IDN2_DIR}"
|
tar -xvf "${PKGS_DIR}/libidn2.tar.gz" --strip-components=1 -C "${IDN2_DIR}"
|
||||||
pushd "${IDN2_DIR}"
|
pushd "${IDN2_DIR}"
|
||||||
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" ./configure --prefix="${LIBS_DIR}" --disable-shared --disable-doc --without-libiconv-prefix --without-libunistring-prefix --disable-valgrind-tests
|
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" ./configure --prefix="${LIBS_DIR}" --disable-shared --disable-doc --without-libiconv-prefix --without-libunistring-prefix --disable-valgrind-tests
|
||||||
make && make install
|
make && make install
|
||||||
@ -218,9 +221,9 @@ popd
|
|||||||
# libpsl
|
# libpsl
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== libpsl ====================\n\n"
|
printf "\n==================== libpsl ====================\n\n"
|
||||||
readonly LPSL_DIR="${BASE_DIR}/libpsl-${MY_CPU}"
|
readonly LPSL_DIR="${WORK_DIR}/libpsl"
|
||||||
rm -rf "${LPSL_DIR}" && mkdir "${LPSL_DIR}"
|
rm -rf "${LPSL_DIR}" && mkdir "${LPSL_DIR}"
|
||||||
tar -xvf "${LIBS_DIR}/.pkg/libpsl.tar.gz" --strip-components=1 -C "${LPSL_DIR}"
|
tar -xvf "${PKGS_DIR}/libpsl.tar.gz" --strip-components=1 -C "${LPSL_DIR}"
|
||||||
pushd "${LPSL_DIR}"
|
pushd "${LPSL_DIR}"
|
||||||
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" ./configure --prefix="${LIBS_DIR}" --disable-shared
|
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" ./configure --prefix="${LIBS_DIR}" --disable-shared
|
||||||
make && make install
|
make && make install
|
||||||
@ -230,9 +233,9 @@ popd
|
|||||||
# libgsasl
|
# libgsasl
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== libgsasl ====================\n\n"
|
printf "\n==================== libgsasl ====================\n\n"
|
||||||
readonly SASL_DIR="${BASE_DIR}/libgsasl-${MY_CPU}"
|
readonly SASL_DIR="${WORK_DIR}/libgsasl"
|
||||||
rm -rf "${SASL_DIR}" && mkdir "${SASL_DIR}"
|
rm -rf "${SASL_DIR}" && mkdir "${SASL_DIR}"
|
||||||
tar -xvf "${LIBS_DIR}/.pkg/libgsasl.tar.gz" --strip-components=1 -C "${SASL_DIR}"
|
tar -xvf "${PKGS_DIR}/libgsasl.tar.gz" --strip-components=1 -C "${SASL_DIR}"
|
||||||
pushd "${SASL_DIR}"
|
pushd "${SASL_DIR}"
|
||||||
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" ./configure --prefix="${LIBS_DIR}" --disable-shared --disable-valgrind-tests --disable-obsolete -without-libintl-prefix
|
CFLAGS="-march=${MY_MARCH} -mtune=${MY_MTUNE} -DNDEBUG -D_WIN32_WINNT=0x0501 -I${LIBS_DIR}/include" LDFLAGS="-L${LIBS_DIR}/lib" ./configure --prefix="${LIBS_DIR}" --disable-shared --disable-valgrind-tests --disable-obsolete -without-libintl-prefix
|
||||||
make && make install
|
make && make install
|
||||||
@ -242,9 +245,9 @@ popd
|
|||||||
# cURL
|
# cURL
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== cURL ====================\n\n"
|
printf "\n==================== cURL ====================\n\n"
|
||||||
readonly CURL_DIR="${BASE_DIR}/curl-${MY_CPU}"
|
readonly CURL_DIR="${WORK_DIR}/curl"
|
||||||
rm -rf "${CURL_DIR}" && mkdir "${CURL_DIR}"
|
rm -rf "${CURL_DIR}" && mkdir "${CURL_DIR}"
|
||||||
tar -xvf "${LIBS_DIR}/.pkg/curl.tar.gz" --strip-components=1 -C "${CURL_DIR}"
|
tar -xvf "${PKGS_DIR}/curl.tar.gz" --strip-components=1 -C "${CURL_DIR}"
|
||||||
pushd "${CURL_DIR}"
|
pushd "${CURL_DIR}"
|
||||||
sed -i -E 's/\bmain[[:space:]]*\(([^\(\)]*)\)/wmain(\1)/g' configure
|
sed -i -E 's/\bmain[[:space:]]*\(([^\(\)]*)\)/wmain(\1)/g' configure
|
||||||
patch -p1 -b < "${BASE_DIR}/patch/curl_getenv.diff"
|
patch -p1 -b < "${BASE_DIR}/patch/curl_getenv.diff"
|
||||||
@ -261,12 +264,12 @@ popd
|
|||||||
# Output
|
# Output
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
printf "\n==================== Output ====================\n\n"
|
printf "\n==================== Output ====================\n\n"
|
||||||
readonly OUT_DIR="${BASE_DIR}/.bin/${MY_CPU}"
|
readonly OUT_DIR="${WORK_DIR}/_bin"
|
||||||
rm -rf "${OUT_DIR}" && mkdir -p "${OUT_DIR}"
|
rm -rf "${OUT_DIR}" && mkdir -p "${OUT_DIR}"
|
||||||
pushd "${OUT_DIR}"
|
pushd "${OUT_DIR}"
|
||||||
cp -vf "${CURL_DIR}/src/curl.exe" curl.exe
|
cp -vf "${CURL_DIR}/src/curl.exe" curl.exe
|
||||||
cp -vf "${LIBS_DIR}/.pkg/cacert.pem" curl-ca-bundle.crt
|
cp -vf "${PKGS_DIR}/cacert.pem" curl-ca-bundle.crt
|
||||||
cp -vf "${LIBS_DIR}/.pkg/manpage.html" manpage.html
|
cp -vf "${PKGS_DIR}/manpage.html" manpage.html
|
||||||
sed -n "/Configured to build curl\/libcurl:$/,/^[[:space:]]*Features:/p" "${CURL_DIR}/config.log" | sed -r "s/configure:[[:digit:]]+://" | sed -r "s/^[[:blank:]]*//" | unix2dos > config.log
|
sed -n "/Configured to build curl\/libcurl:$/,/^[[:space:]]*Features:/p" "${CURL_DIR}/config.log" | sed -r "s/configure:[[:digit:]]+://" | sed -r "s/^[[:blank:]]*//" | unix2dos > config.log
|
||||||
mkdir -p "${OUT_DIR}/legal"
|
mkdir -p "${OUT_DIR}/legal"
|
||||||
unix2dos -n "${BROT_DIR}/LICENSE" legal/brotli.LICENSE.txt
|
unix2dos -n "${BROT_DIR}/LICENSE" legal/brotli.LICENSE.txt
|
||||||
@ -306,7 +309,7 @@ unix2dos -n "${ZSTD_DIR}/README.md" legal/zstandard.README.md
|
|||||||
mkdir -p "${OUT_DIR}/patch"
|
mkdir -p "${OUT_DIR}/patch"
|
||||||
cp -vf "${BASE_DIR}/patch/"*.diff "${OUT_DIR}/patch"
|
cp -vf "${BASE_DIR}/patch/"*.diff "${OUT_DIR}/patch"
|
||||||
find "${OUT_DIR}" -type f -exec chmod 444 "{}" \;
|
find "${OUT_DIR}" -type f -exec chmod 444 "{}" \;
|
||||||
readonly zfile="${BASE_DIR}/curl-${MY_VERSION}-windows-${MY_CPU}.$(date +"%Y-%m-%d").zip"
|
readonly zfile="${BASE_DIR}/build/curl-${MY_VERSION}-windows-${MY_CPU}.$(date +"%Y-%m-%d").zip"
|
||||||
rm -rf "${zfile}" && zip -v -r -9 "${zfile}" "."
|
rm -rf "${zfile}" && zip -v -r -9 "${zfile}" "."
|
||||||
chmod 444 "${zfile}"
|
chmod 444 "${zfile}"
|
||||||
popd
|
popd
|
||||||
|
1
build/.gitkeep
Normal file
1
build/.gitkeep
Normal file
@ -0,0 +1 @@
|
|||||||
|
keep directory!
|
8
make.cmd
8
make.cmd
@ -3,10 +3,10 @@ cd /d "%~dp0"
|
|||||||
|
|
||||||
set "MSYS2_DIR=C:\msys64"
|
set "MSYS2_DIR=C:\msys64"
|
||||||
|
|
||||||
echo "%MSYS2_DIR%\msys2_shell.cmd" -mingw32 -where "%~dp0" -c "./build.sh 2>&1 | tee logfile_x86.txt"
|
echo "%MSYS2_DIR%\msys2_shell.cmd" -mingw32 -where "%~dp0" -c "./build.sh 2>&1 | tee build/logfile-x86.txt"
|
||||||
call "%MSYS2_DIR%\msys2_shell.cmd" -mingw32 -where "%~dp0" -c "./build.sh 2>&1 | tee logfile_x86.txt"
|
call "%MSYS2_DIR%\msys2_shell.cmd" -mingw32 -where "%~dp0" -c "./build.sh 2>&1 | tee build/logfile-x86.txt"
|
||||||
|
|
||||||
TIMEOUT /T 30 /NOBREAK > NUL
|
TIMEOUT /T 30 /NOBREAK > NUL
|
||||||
|
|
||||||
echo "%MSYS2_DIR%\msys2_shell.cmd" -mingw64 -where "%~dp0" -c "./build.sh 2>&1 | tee logfile_x64.txt"
|
echo "%MSYS2_DIR%\msys2_shell.cmd" -mingw64 -where "%~dp0" -c "./build.sh 2>&1 | tee build/logfile-x64.txt"
|
||||||
call "%MSYS2_DIR%\msys2_shell.cmd" -mingw64 -where "%~dp0" -c "./build.sh 2>&1 | tee logfile_x64.txt"
|
call "%MSYS2_DIR%\msys2_shell.cmd" -mingw64 -where "%~dp0" -c "./build.sh 2>&1 | tee build/logfile-x64.txt"
|
||||||
|
Loading…
Reference in New Issue
Block a user