[arch-commits] Commit in android-tools/trunk (4 files)

2020-10-07 Thread Anatol Pomozov via arch-commits
Date: Thursday, October 8, 2020 @ 02:06:36
  Author: anatolik
Revision: 721673

upgpkg: android-tools 30.0.4-1

Use ninja build script from 
https://github.com/anatol/android-platform-tools-build/

Added:
  android-tools/trunk/build.ninja
Modified:
  android-tools/trunk/PKGBUILD
  android-tools/trunk/fix_build_core.patch
Deleted:
  android-tools/trunk/generate_build.rb

--+
 PKGBUILD |   10 
 build.ninja  |  613 +
 fix_build_core.patch |   26 +-
 generate_build.rb|  490 ---
 4 files changed, 630 insertions(+), 509 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2020-10-08 01:23:31 UTC (rev 721672)
+++ PKGBUILD2020-10-08 02:06:36 UTC (rev 721673)
@@ -3,7 +3,7 @@
 # Contributor: Alucryd 
 
 pkgname=android-tools
-pkgver=30.0.3
+pkgver=30.0.4
 pkgrel=1
 _tag=platform-tools-$pkgver
 pkgdesc='Android platform tools'
@@ -29,8 +29,7 @@
 
git+https://android.googlesource.com/platform/external/e2fsprogs#tag=$_tag
 git+https://android.googlesource.com/platform/external/avb#tag=$_tag
 
git+https://android.googlesource.com/platform/external/boringssl#tag=$_tag
-
#git+https://boringssl.googlesource.com/boringssl#commit=$_boringssl_commit
-generate_build.rb
+   build.ninja # copied from 
https://github.com/anatol/android-platform-tools-build
 # deployagent.jar is a library built from Android sources.
 # Building this java library requires a lot of dependencies:
 #  java, protobuf-java, dex compiler, Android base libs.
@@ -61,9 +60,9 @@
   'SKIP'
   'SKIP'
   'SKIP'
-  '8c95ce0bbc39bf1fe37213497af924ad10f195b4'
+  '3e6dc3afe68447212b6dbca74962e9b24a8159b2'
   'd9dfac30245faa0a96968b96f3acd9ad536f4910'
-  '61b1bcf230be39a5f9544e82d43269a20bfb9ef2'
+  'cc295dc7726821ea9e74158d898a1ff80d291c61'
   'ce8314d6b1e05e3f4f7ae7828d225fbb07a2a55c'
   '1c025855a3e7ea351685843a0df45c52a7e674dd'
   '7004dbd0c193668827174880de6f8434de8ceaee')
@@ -89,7 +88,6 @@
 build() {
   (cd "$srcdir"/boringssl/src/build && cmake -GNinja ..; ninja 
crypto/libcrypto.a ssl/libssl.a)
 
-  PLATFORM_TOOLS_VERSION="$pkgver-$pkgrel" ./generate_build.rb > build.ninja
   ninja
 }
 

Added: build.ninja
===
--- build.ninja (rev 0)
+++ build.ninja 2020-10-08 02:06:36 UTC (rev 721673)
@@ -0,0 +1,613 @@
+# This script is generated by http://github.com/anatol/android-tools-build tool
+
+CC = clang
+CXX = clang++
+
+CFLAGS = 
+CPPFLAGS = 
+CXXFLAGS = 
+LDFLAGS = 
+PLATFORM_TOOLS_VERSION = 30.0.4
+
+
+rule cc
+  command = $CC -std=gnu11 $CFLAGS $CPPFLAGS $cflags -c $in -o $out
+
+rule cxx
+  command = $CXX -std=gnu++2a $CXXFLAGS $CPPFLAGS $cflags -c $in -o $out
+
+rule link
+  command = $CXX $ldflags $LDFLAGS $in -o $out
+
+rule protoc
+  command = protoc --cpp_out=. $in
+
+rule genheader
+  command = (echo 'unsigned char $var[] = {' && xxd -i <$in && echo '};') > 
$out
+
+
+build core/adb/proto/key_type.pb.cc core/adb/proto/key_type.pb.h: protoc 
core/adb/proto/key_type.proto
+build core/adb/proto/key_type.pb.cc.o: cxx core/adb/proto/key_type.pb.cc
+cflags = -I.
+build core/adb/adb.cpp.o: cxx core/adb/adb.cpp || core/adb/proto/key_type.pb.h
+cflags = -DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" 
-DADB_HOST=1 -Icore/include -Ilibbase/include -Icore/adb 
-Icore/libcrypto_utils/include -Iboringssl/src/include 
-Icore/diagnose_usb/include -Icore/adb/crypto/include -Icore/adb/proto 
-Icore/adb/tls/include
+build core/adb/adb_io.cpp.o: cxx core/adb/adb_io.cpp || 
core/adb/proto/key_type.pb.h
+cflags = -DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" 
-DADB_HOST=1 -Icore/include -Ilibbase/include -Icore/adb 
-Icore/libcrypto_utils/include -Iboringssl/src/include 
-Icore/diagnose_usb/include -Icore/adb/crypto/include -Icore/adb/proto 
-Icore/adb/tls/include
+build core/adb/adb_listeners.cpp.o: cxx core/adb/adb_listeners.cpp || 
core/adb/proto/key_type.pb.h
+cflags = -DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" 
-DADB_HOST=1 -Icore/include -Ilibbase/include -Icore/adb 
-Icore/libcrypto_utils/include -Iboringssl/src/include 
-Icore/diagnose_usb/include -Icore/adb/crypto/include -Icore/adb/proto 
-Icore/adb/tls/include
+build core/adb/adb_trace.cpp.o: cxx core/adb/adb_trace.cpp || 
core/adb/proto/key_type.pb.h
+cflags = -DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" 
-DADB_HOST=1 -Icore/include -Ilibbase/include -Icore/adb 
-Icore/libcrypto_utils/include -Iboringssl/src/include 
-Icore/diagnose_usb/include -Icore/adb/crypto/include -Icore/adb/proto 
-Icore/adb/tls/include
+build core/adb/adb_utils.cpp.o: cxx core/adb/adb_utils.cpp || 
core/adb/proto/key_type.pb.h
+cflags = 

