Skip to content

Commit 63ea128

Browse files
committed
build: skip utf8 patches since 1.23.4
#12
1 parent a6231d1 commit 63ea128

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ nginx build scripts on msys2 mingw with dependencies and custom patches
99
## Features
1010

1111
* native x86-64 (x64, amd64) build for windows.
12-
* nginx can execute in directory or path containing non-ascii characters.
13-
* read file names in directory as utf8 encoding (affecting autoindex module).
12+
* nginx can execute in directory or path containing non-ascii characters. (Not needed since [1.23.4](https://github.com/nginx/nginx/commits/release-1.23.4/src/os/win32))
13+
* read file names in directory as utf8 encoding (affecting autoindex module). (Not needed since [1.23.4](https://github.com/nginx/nginx/commits/release-1.23.4/src/os/win32))
1414

1515
## [Releases](https://github.com/myfreeer/nginx-build-msys2/releases)
1616

nginx-build-msys2.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ fi
2929

3030
# dep versions
3131
ZLIB="$(curl -s 'https://zlib.net/' | grep -ioP 'zlib-(\d+\.)+\d+' | sort -ruV | head -1)"
32-
ZLIB="${ZLIB:-zlib-1.2.11}"
32+
ZLIB="${ZLIB:-zlib-1.2.13}"
3333
echo "${ZLIB}"
3434
PCRE="$(curl -s 'https://sourceforge.net/projects/pcre/rss?path=/pcre/' | grep -ioP 'pcre-(\d+\.)+\d+' |sort -ruV | head -1)"
3535
PCRE="${PCRE:-pcre-8.45}"
3636
echo "${PCRE}"
3737
PCRE2="$(curl -s 'https://api.github.com/repos/PhilipHazel/pcre2/releases/latest' | grep -ioP 'pcre2-(\d+\.)+\d+' |sort -ruV | head -1)"
38-
PCRE2="${PCRE2:-pcre2-10.39}"
38+
PCRE2="${PCRE2:-pcre2-10.42}"
3939
echo "${PCRE2}"
4040
OPENSSL="$(curl -s 'https://www.openssl.org/source/' | grep -ioP 'openssl-1\.(\d+\.)+[a-z\d]+' | sort -ruV | head -1)"
41-
OPENSSL="${OPENSSL:-openssl-1.1.1m}"
41+
OPENSSL="${OPENSSL:-openssl-1.1.1t}"
4242
echo "${OPENSSL}"
4343

4444
# clone and patch nginx
@@ -65,8 +65,21 @@ else
6565
fi
6666

6767
git checkout -b patch
68+
69+
# Since 1.23.4 utf16 encoded pathes are supported natively upstream
70+
# detect function ngx_utf16_to_utf8 introduced since nginx 1.23.4
71+
if [ "$(grep 'ngx_utf16_to_utf8' src/os/win32/ngx_files.c | wc -l)" -ge 2 ]; then
72+
rm -f ../nginx-0003-ngx_files-implement-some-functions-in-utf8-encoding.patch
73+
rm -f ../nginx-0004-ngx_files-implement-ngx_open_tempfile-in-utf8-encodi.patch
74+
rm -f ../nginx-0005-ngx_files-implement-ngx_open_glob-and-ngx_read_glob-.patch
75+
rm -f ../nginx-0006-ngx_files-implement-ngx_win32_rename_file-in-utf8-en.patch
76+
fi
77+
78+
# apply remaining patches
6879
git am -3 ../nginx-*.patch
6980

81+
set -e
82+
7083
# download deps
7184
wget -c -nv "https://zlib.net/${ZLIB}.tar.xz" || \
7285
wget -c -nv "http://prdownloads.sourceforge.net/libpng/${ZLIB}.tar.xz"

0 commit comments

Comments
 (0)