Gentoo Archives: gentoo-commits

From: Davide Pesavento <pesa@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/qt:master commit in: eclass/
Date: Mon, 29 Jun 2015 00:31:28
Message-Id: 1435537856.57293c08f9c38855b723c150cbba3f5487af8393.pesa@gentoo
1 commit: 57293c08f9c38855b723c150cbba3f5487af8393
2 Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 29 00:30:56 2015 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 29 00:30:56 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=57293c08
7
8 [qmake-utils.eclass] Sync.
9
10 eclass/qmake-utils.eclass | 54 +++++++++++++++++++++++++++++++++++------------
11 1 file changed, 40 insertions(+), 14 deletions(-)
12
13 diff --git a/eclass/qmake-utils.eclass b/eclass/qmake-utils.eclass
14 index 5822848..2594a95 100644
15 --- a/eclass/qmake-utils.eclass
16 +++ b/eclass/qmake-utils.eclass
17 @@ -22,10 +22,11 @@ inherit eutils multilib toolchain-funcs
18 # @FUNCTION: qt4_get_bindir
19 # @DESCRIPTION:
20 # Echoes the directory where Qt4 binaries are installed.
21 +# EPREFIX is already prepended to the returned path.
22 qt4_get_bindir() {
23 has "${EAPI:-0}" 0 1 2 && use !prefix && EPREFIX=
24
25 - local qtbindir=${EPREFIX}/usr/$(get_libdir)/qt4/bin
26 + local qtbindir=${EPREFIX}$(qt4_get_libdir)/bin
27 if [[ -d ${qtbindir} ]]; then
28 echo ${qtbindir}
29 else
30 @@ -36,42 +37,67 @@ qt4_get_bindir() {
31 # @FUNCTION: qt4_get_headerdir
32 # @DESCRIPTION:
33 # Echoes the directory where Qt4 headers are installed.
34 -# Does not take EPREFIX into account.
35 qt4_get_headerdir() {
36 echo /usr/include/qt4
37 }
38
39 +# @FUNCTION: qt4_get_libdir
40 +# @DESCRIPTION:
41 +# Echoes the directory where Qt4 libraries are installed.
42 +qt4_get_libdir() {
43 + echo /usr/$(get_libdir)/qt4
44 +}
45 +
46 # @FUNCTION: qt4_get_mkspecsdir
47 # @DESCRIPTION:
48 # Echoes the directory where Qt4 mkspecs are installed.
49 -# Does not take EPREFIX into account.
50 qt4_get_mkspecsdir() {
51 echo /usr/share/qt4/mkspecs
52 }
53
54 +# @FUNCTION: qt4_get_plugindir
55 +# @DESCRIPTION:
56 +# Echoes the directory where Qt4 plugins are installed.
57 +qt4_get_plugindir() {
58 + echo $(qt4_get_libdir)/plugins
59 +}
60 +
61 # @FUNCTION: qt5_get_bindir
62 # @DESCRIPTION:
63 # Echoes the directory where Qt5 binaries are installed.
64 +# EPREFIX is already prepended to the returned path.
65 qt5_get_bindir() {
66 has "${EAPI:-0}" 0 1 2 && use !prefix && EPREFIX=
67
68 - echo ${EPREFIX}/usr/$(get_libdir)/qt5/bin
69 + echo ${EPREFIX}$(qt5_get_libdir)/qt5/bin
70 }
71
72 # @FUNCTION: qt5_get_headerdir
73 # @DESCRIPTION:
74 # Echoes the directory where Qt5 headers are installed.
75 -# Does not take EPREFIX into account.
76 qt5_get_headerdir() {
77 echo /usr/include/qt5
78 }
79
80 +# @FUNCTION: qt5_get_libdir
81 +# @DESCRIPTION:
82 +# Echoes the directory where Qt5 libraries are installed.
83 +qt5_get_libdir() {
84 + echo /usr/$(get_libdir)
85 +}
86 +
87 # @FUNCTION: qt5_get_mkspecsdir
88 # @DESCRIPTION:
89 # Echoes the directory where Qt5 mkspecs are installed.
90 -# Does not take EPREFIX into account.
91 qt5_get_mkspecsdir() {
92 - echo /usr/$(get_libdir)/qt5/mkspecs
93 + echo $(qt5_get_libdir)/qt5/mkspecs
94 +}
95 +
96 +# @FUNCTION: qt5_get_plugindir
97 +# @DESCRIPTION:
98 +# Echoes the directory where Qt5 plugins are installed.
99 +qt5_get_plugindir() {
100 + echo $(qt5_get_libdir)/qt5/plugins
101 }
102
103 # @FUNCTION: qmake-utils_find_pro_file
104 @@ -120,10 +146,10 @@ qmake-utils_find_pro_file() {
105 # @FUNCTION: eqmake4
106 # @USAGE: [project_file] [parameters to qmake]
107 # @DESCRIPTION:
108 -# Wrapper for Qt4's qmake. If project_file isn't specified, eqmake4 will
109 -# look for it in the current directory (${S}, non-recursively). If more
110 -# than one project file are found, then ${PN}.pro is processed, provided
111 -# that it exists. Otherwise eqmake4 fails.
112 +# Wrapper for Qt4's qmake. If project_file is not specified, eqmake4 looks
113 +# for one in the current directory (non-recursively). If multiple project
114 +# files are found, then ${PN}.pro is used, if it exists, otherwise eqmake4
115 +# will not be able to continue.
116 #
117 # All other arguments are appended unmodified to qmake command line.
118 #
119 @@ -233,9 +259,9 @@ eqmake4() {
120 QMAKE_LFLAGS="${LDFLAGS}" \
121 QMAKE_LFLAGS_RELEASE= \
122 QMAKE_LFLAGS_DEBUG= \
123 - QMAKE_LIBDIR_QT="${EPREFIX}"/usr/$(get_libdir)/qt4 \
124 - QMAKE_LIBDIR_X11="${EPREFIX}"/usr/$(get_libdir) \
125 - QMAKE_LIBDIR_OPENGL="${EPREFIX}"/usr/$(get_libdir) \
126 + QMAKE_LIBDIR_QT="${EPREFIX}$(qt4_get_libdir)" \
127 + QMAKE_LIBDIR_X11="${EPREFIX}/usr/$(get_libdir)" \
128 + QMAKE_LIBDIR_OPENGL="${EPREFIX}/usr/$(get_libdir)" \
129 "${qmake_args[@]}"
130
131 if ! eend $? ; then