From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 5873A139087 for ; Wed, 14 Dec 2016 22:38:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D774AE0CD5; Wed, 14 Dec 2016 22:38:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AE98BE0CD5 for ; Wed, 14 Dec 2016 22:38:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 505BF3412CB for ; Wed, 14 Dec 2016 22:38:11 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B00D224C3 for ; Wed, 14 Dec 2016 22:38:09 +0000 (UTC) From: "Sam Jorna" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam Jorna" Message-ID: <1481754505.636e954d1e3931cfea387c984fa38a883fc7e8ae.wraeth@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/refind/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-boot/refind/refind-0.10.4-r1.ebuild X-VCS-Directories: sys-boot/refind/ X-VCS-Committer: wraeth X-VCS-Committer-Name: Sam Jorna X-VCS-Revision: 636e954d1e3931cfea387c984fa38a883fc7e8ae X-VCS-Branch: master Date: Wed, 14 Dec 2016 22:38:09 +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: 7dc39e41-9977-41aa-97b2-25a670f957fb X-Archives-Hash: 306602f0d7083f7a7a28c6ece7ccc28a commit: 636e954d1e3931cfea387c984fa38a883fc7e8ae Author: Sam Jorna gentoo org> AuthorDate: Wed Dec 14 02:22:26 2016 +0000 Commit: Sam Jorna gentoo org> CommitDate: Wed Dec 14 22:28:25 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=636e954d sys-boot/refind: fix building with custom-cflags Gentoo-bug: 598587 Acked-by: Stéphane Veyret gmail.com> Package-Manager: Portage-2.3.3, Repoman-2.3.1 sys-boot/refind/refind-0.10.4-r1.ebuild | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/sys-boot/refind/refind-0.10.4-r1.ebuild b/sys-boot/refind/refind-0.10.4-r1.ebuild index 2bc85ce..af45a99 100644 --- a/sys-boot/refind/refind-0.10.4-r1.ebuild +++ b/sys-boot/refind/refind-0.10.4-r1.ebuild @@ -22,6 +22,18 @@ DEPEND="gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) DOCS="NEWS.txt README.txt docs/refind docs/Styles" +pkg_pretend() { + if use custom-cflags; then + ewarn + ewarn "You have enabled building with USE=custom-cflags. Be aware that" + ewarn "using this can result in EFI binaries that fail to run and may" + ewarn "fail to build at all. This is strongly advised against by upstream." + ewarn + ewarn "See https://bugs.gentoo.org/598587#c3 for more information" + ewarn + fi +} + pkg_setup() { if use x86 ; then export EFIARCH=ia32 @@ -96,12 +108,16 @@ src_compile() { --defsym=PECOFF_HEADER_SIZE=${pecoff_header_size} \ --entry \$(ENTRYPOINT) -u \$(ENTRYPOINT) -m \$(LD_CODE)" ) - use custom-cflags && make_flags[CFLAGS]="${CFLAGS}" # Make main EFI local all_target use gnuefi && all_target="gnuefi" || all_target="tiano" - emake "${make_flags[@]}" ${all_target} + + if use custom-cflags; then + emake CFLAGS="${CFLAGS}" "${make_flags[@]}" ${all_target} + else + emake "${make_flags[@]}" ${all_target} + fi # Make filesystem drivers local gnuefi_target @@ -111,7 +127,11 @@ src_compile() { fs=${fs#+} if use "${fs}"; then einfo "Building ${fs} filesystem driver" - emake "${make_flags[@]}" -C "${S}/filesystems" ${fs}${gnuefi_target} + if use custom-cflags; then + emake CFLAGS="${CFLAGS}" "${make_flags[@]}" -C "${S}/filesystems" ${fs}${gnuefi_target} + else + emake "${make_flags[@]}" -C "${S}/filesystems" ${fs}${gnuefi_target} + fi fi done }