Skip to content

Commit

Permalink
make: finish correcting host/build semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
jstebbins committed Apr 17, 2019
1 parent 8e52e97 commit 046eb04
Show file tree
Hide file tree
Showing 38 changed files with 145 additions and 145 deletions.
18 changes: 9 additions & 9 deletions contrib/ffmpeg/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ FFMPEG.CONFIGURE.extra = \
--cc="$(FFMPEG.GCC.gcc)" \
--extra-ldflags="$(call fn.ARGS,FFMPEG.GCC,*archs *sysroot *minver ?extra) -L$(call fn.ABSOLUTE,$(CONTRIB.build/)lib)"

ifeq (1-linux,$(FEATURE.qsv)-$(BUILD.system))
ifeq (1-linux,$(FEATURE.qsv)-$(HOST.system))
FFMPEG.CONFIGURE.extra += --enable-vaapi
FFMPEG.CONFIGURE.extra += --disable-xlib
else
Expand All @@ -80,24 +80,24 @@ FFMPEG.CONFIGURE.extra += \
--enable-muxer=psp \
--enable-muxer=ipod

ifeq (darwin,$(BUILD.system))
ifeq (darwin,$(HOST.system))
FFMPEG.CONFIGURE.extra += --disable-audiotoolbox --disable-coreimage \
--enable-encoder=h264_videotoolbox \
--enable-encoder=hevc_videotoolbox

ifeq (x86_64,$(BUILD.arch))
ifeq (x86_64,$(HOST.arch))
FFMPEG.CONFIGURE.extra += --arch=x86_64
endif
endif

## check against tuple: B-SYSTEM where B is { 0 | 1 } for cross-compiling flag
ifeq (0-cygwin,$(BUILD.cross)-$(BUILD.system))
ifeq (0-cygwin,$(HOST.cross)-$(HOST.system))
FFMPEG.GCC.args.extra += -fno-common
else ifeq (1-mingw,$(BUILD.cross)-$(BUILD.system))
else ifeq (1-mingw,$(HOST.cross)-$(HOST.system))
FFMPEG.CONFIGURE.extra += \
--target-os=mingw32 \
--arch=$(BUILD.machine) \
--cross-prefix=$(BUILD.cross.prefix) \
--arch=$(HOST.machine) \
--cross-prefix=$(HOST.cross.prefix) \
--pkg-config=$(PKGCONFIG.exe)
FFMPEG.GCC.args.extra += -fno-common
endif
Expand Down Expand Up @@ -137,11 +137,11 @@ endif
FFMPEG.BUILD.extra = V=1

## For POSIX.1-2001
ifeq (solaris,$(BUILD.system))
ifeq (solaris,$(HOST.system))
FFMPEG.CONFIGURE.extra += --extra-libs=/usr/lib/values-xpg6.o
endif

## MPC8 Doesn't compile on SPARC
ifeq (solaris-sparc,$(BUILD.system)-$(BUILD.machine))
ifeq (solaris-sparc,$(HOST.system)-$(HOST.machine))
FFMPEG.CONFIGURE.extra += --disable-demuxer=mpc8
endif
4 changes: 2 additions & 2 deletions contrib/fribidi/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ FRIBIDI.FETCH.basename = fribidi-1.0.5.tar.gz

FRIBIDI.CONFIGURE.bootstrap = rm -fr aclocal.m4 autom4te.cache configure; autoreconf -I m4 -fiv;

ifeq (1-mingw,$(BUILD.cross)-$(BUILD.system))
ifeq (1-mingw,$(HOST.cross)-$(HOST.system))
FRIBIDI.CONFIGURE.extra = --with-glib=no
else ifeq (darwin,$(BUILD.system))
else ifeq (darwin,$(HOST.system))
FRIBIDI.CONFIGURE.extra = --with-glib=no
endif
4 changes: 2 additions & 2 deletions contrib/harfbuzz/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ HARFBUZZ.CONFIGURE.extra = \

HARFBUZZ.CONFIGURE.extra += --with-fontconfig=no

ifeq ($(BUILD.system),darwin)
ifeq ($(HOST.system),darwin)
HARFBUZZ.CONFIGURE.extra += --with-coretext=yes --with-glib=no
endif

