public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mark Wright" <gienah@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/tensorflow/
Date: Wed,  2 May 2018 23:20:37 +0000 (UTC)	[thread overview]
Message-ID: <1525303174.367a3e9287d0c00636a4845a55fcf97af93026df.gienah@gentoo> (raw)

commit:     367a3e9287d0c00636a4845a55fcf97af93026df
Author:     Mark Wright <gienah <AT> gentoo <DOT> org>
AuthorDate: Wed May  2 23:19:34 2018 +0000
Commit:     Mark Wright <gienah <AT> gentoo <DOT> org>
CommitDate: Wed May  2 23:19:34 2018 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=367a3e92

sci-libs/tensorflow: Move our flags to bazel-get-flags()

Package-Manager: Portage-2.3.33, Repoman-2.3.9

 sci-libs/tensorflow/tensorflow-1.8.0.ebuild | 32 ++++++++++++++++-------------
 1 file changed, 18 insertions(+), 14 deletions(-)

diff --git a/sci-libs/tensorflow/tensorflow-1.8.0.ebuild b/sci-libs/tensorflow/tensorflow-1.8.0.ebuild
index cfef9ea2a..557095bc7 100644
--- a/sci-libs/tensorflow/tensorflow-1.8.0.ebuild
+++ b/sci-libs/tensorflow/tensorflow-1.8.0.ebuild
@@ -99,16 +99,7 @@ src_configure(){
 	python_foreach_impl python_configure
 }
 
-src_compile() {
-	# F: fopen_wr
-	# S: deny
-	# P: /proc/self/setgroups
-	# A: /proc/self/setgroups
-	# R: /proc/7712/setgroups
-	# C: unable to read /proc/1/cmdline
-	addpredict /proc
-
-	local opt=$(usex cuda "--config=cuda" "")
+bazel-get-flags() {
 	local fs=""
 	for i in ${CXXFLAGS}; do
 		[[ -n "${fs}" ]] && fs+=" "
@@ -123,16 +114,29 @@ src_compile() {
 		[[ -n "${fs}" ]] && fs+=" "
 		fs+="--linkopt=${i}"
 	done
+	echo "${fs}"
+}
+
+src_compile() {
+	# F: fopen_wr
+	# S: deny
+	# P: /proc/self/setgroups
+	# A: /proc/self/setgroups
+	# R: /proc/7712/setgroups
+	# C: unable to read /proc/1/cmdline
+	addpredict /proc
+
+	local opt=$(usex cuda "--config=cuda" "")
 	einfo ">>> Compiling ${PN} C"$(usex cxx " and C++" "")
 	einfo "	bazel build \\"
 	einfo "	  --config=opt ${opt} \\"
-	einfo "	  ${fs} \\"
+	einfo "	  $(bazel-get-flags) \\"
 	einfo "	  //tensorflow:libtensorflow.so \\"
 	einfo "   //tensorflow:libtensorflow_framework.so \\"
 	einfo "	  "$(usex cxx "//tensorflow:libtensorflow_cc.so" "")
 	bazel build \
 		  --config=opt ${opt} \
-		  ${fs} \
+		  $(bazel-get-flags) \
 		  //tensorflow:libtensorflow.so \
 		  //tensorflow:libtensorflow_framework.so \
 		  $(usex cxx "//tensorflow:libtensorflow_cc.so" "") || die
@@ -141,11 +145,11 @@ src_compile() {
 		einfo ">>> Compiling ${PN} ${MULTIBUILD_VARIANT}"
 		einfo "	bazel build \\"
 		einfo "	  --config=opt ${opt} \\"
-		einfo "	  ${fs} \\"
+		einfo "	  $(bazel-get-flags) \\"
 		einfo "   //tensorflow/tools/pip_package:build_pip_package"
 		bazel build \
 			  --config=opt ${opt} \
-			  ${fs} \
+			  $(bazel-get-flags) \
 			  //tensorflow/tools/pip_package:build_pip_package || die
 		bazel-bin/tensorflow/tools/pip_package/build_pip_package tensorflow_pkg || die
 		unzip -o -d ${PN}_pkg_${MULTIBUILD_VARIANT} ${PN}_pkg/${P}-*.whl || die


             reply	other threads:[~2018-05-02 23:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-02 23:20 Mark Wright [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-09-26 17:35 [gentoo-commits] proj/sci:master commit in: sci-libs/tensorflow/ Aisha Tammy
2018-05-02  5:01 Mark Wright
2018-05-01 11:43 Mark Wright
2018-05-01 10:26 Mark Wright
2018-04-18 17:15 Martin Mokrejs
2018-04-18 16:53 Martin Mokrejs
2018-04-09 16:56 Martin Mokrejs
2018-04-06 23:22 Martin Mokrejs
2018-04-02 12:45 Justin Lecher
2018-01-29 15:34 Martin Mokrejs
2018-01-29 15:29 Martin Mokrejs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1525303174.367a3e9287d0c00636a4845a55fcf97af93026df.gienah@gentoo \
    --to=gienah@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox