From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1160114-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id C7274138353
	for <garchives@archives.gentoo.org>; Thu,  9 Apr 2020 18:10:27 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 13774E0917;
	Thu,  9 Apr 2020 18:10:27 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id E4FA7E0917
	for <gentoo-commits@lists.gentoo.org>; Thu,  9 Apr 2020 18:10:26 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id EDC6034F0C4
	for <gentoo-commits@lists.gentoo.org>; Thu,  9 Apr 2020 18:10:24 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 2B9481B9
	for <gentoo-commits@lists.gentoo.org>; Thu,  9 Apr 2020 18:10:10 +0000 (UTC)
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" <asturm@gentoo.org>
Message-ID: <1586455790.35678fe2decea3d9de1a317c9e8e6a031437b334.asturm@gentoo>
Subject: [gentoo-commits] proj/qt:master commit in: dev-qt/qtcore/
X-VCS-Repository: proj/qt
X-VCS-Files: dev-qt/qtcore/metadata.xml dev-qt/qtcore/qtcore-5.14.9999.ebuild dev-qt/qtcore/qtcore-5.15.9999.ebuild dev-qt/qtcore/qtcore-5.9999.ebuild
X-VCS-Directories: dev-qt/qtcore/
X-VCS-Committer: asturm
X-VCS-Committer-Name: Andreas Sturmlechner
X-VCS-Revision: 35678fe2decea3d9de1a317c9e8e6a031437b334
X-VCS-Branch: master
Date: Thu,  9 Apr 2020 18:10:10 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 5291ae1c-e9cd-406d-b243-6d02fee49a27
X-Archives-Hash: 71f5ab0f75bacb2733b06f41d9225e0d

commit:     35678fe2decea3d9de1a317c9e8e6a031437b334
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  8 08:50:19 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Apr  9 18:09:50 2020 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=35678fe2

dev-qt/qtcore: enable renameat2 and getentropy conditionally

Add USE=old-kernel to switch off the new syscalls.

renameat2() and getentropy() are not available until linux-3.17.

Bug: https://bugs.gentoo.org/669994
Package-Manager: Portage-2.3.88, Repoman-2.3.18
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
Closes: https://github.com/gentoo/qt/pull/214
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-qt/qtcore/metadata.xml            |  1 +
 dev-qt/qtcore/qtcore-5.14.9999.ebuild | 16 ++++++++++++++--
 dev-qt/qtcore/qtcore-5.15.9999.ebuild | 16 ++++++++++++++--
 dev-qt/qtcore/qtcore-5.9999.ebuild    | 18 +++++++++++++++---
 4 files changed, 44 insertions(+), 7 deletions(-)

diff --git a/dev-qt/qtcore/metadata.xml b/dev-qt/qtcore/metadata.xml
index c612265c..34d2b272 100644
--- a/dev-qt/qtcore/metadata.xml
+++ b/dev-qt/qtcore/metadata.xml
@@ -6,6 +6,7 @@
 		<name>Gentoo Qt Project</name>
 	</maintainer>
 	<use>
+		<flag name="old-kernel">disable new syscalls for Linux kernel >= 3.17</flag>
 		<flag name="systemd">Enable native journald logging support</flag>
 	</use>
 	<upstream>

diff --git a/dev-qt/qtcore/qtcore-5.14.9999.ebuild b/dev-qt/qtcore/qtcore-5.14.9999.ebuild
index 9b476abf..a6f5b7fc 100644
--- a/dev-qt/qtcore/qtcore-5.14.9999.ebuild
+++ b/dev-qt/qtcore/qtcore-5.14.9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 QT5_MODULE="qtbase"
-inherit qt5-build
+inherit linux-info qt5-build
 
 DESCRIPTION="Cross-platform application development framework"
 
@@ -11,7 +11,7 @@ if [[ ${QT5_BUILD_TYPE} == release ]]; then
 	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
 fi
 
-IUSE="icu systemd"
+IUSE="icu old-kernel systemd"
 
 DEPEND="
 	dev-libs/double-conversion:=