ifeq (1-mingw,$(BUILD.cross)-$(BUILD.system))
ifeq (1-mingw,$(HOST.cross)-$(HOST.system))
HARFBUZZ.CONFIGURE.extra += --with-directwrite=no --with-glib=no \
--with-gobject=no --with-cairo=no --with-icu=no --with-graphite2=no \
--with-uniscribe=no
Expand Down
2 changes: 1 addition & 1 deletion contrib/lame/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ ifneq (none,$(FFMPEG.GCC.g))
LAME.CONFIGURE.extra += --enable-debug
endif

ifeq (1-msys,$(BUILD.cross)-$(HOST.system))
ifeq (1-msys,$(HOST.cross)-$(BUILD.system))
LAME.CONFIGURE.args.build = --build=$(BUILD.machine)-unknown-linux-gnu
endif
6 changes: 3 additions & 3 deletions contrib/libass/module.defs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__deps__ := FREETYPE FRIBIDI HARFBUZZ

ifeq (,$(filter $(BUILD.system),darwin cygwin mingw))
ifeq (,$(filter $(HOST.system),darwin cygwin mingw))
__deps__ += FONTCONFIG
endif

Expand All @@ -17,7 +17,7 @@ LIBASS.CONFIGURE.extra = \
FREETYPE_LIBS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/))lib -lfreetype" \
FREETYPE_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include/freetype2" \

ifeq (,$(filter $(BUILD.system),darwin cygwin mingw))
ifeq (,$(filter $(HOST.system),darwin cygwin mingw))
# Tell configure where to find our version of fontconfig
LIBASS.CONFIGURE.extra += \
--enable-fontconfig \
Expand All @@ -27,7 +27,7 @@ else
LIBASS.CONFIGURE.extra += --disable-fontconfig
endif

ifneq ($(BUILD.system),linux)
ifneq ($(HOST.system),linux)
LIBASS.CONFIGURE.extra += \
FRIBIDI_LIBS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/))lib -lfribidi" \
FRIBIDI_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include"
Expand Down
4 changes: 2 additions & 2 deletions contrib/libbluray/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ endif

LIBBLURAY.CONFIGURE.extra += --disable-doxygen-doc --disable-examples --disable-bdjava-jar --without-freetype --without-fontconfig

ifeq (mingw,$(BUILD.system))
ifeq (mingw,$(HOST.system))
LIBBLURAY.GCC.D += MINGW_HAS_SECURE_API=1
endif

ifeq (freebsd,$(BUILD.system))
ifeq (freebsd,$(HOST.system))
LIBBLURAY.GCC.D += _XOPEN_SOURCE=700
endif

Expand Down
6 changes: 3 additions & 3 deletions contrib/libiconv/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ LIBICONV.FETCH.url = https://download.handbrake.fr/handbrake/contrib/libicon
LIBICONV.FETCH.url += https://ftp.gnu.org/gnu/libiconv/libiconv-1.15.tar.gz
LIBICONV.FETCH.sha256 = ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178

ifeq (1,$(BUILD.cross))
ifeq (1,$(HOST.cross))
# this contrib will not build under MinGW with -std=gnu99
ifeq (mingw,$(BUILD.system))
ifeq (mingw,$(HOST.system))
LIBICONV.GCC.args.c_std = -std=gnu89
endif

ifeq (msys,$(HOST.system))
ifeq (msys,$(BUILD.system))
LIBICONV.CONFIGURE.args.build = --build=$(BUILD.machine)-unknown-linux-gnu
endif
endif
2 changes: 1 addition & 1 deletion contrib/libmfx/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LIBMFX.FETCH.sha256 = 9dc8bcb67f5df3dfac29a2777c1bdc9ac2bb6b0e68169af4059089f517

LIBMFX.CONFIGURE.bootstrap = rm -fr aclocal.m4 autom4te.cache; autoreconf -fiv;

ifeq (1,$(BUILD.cross))
ifneq (linux,$(HOST.system))
LIBMFX.CONFIGURE.extra = --without-libva_drm --without-libva_x11
endif

