qmc2: fix cross

This commit is contained in:
Jürgen Buchmüller 2017-01-27 16:09:37 +01:00
parent 0031b092e5
commit c62a1974db

View file

@ -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}
}