builder: fix regressions from 37869441..a3ec309b

Refactor the build environment evaluation, make build variables set
immediately so that they don't grow longer on re-evaluations and defer
all other variables. Export as many build related variables as possible.

Make one more crucial fix for cross builds: run the post_build after
LDFLAGS and LIBS are restored, so that this does not interfere with
setting and restoring the build environment for host builds.

Other changes:

- fontconfig 2.13.0 -> 2.13.1

- openal     1.19.0 -> 1.19.1

- set fontconfig configure type to autoreconf, disable tests

- disable the openssl parallel build patch, it fails unpredictably,
  always build openssl with -j1

- configure libicu with --disable-tests and a few other things disabled,
  the tests cause link issues on mingw i686

- also make a minor fix to libicu makefiles for mingw (replace echo -n
  with printf)

- move $BUILD_ENV evaluation to the builder() main function to defer
  some variable initializations

- add patch for openal to mingw-cross to use gcc instead of cmake to
  build some native tools it uses, cmake causes issues with cross builds

- in host_env()/target_env() defer variable expansion and include a copy
  of $BUILD_ENV in the appropriate sequence
This commit is contained in:
Rafael Kitover 2018-11-15 01:54:19 -08:00
parent a3ec309bd6
commit b9911a5759
10 changed files with 164 additions and 175 deletions

View File

