From c62a1974db4afd324f6adb6a40c34250465903cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Fri, 27 Jan 2017 16:09:37 +0100 Subject: [PATCH] qmc2: fix cross --- srcpkgs/qmc2/template | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/srcpkgs/qmc2/template b/srcpkgs/qmc2/template index 9b103045fd9..07d70cd9195 100644 --- a/srcpkgs/qmc2/template +++ b/srcpkgs/qmc2/template @@ -1,7 +1,7 @@ # Template file for 'qmc2' pkgname=qmc2 version=0.71 -revision=1 +revision=2 wrksrc=${pkgname} build_style=gnu-makefile make_build_args="PREFIX=/usr DATADIR=/usr/share MAN_DIR=/usr/share/man TARGET=qmc2-mame" @@ -18,8 +18,10 @@ homepage="http://qmc2.arcadehits.net/wordpress/" distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}/${version}/${pkgname}-${version}.tar.bz2" checksum=4233d8aaf679f9f752348990eb5ebe3ab801e28a17dc624ba9b6eb77d54a82f0 -nocross=yes -nopie=yes +if [ -n "$CROSS_BUILD" ]; then + hostmakedepends+=" qt5-host-tools qt5-multimedia-devel qt5-script-devel qt5-svg-devel" + hostmakedepends+=" qt5-webkit-devel qt5-xmlpatterns-devel qt5-x11extras-devel" +fi pre_build() { # Replace sdl-config with sdl2-config @@ -30,6 +32,15 @@ pre_build() { do_build() { # Print configuration info make ${make_build_args} config + make ${make_build_args} Makefile.qmake + make ${make_build_args} tools/qchdman/Makefile + sed -i Makefile.qmake tools/qchdman/Makefile \ + -e "s;^\(CC *=\).*;\1 $CC;" \ + -e "s;^\(CXX *=\).*;\1 $CXX;" \ + -e "s;^\(LINK *=\).*;\1 $CXX;" \ + -e "s;^\(CFLAGS *=\)\(.*\);\1 $CFLAGS \2;" \ + -e "s;^\(CXXFLAGS *=\)\(.*\);\1 $CXXFLAGS \2;" \ + -e "s;^\(LFLAGS *=\)\(.*\);\1 $LDFLAGS \2;" make ${makejobs} qchdman make ${make_build_args} ${makejobs} }