public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/android:master commit in: dev-util/soong/, dev-util/soong/files/
@ 2018-08-09  5:28 Benda XU
  0 siblings, 0 replies; 6+ messages in thread
From: Benda XU @ 2018-08-09  5:28 UTC (permalink / raw
  To: gentoo-commits

commit:     0f8ab56e4acf493ff706433ef460963b718f33ea
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  9 05:34:49 2018 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Thu Aug  9 05:34:49 2018 +0000
URL:        https://gitweb.gentoo.org/proj/android.git/commit/?id=0f8ab56e

Ship the patches and common Android.bp.

 dev-util/soong/Manifest                           |  5 +-
 dev-util/soong/files/blueprint-test-go-1.10.patch | 64 +++++++++++++++++++++++
 dev-util/soong/files/soong-bootstrap-clean.patch  | 57 ++++++++++++++++++++
 dev-util/soong/files/soong-no-kernel-header.patch | 13 +++++
 dev-util/soong/soong-8.1.0_p41.ebuild             | 11 +++-
 5 files changed, 148 insertions(+), 2 deletions(-)

diff --git a/dev-util/soong/Manifest b/dev-util/soong/Manifest
index 13b5d25..4151601 100644
--- a/dev-util/soong/Manifest
+++ b/dev-util/soong/Manifest
@@ -1,4 +1,7 @@
+AUX blueprint-test-go-1.10.patch 1533 BLAKE2B 3f764ea5ac68cdce8ecadb0dc40f4e676d8db21095b88cf99d7aa6c950ffd578029782d075d59290fc4898544458cab730471f9f0581dccefccc5a2951aa7234 SHA512 2846a098840b4543ec34466d5e97d0f6f8b05ba8dbb01e23c4a802a2bc3995fbb64020e88fa49ded8d7cac527cbfbb5614447165f7f17b392925f4f02556d480
+AUX soong-bootstrap-clean.patch 1588 BLAKE2B ec20e7fece7c126a19586d1a6db7264f64f2b427c7386a6a9f2df77d5171a024185e119683ae2d5e87f483937bc05d40b6d3ffd4132826ff7e42448348d96e75 SHA512 bb39af5fd5d8ec310506b8a3bb782389e9a3c4a31429d6cf32f4681b5fee64d41c01ecf05f692060bcf15ff53952a31d1d6ffe2ee4de6a6e65ee8f44cca42972
+AUX soong-no-kernel-header.patch 346 BLAKE2B 9e830f028a47a031b46c5cefbc4ddafc922b1506756ba36266aa97f48e670efd1bae8a438f712add004b17fff3bf3c3f4c059a48039ee6ef619afc39163445d2 SHA512 b0ae8e277050911baf262a54c7324f03d69e5f8dd87505942d0a554451e69c6d6f0668801b83d66ac5c69d7827ea7d613d1d55e376c761c7e1f54c3b1ff286be
 DIST blueprint-8.1.0_p41.tar.gz 114223 BLAKE2B c2e0c450fc6bd6b92dfcdeb5f80462e0edb65a2c052beb29d0a8d6b5dbaa92e54f2c402b964acffe733d58926abe4d2ad3c5891ad751f7eab0c8e5ee8ba4d9b8 SHA512 4799d4e6edcb9a5088a427fad39b0641455806e808457d33b2f78d2c22b14004804b4f62a35a75087be799b05e69f8aa171747a90e53eb894f36937acd32343c
 DIST soong-8.1.0_p41.tar.gz 355567 BLAKE2B aeafa2f29e270bde985ff52a2c3c12507f6c2aba37013c14139cc5c8336ac15305f6aa8182799dea0e744355efdf83a331ce4db10e8551a5b2e5efb140c2a592 SHA512 90675ad4623bba3d3fd20620d3a5a42b63c67bc48ade17da5e661ad8cedab31e2cc41a46bac181ebd49a24f0bfb9cfc07857e312a3f7d80458e361311a354245
-EBUILD soong-8.1.0_p41.ebuild 1379 BLAKE2B 0e890c7433c4f1947545f30991cab1906cc1e44cc2bc024c57f122e9e46a509313bb973ef22809984376b71eb630f20661366660b5cd2ffb0396d32527ff1d22 SHA512 4dffe8c8bdc706867616e79b89de5f5b5017658984a9119a7fdd150257e554bc69b5162c03ee998b805b44317c87d98536d59366bd70f21fecd728d481125086
+EBUILD soong-8.1.0_p41.ebuild 1659 BLAKE2B 19cc439751509137dd83a291bd9c8a8e21e64f6c3577e4309eb9cf4236c98874b6712be2ca1231f0f96518aecd18f72517b9e31fb4128b74f802ff37f67adac5 SHA512 1e2453aa1ec4a3738b1f64ae561add3adbb8da313106b5422be77f9e4aab6731f2a67dac0c504b62cbe51344ee0419da4f4ce44b7efca0f69689103772826748
 MISC metadata.xml 242 BLAKE2B 08b4880748ab6d685ce28f65a9f6cc5ad62deff8f85d4e0a55a3dc12aa8bd63cf1de56b28ff89929e054a6831e223d6ef0207e8b19c6887f09ee22621bd76928 SHA512 ae57aaeecc094cffa640d88329a0baa6c2b0703330d84f6406f3f68d8bb9b724d2e19a8478be8708de284db9ac452f95f225a9f79cd1c5d0236aa2f9935b9b21

diff --git a/dev-util/soong/files/blueprint-test-go-1.10.patch b/dev-util/soong/files/blueprint-test-go-1.10.patch
new file mode 100644
index 0000000..23b7caa
--- /dev/null
+++ b/dev-util/soong/files/blueprint-test-go-1.10.patch
@@ -0,0 +1,64 @@
+Index: soong-8.1.0_p41/build/blueprint/gotestmain/gotestmain.go
+===================================================================
+--- soong-8.1.0_p41.orig/build/blueprint/gotestmain/gotestmain.go
++++ soong-8.1.0_p41/build/blueprint/gotestmain/gotestmain.go
+@@ -105,12 +105,11 @@ var testMainTmpl = template.Must(templat
+ package main
+ 
+ import (
+-	"io"
+ {{if not .HasMain}}
+ 	"os"
+ {{end}}
+-	"regexp"
+ 	"testing"
++	"testing/internal/testdeps"
+ 
+ 	pkg "{{.Package}}"
+ )
+@@ -121,44 +120,9 @@ var t = []testing.InternalTest{
+ {{end}}
+ }
+ 
+-var matchPat string
+-var matchRe *regexp.Regexp
+-
+-type matchString struct{}
+-
+-func MatchString(pat, str string) (result bool, err error) {
+-	if matchRe == nil || matchPat != pat {
+-		matchPat = pat
+-		matchRe, err = regexp.Compile(matchPat)
+-		if err != nil {
+-			return
+-		}
+-	}
+-	return matchRe.MatchString(str), nil
+-}
+-
+-func (matchString) MatchString(pat, str string) (bool, error) {
+-	return MatchString(pat, str)
+-}
+-
+-func (matchString) StartCPUProfile(w io.Writer) error {
+-	panic("shouldn't get here")
+-}
+-
+-func (matchString) StopCPUProfile() {
+-}
+-
+-func (matchString) WriteHeapProfile(w io.Writer) error {
+-    panic("shouldn't get here")
+-}
+-
+-func (matchString) WriteProfileTo(string, io.Writer, int) error {
+-    panic("shouldn't get here")
+-}
+-
+ func main() {
+ {{if .MainStartTakesInterface}}
+-	m := testing.MainStart(matchString{}, t, nil, nil)
++	m := testing.MainStart(testdeps.TestDeps{}, t, nil, nil)
+ {{else}}
+ 	m := testing.MainStart(MatchString, t, nil, nil)
+ {{end}}

diff --git a/dev-util/soong/files/soong-bootstrap-clean.patch b/dev-util/soong/files/soong-bootstrap-clean.patch
new file mode 100644
index 0000000..94c08e9
--- /dev/null
+++ b/dev-util/soong/files/soong-bootstrap-clean.patch
@@ -0,0 +1,57 @@
+Index: soong-8.1.0_p41/build/soong/bootstrap.bash
+===================================================================
+--- soong-8.1.0_p41.orig/build/soong/bootstrap.bash
++++ soong-8.1.0_p41/build/soong/bootstrap.bash
+@@ -1,16 +1,7 @@
+ #!/bin/bash
+ 
+-set -e
++set -exv
+ 
+-ORIG_SRCDIR=$(dirname "${BASH_SOURCE[0]}")
+-if [[ "$ORIG_SRCDIR" != "." ]]; then
+-  if [[ ! -z "$BUILDDIR" ]]; then
+-    echo "error: To use BUILDDIR, run from the source directory"
+-    exit 1
+-  fi
+-  export BUILDDIR=$("${ORIG_SRCDIR}/build/soong/scripts/reverse_path.py" "$ORIG_SRCDIR")
+-  cd $ORIG_SRCDIR
+-fi
+ if [[ -z "$BUILDDIR" ]]; then
+   echo "error: Run ${BASH_SOURCE[0]} from the build output directory"
+   exit 1
+@@ -22,21 +13,6 @@ export TOPNAME="Android.bp"
+ export BOOTSTRAP_MANIFEST="${SRCDIR}/build/soong/build.ninja.in"
+ export RUN_TESTS="-t"
+ 
+-case $(uname) in
+-    Linux)
+-	export GOOS="linux"
+-	export PREBUILTOS="linux-x86"
+-	;;
+-    Darwin)
+-	export GOOS="darwin"
+-	export PREBUILTOS="darwin-x86"
+-	;;
+-    *) echo "unknown OS:" $(uname) && exit 1;;
+-esac
+-export GOROOT="${SRCDIR}/prebuilts/go/$PREBUILTOS/"
+-export GOARCH="amd64"
+-export GOCHAR="6"
+-
+ if [[ $# -eq 0 ]]; then
+     mkdir -p $BUILDDIR
+ 
+Index: soong-8.1.0_p41/build/blueprint/bootstrap.bash
+===================================================================
+--- soong-8.1.0_p41.orig/build/blueprint/bootstrap.bash
++++ soong-8.1.0_p41/build/blueprint/bootstrap.bash
+@@ -22,7 +22,7 @@
+ # The invoking script should then run this script, passing along all of its
+ # command line arguments.
+ 
+-set -e
++set -exv
+ 
+ EXTRA_ARGS=""
+ 

diff --git a/dev-util/soong/files/soong-no-kernel-header.patch b/dev-util/soong/files/soong-no-kernel-header.patch
new file mode 100644
index 0000000..522ae67
--- /dev/null
+++ b/dev-util/soong/files/soong-no-kernel-header.patch
@@ -0,0 +1,13 @@
+Index: soong-8.1.0_p41/build/soong/Android.bp
+===================================================================
+--- soong-8.1.0_p41.orig/build/soong/Android.bp
++++ soong-8.1.0_p41/build/soong/Android.bp
+@@ -315,8 +315,3 @@ toolchain_library {
+         },
+     },
+ }
+-
+-kernel_headers {
+-    name: "device_kernel_headers",
+-    vendor: true,
+-}

