From 1818a70bb1ff9257acea86d7ec3d5580bcf9669e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Tue, 30 Jul 2019 09:04:21 +0200 Subject: [PATCH] dtkcore: fix cross MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In post_build patch deepin-os-release/Makefile to rebuild with target tools and libraries. Signed-off-by: Jürgen Buchmüller --- srcpkgs/dtkcore/template | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/srcpkgs/dtkcore/template b/srcpkgs/dtkcore/template index 2d7a7baa126..7e472c5c0e9 100644 --- a/srcpkgs/dtkcore/template +++ b/srcpkgs/dtkcore/template @@ -14,11 +14,25 @@ changelog="https://github.com/linuxdeepin/dtkcore/blob/${version}/CHANGELOG.md" distfiles="https://github.com/linuxdeepin/dtkcore/archive/${version}.tar.gz" checksum=b443869be7b2238d6c6ecdefe33e67c973b13b7cc5a396d07dd0acad3da464f2 -if [ "$CROSS_BUILD" ];then - hostmakedepends+=" qt5-devel gsettings-qt-devel" +if [ "$CROSS_BUILD" ]; then + hostmakedepends+=" qt5-devel" fi -nocross="Some QMake mess" +post_build() { + if [ "$CROSS_BUILD" ]; then + cd ${wrksrc}/tools/deepin-os-release + vsed -i Makefile -e"s;\(CC .*=\).*;\1 $CC;" + vsed -i Makefile -e"s;\(CXX .*=\).*;\1 $CXX;" + vsed -i Makefile -e"s;\(CFLAGS .*=\).*;\1 $CFLAGS -fPIC;" + vsed -i Makefile -e"s;\(CXXFLAGS .*=\).*;\1 $CXXFLAGS -fPIC;" + vsed -i Makefile -e"s;\(LINK .*=\).*;\1 $CXX;" + vsed -i Makefile -e"s;\(LFLAGS .*=\).*;\1 $LDFLAGS -pie;" + vsed -i Makefile -e"s;\(AR .*=\).*;\1 $AR;" + vsed -i Makefile -e"s; /usr/lib/libQt5Core.so; ${XBPS_CROSS_BASE}/usr/lib/libQt5Core.so;" + make clean + make ${makejobs} + fi +} dtkcore-devel_package() { short_desc+=" - development files"