From 4fc33d4ecca3ee8fc7bab8ce6a5efad5c19fa9e6 Mon Sep 17 00:00:00 2001 From: "Lan Yixun (dlan)" Date: Mon, 9 Dec 2013 11:33:36 +0800 Subject: [PATCH] dev-android/fastboot: make it work again 1) fix git repo typo 2) gcc compile issue Signed-off-by: Lan Yixun (dlan) --- dev-android/fastboot/fastboot-9999.ebuild | 14 +++++++----- .../fastboot/files/fastboot-gcc-4.8.patch | 22 +++++++++++++++++++ 2 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 dev-android/fastboot/files/fastboot-gcc-4.8.patch diff --git a/dev-android/fastboot/fastboot-9999.ebuild b/dev-android/fastboot/fastboot-9999.ebuild index 95ffa825f0..a9b66f8b26 100644 --- a/dev-android/fastboot/fastboot-9999.ebuild +++ b/dev-android/fastboot/fastboot-9999.ebuild @@ -21,23 +21,25 @@ RDEPEND="${DEPEND}" S="${WORKDIR}/${P}/${PN}" src_unpack() { - EGIT_REPO_URI="${EGIT_ANDROID}"/system/core + # EGIT_COMMIT="48a6d3de590714f4e913c6cc3135a455126df91d" + EGIT_REPO_URI="${EGIT_ANDROID}"/system/core \ EGIT_SOURCEDIR="${WORKDIR}/${P}" \ git-2_src_unpack - EGIT_REPO_URI="${EGIT_ANDROID}"/system/core + # EGIT_COMMIT="144d160d4d21e70472fcc6a725ceb2358c1de3fc" + EGIT_REPO_URI="${EGIT_ANDROID}"/system/extras \ EGIT_SOURCEDIR=${S}/extras \ git-2_src_unpack - EGIT_REPO_URI="${EGIT_ANDROID}"/system/core + # EGIT_COMMIT="9ea93f235aec7f0075b3d8f5b2aec9ead0130e2e" + EGIT_REPO_URI="${EGIT_ANDROID}"/external/libselinux \ EGIT_SOURCEDIR=${S}/libselinux \ git-2_src_unpack } src_prepare() { cp ${FILESDIR}/Makefile Makefile || die -} + epatch ${FILESDIR}/${PN}-gcc-4.8.patch -src_install(){ - einstall DESTDIR=${D} + epatch_user } diff --git a/dev-android/fastboot/files/fastboot-gcc-4.8.patch b/dev-android/fastboot/files/fastboot-gcc-4.8.patch new file mode 100644 index 0000000000..5fc6046665 --- /dev/null +++ b/dev-android/fastboot/files/fastboot-gcc-4.8.patch @@ -0,0 +1,22 @@ +diff --git a/fastboot/fastboot.c b/fastboot/fastboot.c +index 73a6e56..d9c0cfc 100644 +--- a/fastboot/fastboot.c ++++ b/fastboot/fastboot.c +@@ -445,7 +445,7 @@ static int setup_requirement_line(char *name) + char *val[MAX_OPTIONS]; + const char **out; + char *prod = NULL; +- unsigned n, count; ++ unsigned n, i, count; + char *x; + int invert = 0; + +@@ -492,7 +492,7 @@ static int setup_requirement_line(char *name) + for(n = 0; n < count; n++) { + out[n] = strdup(strip(val[n])); + if (out[n] == 0) { +- for(size_t i = 0; i < n; ++i) { ++ for(i = 0; i < n; ++i) { + free((char*) out[i]); + } + free(out);