dtkcore: only define QT_HOST_DATA if it is empty, enable parallel building

This commit is contained in:
José Romildo Malaquias 2018-09-02 15:15:01 -03:00
parent ca47cc90c2
commit c48a234ab1

View File

@ -23,11 +23,16 @@ stdenv.mkDerivation rec {
];
postPatch = ''
sed -i src/src.pro src/dtk_module.prf \
-e "s,\$\''${QT_HOST_DATA}/mkspecs,$out/mkspecs,"
# Only define QT_HOST_DATA if it is empty
sed '/QT_HOST_DATA=/a }' -i src/dtk_module.prf
sed '/QT_HOST_DATA=/i isEmpty(QT_HOST_DATA) {' -i src/dtk_module.prf
sed -i tools/script/dtk-translate.py \
-e "s,#!env,#!/usr/bin/env,"
# Fix shebang
sed -i tools/script/dtk-translate.py -e "s,#!env,#!/usr/bin/env,"
'';
preConfigure = ''
qmakeFlags="$qmakeFlags QT_HOST_DATA=$out"
'';
postFixup = ''
@ -35,6 +40,8 @@ stdenv.mkDerivation rec {
wrapPythonProgramsIn "$out/lib/dtk2" "$out $pythonPath"
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "Deepin tool kit core modules";
homepage = https://github.com/linuxdeepin/dtkcore;