@ -4,16 +4,16 @@ set -e
[ -n "$BASH_VERSION" ] && set -o posix
BUILD_ROOT=${BUILD_ROOT:-$HOME/vbam-build}
TAR=${TAR:-tar --force-local}
CURL=${CURL:-curl --insecure}
PERL_MAKE=${PERL_MAKE:-make}
export BUILD_ROOT="${BUILD_ROOT:-$HOME/vbam-build}"
export TAR="${TAR:-tar --force-local}"
export CURL="${CURL:-curl --insecure}"
export PERL_MAKE="${PERL_MAKE:-make}"
[ -n "$BUILD_ENV" ] && eval "$BUILD_ENV"
BUILD_ENV=$BUILD_ENV$(cat <<EOF
export BUILD_ROOT="$BUILD_ROOT"
export BUILD_ROOT="\$BUILD_ROOT"
export CC="\${CC:-gcc}"
export CXX="\${CXX:-g++}"
@ -32,23 +32,18 @@ case "\$CC" in
REQUIRED_CMAKE_ARGS="\$REQUIRED_CMAKE_ARGS -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=\$CC -DCMAKE_CXX_COMPILER=\$CXX"
;;
esac
export CC_ORIG=\$CC
export CXX_ORIG=\$CXX
export CC="ccache \$CC"
export CXX="ccache \$CXX"
fi
;;
esac
export CC_ORIG="\${CC_ORIG:-\$CC}"
export CXX_ORIG="\${CXX_ORIG:-\$CXX}"
export CPPFLAGS="$CPPFLAGS${CPPFLAGS:+ }-I$BUILD_ROOT/root/include"
export CFLAGS="$CFLAGS${CFLAGS:+ }-fPIC -I$BUILD_ROOT/root/include -L$BUILD_ROOT/root/lib -pthread -lm"
export CXXFLAGS="$CXXFLAGS${CXXFLAGS:+ }-fPIC -I$BUILD_ROOT/root/include -L$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -pthread -lm"
export OBJCXXFLAGS="$OBJCXXFLAGS${OBJCXXFLAGS:+ }-fPIC -I$BUILD_ROOT/root/include -L$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -pthread -lm"
export LDFLAGS="$LDFLAGS${LDFLAGS:+ }-fPIC -L$BUILD_ROOT/root/lib -pthread -lm"
export STRIP="${STRIP:-strip}"
export CPPFLAGS="$CPPFLAGS${CPPFLAGS:+ }-I\$BUILD_ROOT/root/include"
export CFLAGS="$CFLAGS${CFLAGS:+ }-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -pthread -lm"
export CXXFLAGS="$CXXFLAGS${CXXFLAGS:+ }-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -pthread -lm"
export OBJCXXFLAGS="$OBJCXXFLAGS${OBJCXXFLAGS:+ }-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -pthread -lm"
export LDFLAGS="$LDFLAGS${LDFLAGS:+ }-fPIC -L\$BUILD_ROOT/root/lib -pthread -lm"
export STRIP="\${STRIP:-strip}"
if [ -z "\$OPENMP" ] && echo "\$CC" | grep -Eq gcc; then
export CFLAGS="\$CFLAGS -fopenmp"
@ -58,55 +53,49 @@ if [ -z "\$OPENMP" ] && echo "\$CC" | grep -Eq gcc; then
export OPENMP=1
fi
export CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:-$BUILD_ROOT/root}"
export PKG_CONFIG_PATH="$BUILD_ROOT/root/lib/pkgconfig:$BUILD_ROOT/root/share/pkgconfig"
export CMAKE_PREFIX_PATH="\${CMAKE_PREFIX_PATH:-\$BUILD_ROOT/root}"
export PKG_CONFIG_PATH="\$BUILD_ROOT/root/lib/pkgconfig:\$BUILD_ROOT/root/share/pkgconfig"
export LD_LIBRARY_PATH="$BUILD_ROOT/root/lib"
export LD_LIBRARY_PATH="\$BUILD_ROOT/root/lib"
export PERL_MM_USE_DEFAULT=1
export PERL_EXTUTILS_AUTOINSTALL="--defaultdeps"
export OPENSSL_ROOT="$BUILD_ROOT/root"
export OPENSSL_ROOT="\$BUILD_ROOT/root"
export PERL_MB_OPT='--install_base $BUILD_ROOT/root/perl5'
export PERL_MM_OPT='INSTALL_BASE=$BUILD_ROOT/root/perl5'
export PERL5LIB="$BUILD_ROOT/root/perl5/lib/perl5"
export PERL_LOCAL_LIB_ROOT="$BUILD_ROOT/root/perl5"
export PERL_MB_OPT="--install_base \$BUILD_ROOT/root/perl5"
export PERL_MM_OPT="INSTALL_BASE=\"\$BUILD_ROOT/root/perl5\" CCFLAGS=\"\$CFLAGS\" LDDFLAGS=\"\$LDFLAGS\""
export PERL5LIB="\$BUILD_ROOT/root/perl5/lib/perl5"
export PERL_LOCAL_LIB_ROOT="\$BUILD_ROOT/root/perl5"
case "\$PATH" in
*"$BUILD_ROOT"*)
*"\$BUILD_ROOT"*)
;;
*)
export PATH="$BUILD_ROOT/root/bin:$BUILD_ROOT/root/perl5/bin:\$PATH"
export PATH="\$BUILD_ROOT/root/bin:\$BUILD_ROOT/root/perl5/bin:\$PATH"
;;
esac
export PERL_MM_OPT="\$PERL_MM_OPT CCFLAGS='\$CFLAGS' LDDFLAGS='\$LDFLAGS'"
export MANPATH="\$BUILD_ROOT/root/man:\$BUILD_ROOT/root/share/man:/usr/share/man:/usr/local/share/man"
export MANPATH="$BUILD_ROOT/root/man:$BUILD_ROOT/root/share/man:/usr/share/man:/usr/local/share/man"
export XML_CATALOG_FILES="\$(cygpath -m "\$BUILD_ROOT/root/etc/xml/catalog.xml" 2>/dev/null)"
export XML_CATALOG_FILES="$BUILD_ROOT/root/etc/xml/catalog.xml"
export FORMAT_DIR="\$BUILD_ROOT/root/share/xmlto/format"
export FORMAT_DIR="$BUILD_ROOT/root/share/xmlto/format"
export XDG_DATA_DIRS="\$BUILD_ROOT/root/share"
export XDG_DATA_DIRS="$BUILD_ROOT/root/share"
export FONTCONFIG_PATH="\$BUILD_ROOT/root/etc/fonts"
export FONTCONFIG_PATH="$BUILD_ROOT/root/etc/fonts"
export BISON_PKGDATADIR="\$BUILD_ROOT/root/share/bison"
export BISON_PKGDATADIR="$BUILD_ROOT/root/share/bison"
export SWIG_LIB="\$(echo \$BUILD_ROOT/root/share/swig/*)"
if command -v cygpath >/dev/null; then
export XML_CATALOG_FILES=\$(cygpath -m "\$XML_CATALOG_FILES")
fi
export SWIG_LIB="\$(echo \$BUILD_ROOT/root/share/swig/* 2>/dev/null)"
EOF
)
ORIG_PATH=$PATH
export BUILD_ENV
eval "$BUILD_ENV"
ORIG_PATH=$PATH
PRE_BUILD_DISTS="$PRE_BUILD_DISTS bzip2 xz unzip"
@ -156,7 +145,7 @@ DISTS=$DISTS'
# libcroco http://ftp.gnome.org/pub/gnome/sources/libcroco/0.6/libcroco-0.6.12.tar.xz lib/libcroco-0.6.a
libuuid https://downloads.sourceforge.net/project/libuuid/libuuid-1.0.3.tar.gz lib/libuuid.a
freetype http://download.savannah.gnu.org/releases/freetype/freetype-2.9.1.tar.bz2 lib/libfreetype.a
fontconfig https://freedesktop.org/software/fontconfig/release/fontconfig-2.13.0.tar.bz2 lib/libfontconfig.a
fontconfig https://freedesktop.org/software/fontconfig/release/fontconfig-2.13.1.tar.bz2 lib/libfontconfig.a
libgd https://github.com/libgd/libgd/releases/download/gd-2.2.5/libgd-2.2.5.tar.xz lib/libgd.a
dejavu https://downloads.sourceforge.net/project/dejavu/dejavu/2.37/dejavu-fonts-ttf-2.37.tar.bz2 share/fonts/dejavu/DejaVuSansMono.ttf
liberation https://releases.pagure.org/liberation-fonts/liberation-fonts-ttf-2.00.1.tar.gz share/fonts/liberation/LiberationMono-Regular.ttf
@ -231,22 +220,21 @@ FFMPEG_DISTS='
: ${PATH_SEP:=':'}
# these two can be set to always be included regardless of overrides
REQUIRED_CONFIGURE_ARGS="$REQUIRED_CONFIGURE_ARGS"
REQUIRED_CMAKE_ARGS="$REQUIRED_CMAKE_ARGS"
export REQUIRED_CONFIGURE_ARGS="$REQUIRED_CONFIGURE_ARGS"
export REQUIRED_CMAKE_ARGS="$REQUIRED_CMAKE_ARGS"
CONFIGURE_ARGS="$CONFIGURE_ARGS --disable-shared --enable-static --prefix=/usr"
export CONFIGURE_ARGS="$CONFIGURE_ARGS --disable-shared --enable-static --prefix=/usr"
CMAKE_BASE_ARGS="$CMAKE_BASE_ARGS -DBUILD_SHARED_LIBS=NO -DENABLE_SHARED=NO -DCMAKE_PREFIX_PATH:FILEPATH=\"\$CMAKE_PREFIX_PATH\" -DCMAKE_BUILD_TYPE=Release"
export CMAKE_BASE_ARGS="$CMAKE_BASE_ARGS -DBUILD_SHARED_LIBS=NO -DENABLE_SHARED=NO -DCMAKE_PREFIX_PATH:FILEPATH=\"\$CMAKE_PREFIX_PATH\" -DCMAKE_BUILD_TYPE=Release"
CMAKE_ARGS="$CMAKE_BASE_ARGS $CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=/usr"
export CMAKE_ARGS="$CMAKE_BASE_ARGS $CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=/usr"
MESON_ARGS="--prefix /usr --buildtype release --default-library static -Dintrospection=false"
export MESON_ARGS="--prefix /usr --buildtype release --default-library static -Dintrospection=false"
DIST_PATCHES=$DIST_PATCHES'
docbook2x https://gist.githubusercontent.com/rkitover/0b5dcc95a0703a9b0e0e7eb6d325a98e/raw/e256d2fad8d19633ac8abe02a0d1e119063d1fd9/docbook2x.patch
ccache https://gist.githubusercontent.com/rkitover/4dd30c2841a2131be8715038f538d622/raw/40a8f0f50aa6ca5f9658a0c37aa17393cc80c109/ccache-3.4.2-msys.patch
graphite2 https://gist.githubusercontent.com/rkitover/418600634d7cf19e2bf1c3708b50c042/raw/839b72d9cda545f2e3b640d743c1bd44b89861b9/graphite2-1.3.10-static.patch
fontconfig https://gist.githubusercontent.com/rkitover/542405b4509bd23daa76c98b15a94627/raw/b1ffcfe67c8da22452858216eac4b86afeb93eae/fontconfig-gperf.patch
python2 https://gist.githubusercontent.com/rkitover/2d9e5baff1f1cc4f2618dee53083bd35/raw/7f33fcf5470a9f1013ac6ae7bb168368a98fe5a0/python-2.7.14-custom-static-openssl.patch https://gist.githubusercontent.com/rkitover/afab7ed3ac7ce1860c43a258571c8ae1/raw/6f5fc90a7acf5f5c3ffda2edf402b28f469a4b3b/python-2.7.14-static-libintl.patch
python3 https://gist.githubusercontent.com/rkitover/93d89a679705875c59275fb0a8f22b45/raw/6149e7fa3920d6c674c79448c5a4c9313620e06c/python-3.6.3-custom-static-openssl.patch https://gist.githubusercontent.com/rkitover/b18f19eafda3775a9652cc9cdf3ec914/raw/ed14c34bf9f205ccc3a4684dbdb83f8620162b98/python-3.6.3-static-libintl.patch
intltool https://gist.githubusercontent.com/rkitover/d638882f52e5d5f8e392cbf6842cd6d0/raw/dcfbe358bbb8b89f88b40a9c3402494552fd33f8/intltool-0.51.0.patch
@ -258,6 +246,7 @@ DIST_TAR_ARGS="$DIST_TAR_ARGS
DIST_CONFIGURE_TYPES="$DIST_CONFIGURE_TYPES
unzip make
zip make
fontconfig autoreconf
libgd autoreconf
harfbuzz autoconf
python2 autoreconf
@ -278,6 +267,7 @@ DIST_PRE_BUILD="$DIST_PRE_BUILD
libicu cd source;
# flex-2.6.3 sed -i.bak '/^'\"\$TAB\"'tests \\\\\$/d' Makefile.am;
flex mkdir -p build-aux; touch build-aux/config.rpath; mkdir -p po; touch po/Makefile.in.in; sed -i.bak '/po \\\\$/d' Makefile.am;
fontconfig sed -i.bak 'd;q' test/Makefile.am;
python3 sed -i.bak '/-Wl,-stack_size,/d' configure.ac;
libxml2-python cd python; \
sed -i.bak \"s,^ROOT = .*,ROOT = os.getenv('BUILD_ROOT') + '/root',; s|^\\( *platformLibs = \\[ *[^]].*\\)\\] *\$|\\1, 'lzma', 'iconv', 'intl']|\" setup.py;
@ -309,22 +299,25 @@ DIST_PRE_BUILD="$DIST_PRE_BUILD
DIST_POST_BUILD="$DIST_POST_BUILD
harfbuzz rebuild_dist freetype --with-harfbuzz=yes;
flex-2.6.3 build_dist flex || :;
libtool ln -sf '$BUILD_ROOT/root/bin/libtoolize' '$BUILD_ROOT/root/bin/glibtoolize';
libtool ln -sf \"\$BUILD_ROOT/root/bin/libtoolize\" \"\$BUILD_ROOT/root/bin/glibtoolize\";
glib rebuild_dist gettext --without-included-glib --without-included-libxml;
graphviz (cd '$BUILD_ROOT/root/bin'; path_exists dot_static && ! path_exists dot && ln -sf '$BUILD_ROOT/root/bin/dot_static' ./dot || :);
libxml2 mkdir -p '$BUILD_ROOT/root/etc/xml'; \
xmlcatalog --noout --create \"\$(cygpath -m \"$BUILD_ROOT/root/etc/xml/catalog.xml\")\" || :;
graphviz (cd \"\$BUILD_ROOT/root/bin\"; path_exists dot_static && ! path_exists dot && ln -sf \"\$BUILD_ROOT/root/bin/dot_static\" ./dot || :);
libxml2 mkdir -p \"\$BUILD_ROOT/root/etc/xml\"; \
xmlcatalog --noout --create \"\$(cygpath -m \"\$BUILD_ROOT/root/etc/xml/catalog.xml\")\" || :;
python2 pip2 install six;
python3 pip3 install six;
fontconfig mkdir -p '$BUILD_ROOT/root/etc/fonts'; \
touch '$BUILD_ROOT/root/etc/fonts/fonts.conf'; \
sed -i.bak 's|/usr/share/fonts|$BUILD_ROOT/root/share/fonts|g' '$BUILD_ROOT/root/etc/fonts/fonts.conf';
fontconfig mkdir -p \"\$BUILD_ROOT/root/etc/fonts\"; \
touch \"\$BUILD_ROOT/root/etc/fonts/fonts.conf\"; \
sed -i.bak \"s|/usr/share/fonts|\$BUILD_ROOT/root/share/fonts|g\" \"\$BUILD_ROOT/root/etc/fonts/fonts.conf\";
"
DIST_POST_CONFIGURE="$DIST_POST_CONFIGURE
openssl sed -E -i.bak ' \
s/^(\\t+)([^\\t]+\\\$\\((BUILD_ONE_CMD|RECURSIVE_BUILD_CMD|RECURSIVE_MAKE)\\))/\1+ \2/ \
' \$(find . -name Makefile);
#
# I tried to use this to make openssl build in parallel, but it fails unpredictably.
#
#openssl sed -E -i.bak ' \
# s/^(\\t+)([^\\t]+\\\$\\((BUILD_ONE_CMD|RECURSIVE_BUILD_CMD|RECURSIVE_MAKE)\\))/\1+ \2/ \
#' \$(find . -name Makefile);
"
DIST_CONFIGURE_OVERRIDES="$DIST_CONFIGURE_OVERRIDES
@ -332,20 +325,20 @@ DIST_CONFIGURE_OVERRIDES="$DIST_CONFIGURE_OVERRIDES
cmake ./configure --prefix=/usr --no-qt-gui --parallel=\$NUM_CPUS --enable-ccache
zlib ./configure --static --prefix=/usr
XML-SAX echo no | PERL_MM_USE_DEFAULT=0 perl Makefile.PL
wxwidgets ./configure $REQUIRED_CONFIGURE_ARGS --disable-shared --prefix=/usr --enable-stl --disable-precomp-headers --enable-cxx11 --enable-permissive --with-opengl --with-libpng
wxwidgets ./configure \$REQUIRED_CONFIGURE_ARGS --disable-shared --prefix=/usr --enable-stl --disable-precomp-headers --enable-cxx11 --enable-permissive --with-opengl --with-libpng
"
DIST_BUILD_OVERRIDES="$DIST_BUILD_OVERRIDES
c2man ./Configure -de -Dprefix=/usr -Dmansrc=/usr/share/man/man1 -Dcc=\"\$CC\"; \
sed -i.bak 's|/[^ ][^ ]*/libfl\\.[^ ]*|-L$BUILD_ROOT/root/lib -lfl|' Makefile; \
sed -i.bak \"s|/[^ ][^ ]*/libfl[.][^ ]*|-L\$BUILD_ROOT/root/lib -lfl|\" Makefile; \
make -j\$NUM_CPUS; \
make install bin='$BUILD_ROOT/root/bin' mansrc='$BUILD_ROOT/root/share/man/man1' privlib='$BUILD_ROOT/root/lib/c2man'
make install bin=\"\$BUILD_ROOT/root/bin\" mansrc=\"\$BUILD_ROOT/root/share/man/man1\" privlib=\"\$BUILD_ROOT/root/lib/c2man\"
libxml2-python python setup.py build install && python3 setup.py build install
setuptools python bootstrap.py; python easy_install.py .
pip easy_install .
ninja python configure.py --bootstrap && cp -af ./ninja '$BUILD_ROOT/root/bin'
ninja python configure.py --bootstrap && cp -af ./ninja \"\$BUILD_ROOT/root/bin\"
docbook4.2 install_docbook_dist schema
docbook4.1.2 cp '$BUILD_ROOT/dists/docbook4.2/catalog.xml' . ; \
docbook4.1.2 cp \"\$BUILD_ROOT/dists/docbook4.2/catalog.xml\" . ; \
sed -i.bak 's/V4.2/V4.1.2/g; s/4.2/4.1.2/g;' catalog.xml; \
install_docbook_dist schema
docbook4.3 install_docbook_dist schema
@ -360,18 +353,19 @@ DIST_BUILD_OVERRIDES="$DIST_BUILD_OVERRIDES
"
DIST_ARGS="$DIST_ARGS
libicu --disable-extras --disable-tools --disable-tests --disable-samples
gettext --with-included-gettext --with-included-glib --with-included-libcroco --with-included-libunistring --with-included-libxml --disable-curses CPPFLAGS=\"\$CPPFLAGS -DLIBXML_STATIC\"
pkgconfig --with-internal-glib --with-libiconv=gnu
pcre --enable-utf8 --enable-pcre8 --enable-pcre16 --enable-pcre32 --enable-unicode-properties --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-jit
libxslt --without-python --without-crypto
libgd --without-xpm
fontconfig --with-baseconfigdir=/etc/fonts
graphviz --disable-ltdl --without-x CFLAGS=\"-include \$PWD/declspec.h $CFLAGS\"
fontconfig --with-baseconfigdir=/etc/fonts
graphviz --disable-ltdl --without-x CFLAGS=\"-include \$PWD/declspec.h \$CFLAGS\"
python2 --with-ensurepip --with-system-expat
python3 --with-ensurepip --with-system-expat
glib --with-libiconv=gnu
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
sfml -DSFML_USE_SYSTEM_DEPS=TRUE
libcroco --disable-Bsymbolic
@ -399,13 +393,13 @@ DIST_ARGS="$DIST_ARGS
"
DIST_BARE_MAKE_ARGS='CC="$CC"'
export DIST_BARE_MAKE_ARGS='CC="$CC"'
ALL_MAKE_ARGS='V=1 VERBOSE=1'
export ALL_MAKE_ARGS='V=1 VERBOSE=1'
# have to disable ccache for openssl
DIST_MAKE_ARGS="$DIST_MAKE_ARGS
openssl CC=\"\$CC\" CXX=\"\$CXX\" LDFLAGS=\"\$LDFLAGS\"
openssl CC=\"\$CC\" CXX=\"\$CXX\" LDFLAGS=\"\$LDFLAGS\" -j1
getopt LDFLAGS=\"\$LDFLAGS -lintl -liconv\" CFLAGS=\"\$CFLAGS\"
bzip2 libbz2.a bzip2 bzip2recover CFLAGS=\"\$CFLAGS\" LDFLAGS=\"\$LDFLAGS\"
unzip generic2
@ -441,6 +435,7 @@ TAB=' '
builder() {
eval "$BUILD_ENV"
setup
read_command_line "$@"
install_core_deps
@ -1609,11 +1604,11 @@ build_dist() {
fi
fi
dist_post_build "$current_dist"
export LDFLAGS="$ORIG_LDFLAGS"
export LIBS="$ORIG_LIBS"
dist_post_build "$current_dist"
done_msg
}

View File

@ -55,9 +55,11 @@ export LDFLAGS="-L/usr/${target_arch}/usr/lib${lib_suffix} $LDFLAGS"
EOF
)
REQUIRED_CONFIGURE_ARGS="--host=${target_arch}"
export BUILD_ENV
REQUIRED_CMAKE_ARGS="$REQUIRED_CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE='$(perl -MCwd=abs_path -le "print abs_path(q{${0%/*}/../../cmake/Toolchain-cross-MinGW-w64-${target_cpu}.cmake})")'"
export REQUIRED_CONFIGURE_ARGS="--host=${target_arch}"
export REQUIRED_CMAKE_ARGS="$REQUIRED_CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE='$(perl -MCwd=abs_path -le "print abs_path(q{${0%/*}/../../cmake/Toolchain-cross-MinGW-w64-${target_cpu}.cmake})")'"
. "${0%/*}/../builder/mingw.sh"
@ -68,7 +70,10 @@ table_line_replace DIST_CONFIGURE_OVERRIDES openssl-target "./Configure $openssl
table_line_append DIST_PRE_BUILD bzip2-target ':; sed -i.bak '\''s,include <sys\\stat.h>,include <sys/stat.h>,g'\'' *.c;'
table_line_append DIST_ARGS libicu-target "--with-cross-build=$BUILD_ROOT/dists/libicu/source"
table_line_append DIST_ARGS libicu-target "--with-cross-build=\$BUILD_ROOT/dists/libicu/source"
# the native tools openal uses for building can be problematic when cross-compiling
table_line_append DIST_PATCHES openal '-p0 https://gist.githubusercontent.com/rkitover/d371d199ee0ac67864d0940aa7e7c12c/raw/29f3bc4afaba41b35b3fcbd9d18d1f0a22e3dc13/openal-cross-no-cmake-for-native-tools.patch'
table_line_replace DIST_POST_BUILD harfbuzz "$(table_line DIST_POST_BUILD harfbuzz | sed 's/rebuild_dist freetype /rebuild_dist freetype-target /')"
@ -79,14 +84,14 @@ table_line_append DIST_ARGS libsoxr '-DHAVE_WORDS_BIGENDIAN_EXITCODE=0'
vpx_target=x86-win32-gcc
[ "$target_bits" -eq 64 ] && vpx_target=x86_64-win64-gcc
table_line_replace DIST_CONFIGURE_OVERRIDES libvpx "./configure --target=$vpx_target $CONFIGURE_ARGS $(table_line DIST_ARGS libvpx)"
table_line_replace DIST_CONFIGURE_OVERRIDES libvpx "./configure --target=$vpx_target \$CONFIGURE_ARGS $(table_line DIST_ARGS libvpx)"
table_line_remove DIST_ARGS libvpx
table_line_replace DIST_CONFIGURE_OVERRIDES ffmpeg "\
./configure --arch=$target_cpu --target-os=mingw32 --cross-prefix=${target_arch}- \
--pkg-config='$BUILD_ROOT/host/bin/pkg-config' \
$CONFIGURE_ARGS $(table_line DIST_ARGS ffmpeg) \
--pkg-config='\$BUILD_ROOT/host/bin/pkg-config' \
\$CONFIGURE_ARGS $(table_line DIST_ARGS ffmpeg) \
"
table_line_remove DIST_ARGS ffmpeg

View File

@ -2,7 +2,7 @@
set -e
CROSS_OS=windows
export CROSS_OS=windows
[ -n "$BUILD_ENV" ] && eval "$BUILD_ENV"
@ -17,20 +17,20 @@ export LIBS="-lpthread -lm"
export UUID_LIBS="-luuid_mingw -luuid"
export PKG_CONFIG="$BUILD_ROOT/root/bin/pkg-config"
export PKG_CONFIG="\$BUILD_ROOT/root/bin/pkg-config"
EOF
)
export BUILD_ENV
: ${HOST_CC:=ccache gcc}
: ${HOST_CXX:=ccache g++}
: ${HOST_CC_ORIG:=gcc}
: ${HOST_CXX_ORIG:=g++}
: ${HOST_CPPFLAGS:="-I$BUILD_ROOT/root/include"}
: ${HOST_CFLAGS:="-fPIC -I$BUILD_ROOT/root/include -L$BUILD_ROOT/root/lib -pthread -lm"}
: ${HOST_CXXFLAGS:="-fPIC -I$BUILD_ROOT/root/include -L$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -pthread -lm"}
: ${HOST_OBJCXXFLAGS:="-fPIC -I$BUILD_ROOT/root/include -L$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -pthread -lm"}
: ${HOST_LDFLAGS:="-fPIC -L$BUILD_ROOT/root/lib -pthread -lm"}
: ${HOST_CPPFLAGS:="-I\$BUILD_ROOT/root/include"}
: ${HOST_CFLAGS:="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -pthread -lm"}
: ${HOST_CXXFLAGS:="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -pthread -lm"}
: ${HOST_OBJCXXFLAGS:="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -pthread -lm"}
: ${HOST_LDFLAGS:="-fPIC -L\$BUILD_ROOT/root/lib -pthread -lm"}
: ${HOST_LIBS:=-lm}
: ${HOST_UUID_LIBS:=}
: ${HOST_STRIP:=strip}
@ -76,24 +76,22 @@ host_env() {
ln -sf "$BUILD_ROOT/host" "$BUILD_ROOT/root"
if [ -z "$OCC" ]; then
cat <<EOF
OCC="$CC"
OCXX="$CXX"
OCC_ORIG="$CC_ORIG"
OCXX_ORIG="$CXX_ORIG"
OCPPFLAGS="$CPPFLAGS"
OCFLAGS="$CFLAGS"
OCXXFLAGS="$CXXFLAGS"
OOBJCXXFLAGS="$OBJCXXFLAGS"
OLDFLAGS="$LDFLAGS"
OLIBS="$LIBS"
OUUID_LIBS="$UUID_LIBS"
OSTRIP="$STRIP"
OPATH="$PATH"
OCC="\$CC"
OCXX="\$CXX"
OCPPFLAGS="\$CPPFLAGS"
OCFLAGS="\$CFLAGS"
OCXXFLAGS="\$CXXFLAGS"
OOBJCXXFLAGS="\$OBJCXXFLAGS"
OLDFLAGS="\$LDFLAGS"
OLIBS="\$LIBS"
OUUID_LIBS="\$UUID_LIBS"
OSTRIP="\$STRIP"
OPATH="\$PATH"
$BUILD_ENV
export CC="$HOST_CC"
export CXX="$HOST_CXX"
export CC_ORIG="$HOST_CC_ORIG"
export CXX_ORIG="$HOST_CXX_ORIG"
export CPPFLAGS="$HOST_CPPFLAGS"
export CFLAGS="$HOST_CFLAGS"
export CXXFLAGS="$HOST_CXXFLAGS"
@ -102,13 +100,13 @@ export LDFLAGS="$HOST_LDFLAGS"
export LIBS="$HOST_LIBS"
export UUID_LIBS="$HOST_UUID_LIBS"
export STRIP="$HOST_STRIP"
export PATH="$BUILD_ROOT/host/bin:$PATH"
export PATH="$BUILD_ROOT/host/bin:\$PATH"
OREQUIRED_CONFIGURE_ARGS="$REQUIRED_CONFIGURE_ARGS"
OREQUIRED_CMAKE_ARGS="$REQUIRED_CMAKE_ARGS"
OREQUIRED_CONFIGURE_ARGS="\$REQUIRED_CONFIGURE_ARGS"
OREQUIRED_CMAKE_ARGS="\$REQUIRED_CMAKE_ARGS"
REQUIRED_CONFIGURE_ARGS="$(puts "$REQUIRED_CONFIGURE_ARGS" | sed 's/--host[^ ]*//g')"
REQUIRED_CMAKE_ARGS="$(puts "$REQUIRED_CMAKE_ARGS" | sed 's/-DCMAKE_TOOLCHAIN_FILE=[^ ]*//g')"
REQUIRED_CONFIGURE_ARGS="\$(puts "\$REQUIRED_CONFIGURE_ARGS" | sed 's/--host[^ ]*//g')"
REQUIRED_CMAKE_ARGS="\$(puts "\$REQUIRED_CMAKE_ARGS" | sed 's/-DCMAKE_TOOLCHAIN_FILE=[^ ]*//g')"
EOF
fi
@ -121,24 +119,24 @@ target_env() {
if [ -n "$OCC" ]; then
cat <<EOF
export CC="$OCC"
export CXX="$OCXX"
export CC_ORIG="$OCC_ORIG"
export CXX_ORIG="$OCXX_ORIG"
export CPPFLAGS="$OCPPFLAGS"
export CFLAGS="$OCFLAGS"
export CXXFLAGS="$OCXXFLAGS"
export OBJCXXFLAGS="$OOBJCXXFLAGS"
export LDFLAGS="$OLDFLAGS"
export LIBS="$OLIBS"
export UUID_LIBS="$OUUID_LIBS"
export STRIP="$OSTRIP"
export PATH="$OPATH"
OCC= OCXX= OCC_ORIG= OCXX_ORIG= OCPPFLAGS= OCFLAGS= OCXXFLAGS= OOBJCXXFLAGS= OLDFLAGS= OLIBS= OUUID_LIBS= OSTRIP= OPATH=
export CC="\$OCC"
export CXX="\$OCXX"
export CPPFLAGS="\$OCPPFLAGS"
export CFLAGS="\$OCFLAGS"
export CXXFLAGS="\$OCXXFLAGS"
export OBJCXXFLAGS="\$OOBJCXXFLAGS"
export LDFLAGS="\$OLDFLAGS"
export LIBS="\$OLIBS"
export UUID_LIBS="\$OUUID_LIBS"
export STRIP="\$OSTRIP"
export PATH="\$OPATH"
OCC= OCXX= OCPPFLAGS= OCFLAGS= OCXXFLAGS= OOBJCXXFLAGS= OLDFLAGS= OLIBS= OUUID_LIBS= OSTRIP= OPATH=
REQUIRED_CONFIGURE_ARGS="$OREQUIRED_CONFIGURE_ARGS"
REQUIRED_CMAKE_ARGS="$OREQUIRED_CMAKE_ARGS"
REQUIRED_CONFIGURE_ARGS="\$OREQUIRED_CONFIGURE_ARGS"
REQUIRED_CMAKE_ARGS="\$OREQUIRED_CMAKE_ARGS"
OREQUIRED_CONFIGURE_ARGS= OREQUIRED_CMAKE_ARGS=
$BUILD_ENV
EOF
fi
@ -260,7 +258,7 @@ table_line_append DIST_PATCHES $libicu " \
https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-icu/0021-mingw-static-libraries-without-s.patch \
"
table_line_append DIST_EXTRA_LDFLAGS $libicu "-ldl -lcatgets -lws2_32"
table_line_append DIST_PRE_BUILD $libicu ":; sed -E -i.bak 's/@echo -n /@printf \"%s\" /g' config/mh-mingw*;"
table_insert_after DISTS libiconv-target '
catgets https://downloads.sourceforge.net/project/mingw/MinGW/Extension/catgets/mingw-catgets-1.0.1/mingw-catgets-1.0.1-src.tar.gz include/langinfo.h
@ -282,20 +280,15 @@ table_line_append DIST_PATCHES fontconfig-target " \
https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-fontconfig/0007-pkgconfig.mingw.patch \
"
table_line_replace DIST_CONFIGURE_TYPES fontconfig-target autoreconf
table_line_append DIST_PATCHES libgd 'https://gist.githubusercontent.com/rkitover/c64ea5b83ddea94ace58c40c7de42879/raw/fbaf4885fbefb302116b56626c0e191df514e8c6/libgd-2.2.4-mingw-static.patch'
table_insert_before DISTS sfml '
openal https://github.com/kcat/openal-soft/archive/openal-soft-1.19.0.tar.gz lib/libOpenAL32.a
openal https://github.com/kcat/openal-soft/archive/openal-soft-1.19.1.tar.gz lib/libOpenAL32.a
'
table_line_append DIST_ARGS openal '-DLIBTYPE=STATIC -DALSOFT_UTILS=OFF -DALSOFT_EXAMPLES=OFF -DALSOFT_TESTS=OFF'
# this is necessary so the native tools openal uses to build compile when cross-compiling
table_line_append DIST_PRE_BUILD openal ":; sed -i.bak 's/\\(-G \"\\\${CMAKE_GENERATOR}\"\\)/\\1 -DCMAKE_C_COMPILER=cc -DCMAKE_CXX_COMPILER=c++ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \"-DCMAKE_C_LINK_EXECUTABLE=<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -lm\" \"-DCMAKE_CXX_LINK_EXECUTABLE=<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -lm\" -DCMAKE_C_FLAGS= -DCMAKE_CXX_FLAGS= -DCMAKE_EXE_LINKER_FLAGS=/' CMakeLists.txt;"
table_line_replace DIST_ARGS mp3lame "LDFLAGS='$LDFLAGS $BUILD_ROOT/root/lib/libcatgets.a'"
table_line_replace DIST_ARGS mp3lame "LDFLAGS='\$LDFLAGS \$BUILD_ROOT/root/lib/libcatgets.a'"
table_line_replace DIST_CONFIGURE_TYPES zlib-target cmake
table_line_append DIST_ARGS zlib-target -DUNIX=1
@ -347,13 +340,13 @@ table_line_append DIST_PATCHES libtheora "\
"
table_line_append DIST_PRE_BUILD wxwidgets ":; \
if path_exists $BUILD_ROOT/root/include/langinfo.h; then \
mv $BUILD_ROOT/root/include/langinfo.h $BUILD_ROOT/root/include/langinfo.bak; \
if path_exists \$BUILD_ROOT/root/include/langinfo.h; then \
mv \$BUILD_ROOT/root/include/langinfo.h \$BUILD_ROOT/root/include/langinfo.bak; \
fi;
"
table_line_append DIST_POST_BUILD wxwidgets ":; \
if path_exists $BUILD_ROOT/root/include/langinfo.bak; then \
mv $BUILD_ROOT/root/include/langinfo.bak $BUILD_ROOT/root/include/langinfo.h; \
if path_exists \$BUILD_ROOT/root/include/langinfo.bak; then \
mv \$BUILD_ROOT/root/include/langinfo.bak \$BUILD_ROOT/root/include/langinfo.h; \
fi;
"

View File

@ -1,15 +1,16 @@
set -e
: ${BUILD_ROOT:=$HOME/vbam-build-unix}
export BUILD_ROOT="${BUILD_ROOT:-$HOME/vbam-build-unix}"
BUILD_ENV=$BUILD_ENV$(cat <<EOF
export LDFLAGS="$LDFLAGS -Wl,--start-group -ldl"
export LDFLAGS="$LDFLAGS${LDFLAGS:+ }-Wl,--start-group -ldl"
EOF
)
eval "$BUILD_ENV"
export BUILD_ENV
. "$(dirname "$0")/../builder/core.sh"
# on mac openal is part of the system, on most unixes we need openal-soft
@ -114,9 +115,9 @@ table_line_append DIST_ARGS libdrm '--disable-cairo-tests'
table_line_append DIST_ARGS freeglut '-DFREEGLUT_BUILD_SHARED_LIBS=NO -DFREEGLUT_BUILD_STATIC_LIBS=YES'
table_line_append DIST_ARGS gtk-doc "--with-xml-catalog='$BUILD_ROOT/root/etc/xml/catalog.xml'"
table_line_append DIST_ARGS gtk-doc "--with-xml-catalog=\"\$BUILD_ROOT/root/etc/xml/catalog.xml\""
table_line_append DIST_POST_BUILD gtk-doc ":; sed -i.bak 's|^prefix=/usr$|prefix=$BUILD_ROOT/root|' $BUILD_ROOT/root/bin/gtkdocize"
table_line_append DIST_POST_BUILD gtk-doc ":; sed -i.bak \"s|^prefix=/usr\\\$|prefix=\$BUILD_ROOT/root|\" \"\$BUILD_ROOT/root/bin/gtkdocize\""
table_line_replace DIST_BUILD_OVERRIDES gobject-introspection ':; cp m4/introspection.m4 "$BUILD_ROOT/root/share/aclocal";'

View File

@ -2,7 +2,7 @@
set -e
: ${BUILD_ROOT:=$HOME/vbam-build-linux}
export BUILD_ROOT="${BUILD_ROOT:=$HOME/vbam-build-linux}"
. "$(dirname "$0")/../builder/unix.sh"
@ -35,11 +35,11 @@ table_line_append DIST_ARGS libudev '-Dlink-udev-shared=false'
table_line_append DIST_MAKE_ARGS libudev 'src/udev/libudev.a'
table_line_append DIST_INSTALL_OVERRIDES libudev " \
mkdir -p '$BUILD_ROOT/root/lib/pkgconfig'; \
mkdir -p '$BUILD_ROOT/root/include'; \
cp -a src/udev/libudev.a '$BUILD_ROOT/root/lib'; \
cp -a src/libudev/libudev.pc '$BUILD_ROOT/root/pkgconfig'; \
cp -a ../src/libudev/libudev.h '$BUILD_ROOT/root/include'; \
mkdir -p \"\$BUILD_ROOT/root/lib/pkgconfig\"; \
mkdir -p \"\$BUILD_ROOT/root/include\"; \
cp -a src/udev/libudev.a \"\$BUILD_ROOT/root/lib\"; \
cp -a src/libudev/libudev.pc \"\$BUILD_ROOT/root/pkgconfig\"; \
cp -a ../src/libudev/libudev.h \"\$BUILD_ROOT/root/include\"; \
"
builder "$@"

View File

@ -27,7 +27,7 @@ case "$1" in
;;
esac
BUILD_ROOT=$HOME/vbam-build-mac-${target_bits}bit
export BUILD_ROOT="$HOME/vbam-build-mac-${target_bits}bit"
BUILD_ENV=$(cat <<EOF
export MACOSX_DEPLOYMENT_TARGET=10.7
@ -45,10 +45,11 @@ export UUID_LIBS="-L\$BUILD_ROOT/root/stow/libuuid/lib -luuid"
EOF
)
TAR=tar
export BUILD_ENV
export TAR=tar
if [ "$target_cpu" = i386 ]; then
REQUIRED_CONFIGURE_ARGS='--host=i386-apple-darwin --build=x86_64-apple-darwin'
export REQUIRED_CONFIGURE_ARGS='--host=i386-apple-darwin --build=x86_64-apple-darwin'
fi
. "$(dirname "$0")/../builder/core.sh"
@ -100,7 +101,7 @@ table_line_append DIST_PRE_BUILD libmodplug " \
table_line_append DIST_PRE_BUILD libzmq "sed -i.bak 's/-lstdc++/-lc++/g' src/libzmq.pc.in"
table_line_append DIST_PRE_BUILD ffmpeg "sed -i.bak 's/-lstdc++/-lc++/g' configure"
table_line_append DIST_ARGS wxwidgets "--with-macosx-version-min=$MACOSX_DEPLOYMENT_TARGET LDFLAGS='$LDFLAGS -stdlib=libc++'"
table_line_append DIST_ARGS wxwidgets "--with-macosx-version-min=\$MACOSX_DEPLOYMENT_TARGET LDFLAGS=\"\$LDFLAGS -stdlib=libc++\""
table_line_append DIST_ARGS ffmpeg "--disable-videotoolbox --extra-ldflags='-framework CoreText'"
table_line_append DIST_ARGS libmodplug "CC=clang++ CXX=clang++"

View File

@ -2,7 +2,7 @@
set -e
BUILD_ROOT=$HOME/vbam-build-unix
export BUILD_ROOT="$HOME/vbam-build-unix"
. "$(dirname "$0")/../builder/core.sh"

View File

@ -24,15 +24,12 @@ if [ "$(uname -o 2>/dev/null || :)" = Cygwin ]; then
fi
fi
REQUIRED_CMAKE_ARGS="-DGETTEXT_MSGFMT_EXECUTABLE:FILEPATH=\"\$BUILD_ROOT/host/bin/msgfmt\" -DGETTEXT_MSGMERGE_EXECUTABLE=\"\$BUILD_ROOT/host/bin/msgmerge\""
export REQUIRED_CMAKE_ARGS="-DGETTEXT_MSGFMT_EXECUTABLE:FILEPATH=\"\$BUILD_ROOT/host/bin/msgfmt\" -DGETTEXT_MSGMERGE_EXECUTABLE=\"\$BUILD_ROOT/host/bin/msgmerge\""
. "${0%/*}/../builder/mingw-cross.sh"
table_line_append DIST_MAKE_ARGS unzip 'CFLAGS="$CFLAGS -DNO_LCHMOD"'
# parallel build of openssl doesn't work for cygwin layer
table_line_append DIST_MAKE_ARGS openssl -j1
# FIXME: problems with autopoint that need to be sorted
table_line_remove DISTS flex

View File

@ -2,7 +2,7 @@
set -e
TAR=tar
export TAR=tar
. "${0%/*}/../builder/mingw-cross.sh"
@ -11,13 +11,11 @@ host_env_hook() {
export COMMAND_MODE=unix2003
export CC='ccache clang'
export CXX='ccache clang++'
export CC_ORIG=clang
export CXX_ORIG=clang++
export CPPFLAGS="-I$BUILD_ROOT/root/include -DICONV_CONST="
export CFLAGS="-fPIC -I$BUILD_ROOT/root/include -L$BUILD_ROOT/root/lib -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -DICONV_CONST= -Wl,-no_compact_unwind"
export CXXFLAGS="-fPIC -I$BUILD_ROOT/root/include -L$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -stdlib=libc++ -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -DICONV_CONST= -Wl,-no_compact_unwind"
export OBJCXXFLAGS="-fPIC -I$BUILD_ROOT/root/include -L$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -stdlib=libc++ -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -DICONV_CONST= -Wl,-no_compact_unwind"
export LDFLAGS="-fPIC -L$BUILD_ROOT/root/lib -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -Wl,-no_compact_unwind"
export CPPFLAGS="-I\$BUILD_ROOT/root/include -DICONV_CONST="
export CFLAGS="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -DICONV_CONST= -Wl,-no_compact_unwind"
export CXXFLAGS="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -stdlib=libc++ -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -DICONV_CONST= -Wl,-no_compact_unwind"
export OBJCXXFLAGS="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -stdlib=libc++ -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -DICONV_CONST= -Wl,-no_compact_unwind"
export LDFLAGS="-fPIC -L\$BUILD_ROOT/root/lib -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -Wl,-no_compact_unwind"
EOF
}

View File

@ -31,12 +31,12 @@ case "$MSYSTEM" in
MINGW32)
export HOST_SYSTEM=i686-w64-mingw32
sys_base=/mingw32
BUILD_ROOT="$HOME/vbam-build-msys2-i686"
export BUILD_ROOT="$HOME/vbam-build-msys2-i686"
;;
MINGW64)
export HOST_SYSTEM=x86_64-w64-mingw32
sys_base=/mingw64
BUILD_ROOT="$HOME/vbam-build-msys2-x86_64"
export BUILD_ROOT="$HOME/vbam-build-msys2-x86_64"
;;
MSYS)
exec "$0" "$@" -64
@ -82,9 +82,9 @@ for d in /usr /usr/include /usr/lib; do
done
ignore_msys_paths=${ignore_msys_paths#;}
CMAKE_BASE_ARGS="-G 'MSYS Makefiles' -DCMAKE_IGNORE_PATH='$ignore_msys_paths'"
export CMAKE_BASE_ARGS="-G 'MSYS Makefiles' -DCMAKE_IGNORE_PATH='$ignore_msys_paths'"
TMP_DIR="$BUILD_ROOT/tmp_$$"
export TMP_DIR="$BUILD_ROOT/tmp_$$"
BUILD_ENV=$BUILD_ENV$(cat <<'EOF'
@ -94,6 +94,8 @@ export MSYS2_ARG_CONV_EXCL="-D;/usr;/etc"
EOF
)
export BUILD_ENV
DIST_TAR_ARGS="
help2man --exclude ChangeLog
sfml --exclude libs-osx
@ -110,11 +112,11 @@ host_env() {
cat <<EOF
unset MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX CONFIG_SITE ACLOCAL_PATH PKG_CONFIG_PATH
OPWD="$PWD"
OPWD="\$PWD"
export MSYSTEM=MSYS
. /etc/profile || :
. ~/.bashrc 2>/dev/null || :
$BUILD_ENV
\$BUILD_ENV
EOF
cd "$OPWD"
@ -126,11 +128,11 @@ target_env() {
cat <<EOF
unset MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX CONFIG_SITE ACLOCAL_PATH PKG_CONFIG_PATH
OPWD="$PWD"
export MSYSTEM="$OMSYSTEM"
OPWD="\$PWD"
export MSYSTEM="\$OMSYSTEM"
. /etc/profile || :
. ~/.bashrc 2>/dev/null || :
$BUILD_ENV
\$BUILD_ENV
EOF
cd "$OPWD"
@ -181,7 +183,4 @@ table_line_replace DIST_POST_BUILD unzip ":; \
table_line_replace DIST_CONFIGURE_OVERRIDES openssl "$(table_line DIST_CONFIGURE_OVERRIDES openssl | sed 's,^./config ,./Configure Cygwin-x86_64 ,')"
# parallel build of openssl doesn't work for msys2 layer
table_line_append DIST_MAKE_ARGS openssl -j1
builder "$@"