From d5949bc688d3c0c812266fa71a118066a8ab4e6a Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Wed, 8 Aug 2018 19:39:14 +0000 Subject: [PATCH] community/android-tools to 9.0.0_r3-1 --- community/android-tools/PKGBUILD | 11 +++-- community/android-tools/fix_build_core.patch | 48 ++++++++++++++----- .../android-tools/fix_build_e2fsprogs.patch | 17 ++----- community/android-tools/generate_build.rb | 38 ++++++--------- 4 files changed, 60 insertions(+), 54 deletions(-) diff --git a/community/android-tools/PKGBUILD b/community/android-tools/PKGBUILD index 8d2b6d27f..b4ba78b01 100644 --- a/community/android-tools/PKGBUILD +++ b/community/android-tools/PKGBUILD @@ -7,7 +7,7 @@ # - set -Wno-error=attributes to stop alignas(64) warnings as errors pkgname=android-tools -pkgver=8.1.0_r33 +pkgver=9.0.0_r3 pkgrel=1 pkgdesc='Android platform tools' arch=(x86_64) @@ -16,7 +16,8 @@ license=(Apache MIT) 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 @@ -35,10 +36,10 @@ sha1sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' - '89c0b62805506c729f76c1aa3c901c4ea2e3bfbe' - 'e6ab688d0decfae64302d1402e1eee6678fc2549' + '238507086a99134820cc9900545cbff06772dc30' + '62446582a96b3a39e5d91e3e2ef8b8b38a5a735e' 'ec473160d7445f97bccabd1c32ac0ae2f77900c1' - 'e0d19de229f1a41a066ddb7a84f8e56e67bbc8bc' + '5df8c7e00a4066733d59050e8e1fcd4cc2b22104' '7004dbd0c193668827174880de6f8434de8ceaee') prepare() { diff --git a/community/android-tools/fix_build_core.patch b/community/android-tools/fix_build_core.patch index 7ee9dd775..7b163633d 100644 --- a/community/android-tools/fix_build_core.patch +++ b/community/android-tools/fix_build_core.patch @@ -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 @@ index 81201995a0..cfd60fce97 100644 #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 @@ index 296995efe2..48269b6750 100644 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 @@ index a2f28878e8..0aa185e972 100644 #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 @@ index 6357b4ba73..3c7dbce131 100644 // 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 @@ index 709f061bd6..77629a882b 100644 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 +diff --git a/libziparchive/zip_archive.cc b/libziparchive/zip_archive.cc +index 5e5e7afd18..ebbc819a7a 100644 +--- a/libziparchive/zip_archive.cc ++++ b/libziparchive/zip_archive.cc +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + + #include + #include diff --git a/community/android-tools/fix_build_e2fsprogs.patch b/community/android-tools/fix_build_e2fsprogs.patch index b58cf5169..b9fdb5eaf 100644 --- a/community/android-tools/fix_build_e2fsprogs.patch +++ b/community/android-tools/fix_build_e2fsprogs.patch @@ -1,14 +1,5 @@ -diff --git a/contrib/android/e2fsdroid.c b/contrib/android/e2fsdroid.c -index f043822b..4d49bee4 100644 ---- a/contrib/android/e2fsdroid.c -+++ b/contrib/android/e2fsdroid.c -@@ -1,3 +1,4 @@ -+#define _GNU_SOURCE // for asprintf - #include - #include - #include diff --git a/contrib/android/perms.c b/contrib/android/perms.c -index 9ae8e586..433506fd 100644 +index d83ad35a..dca5b620 100644 --- a/contrib/android/perms.c +++ b/contrib/android/perms.c @@ -5,6 +5,7 @@ @@ -38,10 +29,10 @@ index 505b3c9c..7be5105f 100644 #ifdef __GNUC__ #define _INLINE_ extern __inline__ diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h -index e153c817..dcae5947 100644 +index 470e7d7a..95a41e0d 100644 --- a/lib/ext2fs/ext2fs.h +++ b/lib/ext2fs/ext2fs.h -@@ -1736,7 +1736,7 @@ extern const struct ext2_inode *ext2fs_const_inode(const struct ext2_inode_large +@@ -1743,7 +1743,7 @@ extern const struct ext2_inode *ext2fs_const_inode(const struct ext2_inode_large #define _INLINE_ extern #else #if (__STDC_VERSION__ >= 199901L) @@ -51,7 +42,7 @@ index e153c817..dcae5947 100644 #ifdef __GNUC__ #define _INLINE_ extern __inline__ diff --git a/misc/create_inode.c b/misc/create_inode.c -index 94c29b8d..6e59151c 100644 +index 1373b46b..e6f34bd9 100644 --- a/misc/create_inode.c +++ b/misc/create_inode.c @@ -403,7 +403,7 @@ static ssize_t my_pread(int fd, void *buf, size_t count, off_t offset) diff --git a/community/android-tools/generate_build.rb b/community/android-tools/generate_build.rb index 86921638d..91f42fec0 100755 --- a/community/android-tools/generate_build.rb +++ b/community/android-tools/generate_build.rb @@ -21,7 +21,7 @@ def compile(sources, cflags) lang_flags = "-std=gnu11 $CFLAGS $CPPFLAGS" when ".cpp", ".cc" cc = "cxx" - lang_flags = "-std=gnu++14 $CXXFLAGS $CPPFLAGS" + lang_flags = "-std=gnu++17 $CXXFLAGS $CPPFLAGS" else raise "Unknown extension #{ext}" end @@ -131,17 +131,17 @@ logfiles = %w( liblog = compile(expand("core/liblog", logfiles), "-DLIBLOG_LOG_TAG=1006 -D_XOPEN_SOURCE=700 -DFAKE_LOG_DEVICE=1 -Icore/log/include -Icore/include") cutilsfiles = %w( - load_file.c - socket_local_client_unix.c - socket_network_client_unix.c - socket_local_server_unix.c + load_file.cpp + socket_local_client_unix.cpp + socket_network_client_unix.cpp + socket_local_server_unix.cpp sockets_unix.cpp - socket_inaddr_any_server_unix.c + socket_inaddr_any_server_unix.cpp sockets.cpp android_get_control_file.cpp - threads.c + threads.cpp fs_config.cpp - canned_fs_config.c + canned_fs_config.cpp ) libcutils = compile(expand("core/libcutils", cutilsfiles), "-D_GNU_SOURCE -Icore/libcutils/include -Icore/include") @@ -173,7 +173,7 @@ fastbootfiles = %w( tcp.cpp udp.cpp ) -libfastboot = compile(expand("core/fastboot", fastbootfiles), '-DFASTBOOT_VERSION="\"$PKGVER\"" -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -DUSE_F2FS -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils/include -Iextras/f2fs_utils -Icore/libziparchive/include') +libfastboot = compile(expand("core/fastboot", fastbootfiles), '-DFASTBOOT_VERSION="\"$PKGVER\"" -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -DUSE_F2FS -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils/include -Iextras/f2fs_utils -Icore/libziparchive/include -Icore/mkbootimg/include/bootimg') sparsefiles = %w( backed_block.c @@ -186,11 +186,8 @@ sparsefiles = %w( libsparse = compile(expand("core/libsparse", sparsefiles), "-Icore/libsparse/include -Icore/base/include") f2fsfiles = %w( - f2fs_utils.c - f2fs_ioutils.c - f2fs_dlutils.c ) -f2fs = compile(expand("extras/f2fs_utils", f2fsfiles), "-Iextras/f2fs_utils -If2fs-tools/include -If2fs-tools/mkfs -Icore/libsparse/include -Iselinux/libselinux/include") +f2fs = compile(expand("extras/f2fs_utils", f2fsfiles), "-DHAVE_LINUX_TYPES_H -If2fs-tools/include -Icore/liblog/include") zipfiles = %w( zip_archive.cc @@ -203,16 +200,8 @@ utilfiles = %w( libutil = compile(expand("core/libutils", utilfiles), "-Icore/include") ext4files = %w( - make_ext4fs.c - ext4fixup.c ext4_utils.c - allocate.c - contents.c - extent.c - indirect.c - sha1.c wipe.c - crc16.c ext4_sb.c ) libext4 = compile(expand("extras/ext4_utils", ext4files), "-D_GNU_SOURCE -Icore/libsparse/include -Icore/include -Iselinux/libselinux/include -Iextras/ext4_utils/include") @@ -328,6 +317,7 @@ libext2fsfiles = %w( lib/ext2fs/get_num_dirs.c lib/ext2fs/getsectsize.c lib/ext2fs/getsize.c + lib/ext2fs/hashmap.c lib/ext2fs/i_block.c lib/ext2fs/ind_block.c lib/ext2fs/initialize.c @@ -352,6 +342,7 @@ libext2fsfiles = %w( lib/ext2fs/read_bb_file.c lib/ext2fs/res_gdt.c lib/ext2fs/rw_bitmaps.c + lib/ext2fs/sha512.c lib/ext2fs/sparse_io.c lib/ext2fs/symlink.c lib/ext2fs/undo_io.c @@ -374,7 +365,7 @@ libext2fsfiles = %w( lib/uuid/unparse.c misc/create_inode.c ) -libext2fs = compile(expand("e2fsprogs", libext2fsfiles), "-Ie2fsprogs/lib -Icore/libsparse/include") +libext2fs = compile(expand("e2fsprogs", libext2fsfiles), "-Ie2fsprogs/lib -Ie2fsprogs/lib/ext2fs -Icore/libsparse/include") mke2fsfiles = %w( misc/default_profile.c @@ -390,13 +381,12 @@ e2fsdroidfiles = %w( contrib/android/e2fsdroid.c contrib/android/basefs_allocator.c contrib/android/block_range.c - contrib/android/hashmap.c contrib/android/base_fs.c contrib/android/fsmap.c contrib/android/block_list.c contrib/android/perms.c ) -e2fsdroid = compile(expand("e2fsprogs", e2fsdroidfiles), "-Ie2fsprogs/lib -Iselinux/libselinux/include -Icore/libcutils/include -Ie2fsprogs/misc") +e2fsdroid = compile(expand("e2fsprogs", e2fsdroidfiles), "-Ie2fsprogs/lib -Ie2fsprogs/lib/ext2fs -Iselinux/libselinux/include -Icore/libcutils/include -Ie2fsprogs/misc") link("e2fsdroid", e2fsdroid + libext2fs + libsparse + libbase + libzip + liblog + libutil + libselinux + libsepol + libcutils, "-lz -lpthread -lpcre2-8")