diff options
-rw-r--r-- | dev-util/soong/Manifest | 5 | ||||
-rw-r--r-- | dev-util/soong/files/blueprint-test-go-1.10.patch | 64 | ||||
-rw-r--r-- | dev-util/soong/files/soong-bootstrap-clean.patch | 57 | ||||
-rw-r--r-- | dev-util/soong/files/soong-no-kernel-header.patch | 13 | ||||
-rw-r--r-- | 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 } |