builder: msys2 fixes
For cmake, the dependency on `bin2c` when using `HostCompile.cmake` does not work if it's set to `bin2c.exe`, for whatever reason, so remove the suffix. Add `-DCURL_STATICLIB` to `CPPFLAGS` etc. to link to `libcurl` correctly, needed for `osslsigncode`. Add `--without-brotli` to curl configure args, because it can try to link to some existing version and fail. Add a `gmake` symlink to the system `make` into the `PATH` because some things like Strawberry Perl install their own copy of `gmake` into the `PATH`. Add `pass` to list of msys2 deps, needed to store the windows codesigning cert password. Use `$CMAKE_ARGS` instead of `$CMAKE_BASE_ARGS` for building vbam, adding `-DCMAKE_INSTALL_PREFIX=/usr`, this is necessary for extracting the locales correctly. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
f1438e0f0a
commit
2a2be95397
|
@ -524,7 +524,7 @@ set(XRC_SOURCES
|
||||||
# wxrc does not support xrs files in -c output (> 10x compression)
|
# wxrc does not support xrs files in -c output (> 10x compression)
|
||||||
# we do it using the bin2c.c utility
|
# we do it using the bin2c.c utility
|
||||||
|
|
||||||
set(BIN2C ${CMAKE_BINARY_DIR}/bin2c${CMAKE_EXECUTABLE_SUFFIX})
|
set(BIN2C ${CMAKE_BINARY_DIR}/bin2c)
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
include(HostCompile)
|
include(HostCompile)
|
||||||
|
|
|
@ -40,10 +40,10 @@ case "\$CC" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
export CPPFLAGS="$CPPFLAGS${CPPFLAGS:+ }-I\$BUILD_ROOT/root/include"
|
export CPPFLAGS="$CPPFLAGS${CPPFLAGS:+ }-I\$BUILD_ROOT/root/include -DCURL_STATICLIB"
|
||||||
export CFLAGS="$CFLAGS${CFLAGS:+ }-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -pthread -lm"
|
export CFLAGS="$CFLAGS${CFLAGS:+ }-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -pthread -lm -DCURL_STATICLIB"
|
||||||
export CXXFLAGS="$CXXFLAGS${CXXFLAGS:+ }-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -pthread -lm"
|
export CXXFLAGS="$CXXFLAGS${CXXFLAGS:+ }-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -pthread -lm -DCURL_STATICLIB"
|
||||||
export OBJCXXFLAGS="$OBJCXXFLAGS${OBJCXXFLAGS:+ }-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 -DCURL_STATICLIB"
|
||||||
export LDFLAGS="$LDFLAGS${LDFLAGS:+ }-fPIC -L\$BUILD_ROOT/root/lib -pthread -lm"
|
export LDFLAGS="$LDFLAGS${LDFLAGS:+ }-fPIC -L\$BUILD_ROOT/root/lib -pthread -lm"
|
||||||
export STRIP="\${STRIP:-strip}"
|
export STRIP="\${STRIP:-strip}"
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@ DIST_ARGS="$DIST_ARGS
|
||||||
libicu --disable-extras --disable-tools --disable-tests --disable-samples
|
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\"
|
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
|
pkgconfig --with-internal-glib --with-libiconv=gnu
|
||||||
curl --with-ssl
|
curl --with-ssl --without-brotli
|
||||||
pcre --enable-utf8 --enable-pcre8 --enable-pcre16 --enable-pcre32 --enable-unicode-properties --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-jit
|
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
|
libxslt --without-python --without-crypto
|
||||||
libgd --without-xpm
|
libgd --without-xpm
|
||||||
|
@ -496,9 +496,14 @@ setup() {
|
||||||
|
|
||||||
OPWD=$PWD
|
OPWD=$PWD
|
||||||
cd "$BUILD_ROOT/root"
|
cd "$BUILD_ROOT/root"
|
||||||
for d in perl5 share etc man doc; do
|
|
||||||
[ -d "$d" ] || mkdir "$d"
|
for d in bin perl5 share etc man doc; do
|
||||||
|
mkdir -p "$d"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# things like strawberry perl very rudely put this in the PATH
|
||||||
|
[ -L bin/gmake ] || ln -s "$(command -v make)" bin/gmake
|
||||||
|
|
||||||
cd "$OPWD"
|
cd "$OPWD"
|
||||||
|
|
||||||
if [ -z "$BUILD_FFMPEG" ]; then
|
if [ -z "$BUILD_FFMPEG" ]; then
|
||||||
|
@ -687,7 +692,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 "$@"
|
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 "$@"
|
||||||
|
|
||||||
# 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"
|
||||||
|
@ -2627,7 +2632,7 @@ build_project() {
|
||||||
lto=OFF
|
lto=OFF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo_eval_run cmake "'$CHECKOUT'" $REQUIRED_CMAKE_ARGS -DVBAM_STATIC=ON -DENABLE_LTO=${lto} $CMAKE_BASE_ARGS $PROJECT_ARGS $@
|
echo_eval_run cmake "'$CHECKOUT'" $REQUIRED_CMAKE_ARGS -DVBAM_STATIC=ON -DENABLE_LTO=${lto} $CMAKE_ARGS $PROJECT_ARGS $@
|
||||||
echo_run make -j$NUM_CPUS VERBOSE=1
|
echo_run make -j$NUM_CPUS VERBOSE=1
|
||||||
|
|
||||||
if [ "$target_os" = mac ]; then
|
if [ "$target_os" = mac ]; then
|
||||||
|
@ -2664,9 +2669,9 @@ build_project() {
|
||||||
rm -f translations.zip
|
rm -f translations.zip
|
||||||
|
|
||||||
make install DESTDIR=./destdir
|
make install DESTDIR=./destdir
|
||||||
cd destdir/usr/local/share/locale
|
cd destdir/usr/share/locale
|
||||||
zip -9r ../../../../../translations.zip *
|
zip -9r ../../../../translations.zip *
|
||||||
cd ../../../../..
|
cd ../../../..
|
||||||
|
|
||||||
rm -f $zip.asc translations.zip.asc
|
rm -f $zip.asc translations.zip.asc
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue