commit: 57293c08f9c38855b723c150cbba3f5487af8393
Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 29 00:30:56 2015 +0000
Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Mon Jun 29 00:30:56 2015 +0000
URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=57293c08
[qmake-utils.eclass] Sync.
eclass/qmake-utils.eclass | 54 +++++++++++++++++++++++++++++++++++------------
1 file changed, 40 insertions(+), 14 deletions(-)
diff --git a/eclass/qmake-utils.eclass b/eclass/qmake-utils.eclass
index 5822848..2594a95 100644
--- a/eclass/qmake-utils.eclass
+++ b/eclass/qmake-utils.eclass
@@ -22,10 +22,11 @@ inherit eutils multilib toolchain-funcs
# @FUNCTION: qt4_get_bindir
# @DESCRIPTION:
# Echoes the directory where Qt4 binaries are installed.
+# EPREFIX is already prepended to the returned path.
qt4_get_bindir() {
has "${EAPI:-0}" 0 1 2 && use !prefix && EPREFIX=
- local qtbindir=${EPREFIX}/usr/$(get_libdir)/qt4/bin
+ local qtbindir=${EPREFIX}$(qt4_get_libdir)/bin
if [[ -d ${qtbindir} ]]; then
echo ${qtbindir}
else
@@ -36,42 +37,67 @@ qt4_get_bindir() {
# @FUNCTION: qt4_get_headerdir
# @DESCRIPTION:
# Echoes the directory where Qt4 headers are installed.
-# Does not take EPREFIX into account.
qt4_get_headerdir() {
echo /usr/include/qt4
}
+# @FUNCTION: qt4_get_libdir
+# @DESCRIPTION:
+# Echoes the directory where Qt4 libraries are installed.
+qt4_get_libdir() {
+ echo /usr/$(get_libdir)/qt4
+}
+
# @FUNCTION: qt4_get_mkspecsdir
# @DESCRIPTION:
# Echoes the directory where Qt4 mkspecs are installed.
-# Does not take EPREFIX into account.
qt4_get_mkspecsdir() {
echo /usr/share/qt4/mkspecs
}
+# @FUNCTION: qt4_get_plugindir
+# @DESCRIPTION:
+# Echoes the directory where Qt4 plugins are installed.
+qt4_get_plugindir() {
+ echo $(qt4_get_libdir)/plugins
+}
+
# @FUNCTION: qt5_get_bindir
# @DESCRIPTION:
# Echoes the directory where Qt5 binaries are installed.
+# EPREFIX is already prepended to the returned path.
qt5_get_bindir() {
has "${EAPI:-0}" 0 1 2 && use !prefix && EPREFIX=
- echo ${EPREFIX}/usr/$(get_libdir)/qt5/bin
+ echo ${EPREFIX}$(qt5_get_libdir)/qt5/bin
}
# @FUNCTION: qt5_get_headerdir
# @DESCRIPTION:
# Echoes the directory where Qt5 headers are installed.
-# Does not take EPREFIX into account.
qt5_get_headerdir() {
echo /usr/include/qt5
}
+# @FUNCTION: qt5_get_libdir
+# @DESCRIPTION:
+# Echoes the directory where Qt5 libraries are installed.
+qt5_get_libdir() {
+ echo /usr/$(get_libdir)
+}
+
# @FUNCTION: qt5_get_mkspecsdir
# @DESCRIPTION:
# Echoes the directory where Qt5 mkspecs are installed.
-# Does not take EPREFIX into account.
qt5_get_mkspecsdir() {
- echo /usr/$(get_libdir)/qt5/mkspecs
+ echo $(qt5_get_libdir)/qt5/mkspecs
+}
+
+# @FUNCTION: qt5_get_plugindir
+# @DESCRIPTION:
+# Echoes the directory where Qt5 plugins are installed.
+qt5_get_plugindir() {
+ echo $(qt5_get_libdir)/qt5/plugins
}
# @FUNCTION: qmake-utils_find_pro_file
@@ -120,10 +146,10 @@ qmake-utils_find_pro_file() {
# @FUNCTION: eqmake4
# @USAGE: [project_file] [parameters to qmake]
# @DESCRIPTION:
-# Wrapper for Qt4's qmake. If project_file isn't specified, eqmake4 will
-# look for it in the current directory (${S}, non-recursively). If more
-# than one project file are found, then ${PN}.pro is processed, provided
-# that it exists. Otherwise eqmake4 fails.
+# Wrapper for Qt4's qmake. If project_file is not specified, eqmake4 looks
+# for one in the current directory (non-recursively). If multiple project
+# files are found, then ${PN}.pro is used, if it exists, otherwise eqmake4
+# will not be able to continue.
#
# All other arguments are appended unmodified to qmake command line.
#
@@ -233,9 +259,9 @@ eqmake4() {
QMAKE_LFLAGS="${LDFLAGS}" \
QMAKE_LFLAGS_RELEASE= \
QMAKE_LFLAGS_DEBUG= \
- QMAKE_LIBDIR_QT="${EPREFIX}"/usr/$(get_libdir)/qt4 \
- QMAKE_LIBDIR_X11="${EPREFIX}"/usr/$(get_libdir) \
- QMAKE_LIBDIR_OPENGL="${EPREFIX}"/usr/$(get_libdir) \
+ QMAKE_LIBDIR_QT="${EPREFIX}$(qt4_get_libdir)" \
+ QMAKE_LIBDIR_X11="${EPREFIX}/usr/$(get_libdir)" \
+ QMAKE_LIBDIR_OPENGL="${EPREFIX}/usr/$(get_libdir)" \
"${qmake_args[@]}"
if ! eend $? ; then