Expand Down
2 changes: 1 addition & 1 deletion contrib/libsamplerate/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ LIBSAMPLERATE.CONFIGURE.bootstrap = rm -fr aclocal.m4 autom4te.cache configure;
# Disable to avoid Carbon.h dependency on OSX
LIBSAMPLERATE.CONFIGURE.extra = --disable-sndfile

ifeq (1-msys,$(BUILD.cross)-$(HOST.system))
ifeq (1-msys,$(HOST.cross)-$(BUILD.system))
LIBSAMPLERATE.CONFIGURE.args.build = --build=$(BUILD.machine)-unknown-linux-gnu
endif
2 changes: 1 addition & 1 deletion contrib/libtheora/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ LIBTHEORA.CONFIGURE.extra = \
--with-vorbis=$(call fn.ABSOLUTE,$(CONTRIB.build/)) \
HAVE_PKG_CONFIG=no

ifeq (1-msys,$(BUILD.cross)-$(HOST.system))
ifeq (1-msys,$(HOST.cross)-$(BUILD.system))
LIBTHEORA.CONFIGURE.args.build = --build=$(BUILD.machine)-unknown-linux-gnu
endif
16 changes: 8 additions & 8 deletions contrib/libvpx/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@ LIBVPX.CONFIGURE.extra = \
--disable-docs \
--disable-unit-tests

ifeq (1,$(BUILD.cross))
LIBVPX.CONFIGURE.env.CROSS = CROSS="$(BUILD.spec)-"
ifeq (1,$(HOST.cross))
LIBVPX.CONFIGURE.env.CROSS = CROSS="$(HOST.spec)-"
LIBVPX.CONFIGURE.args.build =
LIBVPX.CONFIGURE.extra += --enable-static-msvcrt
ifeq (i686,$(BUILD.machine))
ifeq (i686,$(HOST.machine))
LIBVPX.CONFIGURE.extra += --target=x86-win32-gcc
else ifeq (x86_64,$(BUILD.machine))
else ifeq (x86_64,$(HOST.machine))
LIBVPX.CONFIGURE.extra += --target=x86_64-win64-gcc
endif
endif

ifeq (linux,$(BUILD.system))
ifeq (x86_64,$(BUILD.machine))
ifeq (linux,$(HOST.system))
ifeq (x86_64,$(HOST.machine))
LIBVPX.CONFIGURE.extra += --enable-pic
endif
endif

ifeq (0-darwin,$(BUILD.cross)-$(BUILD.system))
ifeq (0-darwin,$(HOST.cross)-$(BUILD.system))
ifeq (x86_64,$(BUILD.machine))
LIBVPX.CONFIGURE.extra += --target=x86_64-darwin14-gcc
endif
endif

ifeq (1-mingw,$(BUILD.cross)-$(BUILD.system))
ifeq (1-mingw,$(HOST.cross)-$(HOST.system))
LIBVPX.CONFIGURE.extra += --disable-avx512
endif
2 changes: 1 addition & 1 deletion contrib/libxml2/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ LIBXML2.CONFIGURE.extra = --without-lzma
# in the MinGW environment.
LIBXML2.CONFIGURE.extra += --without-python --without-threads

ifeq (1-msys,$(BUILD.cross)-$(HOST.system))
ifeq (1-msys,$(HOST.cross)-$(BUILD.system))
LIBXML2.CONFIGURE.args.build = --build=$(BUILD.machine)-unknown-linux-gnu
endif
4 changes: 2 additions & 2 deletions contrib/x264/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ X264.CONFIGURE.shared =

X264.CONFIGURE.extra += --disable-lavf --disable-ffms --disable-avs --disable-swscale --disable-gpac --disable-lsmash --disable-cli

ifeq (1,$(BUILD.cross))
ifeq (1,$(HOST.cross))
X264.CONFIGURE.build =
X264.CONFIGURE.extra += --cross-prefix=$(BUILD.spec)-
X264.CONFIGURE.extra += --cross-prefix=$(HOST.spec)-
X264.CONFIGURE.env.CFLAGS = CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/)include) $(call fn.ARGS,X264.GCC,*archs *sysroot *minver ?extra)"
X264.CONFIGURE.env.LDFLAGS = LDFLAGS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/)lib) $(call fn.ARGS,X264.GCC,*archs *sysroot *minver)"
endif
Expand Down
2 changes: 1 addition & 1 deletion contrib/x265/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ X265.SOURCE.libs = \
$(X265.BUILD.dir)/10bit/libx265_main10.a \
$(X265.BUILD.dir)/12bit/libx265_main12.a