@@ -44,6 +44,16 @@ QT5_GENTOO_PRIVATE_CONFIG=(
 
 PATCHES=( "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" ) # bug 703306
 
+pkg_pretend() {
+	if use kernel_linux; then
+		get_running_version
+		if kernel_is -lt 3 17 && ! use old-kernel; then
+			ewarn "The running kernel is older than 3.17. USE=old-kernel is needed for ${CATEGORY}/${PN}"
+			ewarn "to function on this kernel properly.  See Bug #669994."
+		fi
+	fi
+}
+
 src_prepare() {
 	# don't add -O3 to CXXFLAGS, bug 549140
 	sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die
@@ -59,6 +69,8 @@ src_configure() {
 		-no-feature-statx	# bug 672856
 		$(qt_use icu)
 		$(qt_use !icu iconv)
+		$(qt_use !old-kernel feature-renameat2)  # needs Linux 3.16, bug 669994
+		$(qt_use !old-kernel feature-getentropy) # needs Linux 3.17, bug 669994
 		$(qt_use systemd journald)
 	)
 	qt5-build_src_configure

diff --git a/dev-qt/qtcore/qtcore-5.15.9999.ebuild b/dev-qt/qtcore/qtcore-5.15.9999.ebuild
index 9b476abf..a6f5b7fc 100644
--- a/dev-qt/qtcore/qtcore-5.15.9999.ebuild
+++ b/dev-qt/qtcore/qtcore-5.15.9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 QT5_MODULE="qtbase"
-inherit qt5-build
+inherit linux-info qt5-build
 
 DESCRIPTION="Cross-platform application development framework"
 
@@ -11,7 +11,7 @@ if [[ ${QT5_BUILD_TYPE} == release ]]; then
 	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
 fi
 
-IUSE="icu systemd"
+IUSE="icu old-kernel systemd"
 
 DEPEND="
 	dev-libs/double-conversion:=
@@ -44,6 +44,16 @@ QT5_GENTOO_PRIVATE_CONFIG=(
 
 PATCHES=( "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" ) # bug 703306
 
+pkg_pretend() {
+	if use kernel_linux; then
+		get_running_version
+		if kernel_is -lt 3 17 && ! use old-kernel; then
+			ewarn "The running kernel is older than 3.17. USE=old-kernel is needed for ${CATEGORY}/${PN}"
+			ewarn "to function on this kernel properly.  See Bug #669994."
+		fi
+	fi
+}
+
 src_prepare() {
 	# don't add -O3 to CXXFLAGS, bug 549140
 	sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die
@@ -59,6 +69,8 @@ src_configure() {
 		-no-feature-statx	# bug 672856
 		$(qt_use icu)
 		$(qt_use !icu iconv)
+		$(qt_use !old-kernel feature-renameat2)  # needs Linux 3.16, bug 669994
+		$(qt_use !old-kernel feature-getentropy) # needs Linux 3.17, bug 669994
 		$(qt_use systemd journald)
 	)
 	qt5-build_src_configure

diff --git a/dev-qt/qtcore/qtcore-5.9999.ebuild b/dev-qt/qtcore/qtcore-5.9999.ebuild
index 4ef01cf6..c39aa396 100644
--- a/dev-qt/qtcore/qtcore-5.9999.ebuild
+++ b/dev-qt/qtcore/qtcore-5.9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 QT5_MODULE="qtbase"
-inherit qt5-build
+inherit linux-info qt5-build
 
 DESCRIPTION="Cross-platform application development framework"
 
@@ -11,7 +11,7 @@ if [[ ${QT5_BUILD_TYPE} == release ]]; then
 	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
 fi
 
-IUSE="icu systemd"
+IUSE="icu old-kernel systemd"
 
 DEPEND="
 	dev-libs/double-conversion:=
@@ -43,6 +43,16 @@ QT5_GENTOO_PRIVATE_CONFIG=(
 	!:xml
 )
 
+pkg_pretend() {
+	if use kernel_linux; then
+		get_running_version
+		if kernel_is -lt 3 17 && ! use old-kernel; then
+			ewarn "The running kernel is older than 3.17. USE=old-kernel is needed for ${CATEGORY}/${PN}"
+			ewarn "to function on this kernel properly.  See Bug #669994."
+		fi
+	fi
+}
+
 src_prepare() {
 	# don't add -O3 to CXXFLAGS, bug 549140
 	sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die
@@ -58,6 +68,8 @@ src_configure() {
 		-no-feature-statx	# bug 672856
 		$(qt_use icu)
 		$(qt_use !icu iconv)
+		$(qt_use !old-kernel feature-renameat2)  # needs Linux 3.16, bug 669994
+		$(qt_use !old-kernel feature-getentropy) # needs Linux 3.17, bug 669994
 		$(qt_use systemd journald)
 	)
 	qt5-build_src_configure