From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9AA53138A1A for ; Wed, 11 Feb 2015 15:11:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E2DA0E0893; Wed, 11 Feb 2015 15:11:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 88D87E0893 for ; Wed, 11 Feb 2015 15:11:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2763C340803 for ; Wed, 11 Feb 2015 15:11:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CCB1B11888 for ; Wed, 11 Feb 2015 15:11:47 +0000 (UTC) From: "Ben de Groot" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ben de Groot" Message-ID: <1423667495.a8a171061e8347da2a1bfe3dac8916f6d52e927e.yngwin@gentoo> Subject: [gentoo-commits] proj/qt:master commit in: eclass/ X-VCS-Repository: proj/qt X-VCS-Files: eclass/qmake-utils.eclass X-VCS-Directories: eclass/ X-VCS-Committer: yngwin X-VCS-Committer-Name: Ben de Groot X-VCS-Revision: a8a171061e8347da2a1bfe3dac8916f6d52e927e X-VCS-Branch: master Date: Wed, 11 Feb 2015 15:11:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b1d7a71b-e98b-4221-b05b-dc451f39784e X-Archives-Hash: 989760b77168ecbe097dc65a35d4e421 commit: a8a171061e8347da2a1bfe3dac8916f6d52e927e Author: Ben de Groot gentoo org> AuthorDate: Wed Feb 11 15:11:35 2015 +0000 Commit: Ben de Groot gentoo org> CommitDate: Wed Feb 11 15:11:35 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=a8a17106 qmake-utils.eclass: add get_bindir helper functions --- eclass/qmake-utils.eclass | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/eclass/qmake-utils.eclass b/eclass/qmake-utils.eclass index 623a629..cc11970 100644 --- a/eclass/qmake-utils.eclass +++ b/eclass/qmake-utils.eclass @@ -51,6 +51,25 @@ qmake-utils_find_pro_file() { esac } +# @FUNCTION qt4_get_bindir +# @DESCRIPTION: +# Get the correct location of Qt4's installed binaries. +qt4_get_bindir() { + local qtbindir=${EPREFIX}/usr/$(get_libdir)/qt4/bin + if [[ -x ${qtbindir} ]]; then + echo ${qtbindir} + else + echo ${EPREFIX}/usr/bin + fi +} + +# @FUNCTION qt5_get_bindir +# @DESCRIPTION: +# Get the correct location of Qt5's installed binaries. +qt5_get_bindir() { + echo ${EPREFIX}/usr/$(get_libdir)/qt5/bin +} + # @VARIABLE: EQMAKE4_EXCLUDE # @DEFAULT_UNSET # @DESCRIPTION: @@ -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)" \