2020-09-07 19:30:40 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
MINGW_REPO="https://github.com/mirror/mingw-w64.git"
|
2021-10-28 18:47:11 +00:00
|
|
|
MINGW_COMMIT="a2eb3ea3aaa7c780c4b4ab30d71169f442788864"
|
2020-09-07 19:30:40 +00:00
|
|
|
|
|
|
|
ffbuild_enabled() {
|
|
|
|
[[ $TARGET == win* ]] || return -1
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2021-04-06 01:41:36 +00:00
|
|
|
ffbuild_dockerlayer() {
|
2021-04-06 04:23:15 +00:00
|
|
|
to_df "COPY --from=${SELFLAYER} /opt/mingw/. /"
|
|
|
|
to_df "COPY --from=${SELFLAYER} /opt/mingw/. /opt/mingw"
|
2021-04-06 01:41:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_dockerfinal() {
|
2021-04-06 04:23:15 +00:00
|
|
|
to_df "COPY --from=${PREVLAYER} /opt/mingw/. /"
|
2021-04-06 01:41:36 +00:00
|
|
|
}
|
|
|
|
|
2020-09-07 19:30:40 +00:00
|
|
|
ffbuild_dockerbuild() {
|
|
|
|
git-mini-clone "$MINGW_REPO" "$MINGW_COMMIT" mingw
|
2021-05-15 13:33:59 +00:00
|
|
|
cd mingw
|
|
|
|
|
|
|
|
cd mingw-w64-headers
|
2020-09-07 19:30:40 +00:00
|
|
|
|
|
|
|
unset CFLAGS
|
|
|
|
unset CXXFLAGS
|
|
|
|
unset LDFLAGS
|
|
|
|
unset PKG_CONFIG_LIBDIR
|
|
|
|
|
|
|
|
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
|
|
|
|
)
|
|
|
|
|
2021-04-04 21:20:31 +00:00
|
|
|
./configure "${myconf[@]}"
|
|
|
|
make -j$(nproc)
|
2021-04-06 04:23:15 +00:00
|
|
|
make install DESTDIR="/opt/mingw"
|
2020-09-07 19:30:40 +00:00
|
|
|
|
|
|
|
cd ../mingw-w64-libraries/winpthreads
|
|
|
|
|
|
|
|
local myconf=(
|
|
|
|
--prefix="/usr/$FFBUILD_TOOLCHAIN"
|
|
|
|
--host="$FFBUILD_TOOLCHAIN"
|
|
|
|
--with-pic
|
|
|
|
--disable-shared
|
|
|
|
--enable-static
|
|
|
|
)
|
|
|
|
|
2021-04-04 21:20:31 +00:00
|
|
|
./configure "${myconf[@]}"
|
|
|
|
make -j$(nproc)
|
2021-04-06 04:23:15 +00:00
|
|
|
make install DESTDIR="/opt/mingw"
|
2020-09-07 19:30:40 +00:00
|
|
|
}
|
2020-11-10 14:39:22 +00:00
|
|
|
|
|
|
|
ffbuild_configure() {
|
|
|
|
echo --disable-w32threads --enable-pthreads
|
|
|
|
}
|