builder: mingw/msys2 updates.

- Update to new version of icu and patches.

- Update to newer meson based glib.

- Support meson-installed dists.

- On msys2 use the distro ninja to build ninja, because there is some
  kind of issue with building on windows now.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2019-11-26 14:31:20 +00:00
parent ae7349b06f
commit d458e75ca6
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
5 changed files with 24 additions and 15 deletions

View File

@ -128,7 +128,7 @@ DISTS=$DISTS'
flex https://github.com/westes/flex/archive/e7d45afc6aeb49745f17d21ddba4848e0c0118fc.tar.gz bin/flex flex https://github.com/westes/flex/archive/e7d45afc6aeb49745f17d21ddba4848e0c0118fc.tar.gz bin/flex
xmlto https://releases.pagure.org/xmlto/xmlto-0.0.28.tar.bz2 bin/xmlto xmlto https://releases.pagure.org/xmlto/xmlto-0.0.28.tar.bz2 bin/xmlto
gperf http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz bin/gperf gperf http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz bin/gperf
libicu https://github.com/unicode-org/icu/releases/download/release-63-rc/icu4c-63rc-src.tgz lib/libicud*t*.a libicu https://github.com/unicode-org/icu/releases/download/release-65-1/icu4c-65_1-src.tgz lib/libicud*t*.a
pkgconfig https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz bin/pkg-config pkgconfig https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz bin/pkg-config
nasm http://repo.or.cz/nasm.git/snapshot/53371ddd17b685f8880c22b8b698e494e0f1059b.tar.gz bin/nasm nasm http://repo.or.cz/nasm.git/snapshot/53371ddd17b685f8880c22b8b698e494e0f1059b.tar.gz bin/nasm
yasm http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz bin/yasm yasm http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz bin/yasm
@ -172,7 +172,7 @@ DISTS=$DISTS'
intltool https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz bin/intltoolize intltool https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz bin/intltoolize
ninja https://github.com/ninja-build/ninja/archive/v1.9.0.tar.gz bin/ninja ninja https://github.com/ninja-build/ninja/archive/v1.9.0.tar.gz bin/ninja
meson https://github.com/mesonbuild/meson/releases/download/0.51.2/meson-0.51.2.tar.gz bin/meson meson https://github.com/mesonbuild/meson/releases/download/0.51.2/meson-0.51.2.tar.gz bin/meson
glib https://github.com/GNOME/glib/archive/2.58.1.tar.gz lib/libglib-2.0.a glib https://github.com/GNOME/glib/archive/2.62.2.tar.gz lib/libglib-2.0.a
libgpg-error https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.36.tar.bz2 lib/libgpg-error.a libgpg-error https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.36.tar.bz2 lib/libgpg-error.a
libgcrypt https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.8.5.tar.bz2 lib/libgcrypt.a libgcrypt https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.8.5.tar.bz2 lib/libgcrypt.a
libsecret http://ftp.gnome.org/pub/gnome/sources/libsecret/0.19/libsecret-0.19.1.tar.xz lib/libsecret-1.a libsecret http://ftp.gnome.org/pub/gnome/sources/libsecret/0.19/libsecret-0.19.1.tar.xz lib/libsecret-1.a
@ -266,7 +266,6 @@ DIST_CONFIGURE_TYPES="$DIST_CONFIGURE_TYPES
python2 autoreconf python2 autoreconf
python3 autoreconf python3 autoreconf
libxml2-python python libxml2-python python
glib autoreconf
graphviz autoreconf graphviz autoreconf
docbook2x autoreconf docbook2x autoreconf
libvorbis autoreconf libvorbis autoreconf
@ -374,7 +373,6 @@ DIST_ARGS="$DIST_ARGS
graphviz --disable-ltdl --without-x --disable-swig CFLAGS=\"-include \$PWD/declspec.h \$CFLAGS\" graphviz --disable-ltdl --without-x --disable-swig CFLAGS=\"-include \$PWD/declspec.h \$CFLAGS\"
python2 --with-ensurepip --with-system-expat python2 --with-ensurepip --with-system-expat
python3 --with-ensurepip --with-system-expat python3 --with-ensurepip --with-system-expat
glib --with-libiconv=gnu
bakefile --enable-shared bakefile --enable-shared
XML-Parser EXPATINCPATH=\"\$BUILD_ROOT/root/include\" EXPATLIBPATH=\"\$BUILD_ROOT/root/lib\" XML-Parser EXPATINCPATH=\"\$BUILD_ROOT/root/include\" EXPATLIBPATH=\"\$BUILD_ROOT/root/lib\"
doxygen -DICONV_ACCEPTS_NONCONST_INPUT:BOOL=FALSE -DICONV_ACCEPTS_CONST_INPUT:BOOL=TRUE doxygen -DICONV_ACCEPTS_NONCONST_INPUT:BOOL=FALSE -DICONV_ACCEPTS_CONST_INPUT:BOOL=TRUE
@ -695,7 +693,7 @@ msys2_install_core_deps() {
done done
# install # install
pacman --noconfirm --needed -S make tar patch diffutils ccache perl msys2-w32api-headers msys2-runtime-devel gcc gcc-libs mpfr windows-default-manifest python python2 pass "$@" pacman --noconfirm --needed -S make tar patch diffutils ccache perl msys2-w32api-headers msys2-runtime-devel gcc gcc-libs mpfr windows-default-manifest python python2 pass ninja "$@"
# make sure msys perl takes precedence over mingw perl if the latter is installed # make sure msys perl takes precedence over mingw perl if the latter is installed
mkdir -p "$BUILD_ROOT/root/bin" mkdir -p "$BUILD_ROOT/root/bin"
@ -1679,12 +1677,21 @@ install_dist() {
# if there is an extra prefix, like e.g. 'msys64' on msys2 before 'usr/', # if there is an extra prefix, like e.g. 'msys64' on msys2 before 'usr/',
# remove it # remove it
if ([ "$(list_length destdir/*)" -eq 1 ] && [ ! -d destdir${prefix} ]) || \ if ([ "$(list_length destdir/*)" -eq 1 ] && [ ! -d "destdir${prefix}" ]) || \
([ "$(list_length destdir/*)" -eq 2 ] && [ "$(find destdir${prefix} -type f 2>/dev/null | wc -l)" -eq 0 ]); then ([ "$(list_length destdir/*)" -eq 2 ] && [ "$(find destdir${prefix} -type f 2>/dev/null | wc -l)" -eq 0 ]); then
mv destdir/${prefix}/* tmp-usr mv "destdir/${prefix}"/* tmp-usr
rm -rf destdir/* rm -rf destdir/*
mkdir -p destdir${prefix%/*} mkdir -p "destdir${prefix%/*}"
mv tmp-usr destdir${prefix} mv tmp-usr "destdir${prefix}"
fi
# if there is no prefix in the destdir, create it
if [ ! -d "destdir${prefix}" ]; then
find destdir -maxdepth 1 -mindepth 1 | \
while read -r installed; do
mkdir -p "destdir${prefix}"
mv "$installed" "destdir${prefix}"
done
fi fi
# move libs out of platforms dirs like lib/x86_64-linux-gnu/ and lib64/ # move libs out of platforms dirs like lib/x86_64-linux-gnu/ and lib64/

View File

@ -13,7 +13,7 @@ export CFLAGS="$CFLAGS${CFLAGS:+ }-static-libgcc -static-libstdc++ -static -lpth
export CXXFLAGS="$CXXFLAGS${CXXFLAGS:+ }-static-libgcc -static-libstdc++ -static -lpthread -DMINGW_HAS_SECURE_API -lm" export CXXFLAGS="$CXXFLAGS${CXXFLAGS:+ }-static-libgcc -static-libstdc++ -static -lpthread -DMINGW_HAS_SECURE_API -lm"
export OBJCXXFLAGS="$OBJCXXFLAGS${OBJCXXFLAGS:+ }-static-libgcc -static-libstdc++ -static -lpthread -DMINGW_HAS_SECURE_API -lm" export OBJCXXFLAGS="$OBJCXXFLAGS${OBJCXXFLAGS:+ }-static-libgcc -static-libstdc++ -static -lpthread -DMINGW_HAS_SECURE_API -lm"
export LDFLAGS="$LDFLAGS${LDFLAGS:+ }-static-libgcc -static-libstdc++ -static -lpthread -DMINGW_HAS_SECURE_API -lm" export LDFLAGS="$LDFLAGS${LDFLAGS:+ }-static-libgcc -static-libstdc++ -static -lpthread -DMINGW_HAS_SECURE_API -lm"
export LIBS="-lpthread -lm" export LIBS="-lpthread -lm -lole32"
export UUID_LIBS="-luuid_mingw -luuid" export UUID_LIBS="-luuid_mingw -luuid"
@ -282,13 +282,14 @@ table_line_append DIST_PATCHES $libicu " \
https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0007-actually-move-to-bin.mingw.patch \ https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0007-actually-move-to-bin.mingw.patch \
https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0008-data-install-dir.mingw.patch \ https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0008-data-install-dir.mingw.patch \
https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0009-fix-bindir-in-config.mingw.patch \ https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0009-fix-bindir-in-config.mingw.patch \
https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0010-msys-rules-for-makefiles.mingw.patch \
https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0011-sbin-dir.mingw.patch \ https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0011-sbin-dir.mingw.patch \
https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0012-libprefix.mingw.patch \ https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0012-libprefix.mingw.patch \
https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0014-mingwize-pkgdata.mingw.patch \
https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0015-debug.mingw.patch \ https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0015-debug.mingw.patch \
https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0016-icu-pkgconfig.patch \ https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0016-icu-pkgconfig.patch \
https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0017-icu-config-versioning.patch \ https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0017-icu-config-versioning.patch \
https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0021-mingw-static-libraries-without-s.patch \ https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0021-mingw-static-libraries-without-s.patch \
https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0023-fix-twice-include-platform_make_fragment.patch \
" "
table_line_append DIST_PRE_BUILD $libicu ":; sed -E -i.bak 's/@echo -n /@printf \"%s\" /g' config/mh-mingw*;" table_line_append DIST_PRE_BUILD $libicu ":; sed -E -i.bak 's/@echo -n /@printf \"%s\" /g' config/mh-mingw*;"
@ -346,7 +347,7 @@ table_line_append DIST_CONFIGURE_OVERRIDES ffmpeg "--extra-ldflags='-Wl,-allow-m
table_line_append DIST_ARGS gettext "--enable-threads=windows" table_line_append DIST_ARGS gettext "--enable-threads=windows"
table_line_append DIST_ARGS glib "--with-threads=posix --disable-libelf" table_line_append DIST_ARGS glib -Dforce_posix_threads=true
table_line_append DIST_PATCHES glib "\ table_line_append DIST_PATCHES glib "\
https://raw.githubusercontent.com/msys2/MINGW-packages/master/mingw-w64-glib2/0001-Update-g_fopen-g_open-and-g_creat-to-open-with-FILE_.patch \ https://raw.githubusercontent.com/msys2/MINGW-packages/master/mingw-w64-glib2/0001-Update-g_fopen-g_open-and-g_creat-to-open-with-FILE_.patch \

View File

@ -85,7 +85,6 @@ table_line_append DIST_PATCHES m4 '-p0 https://raw.githubusercontent.com/macport
# these are only applicable for cross-compiling to 32 bits # these are only applicable for cross-compiling to 32 bits
if [ "$target_cpu" = i386 ]; then if [ "$target_cpu" = i386 ]; then
# some dists will not cross compile without a CONFIG_SITE # some dists will not cross compile without a CONFIG_SITE
table_line_append DIST_ARGS glib '--host= --build='
table_line_append DIST_ARGS pkgconfig '--host= --build=' table_line_append DIST_ARGS pkgconfig '--host= --build='
table_line_append DIST_ARGS docbook2x '--host= --build=' table_line_append DIST_ARGS docbook2x '--host= --build='

View File

@ -6,6 +6,6 @@ export BUILD_ROOT="$HOME/vbam-build-unix"
. "$(dirname "$0")/../builder/core.sh" . "$(dirname "$0")/../builder/core.sh"
table_line_append DIST_ARGS glib '--disable-libmount' table_line_append DIST_ARGS glib -Dlibmount=false
builder "$@" builder "$@"

View File

@ -140,6 +140,8 @@ EOF
target_env_base 2>/dev/null || : target_env_base 2>/dev/null || :
} }
table_line_replace DIST_BUILD_OVERRIDES ninja "python configure.py && ninja -j $NUM_CPUS && cp -af ./ninja \"\$BUILD_ROOT/root/bin\""
table_line_append DIST_PRE_BUILD c2man ":; \ table_line_append DIST_PRE_BUILD c2man ":; \
sed -i.bak '/test -d c:\\//,/^fi\$/d' Configure; \ sed -i.bak '/test -d c:\\//,/^fi\$/d' Configure; \
" "