From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1134538-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 45A3D138334
	for <garchives@archives.gentoo.org>; Sun, 29 Dec 2019 23:18:08 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 282B9E0AD0;
	Sun, 29 Dec 2019 23:18:07 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(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 EC3E0E0AD0
	for <gentoo-commits@lists.gentoo.org>; Sun, 29 Dec 2019 23:18:05 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(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 6435534DCFA
	for <gentoo-commits@lists.gentoo.org>; Sun, 29 Dec 2019 23:18:04 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id A1FD429
	for <gentoo-commits@lists.gentoo.org>; Sun, 29 Dec 2019 23:18:01 +0000 (UTC)
From: "Marek Szuba" <marecki@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, "Marek Szuba" <marecki@gentoo.org>
Message-ID: <1577661467.77ec8e9ee23def7148efe1cc1c7c49c3f9b895b3.marecki@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/xrootd/, net-libs/xrootd/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-libs/xrootd/files/xrootd-4.8.3-Werror_only_Debug.patch net-libs/xrootd/xrootd-4.8.3.ebuild net-libs/xrootd/xrootd-4.9.0.ebuild
X-VCS-Directories: net-libs/xrootd/ net-libs/xrootd/files/
X-VCS-Committer: marecki
X-VCS-Committer-Name: Marek Szuba
X-VCS-Revision: 77ec8e9ee23def7148efe1cc1c7c49c3f9b895b3
X-VCS-Branch: master
Date: Sun, 29 Dec 2019 23:18:01 +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: 5ee369ce-47a5-434b-bf85-1d06667c167f
X-Archives-Hash: 60f6a2ad6ccae8a427cfa8a3906de59b

commit:     77ec8e9ee23def7148efe1cc1c7c49c3f9b895b3
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 29 23:17:24 2019 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Sun Dec 29 23:17:47 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77ec8e9e

net-libs/xrootd: do not set -Werror in normal builds

Backported to 4.8 and 4.9 from 4.10. Should allow these versions to
build under gcc-9.

Closes: https://bugs.gentoo.org/703412
Package-Manager: Portage-2.3.79, Repoman-2.3.16
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../files/xrootd-4.8.3-Werror_only_Debug.patch     | 22 ++++++++++++++++++++++
 net-libs/xrootd/xrootd-4.8.3.ebuild                |  5 ++++-
 net-libs/xrootd/xrootd-4.9.0.ebuild                |  5 ++++-
 3 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/net-libs/xrootd/files/xrootd-4.8.3-Werror_only_Debug.patch b/net-libs/xrootd/files/xrootd-4.8.3-Werror_only_Debug.patch
new file mode 100644
index 00000000000..2f0a64b13fd
--- /dev/null
+++ b/net-libs/xrootd/files/xrootd-4.8.3-Werror_only_Debug.patch
@@ -0,0 +1,22 @@
+Only set -Werror - which among other things prevents xrootd-4.8.3 from being
+compiled with gcc-9 - either in debug mode or when explicitly requested.
+Backport of the change made upstream in 4.10.
+--- a/cmake/XRootDOSDefs.cmake
++++ b/cmake/XRootDOSDefs.cmake
+@@ -26,7 +26,15 @@
+ #-------------------------------------------------------------------------------
+ if( CMAKE_COMPILER_IS_GNUCXX )
+   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x" )
+-  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror" )
++  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" )
++  #-----------------------------------------------------------------------------
++  # Set -Werror only for Debug (or undefined) build type or if we have been
++  # explicitly asked to do so
++  #-----------------------------------------------------------------------------
++  if( ( CMAKE_BUILD_TYPE STREQUAL "Debug" OR "${CMAKE_BUILD_TYPE}" STREQUAL ""
++        OR FORCE_WERROR ) )
++    set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" )
++  endif()
+   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter" )
+   # gcc 4.1 is retarded
+   execute_process( COMMAND ${CMAKE_C_COMPILER} -dumpversion

diff --git a/net-libs/xrootd/xrootd-4.8.3.ebuild b/net-libs/xrootd/xrootd-4.8.3.ebuild
index 90f82f05b9a..df36a3d6213 100644
--- a/net-libs/xrootd/xrootd-4.8.3.ebuild
+++ b/net-libs/xrootd/xrootd-4.8.3.ebuild
@@ -42,7 +42,10 @@ REQUIRED_USE="
 	python? ( ${PYTHON_REQUIRED_USE} )
 "
 
-PATCHES=( "${FILESDIR}"/${P}-crc32.patch )
+PATCHES=(
+	"${FILESDIR}"/${P}-crc32.patch
+	"${FILESDIR}"/${PN}-4.8.3-Werror_only_Debug.patch
+)
 
 # xrootd plugins are not intended to be linked with,
 # they are to be loaded at runtime by xrootd,

diff --git a/net-libs/xrootd/xrootd-4.9.0.ebuild b/net-libs/xrootd/xrootd-4.9.0.ebuild
index f42a32f1833..55c0653ee3b 100644
--- a/net-libs/xrootd/xrootd-4.9.0.ebuild
+++ b/net-libs/xrootd/xrootd-4.9.0.ebuild
@@ -42,7 +42,10 @@ REQUIRED_USE="
 	python? ( ${PYTHON_REQUIRED_USE} )
 "
 
-PATCHES=( "${FILESDIR}"/xrootd-4.8.3-crc32.patch )
+PATCHES=(
+	"${FILESDIR}"/xrootd-4.8.3-crc32.patch
+	"${FILESDIR}"/${PN}-4.8.3-Werror_only_Debug.patch
+)
 
 # xrootd plugins are not intended to be linked with,
 # they are to be loaded at runtime by xrootd,