[arch-commits] Commit in android-tools/trunk (4 files)

2020-08-01 Thread Anatol Pomozov via arch-commits
Date: Sunday, August 2, 2020 @ 01:45:30
  Author: anatolik
Revision: 667568

upgpkg: android-tools 30.0.3-1

Added:
  android-tools/trunk/fix_libziparchive.patch
Modified:
  android-tools/trunk/PKGBUILD
  android-tools/trunk/fix_build_core.patch
  android-tools/trunk/generate_build.rb

-+
 PKGBUILD|   41 ++---
 fix_build_core.patch|  108 +++---
 fix_libziparchive.patch |   12 +
 generate_build.rb   |   28 +--
 4 files changed, 143 insertions(+), 46 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2020-08-01 22:45:06 UTC (rev 667567)
+++ PKGBUILD2020-08-02 01:45:30 UTC (rev 667568)
@@ -3,9 +3,9 @@
 # Contributor: Alucryd 
 
 pkgname=android-tools
-pkgver=30.0.0
-pkgrel=2
-tag=platform-tools-$pkgver
+pkgver=30.0.3
+pkgrel=1
+_tag=platform-tools-$pkgver
 pkgdesc='Android platform tools'
 arch=(x86_64)
 url='http://tools.android.com/'
@@ -17,17 +17,18 @@
 makedepends=(git clang gtest ruby cmake ninja go vim)
 provides=(fastboot adb)
 conflicts=(fastboot adb)
-#_boringssl_commit=$(curl 
https://android.googlesource.com/platform/external/boringssl/+/refs/tags/$tag/BORINGSSL_REVISION?format=TEXT
 | base64 -d)
-source=(git+https://android.googlesource.com/platform/frameworks/base#tag=$tag
-
git+https://android.googlesource.com/platform/frameworks/native#tag=$tag
-git+https://android.googlesource.com/platform/system/core#tag=$tag
-git+https://android.googlesource.com/platform/system/extras#tag=$tag
-
git+https://android.googlesource.com/platform/system/tools/mkbootimg#tag=$tag
-git+https://android.googlesource.com/platform/external/selinux#tag=$tag
-
git+https://android.googlesource.com/platform/external/f2fs-tools#tag=$tag
-
git+https://android.googlesource.com/platform/external/e2fsprogs#tag=$tag
-git+https://android.googlesource.com/platform/external/avb#tag=$tag
-
git+https://android.googlesource.com/platform/external/boringssl#tag=$tag
+source=(git+https://android.googlesource.com/platform/frameworks/base#tag=$_tag
+
git+https://android.googlesource.com/platform/frameworks/native#tag=$_tag
+git+https://android.googlesource.com/platform/system/core#tag=$_tag
+git+https://android.googlesource.com/platform/system/extras#tag=$_tag
+   git+https://android.googlesource.com/platform/system/libbase#tag=$_tag
+   
git+https://android.googlesource.com/platform/system/libziparchive#tag=$_tag
+
git+https://android.googlesource.com/platform/system/tools/mkbootimg#tag=$_tag
+
git+https://android.googlesource.com/platform/external/selinux#tag=$_tag
+
git+https://android.googlesource.com/platform/external/f2fs-tools#tag=$_tag
+
git+https://android.googlesource.com/platform/external/e2fsprogs#tag=$_tag
+git+https://android.googlesource.com/platform/external/avb#tag=$_tag
+
git+https://android.googlesource.com/platform/external/boringssl#tag=$_tag
 
#git+https://boringssl.googlesource.com/boringssl#commit=$_boringssl_commit
 generate_build.rb
 # deployagent.jar is a library built from Android sources.
@@ -42,7 +43,9 @@
 #   mmm system/core/adb/
 #   cp ./target/product/generic/system/framework/deployagent.jar .
 deployagent.jar
+# we disable mDNS functionality as it does not compile with the Arch system 
version of the library
 fix_build_core.patch
+   fix_libziparchive.patch
 boringssl-disable-thirdpartydeps.patch
 bash_completion.fastboot)
 # Bash completion file was taken from 
https://github.com/mbrubeck/android-completion
@@ -56,9 +59,12 @@
   'SKIP'
   'SKIP'
   'SKIP'
-  '4aec96639c5a16e75fac907bc5a8ea6a7efca047'
+  'SKIP'
+  'SKIP'
+  '8c95ce0bbc39bf1fe37213497af924ad10f195b4'
   'd9dfac30245faa0a96968b96f3acd9ad536f4910'
-  '70abd4483233ee481490b3369dbdd492c57f'
+  '61b1bcf230be39a5f9544e82d43269a20bfb9ef2'
+  'ce8314d6b1e05e3f4f7ae7828d225fbb07a2a55c'
   '1c025855a3e7ea351685843a0df45c52a7e674dd'
   '7004dbd0c193668827174880de6f8434de8ceaee')
 
