2020-09-07 19:30:40 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
MINGW_REPO="https://github.com/mirror/mingw-w64.git"
|
2020-11-10 15:22:37 +00:00
|
|
|
MINGW_COMMIT="b4da620ea9f159db0018d243d21fdf4fa8752f32"
|
2020-09-07 19:30:40 +00:00
|
|
|
|
|
|
|
ffbuild_enabled() {
|
|
|
|
[[ $TARGET == win* ]] || return -1
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_dockerstage() {
|
|
|
|
to_df "ADD $SELF /stage.sh"
|
|
|
|
to_df "RUN run_stage"
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_dockerbuild() {
|
|
|
|
git-mini-clone "$MINGW_REPO" "$MINGW_COMMIT" mingw
|
|
|
|
cd mingw/mingw-w64-headers
|
|
|
|
|
|
|
|
unset CFLAGS
|
|
|
|
unset CXXFLAGS
|
|
|
|
unset LDFLAGS
|
|
|
|
unset PKG_CONFIG_LIBDIR
|
|
|
|
|
|
|
|
autoreconf -i
|
|
|
|
|
|
|
|
local myconf=(
|
|
|
|
--prefix="/usr/$FFBUILD_TOOLCHAIN"
|
|
|
|
--host="$FFBUILD_TOOLCHAIN"
|
2020-10-11 14:40:40 +00:00
|
|
|
--with-default-win32-winnt="0x601"
|
2020-09-07 19:30:40 +00:00
|
|
|
--enable-idl
|
|
|
|
)
|
|
|
|
|
|
|
|
./configure "${myconf[@]}" || return -1
|
|
|
|
make -j$(nproc) || return -1
|
|
|
|
make install || return -1
|
|
|
|
|
|
|
|
cd ../mingw-w64-libraries/winpthreads
|
|
|
|
|
|
|
|
autoreconf -i
|
|
|
|
|
|
|
|
local myconf=(
|
|
|
|
--prefix="/usr/$FFBUILD_TOOLCHAIN"
|
|
|
|
--host="$FFBUILD_TOOLCHAIN"
|
|
|
|
--with-pic
|
|
|
|
--disable-shared
|
|
|
|
--enable-static
|
|
|
|
)
|
|
|
|
|
|
|
|
./configure "${myconf[@]}" || return -1
|
|
|
|
make -j$(nproc) || return -1
|
|
|
|
make install || return -1
|
|
|
|
|
|
|
|
cd ../../..
|
|
|
|
rm -rf mingw
|
|
|
|
}
|
2020-11-10 14:39:22 +00:00
|
|
|
|
|
|
|
ffbuild_configure() {
|
|
|
|
echo --disable-w32threads --enable-pthreads
|
|
|
|
}
|