ifeq (1-mingw,$(BUILD.cross)-$(BUILD.system))
ifeq (1-mingw,$(HOST.cross)-$(HOST.system))
X265.O.ext = .obj
else
X265.O.ext = .o
Expand Down
6 changes: 3 additions & 3 deletions contrib/x265_10bit/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ else
X265_10.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Release
endif

ifeq (1,$(BUILD.cross))
ifeq (mingw,$(BUILD.system))
ifeq (1,$(HOST.cross))
ifeq (mingw,$(HOST.system))
X265_10.CONFIGURE.extra += -DWIN32=ON
X265_10.CONFIGURE.extra += -DCMAKE_SYSTEM_NAME=Windows
X265_10.CONFIGURE.extra += -DCMAKE_C_COMPILER=$(X265_10.GCC.gcc)
Expand All @@ -39,7 +39,7 @@ ifeq (1,$(BUILD.cross))
X265_10.CONFIGURE.extra += -DCMAKE_CXX_COMPILER=$(X265_10.GCC.gxx)
X265_10.CONFIGURE.extra += -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -static"
X265_10.CONFIGURE.extra += -DCMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS="-static-libgcc -static-libstdc++ -static"
X265_10.CONFIGURE.extra += -DCMAKE_RC_COMPILER=$(BUILD.cross.prefix)windres
X265_10.CONFIGURE.extra += -DCMAKE_RC_COMPILER=$(HOST.cross.prefix)windres
endif
X265_10.CONFIGURE.args.host = -DCMAKE_SYSTEM_NAME="$(X265_10.CONFIGURE.host)"
X265_10.CONFIGURE.args.build = -DCMAKE_HOST_SYSTEM="$(X265_10.CONFIGURE.build)"
Expand Down
6 changes: 3 additions & 3 deletions contrib/x265_12bit/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ else
X265_12.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Release
endif

ifeq (1,$(BUILD.cross))
ifeq (mingw,$(BUILD.system))
ifeq (1,$(HOST.cross))
ifeq (mingw,$(HOST.system))
X265_12.CONFIGURE.extra += -DWIN32=ON
X265_12.CONFIGURE.extra += -DCMAKE_SYSTEM_NAME=Windows
X265_12.CONFIGURE.extra += -DCMAKE_C_COMPILER=$(X265_12.GCC.gcc)
Expand All @@ -39,7 +39,7 @@ ifeq (1,$(BUILD.cross))
X265_12.CONFIGURE.extra += -DCMAKE_CXX_COMPILER=$(X265_12.GCC.gxx)
X265_12.CONFIGURE.extra += -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -static"
X265_12.CONFIGURE.extra += -DCMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS="-static-libgcc -static-libstdc++ -static"
X265_12.CONFIGURE.extra += -DCMAKE_RC_COMPILER=$(BUILD.cross.prefix)windres
X265_12.CONFIGURE.extra += -DCMAKE_RC_COMPILER=$(HOST.cross.prefix)windres
endif
X265_12.CONFIGURE.args.host = -DCMAKE_SYSTEM_NAME="$(X265_12.CONFIGURE.host)"
X265_12.CONFIGURE.args.build = -DCMAKE_HOST_SYSTEM="$(X265_12.CONFIGURE.build)"
Expand Down
6 changes: 3 additions & 3 deletions contrib/x265_8bit/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ else
X265_8.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Release
endif

