From 9e52f921960b5a40c22bea2e0c409e35c75f8d26 Mon Sep 17 00:00:00 2001
From: Lawrence Rust <lvr@softsystem.co.uk>
Date: Wed, 10 Oct 2012 20:47:33 +0200
Subject: [PATCH] Fix Windows cross-compile of MythTV 0.26 on Linux
Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
---
mythtv/configure | 3 +++
mythtv/external/Makefile | 14 +++++++++++---
mythtv/external/nzmqt/src/nzmqt.pro | 5 +++++
mythtv/external/qjson/src/src.pro | 8 +++++++-
4 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/mythtv/configure b/mythtv/configure
index 27958e1..19900a8 100755
a
|
b
|
QMAKE_LIBDIR-=${sysroot}${libdir} |
5429 | 5429 | LATE_LIBS+=-L${sysroot}${libdir} |
5430 | 5430 | EOF |
5431 | 5431 | |
| 5432 | # Save the cross-prefix for external configure scripts |
| 5433 | [ -n "$cross_prefix" ] && echo "XPREFIX=${cross_prefix%-}" >> $TMPMAK |
| 5434 | |
5432 | 5435 | #echo "endif # FFMPEG_CONFIG_MAK" >> $TMPMAK |
5433 | 5436 | |
5434 | 5437 | # Should be done on all platforms, but for the time being limit it to mac only |
diff --git a/mythtv/external/Makefile b/mythtv/external/Makefile
index 6fc0c2e..0323f2a 100644
a
|
b
|
SUBDIRS_UNINSTALL = $(addsuffix -uninstall, ${SUBDIRS}) |
8 | 8 | SUBDIRS_CLEAN = $(addsuffix -clean, ${SUBDIRS}) |
9 | 9 | SUBDIRS_DISTCLEAN = $(addsuffix -distclean, ${SUBDIRS}) |
10 | 10 | |
| 11 | ZEROMQ_CONFIG = --prefix=${PREFIX} |
| 12 | ZEROMQ_CONFIG += --includedir=${PREFIX}/include/mythtv/zeromq |
| 13 | ZEROMQ_CONFIG += --without-documentation |
| 14 | ifdef XBUILD |
| 15 | ZEROMQ_CONFIG += --build=${XBUILD} |
| 16 | endif |
| 17 | ifdef XPREFIX |
| 18 | ZEROMQ_CONFIG += --host=${XPREFIX} |
| 19 | endif |
| 20 | |
11 | 21 | default: all |
12 | 22 | all: ${SUBDIRS_ALL} |
13 | 23 | install: ${SUBDIRS_INSTALL} |
… |
… |
zeromq-all: zeromq/Makefile |
23 | 33 | ${MAKE} -C zeromq all |
24 | 34 | |
25 | 35 | zeromq/Makefile: zeromq/configure |
26 | | (cd zeromq ; \ |
27 | | ./configure --without-documentation --prefix=${PREFIX} \ |
28 | | --includedir=${PREFIX}/include/mythtv/zeromq) |
| 36 | (cd zeromq ; ./configure ${ZEROMQ_CONFIG} ) |
29 | 37 | |
30 | 38 | zeromq-install zeromq-uninstall zeromq-clean zeromq-distclean: |
31 | 39 | ${MAKE} -C zeromq ${@:zeromq-%=%} DESTDIR=${INSTALL_ROOT} |
diff --git a/mythtv/external/nzmqt/src/nzmqt.pro b/mythtv/external/nzmqt/src/nzmqt.pro
index 45dc1d4..947457f 100644
a
|
b
|
INSTALLS = target |
13 | 13 | |
14 | 14 | TEMPLATE = lib |
15 | 15 | |
| 16 | # Windows doesn't have a nice variable like LD_LIBRARY_PATH, |
| 17 | # which means make install would be broken without extra steps. |
| 18 | # As a workaround, we store dlls with exes. Also improves debugging! |
| 19 | windows: target.path = $${PREFIX}/bin |
| 20 | |
16 | 21 | QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2) |
17 | 22 | |
18 | 23 | SOURCES += \ |
diff --git a/mythtv/external/qjson/src/src.pro b/mythtv/external/qjson/src/src.pro
index 7859c38..8cd25e1 100644
a
|
b
|
TARGET = mythqjson |
9 | 9 | target.path = $${LIBDIR} |
10 | 10 | DESTDIR = $$QJSON_BASE/lib |
11 | 11 | #CONFIG += create_prl |
| 12 | CONFIG += dll |
12 | 13 | INSTALLS = target |
13 | 14 | |
14 | 15 | !mingw { |
… |
… |
INSTALLS = target |
17 | 18 | |
18 | 19 | windows: { |
19 | 20 | DEFINES += QJSON_MAKEDLL |
| 21 | |
| 22 | # Windows doesn't have a nice variable like LD_LIBRARY_PATH, |
| 23 | # which means make install would be broken without extra steps. |
| 24 | # As a workaround, we store dlls with exes. Also improves debugging! |
| 25 | # |
| 26 | target.path = $${PREFIX}/bin |
20 | 27 | } |
21 | 28 | |
22 | 29 | # MythTV OS X build fix. We want a dynamic library (like all our other libs), |
… |
… |
cppinc.files += $${PUBLIC_CPPHEADERS} |
96 | 103 | cppinc.path += $${PREFIX}/include/mythtv/QJson/ |
97 | 104 | |
98 | 105 | INSTALLS += cppinc |
99 | | |