fd64 recipe for QT5 -- "-prefix" option not working [Mostly solved?]
Edit, "This issue may be mostly solved (see post)"
I recently used fatdog64s recipe to build qt5-5.15.2-x86_64-1.txz but I think that the Environment was incorrectly built. After installing this package I observe the following:
Code: Select all
# qmake -query
QT_SYSROOT:
QT_INSTALL_PREFIX:/usr
QT_INSTALL_ARCHDATA:/usr
QT_INSTALL_DATA:/usr/lib64
QT_INSTALL_DOCS:/usr/share/doc/qt
QT_INSTALL_HEADERS:/usr/include
QT_INSTALL_LIBS:/usr/lib64
QT_INSTALL_LIBEXECS:/usr/libexec
QT_INSTALL_BINS:/usr/bin
QT_INSTALL_TESTS:/usr/tests
QT_INSTALL_PLUGINS:/usr/lib64/plugins
QT_INSTALL_IMPORTS:/usr/lib64/imports
QT_INSTALL_QML:/usr/qml
QT_INSTALL_TRANSLATIONS:/usr/share/translations
QT_INSTALL_CONFIGURATION:/etc/xdg
QT_INSTALL_EXAMPLES:/usr/share/examples
QT_INSTALL_DEMOS:/usr/share/examples
QT_HOST_PREFIX:/usr
QT_HOST_DATA:/usr
QT_HOST_BINS:/usr/bin
QT_HOST_LIBS:/usr/lib64
QMAKE_SPEC:linux-g++
QMAKE_XSPEC:linux-g++
QMAKE_VERSION:3.1
QT_VERSION:5.15.2
However the package installs qt to /opt/qt-5.15.2
If I try to change this property (see docs),
Code: Select all
qmake -set QT_INSTALL_PREFIX /opt/qt
the built-in property isn't removed, instead the following is appended to the top of the above output:
Code: Select all
QT_INSTALL_PREFIX:/opt/qt-5.15.2
Unfortunately, the configure.py script for the python3-qt5 package will read the last line outputed by "qmake -query":
Code: Select all
class TargetQtConfiguration:
""" A container for the target Qt configuration. """
def __init__(self, qmake):
""" Initialise the configuration. qmake is the full pathname of the
qmake executable that will provide the configuration.
"""
inform("Querying qmake about your Qt installation...")
pipe = os.popen(' '.join([qmake, '-query']))
for l in pipe:
l = l.strip()
tokens = l.split(':', 1)
if isinstance(tokens, list):
if len(tokens) != 2:
error("Unexpected output from qmake: '%s'\n" % l)
name, value = tokens
else:
name = tokens
value = None
name = name.replace('/', '_')
setattr(self, name, value)
pipe.close()
and I think this will cause problems when trying to build python3-qt5 even if we try to assign a new value for "QT_INSTALL_PREFIX" using the command "qmake -set".
If you look at the configure script for qt5 you find the following:
Code: Select all
-prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
shift
VAL="$1"
;;
Code: Select all
-prefix <dir> ...... This will install everything relative to <dir>
(default $QT_INSTALL_PREFIX)
...
-libdir <dir> ......... Libraries will be installed to <dir>
(default PREFIX/lib)
Code: Select all
prefix)
QT_INSTALL_PREFIX="$VAL"
;;
In conclusion I think that we need to at following option to the recipe, the following configure option seems to not be working:
Code: Select all
-prefix /opt/qt5