ifeq (1,$(BUILD.cross))
ifeq (mingw,$(BUILD.system))
ifeq (1,$(HOST.cross))
ifeq (mingw,$(HOST.system))
X265_8.CONFIGURE.extra += -DWIN32=ON
X265_8.CONFIGURE.extra += -DCMAKE_SYSTEM_NAME=Windows
X265_8.CONFIGURE.extra += -DCMAKE_C_COMPILER=$(X265_8.GCC.gcc)
Expand All @@ -36,7 +36,7 @@ ifeq (1,$(BUILD.cross))
X265_8.CONFIGURE.extra += -DCMAKE_CXX_COMPILER=$(X265_8.GCC.gxx)
X265_8.CONFIGURE.extra += -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -static"
X265_8.CONFIGURE.extra += -DCMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS="-static-libgcc -static-libstdc++ -static"
X265_8.CONFIGURE.extra += -DCMAKE_RC_COMPILER=$(BUILD.cross.prefix)windres
X265_8.CONFIGURE.extra += -DCMAKE_RC_COMPILER=$(HOST.cross.prefix)windres
endif
X265_8.CONFIGURE.args.host = -DCMAKE_SYSTEM_NAME="$(X265_8.CONFIGURE.host)"
X265_8.CONFIGURE.args.build = -DCMAKE_HOST_SYSTEM="$(X265_8.CONFIGURE.build)"
Expand Down
2 changes: 1 addition & 1 deletion contrib/zlib/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ZLIB.FETCH.sha256 = c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197

ZLIB.CONFIGURE.args = !sete @dir !env !exe @prefix !extra

ifeq (1-mingw,$(BUILD.cross)-$(BUILD.system))
ifeq (1-mingw,$(HOST.cross)-$(HOST.system))
ZLIB.CONFIGURE.env.AR = AR="$(AR.exe)"
ZLIB.CONFIGURE.env.ARFLAGS = ARFLAGS="rc"
ZLIB.CONFIGURE.env.RANLIB = RANLIB="$(RANLIB.exe)"
Expand Down
4 changes: 2 additions & 2 deletions gtk/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ BUILD.out += $(GTK.out)

###############################################################################

ifeq (1-mingw,$(BUILD.cross)-$(BUILD.system))
GTK.CONFIGURE.extra += --host=$(BUILD.spec)
ifeq (1-mingw,$(HOST.cross)-$(HOST.system))
GTK.CONFIGURE.extra += --host=$(HOST.spec)
ifeq ($(HAS.dlfcn),1)
GTK.CONFIGURE.extra += --enable-dl
endif
Expand Down
2 changes: 1 addition & 1 deletion gtk/src/callbacks.c
Original file line number Diff line number Diff line change
Expand Up @@ -4609,7 +4609,7 @@ about_action_cb(GSimpleAction *action, GVariant *param, signal_user_data_t *ud)
GtkWidget *widget = GHB_WIDGET (ud->builder, "hb_about");
gchar *ver;

ver = g_strdup_printf("%s (%s)", HB_PROJECT_VERSION, HB_PROJECT_BUILD_ARCH);
ver = g_strdup_printf("%s (%s)", HB_PROJECT_VERSION, HB_PROJECT_HOST_ARCH);
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), ver);
g_free(ver);
gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(widget),
Expand Down
2 changes: 1 addition & 1 deletion gtk/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ ghb_activate_cb(GApplication * app, signal_user_data_t * ud)
ghb_preview_init(ud);
IoRedirect(ud);
ghb_log( "%s - %s - %s",
HB_PROJECT_TITLE, HB_PROJECT_BUILD_TITLE, HB_PROJECT_URL_WEBSITE );
HB_PROJECT_TITLE, HB_PROJECT_HOST_TITLE, HB_PROJECT_URL_WEBSITE );
ghb_init_dep_map();

GtkTextView * textview;
Expand Down
4 changes: 2 additions & 2 deletions libhb/hb_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ hb_dict_t * hb_version_dict()
"VersionString", hb_value_string(HB_PROJECT_VERSION),
"RepoHash", hb_value_string(HB_PROJECT_REPO_HASH),
"RepoDate", hb_value_string(HB_PROJECT_REPO_DATE),
"System", hb_value_string(HB_PROJECT_BUILD_SYSTEMF),
"Arch", hb_value_string(HB_PROJECT_BUILD_ARCH));
"System", hb_value_string(HB_PROJECT_HOST_SYSTEMF),
"Arch", hb_value_string(HB_PROJECT_HOST_ARCH));
if (dict == NULL)
{
hb_error("json pack failure: %s", error.text);
Expand Down
Loading

0 comments on commit 046eb04

Please sign in to comment.