Files
Rafael Kitover b9911a5759 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
2018-11-15 01:54:19 -08:00

46 lines
1.9 KiB
Bash
Executable File

#!/bin/sh
set -e
export BUILD_ROOT="${BUILD_ROOT:=$HOME/vbam-build-linux}"
. "$(dirname "$0")/../builder/unix.sh"
table_line_append DIST_EXTRA_LIBS shared-mime-info '-Wl,--start-group -lmount -lblkid -luuid -Wl,--end-group'
table_line_append DIST_EXTRA_LDFLAGS ffmpeg -lunwind
table_insert_before DISTS autoconf '
libunwind http://download.savannah.nongnu.org/releases/libunwind/libunwind-1.2.tar.gz lib/libunwind.a
'
table_insert_before DISTS glib '
libcap https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.25.tar.xz lib/libcap.a
libudev https://github.com/systemd/systemd/archive/v237.tar.gz lib/libudev.a
util-linux https://www.kernel.org/pub/linux/utils/util-linux/v2.31/util-linux-2.31.tar.xz lib/libmount.a
'
table_line_append DIST_PATCHES libcap 'https://604802.bugs.gentoo.org/attachment.cgi?id=460354'
table_line_append DIST_EXTRA_LDFLAGS util-linux '-lintl -liconv'
table_line_append DIST_PATCHES libudev " \
https://gist.githubusercontent.com/rkitover/b639097f5c0304c5c4c66d19159fb9a2/raw/7c7bb75747c99fda2ed309c3337338279eff1527/systemd-237-static-libudev.patch \
"
table_line_append DIST_EXTRA_LDFLAGS libudev '-Wl,--allow-multiple-definition -Wl,--start-group -lglib-2.0 -lgio-2.0 -lgmodule-2.0 -lgobject-2.0 -lpcre -lz -lffi -lpthread -lresolv -ldl -lintl -liconv -luuid -Wl,--end-group'
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\"; \
"
builder "$@"