summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorBen de Groot <yngwin@gentoo.org>2015-02-26 01:52:15 +0000
committerBen de Groot <yngwin@gentoo.org>2015-02-26 01:52:15 +0000
commit0e378538d378c779e44c71df5641309a5475ff53 (patch)
tree2e5895818c650122ecaa868e4d95676b16587f4f /eclass
parentAdd missing pango dep. (diff)
downloadgentoo-2-0e378538d378c779e44c71df5641309a5475ff53.tar.gz
gentoo-2-0e378538d378c779e44c71df5641309a5475ff53.tar.bz2
gentoo-2-0e378538d378c779e44c71df5641309a5475ff53.zip
add qt{4,5}_get_bindir helper functions
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/qmake-utils.eclass31
2 files changed, 27 insertions, 9 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 2671a474925a..c36e03399b38 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1554 2015/02/24 12:14:26 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1555 2015/02/26 01:52:15 yngwin Exp $
+
+ 26 Feb 2015; Ben de Groot <yngwin@gentoo.org> qmake-utils.eclass:
+ add qt{4,5}_get_bindir helper functions
24 Feb 2015; Anthony G. Basile <blueness@gentoo.org> bitcoincore.eclass:
bitcoincore.eclass: update spamfilter message, bug #541192.
diff --git a/eclass/qmake-utils.eclass b/eclass/qmake-utils.eclass
index dac5b244e63b..641af8cbf6ca 100644
--- a/eclass/qmake-utils.eclass
+++ b/eclass/qmake-utils.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/qmake-utils.eclass,v 1.5 2014/11/17 02:15:42 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/qmake-utils.eclass,v 1.6 2015/02/26 01:52:15 yngwin Exp $
# @ECLASS: qmake-utils.eclass
# @MAINTAINER:
@@ -16,6 +16,25 @@ _QMAKE_UTILS_ECLASS=1
inherit eutils multilib toolchain-funcs
+# @FUNCTION: qt4_get_bindir
+# @DESCRIPTION:
+# Echoes the directory where Qt4 binaries are installed.
+qt4_get_bindir() {
+ local qtbindir=${EPREFIX}/usr/$(get_libdir)/qt4/bin
+ if [[ -d ${qtbindir} ]]; then
+ echo ${qtbindir}
+ else
+ echo ${EPREFIX}/usr/bin
+ fi
+}
+
+# @FUNCTION: qt5_get_bindir
+# @DESCRIPTION:
+# Echoes the directory where Qt5 binaries are installed.
+qt5_get_bindir() {
+ echo ${EPREFIX}/usr/$(get_libdir)/qt5/bin
+}
+
# @FUNCTION: qmake-utils_find_pro_file
# @RETURN: zero or one qmake .pro file names
# @INTERNAL
@@ -158,11 +177,7 @@ eqmake4() {
[[ -n ${EQMAKE4_EXCLUDE} ]] && eshopts_pop
- # determine qmake binary location
- local qmake_path=${EPREFIX}/usr/$(get_libdir)/qt4/bin/qmake
- [[ ! -x ${qmake_path} ]] && qmake_path=${EPREFIX}/usr/bin/qmake
-
- "${qmake_path}" \
+ "$(qt4_get_bindir)"/qmake \
-makefile \
QMAKE_AR="$(tc-getAR) cqs" \
QMAKE_CC="$(tc-getCC)" \
@@ -213,7 +228,7 @@ eqmake5() {
ebegin "Running qmake"
- "${EPREFIX}"/usr/$(get_libdir)/qt5/bin/qmake \
+ "$(qt5_get_bindir)"/qmake \
-makefile \
QMAKE_AR="$(tc-getAR) cqs" \
QMAKE_CC="$(tc-getCC)" \