@@ -66,6 +72,9 @@
   cd "$srcdir"/core
   patch -p1 < ../fix_build_core.patch
 
+  cd "$srcdir"/libziparchive
+  patch -p1 < ../fix_libziparchive.patch
+
   cd "$srcdir"/avb
   sed -i 's|/usr/bin/env python$|/usr/bin/env python2|g' avbtool
 

Modified: fix_build_core.patch
===
--- fix_build_core.patch2020-08-01 22:45:06 UTC (rev 667567)
+++ fix_build_core.patch2020-08-02 01:45:30 UTC (rev 667568)
@@ -1,5 +1,5 @@
 diff --git a/adb/adb.cpp b/adb/adb.cpp
-index 08d3904c71..a73362acec 100644
+index 08986b77e0..46b6036502 100644
 --- a/adb/adb.cpp
 +++ b/adb/adb.cpp
 @@ -45,8 +45,6 @@
@@ -24,11 +24,69 @@
 

[arch-commits] Commit in android-tools/trunk (4 files)

2018-08-06 Thread Anatol Pomozov via arch-commits
Date: Monday, August 6, 2018 @ 22:16:41
  Author: anatolik
Revision: 369959

upgpkg: android-tools 9.0.0_r3-1

Modified:
  android-tools/trunk/PKGBUILD
  android-tools/trunk/fix_build_core.patch
  android-tools/trunk/fix_build_e2fsprogs.patch
  android-tools/trunk/generate_build.rb

---+
 PKGBUILD  |   11 +-
 fix_build_core.patch  |   48 +---
 fix_build_e2fsprogs.patch |   17 +++
 generate_build.rb |   38 --
 4 files changed, 60 insertions(+), 54 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2018-08-06 22:15:28 UTC (rev 369958)
+++ PKGBUILD2018-08-06 22:16:41 UTC (rev 369959)
@@ -4,7 +4,7 @@
 # Contributor: Alucryd 
 
 pkgname=android-tools
-pkgver=8.1.0_r33
+pkgver=9.0.0_r3
 pkgrel=1
 pkgdesc='Android platform tools'
 arch=(x86_64)
@@ -13,7 +13,8 @@
 depends=(pcre2 libusb)
 optdepends=('python: for mkbootimg script')
 makedepends=(git clang gtest ruby cmake ninja go-pie)
-_boringssl_commit=14308731e5446a73ac2258688a9688b524483cb6 # keep it in sync 
with android 
https://android.googlesource.com/platform/external/boringssl/+/$pkgver/BORINGSSL_REVISION
+# keep the boringssl commit in sync with android tree 
https://android.googlesource.com/platform/external/boringssl/+/$pkgver/BORINGSSL_REVISION
+_boringssl_commit=45210dd4e21ace9d28cb76b3f83303fcdd2efcce
 