diff --git a/dev-util/soong/soong-8.1.0_p41.ebuild b/dev-util/soong/soong-8.1.0_p41.ebuild
index c2a4f9e..27e17ef 100644
--- a/dev-util/soong/soong-8.1.0_p41.ebuild
+++ b/dev-util/soong/soong-8.1.0_p41.ebuild
@@ -20,6 +20,12 @@ DEPEND="dev-lang/go
 	dev-util/ninja"
 RDEPEND="dev-lang/go"
 
+PATCHES=(
+	"${FILESDIR}"/blueprint-test-go-1.10.patch
+	"${FILESDIR}"/soong-bootstrap-clean.patch
+	"${FILESDIR}"/soong-no-kernel-header.patch
+)
+
 src_unpack() {
 	mkdir -p "${WORKDIR}"/${P}/build || die
 	cd "${WORKDIR}"/${P}/build || die
@@ -35,7 +41,7 @@ src_unpack() {
 src_prepare() {
 	default
 	ln -s build/soong/root.bp Android.bp || die
-	ln -s build/soong/bootstrap.bash
+	ln -s build/soong/bootstrap.bash || die
 }
 
 src_compile() {
@@ -51,4 +57,7 @@ src_compile() {
 src_install() {
 	dobin out/.bootstrap/bin/*
 	dodoc out/.bootstrap/docs/*
+	sed -n '/\/\/.*host bionic/,$p' < build/soong/Android.bp > "${T}"/Android.bp
+	insinto /usr/share/soong
+	doins "${T}"/Android.bp
 }


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/android:master commit in: dev-util/soong/, dev-util/soong/files/
@ 2018-08-10 12:30 Benda XU
  0 siblings, 0 replies; 6+ messages in thread
From: Benda XU @ 2018-08-10 12:30 UTC (permalink / raw
  To: gentoo-commits

commit:     3915d3281902c71dee53b9bc57466e532f510ad1
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 10 12:37:23 2018 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Fri Aug 10 12:37:23 2018 +0000
URL:        https://gitweb.gentoo.org/proj/android.git/commit/?id=3915d328

dev-util/soong: add soong-9999 from KirenaHoro.

  Remove bootstrap recipe generator, because it is not needed
  after soong is built.

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-util/soong/Manifest                            |  4 ++
 .../soong/files/soong-9999-bootstrap-clean.patch   | 57 +++++++++++++++++
 dev-util/soong/files/soong-no-bootstrap.patch      | 12 ++++
 dev-util/soong/soong-9999.ebuild                   | 71 ++++++++++++++++++++++
 4 files changed, 144 insertions(+)

diff --git a/dev-util/soong/Manifest b/dev-util/soong/Manifest
index dbae562..adfeb92 100644
--- a/dev-util/soong/Manifest
+++ b/dev-util/soong/Manifest
@@ -1,7 +1,11 @@
 AUX blueprint-test-go-1.10.patch 1533 BLAKE2B 3f764ea5ac68cdce8ecadb0dc40f4e676d8db21095b88cf99d7aa6c950ffd578029782d075d59290fc4898544458cab730471f9f0581dccefccc5a2951aa7234 SHA512 2846a098840b4543ec34466d5e97d0f6f8b05ba8dbb01e23c4a802a2bc3995fbb64020e88fa49ded8d7cac527cbfbb5614447165f7f17b392925f4f02556d480
+AUX soong-9999-bootstrap-clean.patch 1539 BLAKE2B 95c06e8242d4d2e7a65d0f5e25b77bfe8079edf71213be318465250c78a1869e0b9ac0a7bb7be8123f586d1150a86951fb30b021230f3e3857ecdbdadab61d63 SHA512 b08a6314e3bee2b6d3ee7fa60afe3678a61d08c4930f9e55a643cf3bbe3373fef08d245b048a03a246d9cb0f9b3974b7e1dcb3f44f614cd9fd7f062d5c096384
 AUX soong-bootstrap-clean.patch 1588 BLAKE2B ec20e7fece7c126a19586d1a6db7264f64f2b427c7386a6a9f2df77d5171a024185e119683ae2d5e87f483937bc05d40b6d3ffd4132826ff7e42448348d96e75 SHA512 bb39af5fd5d8ec310506b8a3bb782389e9a3c4a31429d6cf32f4681b5fee64d41c01ecf05f692060bcf15ff53952a31d1d6ffe2ee4de6a6e65ee8f44cca42972
+AUX soong-no-bootstrap.patch 719 BLAKE2B 2d6bef0e256f4bf1c7bac48b1a725aaf53f061ec04b67dcc47a94fcb406cc32499557c9c97198748a904a6ab5e9a5ff4d375de2ca0f030deabe31e177795b8bd SHA512 05617b717c05eecd1b6971a4e72302341904a23481fccca83beb9b329ba91afda562b0d594600e2a91d784995dcf125fc71c955da60d0a1648128c71ec751c33
 AUX soong-no-kernel-header.patch 346 BLAKE2B 9e830f028a47a031b46c5cefbc4ddafc922b1506756ba36266aa97f48e670efd1bae8a438f712add004b17fff3bf3c3f4c059a48039ee6ef619afc39163445d2 SHA512 b0ae8e277050911baf262a54c7324f03d69e5f8dd87505942d0a554451e69c6d6f0668801b83d66ac5c69d7827ea7d613d1d55e376c761c7e1f54c3b1ff286be
 DIST blueprint-8.1.0_p41.tar.gz 114222 BLAKE2B cb2335fd766212d1c3279ae4d6ee91df5f3c3a9522230ca70cbc080eed9b387a7d567963ba8ea5ffc4a48b01400958cc1d619b9da897e0f90a29b4446becdf46 SHA512 8ada4f309767567e7e08e6c8e61f0e442eb14a59333323bb6b47bb72c2b923bbb342166cddf6d31ec05a27f70ae60a981c0c8b4a3438820ce20ef47028e9f02b
+DIST lineage-15.1.tar.gz 49859612 BLAKE2B 2203f51a8610100c9b6e3754d54da0310414abfac60b21a7fb4739f8f70bfc81cf0f61fb820b82891fbaf4bc89162d2b891c9c75ef86abe61de91525b7cb5e61 SHA512 5f7f92cf310d45c51f687a84205a8de68390fd2462e754bbe8d7226041e19938614d4f68eafb046dbb34ad29c67d70cfa6a3bea98841935d2c1659a5ee7c90c9
 DIST soong-8.1.0_p41.tar.gz 355543 BLAKE2B 0d2b47c30d0515426cffa19c73495f68633dcdbcd5fc33fbbabb8892b712eb85ec68657ea73e07b34573af525055c0f791cd6b54ca58dedd5c14bd4af1a37623 SHA512 50f65ac86f4466adfed6fddf6e8288e16fdc0c1717ba57e59d40395115d4f55ceed3407ce6542ef0173c2076783a7bdc908ff0aac6f19aad7c62a8f63daef6e3
 EBUILD soong-8.1.0_p41.ebuild 1676 BLAKE2B f262faa3e8dbe45414160220975c8ca5c64104f3479f8b4fc2bc2fe50b79ce2af3a732375616906c7db1a13b0295dc21e937a208f670aa37d404badd79d2ed68 SHA512 da536c2b5f000739a70c8a932f921ef2d52e3e73e4062dfa4b4c13b56612a6e95346b5cc425f8bfe79493c04e52a79e759d8abf704ae090caaa1f6a5b0a64aca
+EBUILD soong-9999.ebuild 1985 BLAKE2B 17de5d9d82e706c9f39d262f739d60af4d7252d3c859431ca4180fee2838156b2516dd9edc5ee982028453fdf358cdcbd00c8027d6e8baac85d441f74a56c56b SHA512 d1b1cc0aed74ce03af4a4859f804256206bc48a06cd1913e5e22d03d08f7a7e1ad6c385e1a4eda57b553c0dc2da83417b3fa7722298ebb9a8867f33bf73efb82
 MISC metadata.xml 242 BLAKE2B 08b4880748ab6d685ce28f65a9f6cc5ad62deff8f85d4e0a55a3dc12aa8bd63cf1de56b28ff89929e054a6831e223d6ef0207e8b19c6887f09ee22621bd76928 SHA512 ae57aaeecc094cffa640d88329a0baa6c2b0703330d84f6406f3f68d8bb9b724d2e19a8478be8708de284db9ac452f95f225a9f79cd1c5d0236aa2f9935b9b21

diff --git a/dev-util/soong/files/soong-9999-bootstrap-clean.patch b/dev-util/soong/files/soong-9999-bootstrap-clean.patch
new file mode 100644
index 0000000..1f1eec6
--- /dev/null
+++ b/dev-util/soong/files/soong-9999-bootstrap-clean.patch
@@ -0,0 +1,57 @@
+diff --git a/build/soong/bootstrap.bash b/build/soong/bootstrap.bash
+index aedbe94..1eb864e 100755
+--- a/build/soong/bootstrap.bash
++++ b/build/soong/bootstrap.bash
+@@ -1,16 +1,7 @@
+ #!/bin/bash
+ 
+-set -e
+-
+-ORIG_SRCDIR=$(dirname "${BASH_SOURCE[0]}")
+-if [[ "$ORIG_SRCDIR" != "." ]]; then
+-  if [[ ! -z "$BUILDDIR" ]]; then
+-    echo "error: To use BUILDDIR, run from the source directory"
+-    exit 1
+-  fi
+-  export BUILDDIR=$("${ORIG_SRCDIR}/build/soong/scripts/reverse_path.py" "$ORIG_SRCDIR")
+-  cd $ORIG_SRCDIR
+-fi
++set -exv
++
+ if [[ -z "$BUILDDIR" ]]; then
+   echo "error: Run ${BASH_SOURCE[0]} from the build output directory"
+   exit 1
+@@ -22,21 +13,6 @@ export TOPNAME="Android.bp"
+ export BOOTSTRAP_MANIFEST="${SRCDIR}/build/soong/build.ninja.in"
+ export RUN_TESTS="-t"
+ 
+-case $(uname) in
+-    Linux)
+-	export GOOS="linux"
+-	export PREBUILTOS="linux-x86"
+-	;;
+-    Darwin)
+-	export GOOS="darwin"
+-	export PREBUILTOS="darwin-x86"
+-	;;
+-    *) echo "unknown OS:" $(uname) && exit 1;;
+-esac
+-#export GOROOT="${SRCDIR}/prebuilts/go/$PREBUILTOS/"
+-#export GOARCH="amd64"
+-#export GOCHAR="6"
+-
+ if [[ $# -eq 0 ]]; then
+     mkdir -p $BUILDDIR
+ 
+Index: soong-8.1.0_p41/build/blueprint/bootstrap.bash
+===================================================================
+--- soong-8.1.0_p41.orig/build/blueprint/bootstrap.bash
++++ soong-8.1.0_p41/build/blueprint/bootstrap.bash
+@@ -22,7 +22,7 @@
+ # The invoking script should then run this script, passing along all of its
+ # command line arguments.
+ 
+-set -e
++set -exv
+ 
+ EXTRA_ARGS=""

diff --git a/dev-util/soong/files/soong-no-bootstrap.patch b/dev-util/soong/files/soong-no-bootstrap.patch
new file mode 100644
index 0000000..3104e68
--- /dev/null
+++ b/dev-util/soong/files/soong-no-bootstrap.patch
@@ -0,0 +1,12 @@
+Index: soong-9999/build/blueprint/bootstrap/command.go
+===================================================================
+--- soong-9999.orig/build/blueprint/bootstrap/command.go
++++ soong-9999/build/blueprint/bootstrap/command.go
+@@ -115,7 +115,6 @@ func Main(ctx *blueprint.Context, config
+ 	ctx.RegisterModuleType("bootstrap_go_binary", newGoBinaryModuleFactory(bootstrapConfig, StagePrimary))
+ 	ctx.RegisterModuleType("blueprint_go_binary", newGoBinaryModuleFactory(bootstrapConfig, StageMain))
+ 	ctx.RegisterTopDownMutator("bootstrap_stage", propagateStageBootstrap)
+-	ctx.RegisterSingletonType("bootstrap", newSingletonFactory(bootstrapConfig))
+ 
+ 	ctx.RegisterSingletonType("glob", globSingletonFactory(ctx))
+ 

diff --git a/dev-util/soong/soong-9999.ebuild b/dev-util/soong/soong-9999.ebuild
new file mode 100644
index 0000000..f5078cd
--- /dev/null
+++ b/dev-util/soong/soong-9999.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit ninja-utils git-r3
+EGIT_REPO_URI=https://github.com/KireinaHoro/android_build_${PN}
+EGIT_CHECKOUT_DIR=${WORKDIR}/${P}/build/${PN}
+
+A_URI=http://aosp.airelinux.org/platform/build
+# blueprint is a source level dependency of soong.
+MPV=8.1.0_p41
+SRC_URI="${A_URI}/blueprint/+archive/android-${MPV/p/r}.tar.gz -> blueprint-${MPV}.tar.gz
+	https://github.com/LineageOS/android_vendor_lineage/archive/lineage-15.1.tar.gz"
+DESCRIPTION="JSON-like build system for Android."
+HOMEPAGE="${A_URI}/${PN}"
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64"
+SLOT=0
+
+DEPEND="dev-lang/go
+	dev-util/ninja"
+RDEPEND="dev-lang/go"
+
+PATCHES=(
+	"${FILESDIR}"/blueprint-test-go-1.10.patch
+	"${FILESDIR}"/soong-9999-bootstrap-clean.patch
+	"${FILESDIR}"/soong-no-kernel-header.patch
+	"${FILESDIR}"/soong-no-bootstrap.patch
+)
+
+src_unpack() {
+	git-r3_src_unpack
+
+	mkdir -p "${S}"/vendor || die
+	cd "${S}"/vendor || die
+	unpack lineage-15.1.tar.gz
+	mv android_vendor_lineage-lineage-15.1 lineage || die
+
+	mkdir -p "${S}"/build/blueprint || die
+	cd "${S}"/build/blueprint || die
+	unpack blueprint-${MPV}.tar.gz
+}
+
+src_prepare() {
+	default
+	ln -s build/soong/root.bp Android.bp || die
+	ln -s build/soong/bootstrap.bash || die
+
+	for c in vendor/lineage/*; do
+		[[ ${c} = */build ]] || rm -r ${c} || die
+	done
+}
+
+src_compile() {
+	BUILDDIR="${S}"/out bash -xv build/soong/bootstrap.bash || die
+	eninja -v -f out/.minibootstrap/build.ninja
+	eninja -v -f out/.bootstrap/build.ninja
+
+	# go run cmd/microfactory/microfactory.go -s cmd/microfactory \
+	#    -pkg-path android/soong=. -o out/soong_ui android/soong/cmd/soong_ui
+	# eninja -v -f .bootstrap/build.ninja
+}
+
+src_install() {
+	dobin out/.bootstrap/bin/*
+	sed -n '/\/\/.*host bionic/,$p' < build/soong/Android.bp > "${T}"/Android.bp
+	sed '/build = \[/,+3d' < build/soong/root.bp > "${T}"/root.bp
+	insinto /usr/share/soong
+	doins "${T}"/{Android,root}.bp
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/android:master commit in: dev-util/soong/, dev-util/soong/files/
@ 2018-08-11  7:10 Benda XU
  0 siblings, 0 replies; 6+ messages in thread
From: Benda XU @ 2018-08-11  7:10 UTC (permalink / raw
  To: gentoo-commits

commit:     6acff0b8c46cc79f296b65eebd1588ebb7f6eca1
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 11 07:16:36 2018 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sat Aug 11 07:16:36 2018 +0000
URL:        https://gitweb.gentoo.org/proj/android.git/commit/?id=6acff0b8

dev-util/soong: remove dependencies on prebuilt toolchain.

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-util/soong/Manifest                           |  5 +-
 dev-util/soong/files/soong-gentoo-toolchain.patch | 78 +++++++++++++++++++++++
 dev-util/soong/soong-9999.ebuild                  |  3 +-
 3 files changed, 83 insertions(+), 3 deletions(-)

diff --git a/dev-util/soong/Manifest b/dev-util/soong/Manifest
index 1a7d1bc..3a27063 100644
--- a/dev-util/soong/Manifest
+++ b/dev-util/soong/Manifest
@@ -1,11 +1,12 @@
 AUX blueprint-test-go-1.10.patch 1533 BLAKE2B 3f764ea5ac68cdce8ecadb0dc40f4e676d8db21095b88cf99d7aa6c950ffd578029782d075d59290fc4898544458cab730471f9f0581dccefccc5a2951aa7234 SHA512 2846a098840b4543ec34466d5e97d0f6f8b05ba8dbb01e23c4a802a2bc3995fbb64020e88fa49ded8d7cac527cbfbb5614447165f7f17b392925f4f02556d480
 AUX soong-9999-bootstrap-clean.patch 1539 BLAKE2B 95c06e8242d4d2e7a65d0f5e25b77bfe8079edf71213be318465250c78a1869e0b9ac0a7bb7be8123f586d1150a86951fb30b021230f3e3857ecdbdadab61d63 SHA512 b08a6314e3bee2b6d3ee7fa60afe3678a61d08c4930f9e55a643cf3bbe3373fef08d245b048a03a246d9cb0f9b3974b7e1dcb3f44f614cd9fd7f062d5c096384
 AUX soong-bootstrap-clean.patch 1588 BLAKE2B ec20e7fece7c126a19586d1a6db7264f64f2b427c7386a6a9f2df77d5171a024185e119683ae2d5e87f483937bc05d40b6d3ffd4132826ff7e42448348d96e75 SHA512 bb39af5fd5d8ec310506b8a3bb782389e9a3c4a31429d6cf32f4681b5fee64d41c01ecf05f692060bcf15ff53952a31d1d6ffe2ee4de6a6e65ee8f44cca42972
+AUX soong-gentoo-toolchain.patch 2253 BLAKE2B 5ee0fae010c0ae60d82c1b1afb11070eab8b5b6d8c2d193509006001539c8a250ee5198f8f246fd9f26b0420fc7ccc936d5f2bd930fa84985482f5c98f95ac14 SHA512 0936eeba3120b866be87cb7584ab3dc6d84a0a67e7f191cd1bdaeab11816e21c4db5cd68a8eb4a2de50fe4791ce723ba313de4a479fa68b92353e7f29ccef404
 AUX soong-no-bootstrap.patch 719 BLAKE2B 2d6bef0e256f4bf1c7bac48b1a725aaf53f061ec04b67dcc47a94fcb406cc32499557c9c97198748a904a6ab5e9a5ff4d375de2ca0f030deabe31e177795b8bd SHA512 05617b717c05eecd1b6971a4e72302341904a23481fccca83beb9b329ba91afda562b0d594600e2a91d784995dcf125fc71c955da60d0a1648128c71ec751c33
 AUX soong-no-kernel-header.patch 346 BLAKE2B 9e830f028a47a031b46c5cefbc4ddafc922b1506756ba36266aa97f48e670efd1bae8a438f712add004b17fff3bf3c3f4c059a48039ee6ef619afc39163445d2 SHA512 b0ae8e277050911baf262a54c7324f03d69e5f8dd87505942d0a554451e69c6d6f0668801b83d66ac5c69d7827ea7d613d1d55e376c761c7e1f54c3b1ff286be
 DIST blueprint-8.1.0_p41.tar.gz 114222 BLAKE2B cb2335fd766212d1c3279ae4d6ee91df5f3c3a9522230ca70cbc080eed9b387a7d567963ba8ea5ffc4a48b01400958cc1d619b9da897e0f90a29b4446becdf46 SHA512 8ada4f309767567e7e08e6c8e61f0e442eb14a59333323bb6b47bb72c2b923bbb342166cddf6d31ec05a27f70ae60a981c0c8b4a3438820ce20ef47028e9f02b
 DIST soong-8.1.0_p41.tar.gz 355543 BLAKE2B 0d2b47c30d0515426cffa19c73495f68633dcdbcd5fc33fbbabb8892b712eb85ec68657ea73e07b34573af525055c0f791cd6b54ca58dedd5c14bd4af1a37623 SHA512 50f65ac86f4466adfed6fddf6e8288e16fdc0c1717ba57e59d40395115d4f55ceed3407ce6542ef0173c2076783a7bdc908ff0aac6f19aad7c62a8f63daef6e3
-DIST vendor-lineage-15.1.tar.gz 49859612 BLAKE2B 2203f51a8610100c9b6e3754d54da0310414abfac60b21a7fb4739f8f70bfc81cf0f61fb820b82891fbaf4bc89162d2b891c9c75ef86abe61de91525b7cb5e61 SHA512 5f7f92cf310d45c51f687a84205a8de68390fd2462e754bbe8d7226041e19938614d4f68eafb046dbb34ad29c67d70cfa6a3bea98841935d2c1659a5ee7c90c9
+DIST vendor-lineage-15.1.tar.gz 49859452 BLAKE2B c4de3918fa6aff6f24b27fdbde5434b2cfb9d8fb8632e64ce007857de3ad08f3a48d50cc8cee158df3daf29d2330f63ae71b433b0cde888ce3f13d152aab8563 SHA512 6f67ddaa087da4c2d379331367b839025aed75a976c05c1f3562f715d05de387a938969488e2979be8286eed1db4a90652c73eec5e58c728174aa50197229fa7
 EBUILD soong-8.1.0_p41.ebuild 1676 BLAKE2B f262faa3e8dbe45414160220975c8ca5c64104f3479f8b4fc2bc2fe50b79ce2af3a732375616906c7db1a13b0295dc21e937a208f670aa37d404badd79d2ed68 SHA512 da536c2b5f000739a70c8a932f921ef2d52e3e73e4062dfa4b4c13b56612a6e95346b5cc425f8bfe79493c04e52a79e759d8abf704ae090caaa1f6a5b0a64aca
-EBUILD soong-9999.ebuild 2015 BLAKE2B c0e5661fcaa99f02177316e80d3dc94c8626425200ff035fbafcfd95779500b8778cdf5293fbe59a774363e1cf94d6e1886f78a399ba55ac43fb3a457368ea1a SHA512 19527b1876ed8fc50b905e185d984b056f49e788ce165ddeaefe490e012f74a17d80a853a0b09d588d3454e9f93481c0fb9249f2911f0cf60cbe61d08e4cdc3c
+EBUILD soong-9999.ebuild 2066 BLAKE2B 4e6091f8df826ff182d1d6a947c811955657d8541b61a11a92b999c3256659f2592108194c96386d88722b7c73716a3b6cb9149df377c7ff55a968a9e39f58e2 SHA512 23e87473eb71d5b8bf8fbc397515109b9b73421ec834f5e896fe12d736f30d98763c91039edf0a14e1d34937f620c055d32ab40f14b73bccd5f61599f655e108
 MISC metadata.xml 242 BLAKE2B 08b4880748ab6d685ce28f65a9f6cc5ad62deff8f85d4e0a55a3dc12aa8bd63cf1de56b28ff89929e054a6831e223d6ef0207e8b19c6887f09ee22621bd76928 SHA512 ae57aaeecc094cffa640d88329a0baa6c2b0703330d84f6406f3f68d8bb9b724d2e19a8478be8708de284db9ac452f95f225a9f79cd1c5d0236aa2f9935b9b21

diff --git a/dev-util/soong/files/soong-gentoo-toolchain.patch b/dev-util/soong/files/soong-gentoo-toolchain.patch
new file mode 100644
index 0000000..81a755c
--- /dev/null
+++ b/dev-util/soong/files/soong-gentoo-toolchain.patch
@@ -0,0 +1,78 @@
+Index: soong-9999/build/soong/cc/builder.go
+===================================================================
+--- soong-9999.orig/build/soong/cc/builder.go
++++ soong-9999/build/soong/cc/builder.go
+@@ -20,7 +20,6 @@ package cc
+ 
+ import (
+ 	"fmt"
+-	"path/filepath"
+ 	"runtime"
+ 	"strconv"
+ 	"strings"
+@@ -44,7 +43,6 @@ var (
+ 			Depfile:     "${out}.d",
+ 			Deps:        blueprint.DepsGCC,
+ 			Command:     "$relPwd ${config.CcWrapper}$ccCmd -c $cFlags -MD -MF ${out}.d -o $out $in",
+-			CommandDeps: []string{"$ccCmd"},
+ 		},
+ 		"ccCmd", "cFlags")
+ 
+@@ -52,7 +50,6 @@ var (
+ 		blueprint.RuleParams{
+ 			Command: "$ldCmd ${crtBegin} @${out}.rsp " +
+ 				"${libFlags} ${crtEnd} -o ${out} ${ldFlags}",
+-			CommandDeps:    []string{"$ldCmd"},
+ 			Rspfile:        "${out}.rsp",
+ 			RspfileContent: "${in}",
+ 		},
+@@ -61,14 +58,12 @@ var (
+ 	partialLd = pctx.AndroidStaticRule("partialLd",
+ 		blueprint.RuleParams{
+ 			Command:     "$ldCmd -nostdlib -Wl,-r ${in} -o ${out} ${ldFlags}",
+-			CommandDeps: []string{"$ldCmd"},
+ 		},
+ 		"ldCmd", "ldFlags")
+ 
+ 	ar = pctx.AndroidStaticRule("ar",
+ 		blueprint.RuleParams{
+ 			Command:        "rm -f ${out} && $arCmd $arFlags $out @${out}.rsp",
+-			CommandDeps:    []string{"$arCmd"},
+ 			Rspfile:        "${out}.rsp",
+ 			RspfileContent: "${in}",
+ 		},
+@@ -385,7 +380,6 @@ func TransformSourceToObj(ctx android.Mo
+ 		ccDesc := ccCmd
+ 
+ 		if flags.clang {
+-			ccCmd = "${config.ClangBin}/" + ccCmd
+ 		} else {
+ 			ccCmd = gccCmd(flags.toolchain, ccCmd)
+ 		}
+@@ -568,7 +562,7 @@ func TransformObjToDynamicBinary(ctx and
+ 
+ 	var ldCmd string
+ 	if flags.clang {
+-		ldCmd = "${config.ClangBin}/clang++"
++		ldCmd = "clang++"
+ 	} else {
+ 		ldCmd = gccCmd(flags.toolchain, "g++")
+ 	}
+@@ -714,7 +708,7 @@ func TransformObjsToObj(ctx android.Modu
+ 
+ 	var ldCmd string
+ 	if flags.clang {
+-		ldCmd = "${config.ClangBin}/clang++"
++		ldCmd = "clang++"
+ 	} else {
+ 		ldCmd = gccCmd(flags.toolchain, "g++")
+ 	}
+@@ -817,7 +811,7 @@ func CopyGccLib(ctx android.ModuleContex
+ }
+ 
+ func gccCmd(toolchain config.Toolchain, cmd string) string {
+-	return filepath.Join(toolchain.GccRoot(), "bin", toolchain.GccTriple()+"-"+cmd)
++	return cmd
+ }
+ 
+ func splitListForSize(list android.Paths, limit int) (lists []android.Paths, err error) {

diff --git a/dev-util/soong/soong-9999.ebuild b/dev-util/soong/soong-9999.ebuild
index da35cf9..9fca1af 100644
--- a/dev-util/soong/soong-9999.ebuild
+++ b/dev-util/soong/soong-9999.ebuild
@@ -27,6 +27,7 @@ PATCHES=(
 	"${FILESDIR}"/soong-9999-bootstrap-clean.patch
 	"${FILESDIR}"/soong-no-kernel-header.patch
 	"${FILESDIR}"/soong-no-bootstrap.patch
+	"${FILESDIR}"/soong-gentoo-toolchain.patch
 )
 
 src_unpack() {
@@ -34,7 +35,7 @@ src_unpack() {
 
 	mkdir -p "${S}"/vendor || die
 	cd "${S}"/vendor || die
-	unpack lineage-15.1.tar.gz
+	unpack vendor-lineage-15.1.tar.gz
 	mv android_vendor_lineage-lineage-15.1 lineage || die
 
 	mkdir -p "${S}"/build/blueprint || die


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/android:master commit in: dev-util/soong/, dev-util/soong/files/
@ 2018-08-11  8:00 Benda XU
  0 siblings, 0 replies; 6+ messages in thread
From: Benda XU @ 2018-08-11  8:00 UTC (permalink / raw
  To: gentoo-commits

commit:     4de6a23d3c0a0026328b67133ef4458d8835b9bc
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 11 08:06:39 2018 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sat Aug 11 08:06:39 2018 +0000
URL:        https://gitweb.gentoo.org/proj/android.git/commit/?id=4de6a23d

dev-util/soong: remove strip wrappers.

  ship scripts like copygcclib.sh.

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-util/soong/Manifest                           |  4 +--
 dev-util/soong/files/soong-gentoo-toolchain.patch | 33 ++++++++++++++++++++---
 dev-util/soong/soong-9999.ebuild                  |  1 +
 3 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/dev-util/soong/Manifest b/dev-util/soong/Manifest
index 3a27063..9e97326 100644
--- a/dev-util/soong/Manifest
+++ b/dev-util/soong/Manifest
@@ -1,12 +1,12 @@
 AUX blueprint-test-go-1.10.patch 1533 BLAKE2B 3f764ea5ac68cdce8ecadb0dc40f4e676d8db21095b88cf99d7aa6c950ffd578029782d075d59290fc4898544458cab730471f9f0581dccefccc5a2951aa7234 SHA512 2846a098840b4543ec34466d5e97d0f6f8b05ba8dbb01e23c4a802a2bc3995fbb64020e88fa49ded8d7cac527cbfbb5614447165f7f17b392925f4f02556d480
 AUX soong-9999-bootstrap-clean.patch 1539 BLAKE2B 95c06e8242d4d2e7a65d0f5e25b77bfe8079edf71213be318465250c78a1869e0b9ac0a7bb7be8123f586d1150a86951fb30b021230f3e3857ecdbdadab61d63 SHA512 b08a6314e3bee2b6d3ee7fa60afe3678a61d08c4930f9e55a643cf3bbe3373fef08d245b048a03a246d9cb0f9b3974b7e1dcb3f44f614cd9fd7f062d5c096384
 AUX soong-bootstrap-clean.patch 1588 BLAKE2B ec20e7fece7c126a19586d1a6db7264f64f2b427c7386a6a9f2df77d5171a024185e119683ae2d5e87f483937bc05d40b6d3ffd4132826ff7e42448348d96e75 SHA512 bb39af5fd5d8ec310506b8a3bb782389e9a3c4a31429d6cf32f4681b5fee64d41c01ecf05f692060bcf15ff53952a31d1d6ffe2ee4de6a6e65ee8f44cca42972
-AUX soong-gentoo-toolchain.patch 2253 BLAKE2B 5ee0fae010c0ae60d82c1b1afb11070eab8b5b6d8c2d193509006001539c8a250ee5198f8f246fd9f26b0420fc7ccc936d5f2bd930fa84985482f5c98f95ac14 SHA512 0936eeba3120b866be87cb7584ab3dc6d84a0a67e7f191cd1bdaeab11816e21c4db5cd68a8eb4a2de50fe4791ce723ba313de4a479fa68b92353e7f29ccef404
+AUX soong-gentoo-toolchain.patch 3081 BLAKE2B 9f13b1851f74289e0d0f0bff674a2dc9a33df2d99dff32781e6347567022b6b2815ac0ce77e622298c618e5cc145a15dd0dbe8e6f425dd1fac6dab75682a2589 SHA512 c01803d050527baedf358aa08db34f432019bf76cdfd3f78ddb1cf22c644ead9e368e77e269db99a6fbedf944d7b1b3d6d3120891108d6d268bde1b85c746a99
 AUX soong-no-bootstrap.patch 719 BLAKE2B 2d6bef0e256f4bf1c7bac48b1a725aaf53f061ec04b67dcc47a94fcb406cc32499557c9c97198748a904a6ab5e9a5ff4d375de2ca0f030deabe31e177795b8bd SHA512 05617b717c05eecd1b6971a4e72302341904a23481fccca83beb9b329ba91afda562b0d594600e2a91d784995dcf125fc71c955da60d0a1648128c71ec751c33
 AUX soong-no-kernel-header.patch 346 BLAKE2B 9e830f028a47a031b46c5cefbc4ddafc922b1506756ba36266aa97f48e670efd1bae8a438f712add004b17fff3bf3c3f4c059a48039ee6ef619afc39163445d2 SHA512 b0ae8e277050911baf262a54c7324f03d69e5f8dd87505942d0a554451e69c6d6f0668801b83d66ac5c69d7827ea7d613d1d55e376c761c7e1f54c3b1ff286be
 DIST blueprint-8.1.0_p41.tar.gz 114222 BLAKE2B cb2335fd766212d1c3279ae4d6ee91df5f3c3a9522230ca70cbc080eed9b387a7d567963ba8ea5ffc4a48b01400958cc1d619b9da897e0f90a29b4446becdf46 SHA512 8ada4f309767567e7e08e6c8e61f0e442eb14a59333323bb6b47bb72c2b923bbb342166cddf6d31ec05a27f70ae60a981c0c8b4a3438820ce20ef47028e9f02b
 DIST soong-8.1.0_p41.tar.gz 355543 BLAKE2B 0d2b47c30d0515426cffa19c73495f68633dcdbcd5fc33fbbabb8892b712eb85ec68657ea73e07b34573af525055c0f791cd6b54ca58dedd5c14bd4af1a37623 SHA512 50f65ac86f4466adfed6fddf6e8288e16fdc0c1717ba57e59d40395115d4f55ceed3407ce6542ef0173c2076783a7bdc908ff0aac6f19aad7c62a8f63daef6e3
 DIST vendor-lineage-15.1.tar.gz 49859452 BLAKE2B c4de3918fa6aff6f24b27fdbde5434b2cfb9d8fb8632e64ce007857de3ad08f3a48d50cc8cee158df3daf29d2330f63ae71b433b0cde888ce3f13d152aab8563 SHA512 6f67ddaa087da4c2d379331367b839025aed75a976c05c1f3562f715d05de387a938969488e2979be8286eed1db4a90652c73eec5e58c728174aa50197229fa7
 EBUILD soong-8.1.0_p41.ebuild 1676 BLAKE2B f262faa3e8dbe45414160220975c8ca5c64104f3479f8b4fc2bc2fe50b79ce2af3a732375616906c7db1a13b0295dc21e937a208f670aa37d404badd79d2ed68 SHA512 da536c2b5f000739a70c8a932f921ef2d52e3e73e4062dfa4b4c13b56612a6e95346b5cc425f8bfe79493c04e52a79e759d8abf704ae090caaa1f6a5b0a64aca
-EBUILD soong-9999.ebuild 2066 BLAKE2B 4e6091f8df826ff182d1d6a947c811955657d8541b61a11a92b999c3256659f2592108194c96386d88722b7c73716a3b6cb9149df377c7ff55a968a9e39f58e2 SHA512 23e87473eb71d5b8bf8fbc397515109b9b73421ec834f5e896fe12d736f30d98763c91039edf0a14e1d34937f620c055d32ab40f14b73bccd5f61599f655e108
+EBUILD soong-9999.ebuild 2096 BLAKE2B 0c20f2a06591ccf03299b145b791b5ec26a10c6780faa1080c0ec81cbc4d45dc622fa3568c13712b35f006edac5557740b2d0e0b99ca72af9e37f7a02c7f6f0a SHA512 01bb0ad883c8d577ade15408a855e052f41ecb725374da81b0866f14039aa0529f504c4105794691bbfcdc734cfee6760c78bddf95f0253847b8a024cd792576
 MISC metadata.xml 242 BLAKE2B 08b4880748ab6d685ce28f65a9f6cc5ad62deff8f85d4e0a55a3dc12aa8bd63cf1de56b28ff89929e054a6831e223d6ef0207e8b19c6887f09ee22621bd76928 SHA512 ae57aaeecc094cffa640d88329a0baa6c2b0703330d84f6406f3f68d8bb9b724d2e19a8478be8708de284db9ac452f95f225a9f79cd1c5d0236aa2f9935b9b21

diff --git a/dev-util/soong/files/soong-gentoo-toolchain.patch b/dev-util/soong/files/soong-gentoo-toolchain.patch
index 81a755c..f9f1a7c 100644
--- a/dev-util/soong/files/soong-gentoo-toolchain.patch
+++ b/dev-util/soong/files/soong-gentoo-toolchain.patch
@@ -41,7 +41,32 @@ Index: soong-9999/build/soong/cc/builder.go
  			Rspfile:        "${out}.rsp",
  			RspfileContent: "${in}",
  		},
-@@ -385,7 +380,6 @@ func TransformSourceToObj(ctx android.Mo
+@@ -101,14 +96,11 @@ var (
+ 		},
+ 		"objcopyCmd", "prefix")
+ 
+-	_ = pctx.SourcePathVariable("stripPath", "build/soong/scripts/strip.sh")
+-
+ 	strip = pctx.AndroidStaticRule("strip",
+ 		blueprint.RuleParams{
+ 			Depfile:     "${out}.d",
+ 			Deps:        blueprint.DepsGCC,
+-			Command:     "CROSS_COMPILE=$crossCompile $stripPath ${args} -i ${in} -o ${out} -d ${out}.d",
+-			CommandDeps: []string{"$stripPath"},
++			Command:     "strip ${args} -i ${in} -o ${out} -d ${out}.d",
+ 		},
+ 		"args", "crossCompile")
+ 
+@@ -124,7 +116,7 @@ var (
+ 			Depfile:     "${out}.d",
+ 			Deps:        blueprint.DepsGCC,
+ 			Command:     "$copyGccLibPath $out $ccCmd $cFlags -print-file-name=${libName}",
+-			CommandDeps: []string{"$copyGccLibPath", "$ccCmd"},
++			CommandDeps: []string{"$copyGccLibPath"},
+ 		},
+ 		"ccCmd", "cFlags", "libName")
+ 
+@@ -385,7 +377,6 @@ func TransformSourceToObj(ctx android.Mo
  		ccDesc := ccCmd
  
  		if flags.clang {
@@ -49,7 +74,7 @@ Index: soong-9999/build/soong/cc/builder.go
  		} else {
  			ccCmd = gccCmd(flags.toolchain, ccCmd)
  		}
-@@ -568,7 +562,7 @@ func TransformObjToDynamicBinary(ctx and
+@@ -568,7 +559,7 @@ func TransformObjToDynamicBinary(ctx and
  
  	var ldCmd string
  	if flags.clang {
@@ -58,7 +83,7 @@ Index: soong-9999/build/soong/cc/builder.go
  	} else {
  		ldCmd = gccCmd(flags.toolchain, "g++")
  	}
-@@ -714,7 +708,7 @@ func TransformObjsToObj(ctx android.Modu
+@@ -714,7 +705,7 @@ func TransformObjsToObj(ctx android.Modu
  
  	var ldCmd string
  	if flags.clang {
@@ -67,7 +92,7 @@ Index: soong-9999/build/soong/cc/builder.go
  	} else {
  		ldCmd = gccCmd(flags.toolchain, "g++")
  	}
-@@ -817,7 +811,7 @@ func CopyGccLib(ctx android.ModuleContex
+@@ -817,7 +808,7 @@ func CopyGccLib(ctx android.ModuleContex
  }
  
  func gccCmd(toolchain config.Toolchain, cmd string) string {

diff --git a/dev-util/soong/soong-9999.ebuild b/dev-util/soong/soong-9999.ebuild
index 9fca1af..2a6cb31 100644
--- a/dev-util/soong/soong-9999.ebuild
+++ b/dev-util/soong/soong-9999.ebuild
@@ -69,4 +69,5 @@ src_install() {
 	sed '/build = \[/,+3d' < build/soong/root.bp > "${T}"/root.bp
 	insinto /usr/share/soong
 	doins "${T}"/{Android,root}.bp
+	doins -r build/soong/scripts
 }


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/android:master commit in: dev-util/soong/, dev-util/soong/files/
@ 2018-08-12  8:26 Benda XU
  0 siblings, 0 replies; 6+ messages in thread
From: Benda XU @ 2018-08-12  8:26 UTC (permalink / raw
  To: gentoo-commits

commit:     44013ded5230f5ddef9b6183678da7a69b0fa2c1
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 12 08:31:20 2018 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sun Aug 12 08:31:36 2018 +0000
URL:        https://gitweb.gentoo.org/proj/android.git/commit/?id=44013ded

dev-util/soong: use gentoo host path for toolchain and helpers.

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-util/soong/Manifest                           |  7 +++---
 dev-util/soong/files/soong-gentoo-host-bin.patch  | 29 +++++++++++++++++++++++
 dev-util/soong/files/soong-gentoo-toolchain.patch | 16 ++++++++-----
 dev-util/soong/files/soong-no-bootstrap.patch     | 20 ++++++++++++++++
 dev-util/soong/soong-9999.ebuild                  |  8 +++++--
 5 files changed, 69 insertions(+), 11 deletions(-)

diff --git a/dev-util/soong/Manifest b/dev-util/soong/Manifest
index 9e97326..d3f485f 100644
--- a/dev-util/soong/Manifest
+++ b/dev-util/soong/Manifest
@@ -1,12 +1,13 @@
 AUX blueprint-test-go-1.10.patch 1533 BLAKE2B 3f764ea5ac68cdce8ecadb0dc40f4e676d8db21095b88cf99d7aa6c950ffd578029782d075d59290fc4898544458cab730471f9f0581dccefccc5a2951aa7234 SHA512 2846a098840b4543ec34466d5e97d0f6f8b05ba8dbb01e23c4a802a2bc3995fbb64020e88fa49ded8d7cac527cbfbb5614447165f7f17b392925f4f02556d480
 AUX soong-9999-bootstrap-clean.patch 1539 BLAKE2B 95c06e8242d4d2e7a65d0f5e25b77bfe8079edf71213be318465250c78a1869e0b9ac0a7bb7be8123f586d1150a86951fb30b021230f3e3857ecdbdadab61d63 SHA512 b08a6314e3bee2b6d3ee7fa60afe3678a61d08c4930f9e55a643cf3bbe3373fef08d245b048a03a246d9cb0f9b3974b7e1dcb3f44f614cd9fd7f062d5c096384
 AUX soong-bootstrap-clean.patch 1588 BLAKE2B ec20e7fece7c126a19586d1a6db7264f64f2b427c7386a6a9f2df77d5171a024185e119683ae2d5e87f483937bc05d40b6d3ffd4132826ff7e42448348d96e75 SHA512 bb39af5fd5d8ec310506b8a3bb782389e9a3c4a31429d6cf32f4681b5fee64d41c01ecf05f692060bcf15ff53952a31d1d6ffe2ee4de6a6e65ee8f44cca42972
-AUX soong-gentoo-toolchain.patch 3081 BLAKE2B 9f13b1851f74289e0d0f0bff674a2dc9a33df2d99dff32781e6347567022b6b2815ac0ce77e622298c618e5cc145a15dd0dbe8e6f425dd1fac6dab75682a2589 SHA512 c01803d050527baedf358aa08db34f432019bf76cdfd3f78ddb1cf22c644ead9e368e77e269db99a6fbedf944d7b1b3d6d3120891108d6d268bde1b85c746a99
-AUX soong-no-bootstrap.patch 719 BLAKE2B 2d6bef0e256f4bf1c7bac48b1a725aaf53f061ec04b67dcc47a94fcb406cc32499557c9c97198748a904a6ab5e9a5ff4d375de2ca0f030deabe31e177795b8bd SHA512 05617b717c05eecd1b6971a4e72302341904a23481fccca83beb9b329ba91afda562b0d594600e2a91d784995dcf125fc71c955da60d0a1648128c71ec751c33
+AUX soong-gentoo-host-bin.patch 1141 BLAKE2B d15738ce12aeb54e63e2f540b992fb6ed1989dfbb53a1b53f8cb0a99b3d30be2ae8ce598fb37f13fd68053e1b2deae0a4e112ab243186bf656662484ae278ca2 SHA512 c6eda77f2f2db1c0fe9b2556966b3015bda409198766a22dfca73dfbca2ed944355e129570e626e1849ee00353a9f229678091f66fed4a61bc5b7e270e33169c
+AUX soong-gentoo-toolchain.patch 3277 BLAKE2B a80102f14af1b73768e8efa441bd050ef0ca425c4d0af4ee2c2991b9c41de09446c4cc2b9dc5694e65e84ba12b129790ec56b6286f0ce7a76077cd7a81f66a55 SHA512 b31787d6045ba003be519102a3a2a79c08d4eda1f664f9637f59daada3ea761b0b502642054120b27dd4544f742aafc420ed44ea0a00409030fa72f1092a5437
+AUX soong-no-bootstrap.patch 1519 BLAKE2B 26b70aa67ed07e6ff5166d04f2d11e40b6c9c6a444cb4b8171f3b2d99ea35de194ed3916eb0027d80d2c61b0ae4ece89fa7d61bf48564de11ab40f6faba5d8aa SHA512 f90988259f308a5bc3843965391bad1a2be0f4a64eaa31284a7522d21832bf5e9095c08c3509acbc0ece982888dcb6f90e77116839eadd48be71eb53224e167f
 AUX soong-no-kernel-header.patch 346 BLAKE2B 9e830f028a47a031b46c5cefbc4ddafc922b1506756ba36266aa97f48e670efd1bae8a438f712add004b17fff3bf3c3f4c059a48039ee6ef619afc39163445d2 SHA512 b0ae8e277050911baf262a54c7324f03d69e5f8dd87505942d0a554451e69c6d6f0668801b83d66ac5c69d7827ea7d613d1d55e376c761c7e1f54c3b1ff286be
 DIST blueprint-8.1.0_p41.tar.gz 114222 BLAKE2B cb2335fd766212d1c3279ae4d6ee91df5f3c3a9522230ca70cbc080eed9b387a7d567963ba8ea5ffc4a48b01400958cc1d619b9da897e0f90a29b4446becdf46 SHA512 8ada4f309767567e7e08e6c8e61f0e442eb14a59333323bb6b47bb72c2b923bbb342166cddf6d31ec05a27f70ae60a981c0c8b4a3438820ce20ef47028e9f02b
 DIST soong-8.1.0_p41.tar.gz 355543 BLAKE2B 0d2b47c30d0515426cffa19c73495f68633dcdbcd5fc33fbbabb8892b712eb85ec68657ea73e07b34573af525055c0f791cd6b54ca58dedd5c14bd4af1a37623 SHA512 50f65ac86f4466adfed6fddf6e8288e16fdc0c1717ba57e59d40395115d4f55ceed3407ce6542ef0173c2076783a7bdc908ff0aac6f19aad7c62a8f63daef6e3
 DIST vendor-lineage-15.1.tar.gz 49859452 BLAKE2B c4de3918fa6aff6f24b27fdbde5434b2cfb9d8fb8632e64ce007857de3ad08f3a48d50cc8cee158df3daf29d2330f63ae71b433b0cde888ce3f13d152aab8563 SHA512 6f67ddaa087da4c2d379331367b839025aed75a976c05c1f3562f715d05de387a938969488e2979be8286eed1db4a90652c73eec5e58c728174aa50197229fa7
 EBUILD soong-8.1.0_p41.ebuild 1676 BLAKE2B f262faa3e8dbe45414160220975c8ca5c64104f3479f8b4fc2bc2fe50b79ce2af3a732375616906c7db1a13b0295dc21e937a208f670aa37d404badd79d2ed68 SHA512 da536c2b5f000739a70c8a932f921ef2d52e3e73e4062dfa4b4c13b56612a6e95346b5cc425f8bfe79493c04e52a79e759d8abf704ae090caaa1f6a5b0a64aca
-EBUILD soong-9999.ebuild 2096 BLAKE2B 0c20f2a06591ccf03299b145b791b5ec26a10c6780faa1080c0ec81cbc4d45dc622fa3568c13712b35f006edac5557740b2d0e0b99ca72af9e37f7a02c7f6f0a SHA512 01bb0ad883c8d577ade15408a855e052f41ecb725374da81b0866f14039aa0529f504c4105794691bbfcdc734cfee6760c78bddf95f0253847b8a024cd792576
+EBUILD soong-9999.ebuild 2235 BLAKE2B efaa432fd695b59851af050c259490e78c8621ea07636d4d2216581d25c0e068893537ff2481f9af198bb3393e71536fd67764f859d14082c40440153322a5be SHA512 627bdd454f463969bab5d3e7061eb353746882f204207bcae0d592eba806680321e850902dd816c19e5bbd3f5405a8a34c29011e9efb1566e59472fc58ce331a
 MISC metadata.xml 242 BLAKE2B 08b4880748ab6d685ce28f65a9f6cc5ad62deff8f85d4e0a55a3dc12aa8bd63cf1de56b28ff89929e054a6831e223d6ef0207e8b19c6887f09ee22621bd76928 SHA512 ae57aaeecc094cffa640d88329a0baa6c2b0703330d84f6406f3f68d8bb9b724d2e19a8478be8708de284db9ac452f95f225a9f79cd1c5d0236aa2f9935b9b21

diff --git a/dev-util/soong/files/soong-gentoo-host-bin.patch b/dev-util/soong/files/soong-gentoo-host-bin.patch
new file mode 100644
index 0000000..d53a266
--- /dev/null
+++ b/dev-util/soong/files/soong-gentoo-host-bin.patch
@@ -0,0 +1,29 @@
+Index: soong-9999/build/soong/android/package_ctx.go
+===================================================================
+--- soong-9999.orig/build/soong/android/package_ctx.go
++++ soong-9999/build/soong/android/package_ctx.go
+@@ -82,11 +82,10 @@ func (p AndroidPackageContext) SourcePat
+ func (p AndroidPackageContext) HostBinToolVariable(name, path string) blueprint.Variable {
+ 	return p.VariableFunc(name, func(config interface{}) (string, error) {
+ 		ctx := &configErrorWrapper{p, config.(Config), []error{}}
+-		p := PathForOutput(ctx, "host", ctx.config.PrebuiltOS(), "bin", path)
+ 		if len(ctx.errors) > 0 {
+ 			return "", ctx.errors[0]
+ 		}
+-		return p.String(), nil
++		return path, nil
+ 	})
+ }
+ 
+Index: soong-9999/build/soong/genrule/genrule.go
+===================================================================
+--- soong-9999.orig/build/soong/genrule/genrule.go
++++ soong-9999/build/soong/genrule/genrule.go
+@@ -229,7 +229,6 @@ func (g *generator) GenerateAndroidBuild
+ 
+ 	ruleParams := blueprint.RuleParams{
+ 		Command:     sandboxCommand,
+-		CommandDeps: []string{"$sboxCmd"},
+ 	}
+ 	var args []string
+ 	if g.properties.Depfile {

diff --git a/dev-util/soong/files/soong-gentoo-toolchain.patch b/dev-util/soong/files/soong-gentoo-toolchain.patch
index f9f1a7c..7a7c179 100644
--- a/dev-util/soong/files/soong-gentoo-toolchain.patch
+++ b/dev-util/soong/files/soong-gentoo-toolchain.patch
@@ -41,7 +41,11 @@ Index: soong-9999/build/soong/cc/builder.go
  			Rspfile:        "${out}.rsp",
  			RspfileContent: "${in}",
  		},
-@@ -101,14 +96,11 @@ var (
+@@ -97,18 +92,14 @@ var (
+ 	prefixSymbols = pctx.AndroidStaticRule("prefixSymbols",
+ 		blueprint.RuleParams{
+ 			Command:     "$objcopyCmd --prefix-symbols=${prefix} ${in} ${out}",
+-			CommandDeps: []string{"$objcopyCmd"},
  		},
  		"objcopyCmd", "prefix")
  
@@ -57,7 +61,7 @@ Index: soong-9999/build/soong/cc/builder.go
  		},
  		"args", "crossCompile")
  
-@@ -124,7 +116,7 @@ var (
+@@ -124,7 +115,7 @@ var (
  			Depfile:     "${out}.d",
  			Deps:        blueprint.DepsGCC,
  			Command:     "$copyGccLibPath $out $ccCmd $cFlags -print-file-name=${libName}",
@@ -66,7 +70,7 @@ Index: soong-9999/build/soong/cc/builder.go
  		},
  		"ccCmd", "cFlags", "libName")
  
-@@ -385,7 +377,6 @@ func TransformSourceToObj(ctx android.Mo
+@@ -385,7 +376,6 @@ func TransformSourceToObj(ctx android.Mo
  		ccDesc := ccCmd
  
  		if flags.clang {
@@ -74,7 +78,7 @@ Index: soong-9999/build/soong/cc/builder.go
  		} else {
  			ccCmd = gccCmd(flags.toolchain, ccCmd)
  		}
-@@ -568,7 +559,7 @@ func TransformObjToDynamicBinary(ctx and
+@@ -568,7 +558,7 @@ func TransformObjToDynamicBinary(ctx and
  
  	var ldCmd string
  	if flags.clang {
@@ -83,7 +87,7 @@ Index: soong-9999/build/soong/cc/builder.go
  	} else {
  		ldCmd = gccCmd(flags.toolchain, "g++")
  	}
-@@ -714,7 +705,7 @@ func TransformObjsToObj(ctx android.Modu
+@@ -714,7 +704,7 @@ func TransformObjsToObj(ctx android.Modu
  
  	var ldCmd string
  	if flags.clang {
@@ -92,7 +96,7 @@ Index: soong-9999/build/soong/cc/builder.go
  	} else {
  		ldCmd = gccCmd(flags.toolchain, "g++")
  	}
-@@ -817,7 +808,7 @@ func CopyGccLib(ctx android.ModuleContex
+@@ -817,7 +807,7 @@ func CopyGccLib(ctx android.ModuleContex
  }
  
  func gccCmd(toolchain config.Toolchain, cmd string) string {

diff --git a/dev-util/soong/files/soong-no-bootstrap.patch b/dev-util/soong/files/soong-no-bootstrap.patch
index 3104e68..50a0663 100644
--- a/dev-util/soong/files/soong-no-bootstrap.patch
+++ b/dev-util/soong/files/soong-no-bootstrap.patch
@@ -10,3 +10,23 @@ Index: soong-9999/build/blueprint/bootstrap/command.go
  
  	ctx.RegisterSingletonType("glob", globSingletonFactory(ctx))
  
+Index: soong-9999/build/blueprint/bootstrap/glob.go
+===================================================================
+--- soong-9999.orig/build/blueprint/bootstrap/glob.go
++++ soong-9999/build/blueprint/bootstrap/glob.go
+@@ -40,14 +40,13 @@ import (
+ // in a build failure with a "missing and no known rule to make it" error.
+ 
+ var (
+-	globCmd = filepath.Join("$BinDir", "bpglob")
++	globCmd = "bpglob"
+ 
+ 	// globRule rule traverses directories to produce a list of files that match $glob
+ 	// and writes it to $out if it has changed, and writes the directories to $out.d
+ 	GlobRule = pctx.StaticRule("GlobRule",
+ 		blueprint.RuleParams{
+ 			Command:     fmt.Sprintf(`%s -o $out $excludes "$glob"`, globCmd),
+-			CommandDeps: []string{globCmd},
+ 			Description: "glob $glob",
+ 
+ 			Restat:  true,

diff --git a/dev-util/soong/soong-9999.ebuild b/dev-util/soong/soong-9999.ebuild
index 2a6cb31..8cc8c07 100644
--- a/dev-util/soong/soong-9999.ebuild
+++ b/dev-util/soong/soong-9999.ebuild
@@ -28,6 +28,7 @@ PATCHES=(
 	"${FILESDIR}"/soong-no-kernel-header.patch
 	"${FILESDIR}"/soong-no-bootstrap.patch
 	"${FILESDIR}"/soong-gentoo-toolchain.patch
+	"${FILESDIR}"/soong-gentoo-host-bin.patch
 )
 
 src_unpack() {
@@ -58,15 +59,18 @@ src_compile() {
 	eninja -v -f out/.minibootstrap/build.ninja
 	eninja -v -f out/.bootstrap/build.ninja
 
+	cd "${S}"/build/${PN}/cmd/sbox
+	go build -v -work
 	# go run cmd/microfactory/microfactory.go -s cmd/microfactory \
 	#    -pkg-path android/soong=. -o out/soong_ui android/soong/cmd/soong_ui
 	# eninja -v -f .bootstrap/build.ninja
 }
 
 src_install() {
-	dobin out/.bootstrap/bin/*
+	dobin out/.bootstrap/bin/* build/${PN}/cmd/sbox/sbox
+
 	sed -n '/\/\/.*host bionic/,$p' < build/soong/Android.bp > "${T}"/Android.bp
-	sed '/build = \[/,+3d' < build/soong/root.bp > "${T}"/root.bp
+	sed -e '/build = \[/,+3d' -e '/vendor/d' < build/soong/root.bp > "${T}"/root.bp
 	insinto /usr/share/soong
 	doins "${T}"/{Android,root}.bp
 	doins -r build/soong/scripts


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/android:master commit in: dev-util/soong/, dev-util/soong/files/
@ 2018-08-13 14:30 Benda XU
  0 siblings, 0 replies; 6+ messages in thread
From: Benda XU @ 2018-08-13 14:30 UTC (permalink / raw
  To: gentoo-commits

commit:     6427c251dace5298bfee1420d80808e0250e92f0
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 13 14:19:59 2018 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Mon Aug 13 14:37:32 2018 +0000
URL:        https://gitweb.gentoo.org/proj/android.git/commit/?id=6427c251

dev-util/soong: Combined hack to support gentoo toolchain.

  Add google llvm-tblgen.
  Google llvm-tblgen is completely different from upstream.

  Make toc.sh an executable.

  Gentoo toolchain defaults with -pie, so replace -Wl,-r with -r.

  Disable strip, as it is managed by portage.

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-util/soong/Manifest                           |  9 ++++--
 dev-util/soong/files/soong-gentoo-host-bin.patch  | 10 +++++--
 dev-util/soong/files/soong-gentoo-toolchain.patch |  8 ++++--
 dev-util/soong/files/soong-no-strip.patch         | 34 +++++++++++++++++++++++
 dev-util/soong/files/soong-relative-symlink.patch | 13 +++++++++
 dev-util/soong/soong-9999.ebuild                  | 23 ++++++++++-----
 6 files changed, 82 insertions(+), 15 deletions(-)

diff --git a/dev-util/soong/Manifest b/dev-util/soong/Manifest
index 3e6f6d1..f3f098e 100644
--- a/dev-util/soong/Manifest
+++ b/dev-util/soong/Manifest
@@ -1,14 +1,17 @@
 AUX blueprint-test-go-1.10.patch 1533 BLAKE2B 3f764ea5ac68cdce8ecadb0dc40f4e676d8db21095b88cf99d7aa6c950ffd578029782d075d59290fc4898544458cab730471f9f0581dccefccc5a2951aa7234 SHA512 2846a098840b4543ec34466d5e97d0f6f8b05ba8dbb01e23c4a802a2bc3995fbb64020e88fa49ded8d7cac527cbfbb5614447165f7f17b392925f4f02556d480
 AUX soong-9999-bootstrap-clean.patch 1539 BLAKE2B 95c06e8242d4d2e7a65d0f5e25b77bfe8079edf71213be318465250c78a1869e0b9ac0a7bb7be8123f586d1150a86951fb30b021230f3e3857ecdbdadab61d63 SHA512 b08a6314e3bee2b6d3ee7fa60afe3678a61d08c4930f9e55a643cf3bbe3373fef08d245b048a03a246d9cb0f9b3974b7e1dcb3f44f614cd9fd7f062d5c096384
 AUX soong-bootstrap-clean.patch 1588 BLAKE2B ec20e7fece7c126a19586d1a6db7264f64f2b427c7386a6a9f2df77d5171a024185e119683ae2d5e87f483937bc05d40b6d3ffd4132826ff7e42448348d96e75 SHA512 bb39af5fd5d8ec310506b8a3bb782389e9a3c4a31429d6cf32f4681b5fee64d41c01ecf05f692060bcf15ff53952a31d1d6ffe2ee4de6a6e65ee8f44cca42972
-AUX soong-gentoo-host-bin.patch 1141 BLAKE2B d15738ce12aeb54e63e2f540b992fb6ed1989dfbb53a1b53f8cb0a99b3d30be2ae8ce598fb37f13fd68053e1b2deae0a4e112ab243186bf656662484ae278ca2 SHA512 c6eda77f2f2db1c0fe9b2556966b3015bda409198766a22dfca73dfbca2ed944355e129570e626e1849ee00353a9f229678091f66fed4a61bc5b7e270e33169c
-AUX soong-gentoo-toolchain.patch 3277 BLAKE2B a80102f14af1b73768e8efa441bd050ef0ca425c4d0af4ee2c2991b9c41de09446c4cc2b9dc5694e65e84ba12b129790ec56b6286f0ce7a76077cd7a81f66a55 SHA512 b31787d6045ba003be519102a3a2a79c08d4eda1f664f9637f59daada3ea761b0b502642054120b27dd4544f742aafc420ed44ea0a00409030fa72f1092a5437
+AUX soong-gentoo-host-bin.patch 1294 BLAKE2B c9c438dcf66da6663becf5b5919fcf3607d40e2be79d4a7ccea2a4efde7decb099bd12969018f6c65bd9def7eddc26d21cafa2da0c65ac3cad89d232cd409d7d SHA512 eabbab9089cfd637e8904e4bc26b496ac4610d07dae4f71d6fbbe37101945af0620932e90e2c411cdca2982d7796ed09ec4efe145d2377e6fbc0f627265ff5b1
+AUX soong-gentoo-toolchain.patch 3320 BLAKE2B 96ec1e0ccdbd732f1c6b30713702b01e133c71bc6c29bcdaac75e0c39abeeacda1d2b563a26004545cef3f80fe7c0041fe59bf76bb4092844be659602f92628f SHA512 a79fce88eefc422c29866cdd9ab89202a6d24e719ba4d2c8299860b95167fd5bcf9e1e4b4da0c6af2e8636ebae44e46394397f069087f4cd5a1ade244cb27943
 AUX soong-no-bootstrap.patch 1519 BLAKE2B 26b70aa67ed07e6ff5166d04f2d11e40b6c9c6a444cb4b8171f3b2d99ea35de194ed3916eb0027d80d2c61b0ae4ece89fa7d61bf48564de11ab40f6faba5d8aa SHA512 f90988259f308a5bc3843965391bad1a2be0f4a64eaa31284a7522d21832bf5e9095c08c3509acbc0ece982888dcb6f90e77116839eadd48be71eb53224e167f
 AUX soong-no-kernel-header.patch 346 BLAKE2B 9e830f028a47a031b46c5cefbc4ddafc922b1506756ba36266aa97f48e670efd1bae8a438f712add004b17fff3bf3c3f4c059a48039ee6ef619afc39163445d2 SHA512 b0ae8e277050911baf262a54c7324f03d69e5f8dd87505942d0a554451e69c6d6f0668801b83d66ac5c69d7827ea7d613d1d55e376c761c7e1f54c3b1ff286be
+AUX soong-no-strip.patch 1355 BLAKE2B d5c4fbeacc48467f463dfd7db6b4af500fbf368f4dac470092c07ecd8ca11eca1d58ab94312f7a89dfb4e3d3bfa6370bfb3e744f1b5a0986c0fd0d59800e2135 SHA512 b5d1799922c04df026e13f0b8f9169d9d73e669977d0a394ebf5f18c8d56a6913dfaa05f63e91023fb390ca4e5f0c0ac20ddc71817a4d15fd72704533c1a4c0b
 AUX soong-no-sysroot.patch 2875 BLAKE2B 092422fbb204b5413418a36cf6d6bc5504339c082c7261df00140a1fa76f09070e50e5b730a1c3a55d87be9f2327ff3a1010889e6dbd6989b1b47142911f6e49 SHA512 d230fa5bfcc7121615c99db5bf07c0adfa580bd8aa958ba600ee5e027b454f27bf08aa596c93ea7099ab195fb6a94a5a32afdf5d8e16548961bc580c14cafb03
+AUX soong-relative-symlink.patch 466 BLAKE2B c7d682565434e444eaab65bfc516f59ddf909e389e970d5837f8fb7c5b1da73214fddd67659e01312a4462580e27e09c7c167782469402117624cd7fe3fbcae3 SHA512 7a268abcb11e126c29988bcc1e4805fac37badf08112f12efce7a659c54cdf833252d023638ccd9e9531d82dd72062e4bf5dccb96bd93f6e4dc77190af8b6891
 DIST blueprint-8.1.0_p41.tar.gz 114222 BLAKE2B cb2335fd766212d1c3279ae4d6ee91df5f3c3a9522230ca70cbc080eed9b387a7d567963ba8ea5ffc4a48b01400958cc1d619b9da897e0f90a29b4446becdf46 SHA512 8ada4f309767567e7e08e6c8e61f0e442eb14a59333323bb6b47bb72c2b923bbb342166cddf6d31ec05a27f70ae60a981c0c8b4a3438820ce20ef47028e9f02b
+DIST llvm-8.1.0_p41.tar.gz 26253027 BLAKE2B 50687a47c6a271d0881f6a115d25a698c3fc86d9477cafe361147beaaf4b3c2dd8599391287141f20efa2db8e0be183eed2d44744269b50471c1364a2f6f7687 SHA512 dbc7848cbc7d48c5b4d02fcc855aea57bf1922e8c116cd4f8424826d6aa49569474298f371561360cc2af6050c175b90296eec359443a9a81f65a8cf309fd27b
 DIST soong-8.1.0_p41.tar.gz 355543 BLAKE2B 0d2b47c30d0515426cffa19c73495f68633dcdbcd5fc33fbbabb8892b712eb85ec68657ea73e07b34573af525055c0f791cd6b54ca58dedd5c14bd4af1a37623 SHA512 50f65ac86f4466adfed6fddf6e8288e16fdc0c1717ba57e59d40395115d4f55ceed3407ce6542ef0173c2076783a7bdc908ff0aac6f19aad7c62a8f63daef6e3
 DIST vendor-lineage-15.1.tar.gz 49859452 BLAKE2B c4de3918fa6aff6f24b27fdbde5434b2cfb9d8fb8632e64ce007857de3ad08f3a48d50cc8cee158df3daf29d2330f63ae71b433b0cde888ce3f13d152aab8563 SHA512 6f67ddaa087da4c2d379331367b839025aed75a976c05c1f3562f715d05de387a938969488e2979be8286eed1db4a90652c73eec5e58c728174aa50197229fa7
 EBUILD soong-8.1.0_p41.ebuild 1676 BLAKE2B f262faa3e8dbe45414160220975c8ca5c64104f3479f8b4fc2bc2fe50b79ce2af3a732375616906c7db1a13b0295dc21e937a208f670aa37d404badd79d2ed68 SHA512 da536c2b5f000739a70c8a932f921ef2d52e3e73e4062dfa4b4c13b56612a6e95346b5cc425f8bfe79493c04e52a79e759d8abf704ae090caaa1f6a5b0a64aca
-EBUILD soong-9999.ebuild 2323 BLAKE2B f5d6668842262a81e81529d7a8095459f4ba4b44d9619865fdfb8a55b3d3cf74ae3d20ce61490139d4c7d8abb4441e14a26b1b8e04fdc88f613ef2c0e38e43ca SHA512 e0f402b41f45302fbacf88da7165f25a2539ef7d306162fae201a263022f9cbaebccd78c3ef77eed4e6577f6aa9b7205975e8c86977b998df2a3cd4cf77ddae3
+EBUILD soong-9999.ebuild 2750 BLAKE2B 932992f39987c9bc1969aa399bc95bc95457f95dd6fe5e80028cf8bebbf3a4a2064d87ffb1ca7d10b0ef9def80b7eaf42a5952c001fcb933614ce65756936e14 SHA512 95dfe51522cafd5fe803399b1e50e2f4e2a117c3301b473d0d2348105c5c0d505e04b3e39ea4b370731427dc2751d679029ddaf8e5a0b3e82a7c6ebb9d2ad786
 MISC metadata.xml 242 BLAKE2B 08b4880748ab6d685ce28f65a9f6cc5ad62deff8f85d4e0a55a3dc12aa8bd63cf1de56b28ff89929e054a6831e223d6ef0207e8b19c6887f09ee22621bd76928 SHA512 ae57aaeecc094cffa640d88329a0baa6c2b0703330d84f6406f3f68d8bb9b724d2e19a8478be8708de284db9ac452f95f225a9f79cd1c5d0236aa2f9935b9b21

diff --git a/dev-util/soong/files/soong-gentoo-host-bin.patch b/dev-util/soong/files/soong-gentoo-host-bin.patch
index d53a266..6920ad8 100644
--- a/dev-util/soong/files/soong-gentoo-host-bin.patch
+++ b/dev-util/soong/files/soong-gentoo-host-bin.patch
@@ -2,7 +2,7 @@ Index: soong-9999/build/soong/android/package_ctx.go
 ===================================================================
 --- soong-9999.orig/build/soong/android/package_ctx.go
 +++ soong-9999/build/soong/android/package_ctx.go
-@@ -82,11 +82,10 @@ func (p AndroidPackageContext) SourcePat
+@@ -82,11 +82,16 @@ func (p AndroidPackageContext) SourcePat
  func (p AndroidPackageContext) HostBinToolVariable(name, path string) blueprint.Variable {
  	return p.VariableFunc(name, func(config interface{}) (string, error) {
  		ctx := &configErrorWrapper{p, config.(Config), []error{}}
@@ -11,7 +11,13 @@ Index: soong-9999/build/soong/android/package_ctx.go
  			return "", ctx.errors[0]
  		}
 -		return p.String(), nil
-+		return path, nil
++
++		if (path == "llvm-tblgen") {
++			p := PathForOutput(ctx, "host", ctx.config.PrebuiltOS(), "bin", path)
++			return p.String(), nil
++		} else {
++			return path, nil
++		}
  	})
  }
  

diff --git a/dev-util/soong/files/soong-gentoo-toolchain.patch b/dev-util/soong/files/soong-gentoo-toolchain.patch
index 7a7c179..7ad9303 100644
--- a/dev-util/soong/files/soong-gentoo-toolchain.patch
+++ b/dev-util/soong/files/soong-gentoo-toolchain.patch
@@ -26,11 +26,13 @@ Index: soong-9999/build/soong/cc/builder.go
  			Rspfile:        "${out}.rsp",
  			RspfileContent: "${in}",
  		},
-@@ -61,14 +58,12 @@ var (
+@@ -60,15 +57,13 @@ var (
+ 
  	partialLd = pctx.AndroidStaticRule("partialLd",
  		blueprint.RuleParams{
- 			Command:     "$ldCmd -nostdlib -Wl,-r ${in} -o ${out} ${ldFlags}",
+-			Command:     "$ldCmd -nostdlib -Wl,-r ${in} -o ${out} ${ldFlags}",
 -			CommandDeps: []string{"$ldCmd"},
++			Command:     "$ldCmd -nostdlib -r ${in} -o ${out} ${ldFlags}",
  		},
  		"ldCmd", "ldFlags")
  
@@ -57,7 +59,7 @@ Index: soong-9999/build/soong/cc/builder.go
  			Deps:        blueprint.DepsGCC,
 -			Command:     "CROSS_COMPILE=$crossCompile $stripPath ${args} -i ${in} -o ${out} -d ${out}.d",
 -			CommandDeps: []string{"$stripPath"},
-+			Command:     "strip ${args} -i ${in} -o ${out} -d ${out}.d",
++			Command:     "ln -f ${in} ${out}",
  		},
  		"args", "crossCompile")
  

diff --git a/dev-util/soong/files/soong-no-strip.patch b/dev-util/soong/files/soong-no-strip.patch
new file mode 100644
index 0000000..5647b8a
--- /dev/null
+++ b/dev-util/soong/files/soong-no-strip.patch
@@ -0,0 +1,34 @@
+Index: soong-9999/build/soong/cc/binary.go
+===================================================================
+--- soong-9999.orig/build/soong/cc/binary.go
++++ soong-9999/build/soong/cc/binary.go
+@@ -297,12 +297,6 @@ func (binary *binaryDecorator) link(ctx
+ 
+ 	builderFlags := flagsToBuilderFlags(flags)
+ 
+-	if binary.stripper.needsStrip(ctx) {
+-		strippedOutputFile := outputFile
+-		outputFile = android.PathForModuleOut(ctx, "unstripped", fileName)
+-		binary.stripper.strip(ctx, outputFile, strippedOutputFile, builderFlags)
+-	}
+-
+ 	if binary.Properties.Prefix_symbols != "" {
+ 		afterPrefixSymbols := outputFile
+ 		outputFile = android.PathForModuleOut(ctx, "unprefixed", fileName)
+Index: soong-9999/build/soong/cc/library.go
+===================================================================
+--- soong-9999.orig/build/soong/cc/library.go
++++ soong-9999/build/soong/cc/library.go
+@@ -545,12 +545,6 @@ func (library *libraryDecorator) linkSha
+ 		library.relocationPacker.pack(ctx, outputFile, packedOutputFile, builderFlags)
+ 	}
+ 
+-	if library.stripper.needsStrip(ctx) {
+-		strippedOutputFile := outputFile
+-		outputFile = android.PathForModuleOut(ctx, "unstripped", fileName)
+-		library.stripper.strip(ctx, outputFile, strippedOutputFile, builderFlags)
+-	}
+-
+ 	sharedLibs := deps.SharedLibs
+ 	sharedLibs = append(sharedLibs, deps.LateSharedLibs...)
+ 

diff --git a/dev-util/soong/files/soong-relative-symlink.patch b/dev-util/soong/files/soong-relative-symlink.patch
new file mode 100644
index 0000000..d1ba676
--- /dev/null
+++ b/dev-util/soong/files/soong-relative-symlink.patch
@@ -0,0 +1,13 @@
+Index: soong-9999/build/soong/android/defs.go
+===================================================================
+--- soong-9999.orig/build/soong/android/defs.go
++++ soong-9999/build/soong/android/defs.go
+@@ -62,7 +62,7 @@ var (
+ 	// A symlink rule.
+ 	Symlink = pctx.AndroidStaticRule("Symlink",
+ 		blueprint.RuleParams{
+-			Command:     "ln -f -s $fromPath $out",
++			Command:     "ln -r -f -s $fromPath $out",
+ 			Description: "symlink $out",
+ 		},
+ 		"fromPath")

diff --git a/dev-util/soong/soong-9999.ebuild b/dev-util/soong/soong-9999.ebuild
index 5b90d90..f9208df 100644
--- a/dev-util/soong/soong-9999.ebuild
+++ b/dev-util/soong/soong-9999.ebuild
@@ -7,10 +7,11 @@ inherit ninja-utils git-r3
 EGIT_REPO_URI=https://github.com/KireinaHoro/android_build_${PN}
 EGIT_CHECKOUT_DIR=${WORKDIR}/${P}/build/${PN}
 
-A_URI=http://aosp.airelinux.org/platform/build
+A_URI=http://aosp.airelinux.org/platform
 # blueprint is a source level dependency of soong.
 MPV=8.1.0_p41
-SRC_URI="${A_URI}/blueprint/+archive/android-${MPV/p/r}.tar.gz -> blueprint-${MPV}.tar.gz
+SRC_URI="${A_URI}/build/blueprint/+archive/android-${MPV/p/r}.tar.gz -> blueprint-${MPV}.tar.gz
+	${A_URI}/external/llvm/+archive/android-${MPV/p/r}.tar.gz -> llvm-${MPV}.tar.gz
 	https://github.com/LineageOS/android_vendor_lineage/archive/lineage-15.1.tar.gz -> vendor-lineage-15.1.tar.gz"
 DESCRIPTION="JSON-like build system for Android."
 HOMEPAGE="${A_URI}/${PN}"
@@ -19,7 +20,8 @@ KEYWORDS="~amd64"
 SLOT=0
 
 DEPEND="dev-lang/go
-	dev-util/ninja"
+	dev-util/ninja
+	dev-libs/libpcre2"
 RDEPEND="dev-lang/go"
 
 PATCHES=(
@@ -28,8 +30,10 @@ PATCHES=(
 	"${FILESDIR}"/soong-no-kernel-header.patch
 	"${FILESDIR}"/soong-no-bootstrap.patch
 	"${FILESDIR}"/soong-no-sysroot.patch
-	"${FILESDIR}"/soong-gentoo-toolchain.patch
+	"${FILESDIR}"/soong-no-strip.patch
+	"${FILESDIR}"/soong-gentoo-toolchain.patch # disable strip, as strip is managed by portage.
 	"${FILESDIR}"/soong-gentoo-host-bin.patch
+	"${FILESDIR}"/soong-relative-symlink.patch
 )
 
 src_unpack() {
@@ -43,6 +47,10 @@ src_unpack() {
 	mkdir -p "${S}"/build/blueprint || die
 	cd "${S}"/build/blueprint || die
 	unpack blueprint-${MPV}.tar.gz
+
+	mkdir -p "${S}"/external/llvm || die
+	cd "${S}"/external/llvm || die
+	unpack llvm-${MPV}.tar.gz
 }
 
 src_prepare() {
@@ -70,10 +78,11 @@ src_compile() {
 src_install() {
 	dobin out/.bootstrap/bin/* build/${PN}/cmd/sbox/sbox
 
-	sed -n '/\/\/.*host bionic/,$p' < build/soong/Android.bp > "${T}"/Android.bp
-	sed -e '/build = \[/,+3d' -e '/vendor/d' < build/soong/root.bp > "${T}"/root.bp
+	pcre2grep -M -v '\swindows: (\{(?>[^{}]|(?1))*\})' < build/soong/Android.bp > "${T}"/Android.bp || die
+	sed -n '/\/\/.*host bionic/,$p' -i "${T}"/Android.bp || die
+	sed -e '/build = \[/,+3d' -e '/vendor/d' < build/soong/root.bp > "${T}"/root.bp || die
 	insinto /usr/share/soong
 	doins "${T}"/{Android,root}.bp
 	doins -r build/soong/scripts
-	fperms +x /usr/share/soong/scripts/copygcclib.sh
+	fperms +x /usr/share/soong/scripts/{copygcclib,toc}.sh
 }


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-13 14:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-13 14:30 [gentoo-commits] proj/android:master commit in: dev-util/soong/, dev-util/soong/files/ Benda XU
  -- strict thread matches above, loose matches on Subject: below --
2018-08-12  8:26 Benda XU
2018-08-11  8:00 Benda XU
2018-08-11  7:10 Benda XU
2018-08-10 12:30 Benda XU
2018-08-09  5:28 Benda XU

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox