Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#53186 closed enhancement (fixed)

qmake5 should change destroot.destdir (qmake PG idem)

Reported by: RJVB (René Bertin) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: michaelld (Michael Dickens), mkae (Marko Käning)
Port: qt5 qt4-mac

Description

I think the qmake portgroups should include a statement like

destroot.destdir "INSTALL_ROOT=${destroot}"

I had already observed this but now got confirmation on a Qt ML that this is indeed the official way to do a destroot'ed install.

Using the default (DESTDIR=${destroot}) mostly works, but can have undesirable side-effects:

> ls -l `port work qt5-kde-devel-qtwebengine`
drwxr-xr-x  8 bertin admin 612 Dec  2 12:18 qtwebengine-opensource-src-5.7.1
drwxr-xr-x 11 bertin admin 510 Dec 31 01:44 build
drwxr-xr-x  3 bertin admin 136 Dec 31 11:59 destrootQtWebEngineCore.framework
drwxr-xr-x  3 bertin admin 136 Dec 31 11:59 destrootQtWebEngine.framework
drwxr-xr-x  3 bertin admin 136 Dec 31 11:59 destrootQtWebEngineWidgets.framework
drwxr-xr-x  3 bertin admin 102 Dec 31 11:59 destroot

Same thing happens for me with QtWebKit. The end result seems to be fine, but there's no guarantee that this will continue to be the case.

A number of Qt5-dependent ports make this change themselves, that shouldn't be necessary, ideally.

Change History (8)

comment:1 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

The qt5 PortGroup has the code destroot.env-append INSTALL_ROOT=${destroot}.
Is there any reason to think that this is insufficient?

comment:2 Changed 7 years ago by RJVB (René Bertin)

The above observations and the instructions on the Qt interest ML ...

I'm waiting for a QtWebKit build to finish to see if adding the variable on the commandline makes a difference.

comment:3 in reply to:  2 Changed 7 years ago by RJVB (René Bertin)

Replying to RJVB:

I'm waiting for a QtWebKit build to finish to see if adding the variable on the commandline makes a difference.

That was a Linux build, and well, evidently I cannot reproduce the issue there with the 5.7.1 QtWebKit version.

Either way, whether or not setting INSTALL_ROOT in the *environment* is enough to obtain the intended behaviour is one thing. Setting DESTDIR via the command line *in addition* is another thing, and in principle not a good idea since that variable *is* used in the Makefiles generated by QMake.

comment:4 Changed 7 years ago by mkae (Marko Käning)

Cc: mkae added

comment:5 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: MarcusCalhoun-Lopez removed
Owner: set to MarcusCalhoun-Lopez
Status: newassigned

comment:6 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: assignedclosed

In 520094a8/macports-ports:

qt5 PG: use INSTALL_ROOT instead of DESTDIR

qmake uses INSTALL_ROOT for the installation location and DESTDIR
for other purposes.
See http://doc.qt.io/qt-5/qmake-variable-reference.html#destdir
Fixes #53186

comment:7 Changed 7 years ago by mkae (Marko Käning)

Port: qt4-mac added; qt4 removed

comment:8 Changed 7 years ago by dstrubbe (David Strubbe)

In c8e295f270ad552373b516ef905ba1714549ade8/macports-ports:

svn2git: Fix destroot error.

Destroot was broken since a change to the qmake5 port group. The Makefile for the destroot phase needs use INSTALL_ROOT instead of DESTDIR, to be consistent with that change: #53186

Note: See TracTickets for help on using tickets.