summaryrefslogtreecommitdiff
path: root/eclass/qt5-build.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-13 16:55:35 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-03-13 16:55:35 +0000
commit1dde4e5c4b92d849bf1abf0a48135b2a0644f7e1 (patch)
treec99a472cce74148d499f42ada873454b0e32a42d /eclass/qt5-build.eclass
parentda6a52f691ef980bab92d003d5df8f463c623af8 (diff)
gentoo resync : 13.03.2018
Diffstat (limited to 'eclass/qt5-build.eclass')
-rw-r--r--eclass/qt5-build.eclass44
1 files changed, 27 insertions, 17 deletions
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index b381c28495cb..2517d3992dde 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: qt5-build.eclass
@@ -13,7 +13,7 @@
# Requires EAPI 6.
if [[ ${CATEGORY} != dev-qt ]]; then
- die "qt5-build.eclass is only to be used for building Qt 5."
+ die "qt5-build.eclass is only to be used for building Qt 5"
fi
case ${EAPI} in
@@ -57,15 +57,14 @@ esac
# for tests you should proceed with setting VIRTUALX_REQUIRED=test.
: ${VIRTUALX_REQUIRED:=manual}
-inherit estack flag-o-matic ltprune toolchain-funcs versionator virtualx
+inherit eapi7-ver estack flag-o-matic toolchain-funcs virtualx
HOMEPAGE="https://www.qt.io/"
LICENSE="|| ( GPL-2 GPL-3 LGPL-3 ) FDL-1.3"
-SLOT=5/$(get_version_component_range 1-2)
+SLOT=5/$(ver_cut 1-2)
-QT5_MINOR_VERSION=$(get_version_component_range 2)
-QT5_PATCH_VERSION=$(get_version_component_range 3)
-readonly QT5_MINOR_VERSION QT5_PATCH_VERSION
+QT5_MINOR_VERSION=$(ver_cut 2)
+readonly QT5_MINOR_VERSION
case ${PV} in
5.9999)
@@ -147,15 +146,6 @@ EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install sr
# @DESCRIPTION:
# Unpacks the sources.
qt5-build_src_unpack() {
- if tc-is-gcc; then
- local min_gcc4_minor_version=7
- if [[ $(gcc-major-version) -lt 4 ]] || \
- [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt ${min_gcc4_minor_version} ]]; then
- eerror "GCC version 4.${min_gcc4_minor_version} or later is required to build this package"
- die "GCC 4.${min_gcc4_minor_version} or later required"
- fi
- fi
-
# bug 307861
if [[ ${PN} == qtwebengine || ${PN} == qtwebkit ]]; then
eshopts_push -s extglob
@@ -330,7 +320,9 @@ qt5-build_src_install() {
fi
qt5_install_module_config
- prune_libtool_files
+
+ # prune libtool files
+ find "${D}" -name '*.la' -delete || die
}
# @FUNCTION: qt5-build_pkg_postinst
@@ -552,6 +544,24 @@ qt5_base_configure() {
-examplesdir "${QT5_EXAMPLESDIR}"
-testsdir "${QT5_TESTSDIR}"
+ # force appropriate compiler
+ $(if use kernel_FreeBSD; then
+ if tc-is-gcc; then
+ echo -platform freebsd-g++
+ elif tc-is-clang; then
+ echo -platform freebsd-clang
+ fi
+ fi)
+ $(if [[ ${QT5_MINOR_VERSION} -ge 10 ]]; then
+ if use kernel_linux; then
+ if tc-is-gcc; then
+ echo -platform linux-g++
+ elif tc-is-clang; then
+ echo -platform linux-clang
+ fi
+ fi
+ fi)
+
# configure in release mode by default,
# override via the CONFIG qmake variable
-release