Bug#924234: dtkcore: Cross-builds incorrectly, built packages contain paths from build architecture

2019-03-11 Thread Helmut Grohne
Control: clone -1 -2
Control: reassign -2 src:dtkwidget

On Sun, Mar 10, 2019 at 04:47:35PM +0300, Dmitry Shachnev wrote:
> When one cross-builds dtkcore package the contents of built libdtkcore-dev
> are wrong: some files are installed into /usr/lib/${DEB_BUILD_MULTIARCH}
> instead of the expected /usr/lib/${DEB_HOST_MULTIARCH} path.

Thank you. I observe that dtkwidget has a copy of this bug.

Helmut



Bug#924234: dtkcore: Cross-builds incorrectly, built packages contain paths from build architecture

2019-03-10 Thread Dmitry Shachnev
On Sun, Mar 10, 2019 at 04:47:35PM +0300, Dmitry Shachnev wrote:
> A patch to fix that is attached.

Sorry, I forgot to attach the patch. Here it is.

--
Dmitry Shachnev
--- a/src/dtk_module.prf
+++ b/src/dtk_module.prf
@@ -97,11 +97,10 @@ MODULE_PRI_CONT += \
 write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
 
 
-QT_HOST_DATA=$$system(qmake -query QT_HOST_DATA)
 qt_module.files = $$MODULE_PRI
 
 isEmpty(MKSPECS_INSTALL_DIR) {
-MKSPECS_INSTALL_DIR=$${QT_HOST_DATA}/mkspecs
+MKSPECS_INSTALL_DIR=$$[QT_HOST_DATA]/mkspecs
 }
 qt_module.path = $${MKSPECS_INSTALL_DIR}/modules
 
--- a/src/src.pro
+++ b/src/src.pro
@@ -104,7 +104,7 @@ include(dtk_module.prf)
 prf.files+= $$PWD/*.prf
 
 isEmpty(MKSPECS_INSTALL_DIR) {
-MKSPECS_INSTALL_DIR=$${QT_HOST_DATA}/mkspecs
+MKSPECS_INSTALL_DIR=$$[QT_HOST_DATA]/mkspecs
 }
 prf.path = $${MKSPECS_INSTALL_DIR}/features
 


signature.asc
Description: PGP signature


Bug#924234: dtkcore: Cross-builds incorrectly, built packages contain paths from build architecture

2019-03-10 Thread Dmitry Shachnev
Source: dtkcore
Version: 2.0.9.17-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

Dear Maintainer,

When one cross-builds dtkcore package the contents of built libdtkcore-dev
are wrong: some files are installed into /usr/lib/${DEB_BUILD_MULTIARCH}
instead of the expected /usr/lib/${DEB_HOST_MULTIARCH} path.

E.g. in this example, it should be /usr/lib/arm-linux-gnueabihf instead of
/usr/lib/x86_64-linux-gnu:

  $ dpkg-deb -c libdtkcore-dev_2.0.9.17-1_armhf.deb | grep mkspecs 
  drwxr-xr-x root/root 0 2019-02-28 21:00 
./usr/lib/x86_64-linux-gnu/qt5/mkspecs/
  drwxr-xr-x root/root 0 2019-02-28 21:00 
./usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/
  -rw-r--r-- root/root  2378 2019-02-26 02:56 
./usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/dtk_build.prf
  -rw-r--r-- root/root  1578 2019-02-26 02:56 
./usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/dtk_cmake.prf
  -rw-r--r-- root/root   376 2019-02-26 02:56 
./usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/dtk_lib.prf
  -rw-r--r-- root/root  4459 2019-02-26 02:56 
./usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/dtk_module.prf
  -rw-r--r-- root/root  3940 2019-02-26 02:56 
./usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/dtk_qmake.prf
  -rw-r--r-- root/root  1580 2019-02-26 02:56 
./usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/dtk_translation.prf
  drwxr-xr-x root/root 0 2019-02-28 21:00 
./usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/
  -rw-r--r-- root/root   471 2019-02-28 21:00 
./usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore.pri

This happens because src/dtk_module.prf has "qmake -query" call, and qmake
is the build architecture qmake by default.

That subprocess call can be avoided at all, as the QT_HOST_DATA variable is
built-in in qmake.

A patch to fix that is attached.

--
Dmitry Shachnev


signature.asc
Description: PGP signature