source=(git+https://android.googlesource.com/platform/system/core#tag=android-$pkgver
 
git+https://android.googlesource.com/platform/system/extras#tag=android-$pkgver
 
git+https://android.googlesource.com/platform/external/selinux#tag=android-$pkgver
@@ -32,10 +33,10 @@
   'SKIP'
   'SKIP'
   'SKIP'
-  '89c0b62805506c729f76c1aa3c901c4ea2e3bfbe'
-  'e6ab688d0decfae64302d1402e1eee6678fc2549'
+  '238507086a99134820cc9900545cbff06772dc30'
+  '62446582a96b3a39e5d91e3e2ef8b8b38a5a735e'
   'ec473160d7445f97bccabd1c32ac0ae2f77900c1'
-  'e0d19de229f1a41a066ddb7a84f8e56e67bbc8bc'
+  '5df8c7e00a4066733d59050e8e1fcd4cc2b22104'
   '7004dbd0c193668827174880de6f8434de8ceaee')
 
 prepare() {

Modified: fix_build_core.patch
===
--- fix_build_core.patch2018-08-06 22:15:28 UTC (rev 369958)
+++ fix_build_core.patch2018-08-06 22:16:41 UTC (rev 369959)
@@ -1,16 +1,16 @@
 diff --git a/adb/client/usb_libusb.cpp b/adb/client/usb_libusb.cpp
-index 81201995a0..cfd60fce97 100644
+index 46c3f58ec5..a0c36f0151 100644
 --- a/adb/client/usb_libusb.cpp
 +++ b/adb/client/usb_libusb.cpp
-@@ -21,6 +21,7 @@
- #include 
+@@ -22,6 +22,7 @@
+ #include 
  
  #include 
 +#include 
  #include 
+ #include 
  #include 
- #include 
-@@ -28,7 +29,7 @@
+@@ -30,7 +31,7 @@
  #include 
  #include 
  
@@ -19,8 +19,20 @@
  
  #include 
  #include 
+diff --git a/adb/client/usb_linux.cpp b/adb/client/usb_linux.cpp
+index 1f376a4c93..f1d6779159 100644
+--- a/adb/client/usb_linux.cpp
 b/adb/client/usb_linux.cpp
+@@ -29,6 +29,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
 diff --git a/adb/sysdeps/posix/network.cpp b/adb/sysdeps/posix/network.cpp
-index 45da5af4a1..ee3bf06994 100644
+index ecd1fd24ec..86166c0e2c 100644
 --- a/adb/sysdeps/posix/network.cpp
 +++ b/adb/sysdeps/posix/network.cpp
 @@ -21,6 +21,7 @@
@@ -44,7 +56,7 @@
  namespace android {
  namespace base {
 diff --git a/base/file.cpp b/base/file.cpp
-index a2f28878e8..0aa185e972 100644
+index 2f697a1cc1..81aef5758c 100644
 --- a/base/file.cpp
 +++ b/base/file.cpp
 @@ -22,6 +22,7 @@
@@ -56,7 +68,7 @@
  #include 
  #include 
 diff --git a/base/logging.cpp b/base/logging.cpp
-index 6357b4ba73..3c7dbce131 100644
+index a31feefab2..d746cc4d78 100644
 --- a/base/logging.cpp
 +++ b/base/logging.cpp
 @@ -23,6 +23,7 @@
@@ -68,10 +80,10 @@
  // For getprogname(3) or program_invocation_short_name.
  #if defined(__ANDROID__) || defined(__APPLE__)
 diff --git a/fastboot/fs.cpp b/fastboot/fs.cpp
-index 709f061bd6..77629a882b 100644
+index c30ca1e4b3..fdc042ff36 100644
 --- a/fastboot/fs.cpp
 +++ b/fastboot/fs.cpp
-@@ -108,7 +108,7 @@ static int generate_ext4_image(const char* fileName, long 
long partSize,
+@@ -117,7 +117,7 @@ static int generate_ext4_image(const char* fileName, long 
long partSize,
  static constexpr int block_size = 4096;
  const std::string exec_dir = android::base::GetExecutableDirectory();
  
@@ -81,14 +93,26 @@
  
  std::string block_size_str = std::to_string(block_size);
 diff --git a/libsparse/sparse_read.cpp b/libsparse/sparse_read.cpp
-index bd668735a3..6168f2e248 100644
+index 4379635270..ccb565bb63 100644
 --- a/libsparse/sparse_read.cpp
 +++ b/libsparse/sparse_read.cpp
 @@ -26,6 +26,7 @@
- #include 
  #include 
+ #include 
  #include 
 +#include 
  #include 
  
  #include 

[arch-commits] Commit in android-tools/trunk (4 files)

2018-01-19 Thread Anatol Pomozov via arch-commits
Date: Friday, January 19, 2018 @ 23:05:42
  Author: anatolik
Revision: 284249

upgpkg: android-tools 8.1.0_r7-1

FS#56955 add Android specific mke2fs, e2fsdroid, ext2simg tools. Patch fastboot 
to use custom mke2fs.

Added:
  android-tools/trunk/fix_build_e2fsprogs.patch
Modified:
  android-tools/trunk/PKGBUILD
  android-tools/trunk/fix_build_core.patch
  android-tools/trunk/generate_build.rb

---+
 PKGBUILD  |   15 +++-
 fix_build_core.patch  |   13 
 fix_build_e2fsprogs.patch |   43 +
 generate_build.rb |  141 +++-
 4 files changed, 207 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2018-01-19 23:03:25 UTC (rev 284248)
+++ PKGBUILD2018-01-19 23:05:42 UTC (rev 284249)
@@ -4,7 +4,7 @@
 # Contributor: Alucryd 
 
 pkgname=android-tools
-pkgver=8.1.0_r1
+pkgver=8.1.0_r7
 pkgrel=1
 pkgdesc='Android platform tools'
 arch=(x86_64)
@@ -18,10 +18,12 @@
 
git+https://android.googlesource.com/platform/system/extras#tag=android-$pkgver
 
git+https://android.googlesource.com/platform/external/selinux#tag=android-$pkgver
 
git+https://android.googlesource.com/platform/external/f2fs-tools#tag=android-$pkgver
+
git+https://android.googlesource.com/platform/external/e2fsprogs#tag=android-$pkgver
 
git+https://boringssl.googlesource.com/boringssl#commit=$_boringssl_commit
 generate_build.rb
 fix_build_core.patch
 fix_build_selinux.patch
+fix_build_e2fsprogs.patch
 bash_completion.fastboot)
 # Bash completion file was taken from 
https://github.com/mbrubeck/android-completion
 sha1sums=('SKIP'
@@ -29,9 +31,11 @@
   'SKIP'
   'SKIP'
   'SKIP'
-  'fa0e4579f2f26a0e0efe53549e9a91ef3a334eff'
-  '640db48e8e915f8c7f525dd044f16a3b502d4689'
+  'SKIP'
+  'caf4dd68f94e7c745b915778c3f33946c0478eae'
+  'e6ab688d0decfae64302d1402e1eee6678fc2549'
   'ec473160d7445f97bccabd1c32ac0ae2f77900c1'
+  '8ccb2ef791a5b517b4371af7f529f4e731ce7260'
   '7004dbd0c193668827174880de6f8434de8ceaee')
 
 prepare() {
@@ -43,6 +47,9 @@
   cd $srcdir/selinux
   patch -p1 < ../fix_build_selinux.patch
 
+  cd $srcdir/e2fsprogs
+  patch -p1 < ../fix_build_e2fsprogs.patch
+
   mkdir -p $srcdir/boringssl/build && cd $srcdir/boringssl/build && cmake 
-GNinja ..; ninja
 }
 
@@ -52,6 +59,6 @@
 
 package(){
   install -m755 -d "$pkgdir"/usr/bin
-  install -m755 -t "$pkgdir"/usr/bin fastboot adb core/mkbootimg/mkbootimg
+  install -m755 -t "$pkgdir"/usr/bin fastboot adb mke2fs.android e2fsdroid 
ext2simg core/mkbootimg/mkbootimg
   install -Dm 644 bash_completion.fastboot 
"$pkgdir"/usr/share/bash-completion/completions/fastboot
 }

Modified: fix_build_core.patch
===
--- fix_build_core.patch2018-01-19 23:03:25 UTC (rev 284248)
+++ fix_build_core.patch2018-01-19 23:05:42 UTC (rev 284249)
@@ -67,6 +67,19 @@
  
  // For getprogname(3) or program_invocation_short_name.
  #if defined(__ANDROID__) || defined(__APPLE__)
+diff --git a/fastboot/fs.cpp b/fastboot/fs.cpp
+index 709f061bd6..77629a882b 100644
+--- a/fastboot/fs.cpp
 b/fastboot/fs.cpp
+@@ -108,7 +108,7 @@ static int generate_ext4_image(const char* fileName, long 
long partSize,
+ static constexpr int block_size = 4096;
+ const std::string exec_dir = android::base::GetExecutableDirectory();
+ 
+-const std::string mke2fs_path = exec_dir + "/mke2fs";
++const std::string mke2fs_path = exec_dir + "/mke2fs.android";
+ std::vector mke2fs_args = {mke2fs_path.c_str(), "-t", 
"ext4", "-b"};
+ 
+ std::string block_size_str = std::to_string(block_size);
 diff --git a/libsparse/sparse_read.cpp b/libsparse/sparse_read.cpp
 index bd668735a3..6168f2e248 100644
 --- a/libsparse/sparse_read.cpp

Added: fix_build_e2fsprogs.patch
===
--- fix_build_e2fsprogs.patch   (rev 0)
+++ fix_build_e2fsprogs.patch   2018-01-19 23:05:42 UTC (rev 284249)
@@ -0,0 +1,43 @@
+diff --git a/contrib/android/perms.c b/contrib/android/perms.c
+index 9ae8e586..433506fd 100644
+--- a/contrib/android/perms.c
 b/contrib/android/perms.c
+@@ -5,6 +5,7 @@
+ #include "support/nls-enable.h"
+ #include 
+ #include 
++#include "private/android_filesystem_capability.h"
+ 
+ #ifndef XATTR_SELINUX_SUFFIX
+ # define XATTR_SELINUX_SUFFIX  "selinux"
+diff --git a/lib/ext2fs/bitops.h b/lib/ext2fs/bitops.h
+index 505b3c9c..7be5105f 100644
+--- a/lib/ext2fs/bitops.h
 b/lib/ext2fs/bitops.h
+@@ -233,11 +233,11 @@ extern errcode_t 
ext2fs_find_first_set_generic_bmap(ext2fs_generic_bitmap bitmap
+ #if (__STDC_VERSION__ >= 199901L)
+ #define _INLINE_ extern inline
+ #else
+-#define _INLINE_ inline
++#define 

[arch-commits] Commit in android-tools/trunk (4 files)

2016-08-31 Thread Anatol Pomozov
Date: Wednesday, August 31, 2016 @ 13:26:59
  Author: anatolik
Revision: 188130

Port generator script to Android 7 release

Modified:
  android-tools/trunk/PKGBUILD
  android-tools/trunk/build.sh
  android-tools/trunk/fix_build.patch
  android-tools/trunk/generate_build.rb

---+
 PKGBUILD  |   12 +--
 build.sh  |  164 +++-
 fix_build.patch   |   73 +--
 generate_build.rb |   80 ++---
 4 files changed, 192 insertions(+), 137 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2016-08-31 13:17:56 UTC (rev 188129)
+++ PKGBUILD2016-08-31 13:26:59 UTC (rev 188130)
@@ -4,7 +4,7 @@
 # Contributor: Alucryd 
 
 pkgname=android-tools
-pkgver=6.0.1_r46
+pkgver=7.0.0_r1
 pkgrel=1
 pkgdesc='Android platform tools'
 arch=(i686 x86_64)
@@ -11,7 +11,7 @@
 url='http://tools.android.com/'
 license=(Apache MIT)
 depends=(openssl pcre)
-makedepends=(git)
+makedepends=(git clang)
 
source=(git+https://android.googlesource.com/platform/system/core#tag=android-$pkgver
 
git+https://android.googlesource.com/platform/system/extras#tag=android-$pkgver
 
git+https://android.googlesource.com/platform/external/libselinux#tag=android-$pkgver
@@ -24,8 +24,8 @@
   'SKIP'
   'SKIP'
   'SKIP'
-  '24ee7a286b91bf488537bbd9b6a2b7721dd22fea'
-  '40a978209b6d1bbf99e04b8bd5fca6429b97f1b1'
+  '0328e1423b8148c87f9a7b2974855e46ec3c04a6'
+  '33538c9161c199f1e608d3b8f519adb1cd9d46d5'
   '7004dbd0c193668827174880de6f8434de8ceaee'
   '2e69152091bb9642be058e49ec6cb720a2fd91dc')
 
@@ -34,12 +34,12 @@
 }
 
 build() {
-  PKGVER=$pkgver bash build.sh
+  PKGVER=$pkgver ./build.sh
 }
 
 package(){
   install -m755 -d "$pkgdir"/usr/bin
-  install -m755 -t "$pkgdir"/usr/bin mkbootimg fastboot adb
+  install -m755 -t "$pkgdir"/usr/bin fastboot adb core/mkbootimg/mkbootimg
   install -Dm 644 bash_completion.fastboot 
"$pkgdir"/usr/share/bash-completion/completions/fastboot
   #adb completion is provided by bash-completion file now
   #install -Dm 644 bash_completion.adb 
"$pkgdir"/usr/share/bash-completion/completions/adb

Modified: build.sh
===
--- build.sh2016-08-31 13:17:56 UTC (rev 188129)
+++ build.sh2016-08-31 13:26:59 UTC (rev 188130)
@@ -1,77 +1,87 @@
-gcc -o core/libmincrypt/dsa_sig.c.o -std=gnu11 $CFLAGS $CPPFLAGS 
-Icore/include -c core/libmincrypt/dsa_sig.c
-gcc -o core/libmincrypt/p256_ec.c.o -std=gnu11 $CFLAGS $CPPFLAGS 
-Icore/include -c core/libmincrypt/p256_ec.c
-gcc -o core/libmincrypt/rsa.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/include -c 
core/libmincrypt/rsa.c
-gcc -o core/libmincrypt/sha.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/include -c 
core/libmincrypt/sha.c
-gcc -o core/libmincrypt/p256.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/include 
-c core/libmincrypt/p256.c
-gcc -o core/libmincrypt/p256_ecdsa.c.o -std=gnu11 $CFLAGS $CPPFLAGS 
-Icore/include -c core/libmincrypt/p256_ecdsa.c
-gcc -o core/libmincrypt/sha256.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/include 
-c core/libmincrypt/sha256.c
-gcc -o core/mkbootimg/mkbootimg.c.o -std=gnu11 $CFLAGS $CPPFLAGS 
-Icore/include -c core/mkbootimg/mkbootimg.c
-g++ -o mkbootimg  $LDFLAGS core/libmincrypt/dsa_sig.c.o 
core/libmincrypt/p256_ec.c.o core/libmincrypt/rsa.c.o core/libmincrypt/sha.c.o 
core/libmincrypt/p256.c.o core/libmincrypt/p256_ecdsa.c.o 
core/libmincrypt/sha256.c.o core/mkbootimg/mkbootimg.c.o
-g++ -o core/adb/adb.cpp.o -std=gnu++11 $CXXFLAGS $CPPFLAGS -DADB_HOST=1 
-fpermissive -Icore/include -Icore/base/include -c core/adb/adb.cpp
-g++ -o core/adb/adb_auth.cpp.o -std=gnu++11 $CXXFLAGS $CPPFLAGS -DADB_HOST=1 
-fpermissive -Icore/include -Icore/base/include -c core/adb/adb_auth.cpp
-g++ -o core/adb/adb_io.cpp.o -std=gnu++11 $CXXFLAGS $CPPFLAGS -DADB_HOST=1 
-fpermissive -Icore/include -Icore/base/include -c core/adb/adb_io.cpp
-g++ -o core/adb/adb_listeners.cpp.o -std=gnu++11 $CXXFLAGS $CPPFLAGS 
-DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -c 
core/adb/adb_listeners.cpp
-g++ -o core/adb/adb_utils.cpp.o -std=gnu++11 $CXXFLAGS $CPPFLAGS -DADB_HOST=1 
-fpermissive -Icore/include -Icore/base/include -c core/adb/adb_utils.cpp
-g++ -o core/adb/sockets.cpp.o -std=gnu++11 $CXXFLAGS $CPPFLAGS -DADB_HOST=1 
-fpermissive -Icore/include -Icore/base/include -c core/adb/sockets.cpp
-g++ -o core/adb/transport.cpp.o -std=gnu++11 $CXXFLAGS $CPPFLAGS -DADB_HOST=1 
-fpermissive -Icore/include -Icore/base/include -c core/adb/transport.cpp
-g++ -o core/adb/transport_local.cpp.o -std=gnu++11 $CXXFLAGS $CPPFLAGS 
-DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -c 
core/adb/transport_local.cpp
-g++ -o core/adb/transport_usb.cpp.o -std=gnu++11 $CXXFLAGS $CPPFLAGS 
-DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -c 

[arch-commits] Commit in android-tools/trunk (4 files)

2016-01-13 Thread Anatol Pomozov
Date: Wednesday, January 13, 2016 @ 18:44:55
  Author: anatolik
Revision: 156313

upgpkg: android-tools 6.0.1_r10-2

Bash completion loader is looking for files named as the executable name.
For android-tool we provide completions for 'adb' and 'fastboot', we need to 
call
completions the same way.

Added:
  android-tools/trunk/bash_completion.adb
(from rev 156263, android-tools/trunk/bash_completion)
  android-tools/trunk/bash_completion.fastboot
(from rev 156312, android-tools/trunk/bash_completion)
Modified:
  android-tools/trunk/PKGBUILD
Deleted:
  android-tools/trunk/bash_completion

--+
 PKGBUILD |   11 +-
 bash_completion  |  203 -
 bash_completion.adb  |  135 +
 bash_completion.fastboot |   90 +++
 4 files changed, 232 insertions(+), 207 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2016-01-13 17:22:37 UTC (rev 156312)
+++ PKGBUILD2016-01-13 17:44:55 UTC (rev 156313)
@@ -5,7 +5,7 @@
 
 pkgname=android-tools
 pkgver=6.0.1_r10
-pkgrel=1
+pkgrel=2
 pkgdesc='Android platform tools'
 arch=(i686 x86_64)
 url='http://tools.android.com/'
@@ -18,7 +18,8 @@
 
git+https://android.googlesource.com/platform/external/f2fs-tools#tag=android-$pkgver
 build.sh # regenerate this file with generate_build.rb tool
 fix_build.patch
-bash_completion) # Bash completion file was taken from 
https://github.com/mbrubeck/android-completion
+bash_completion.fastboot
+bash_completion.adb) # Bash completion file was taken from 
https://github.com/mbrubeck/android-completion
 sha1sums=('SKIP'
   'SKIP'
   'SKIP'
@@ -25,7 +26,8 @@
   'SKIP'
   'd47604b60cc123641d52eed8f6495265725bf9d3'
   '40a978209b6d1bbf99e04b8bd5fca6429b97f1b1'
-  'e1bd94fd4dd260af3c068496071d67738d431aec')
+  '7004dbd0c193668827174880de6f8434de8ceaee'
+  '2e69152091bb9642be058e49ec6cb720a2fd91dc')
 
 prepare() {
   patch -p1 < fix_build.patch
@@ -38,5 +40,6 @@
 package(){
   install -m755 -d "$pkgdir"/usr/bin
   install -m755 -t "$pkgdir"/usr/bin mkbootimg fastboot adb
-  install -Dm 644 bash_completion 
"$pkgdir"/usr/share/bash-completion/completions/$pkgname
+  install -Dm 644 bash_completion.fastboot 
"$pkgdir"/usr/share/bash-completion/completions/fastboot
+  install -Dm 644 bash_completion.adb 
"$pkgdir"/usr/share/bash-completion/completions/adb
 }

Deleted: bash_completion
===
--- bash_completion 2016-01-13 17:22:37 UTC (rev 156312)
+++ bash_completion 2016-01-13 17:44:55 UTC (rev 156313)
@@ -1,203 +0,0 @@
-## Bash completion for the Android SDK tools.
-##
-## Copyright (c) 2009 Matt Brubeck
-##
-## Permission is hereby granted, free of charge, to any person obtaining a copy
-## of this software and associated documentation files (the "Software"), to 
deal
-## in the Software without restriction, including without limitation the rights
-## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-## copies of the Software, and to permit persons to whom the Software is
-## furnished to do so, subject to the following conditions:
-##
-## The above copyright notice and this permission notice shall be included in
-## all copies or substantial portions of the Software.
-##
-## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
FROM,
-## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-## THE SOFTWARE.
-
-
-function _adb()
-{
-  local cur prev opts cmds c subcommand device_selected
-  COMPREPLY=()
-  cur="${COMP_WORDS[COMP_CWORD]}"
-  prev="${COMP_WORDS[COMP_CWORD-1]}"
-  opts="-d -e -s -p"
-  cmds="devices push pull sync shell emu logcat forward jdwp install sideload \
-uninstall bugreport help version wait-for-device start-server \
-reboot reboot-bootloader \
-connect disconnect \
-kill-server get-state get-serialno status-window remount root ppp 
backup restore"
-  cmds_not_need_device="devices help version start-server kill-server connect 
disconnect"
-  subcommand=""
-  device_selected=""
-
-  # Look for the subcommand.
-  c=1
-  while [ $c -lt $COMP_CWORD ]; do
-word="${COMP_WORDS[c]}"
-if [ "$word" = "-d" -o "$word" = "-e" -o "$word" = "-s" ]; then
-  device_selected=true
-  opts="-p"
-fi
-for cmd in $cmds; do
-  if [ "$cmd" = "$word" ]; then
-subcommand="$word"
-  fi
-done
-c=$((++c))
-  done
-
-  

[arch-commits] Commit in android-tools/trunk (4 files)

2015-05-17 Thread Anatol Pomozov
Date: Monday, May 18, 2015 @ 07:01:57
  Author: anatolik
Revision: 133685

Add mkbootimg tool

Integrate custom makefiles into single one

Added:
  android-tools/trunk/Makefile
Modified:
  android-tools/trunk/PKGBUILD
Deleted:
  android-tools/trunk/adbMakefile
  android-tools/trunk/fastbootMakefile

--+
 Makefile |  101 +
 PKGBUILD |   13 ++
 adbMakefile  |   44 ---
 fastbootMakefile |   67 ---
 4 files changed, 105 insertions(+), 120 deletions(-)

Added: Makefile
===
--- Makefile(rev 0)
+++ Makefile2015-05-18 05:01:57 UTC (rev 133685)
@@ -0,0 +1,101 @@
+all: mkbootimg fastboot adb
+
+install:
+   install -m755 -d $(DESTDIR)/usr/bin
+   install -m755 -t $(DESTDIR)/usr/bin mkbootimg fastboot adb
+
+clean:
+   rm -f **/*.o
+
+.PHONY: clean
+
+
+
+
+MKBOOTIMG_SRCS += $(wildcard core/libmincrypt/*.c)
+MKBOOTIMG_SRCS += core/mkbootimg/mkbootimg.c
+
+MKBOOTIMG_CFLAGS += -Icore/include
+
+mkbootimg: $(MKBOOTIMG_OBJ)
+   $(CC) -o $@ $(CFLAGS) $(MKBOOTIMG_CFLAGS) $(LDFLAGS) $(MKBOOTIMG_LIBS) 
$(MKBOOTIMG_SRCS)
+
+
+
+
+ADB_SRCS += core/adb/adb.c
+ADB_SRCS += core/adb/adb_auth_host.c
+ADB_SRCS += core/adb/adb_client.c
+ADB_SRCS += core/adb/commandline.c
+ADB_SRCS += core/adb/console.c
+ADB_SRCS += core/adb/fdevent.c
+ADB_SRCS += core/adb/file_sync_client.c
+ADB_SRCS += core/adb/get_my_path_linux.c
+ADB_SRCS += core/adb/services.c
+ADB_SRCS += core/adb/sockets.c
+ADB_SRCS += core/adb/transport.c
+ADB_SRCS += core/adb/transport_local.c
+ADB_SRCS += core/adb/transport_usb.c
+ADB_SRCS += core/adb/usb_linux.c
+ADB_SRCS += core/adb/usb_vendors.c
+ADB_SRCS += core/libcutils/load_file.c
+ADB_SRCS += core/libcutils/socket_inaddr_any_server.c
+ADB_SRCS += core/libcutils/socket_local_client.c
+ADB_SRCS += core/libcutils/socket_local_server.c
+ADB_SRCS += core/libcutils/socket_loopback_client.c
+ADB_SRCS += core/libcutils/socket_loopback_server.c
+ADB_SRCS += core/libcutils/socket_network_client.c
+ADB_SRCS += core/libzipfile/centraldir.c
+ADB_SRCS += core/libzipfile/zipfile.c
+
+ADB_CFLAGS  += -DADB_HOST=1 -DHAVE_FORKEXEC=1 -DHAVE_OFF64_T=1 -DHAVE_TERMIO_H 
-I core/include -I core/adb
+ADB_LIBS += -lcrypto -lpthread -lz
+
+adb: $(ADB_SRCS)
+   $(CC) -o $@ $(CFLAGS) $(ADB_CFLAGS) $(LDFLAGS) $(ADB_SRCS) $(ADB_LIBS)
+
+
+
+FASTBOOT_SRCS += core/fastboot/bootimg.c
+FASTBOOT_SRCS += core/fastboot/engine.c
+FASTBOOT_SRCS += core/fastboot/fastboot.c
+FASTBOOT_SRCS += core/fastboot/protocol.c
+FASTBOOT_SRCS += core/fastboot/usb_linux.c
+FASTBOOT_SRCS += core/fastboot/util_linux.c
+FASTBOOT_SRCS += core/fastboot/util.c
+FASTBOOT_SRCS += core/fastboot/fs.c
+FASTBOOT_SRCS += core/libsparse/backed_block.c
+FASTBOOT_SRCS += core/libsparse/output_file.c
+FASTBOOT_SRCS += core/libsparse/sparse.c
+FASTBOOT_SRCS += core/libsparse/sparse_crc32.c
+FASTBOOT_SRCS += core/libsparse/sparse_err.c
+FASTBOOT_SRCS += core/libsparse/sparse_read.c
+FASTBOOT_SRCS += core/libzipfile/centraldir.c
+FASTBOOT_SRCS += core/libzipfile/zipfile.c
+FASTBOOT_SRCS += extras/ext4_utils/allocate.c
+FASTBOOT_SRCS += extras/ext4_utils/contents.c
+FASTBOOT_SRCS += extras/ext4_utils/crc16.c
+FASTBOOT_SRCS += extras/ext4_utils/ext4_utils.c
+FASTBOOT_SRCS += extras/ext4_utils/ext4_sb.c
+FASTBOOT_SRCS += extras/ext4_utils/extent.c
+FASTBOOT_SRCS += extras/ext4_utils/indirect.c
+FASTBOOT_SRCS += extras/ext4_utils/make_ext4fs.c
+FASTBOOT_SRCS += extras/ext4_utils/sha1.c
+FASTBOOT_SRCS += extras/ext4_utils/uuid.c
+FASTBOOT_SRCS += extras/ext4_utils/wipe.c
+FASTBOOT_SRCS += extras/f2fs_utils/f2fs_utils.c
+FASTBOOT_SRCS += extras/f2fs_utils/f2fs_dlutils.c
+FASTBOOT_SRCS += extras/f2fs_utils/f2fs_ioutils.c
+FASTBOOT_SRCS += libselinux/src/callbacks.c
+FASTBOOT_SRCS += libselinux/src/check_context.c
+FASTBOOT_SRCS += libselinux/src/freecon.c
+FASTBOOT_SRCS += libselinux/src/init.c
+FASTBOOT_SRCS += libselinux/src/label.c
+FASTBOOT_SRCS += libselinux/src/label_android_property.c
+FASTBOOT_SRCS += libselinux/src/label_file.c
+
+FASTBOOT_CFLAGS  += -DHAVE_OFF64_T=1 -std=gnu99 -I core/mkbootimg -I 
core/libsparse/include -I core/include -I extras/ext4_utils -I 
extras/f2fs_utils -I libselinux/include -I f2fs-tools/include -I f2fs-tools/mkfs
+FASTBOOT_LIBS += -lz -ldl -lpcre
+
+fastboot: $(FASTBOOT_OBJS)
+   $(CC) -o $@ $(CFLAGS) $(FASTBOOT_CFLAGS) $(LDFLAGS) $(FASTBOOT_SRCS) 
$(FASTBOOT_LIBS)

Modified: PKGBUILD
===
--- PKGBUILD2015-05-18 03:05:44 UTC (rev 133684)
+++ PKGBUILD2015-05-18 05:01:57 UTC (rev 133685)
@@ -16,18 +16,15 @@
 
git+https://android.googlesource.com/platform/system/extras#tag=android-$pkgver
 
git+https://android.googlesource.com/platform/external/libselinux#tag=android-$pkgver