diff --git a/mingw-w64-android-tools/0001-android-tools-cmake.patch b/mingw-w64-android-tools/0001-android-tools-cmake.patch index dd2f6e3341..d2a07d5ff1 100644 --- a/mingw-w64-android-tools/0001-android-tools-cmake.patch +++ b/mingw-w64-android-tools/0001-android-tools-cmake.patch @@ -43,7 +43,7 @@ target_compile_definitions(libadb PRIVATE -D_GNU_SOURCE) target_compile_definitions(libadb PUBLIC -DADB_HOST=1) target_include_directories(libadb PUBLIC -@@ -98,37 +112,50 @@ +@@ -98,6 +112,9 @@ target_compile_definitions(liblog PRIVATE -DLIBLOG_LOG_TAG=1006 -D_XOPEN_SOURCE=700 -DFAKE_LOG_DEVICE=1) @@ -53,17 +53,14 @@ target_include_directories(liblog PUBLIC core/include logging/liblog/include - core/libcutils/include +@@ -105,26 +122,35 @@ libbase/include) --add_library(libcutils STATIC + set(libcutils_SOURCES - core/libcutils/android_get_control_file.cpp - core/libcutils/ashmem-host.cpp -- core/libcutils/canned_fs_config.cpp -+set(libcutils_SOURCES core/libcutils/config_utils.cpp - core/libcutils/fs.cpp -- core/libcutils/fs_config.cpp - core/libcutils/hashmap.cpp core/libcutils/iosched_policy.cpp core/libcutils/load_file.cpp @@ -78,13 +75,11 @@ - core/libcutils/sockets_unix.cpp core/libcutils/sockets.cpp - core/libcutils/str_parms.cpp - core/libcutils/strlcpy.c -- core/libcutils/trace-host.cpp -- core/libcutils/threads.cpp) -+ core/libcutils/threads.cpp -+ core/libcutils/trace-host.cpp) +- core/libcutils/strlcpy.c +- core/libcutils/trace-host.cpp) ++ core/libcutils/strlcpy.c) + -+if(WIN32) ++if (WIN32) + list(APPEND libcutils_SOURCES + core/libcutils/socket_inaddr_any_server_windows.cpp + core/libcutils/socket_network_client_windows.cpp @@ -93,9 +88,7 @@ + list(APPEND libcutils_SOURCES + core/libcutils/android_get_control_file.cpp + core/libcutils/ashmem-host.cpp -+ core/libcutils/canned_fs_config.cpp + core/libcutils/fs.cpp -+ core/libcutils/fs_config.cpp + core/libcutils/hashmap.cpp + core/libcutils/multiuser.cpp + core/libcutils/socket_inaddr_any_server_unix.cpp @@ -103,14 +96,13 @@ + core/libcutils/socket_local_server_unix.cpp + core/libcutils/socket_network_client_unix.cpp + core/libcutils/sockets_unix.cpp -+ core/libcutils/str_parms.cpp) ++ core/libcutils/str_parms.cpp ++ core/libcutils/trace-host.cpp) +endif() -+add_library(libcutils STATIC ${libcutils_SOURCES}) - target_compile_definitions(libcutils PRIVATE -D_GNU_SOURCE) - target_include_directories(libcutils PRIVATE - logging/liblog/include core/libutils/include) -@@ -155,7 +182,7 @@ + if (NOT APPLE AND NOT WIN32) + list(APPEND libcutils_SOURCES +@@ -159,7 +185,7 @@ target_include_directories(libcrypto PUBLIC core/libcrypto_utils/include boringssl/include) @@ -119,7 +111,7 @@ adb/adb.cpp adb/adb_io.cpp adb/adb_listeners.cpp -@@ -164,7 +191,6 @@ +@@ -168,7 +194,6 @@ adb/adb_utils.cpp adb/fdevent/fdevent.cpp adb/fdevent/fdevent_poll.cpp @@ -127,7 +119,7 @@ adb/shell_service_protocol.cpp adb/sockets.cpp adb/socket_spec.cpp -@@ -175,6 +201,18 @@ +@@ -179,6 +204,18 @@ adb/types.cpp ${ADB_KEY_TYPE_PROTO_HDRS}) @@ -146,7 +138,7 @@ target_include_directories(adb PRIVATE core/include libbase/include adb core/libcrypto_utils/include boringssl/include) -@@ -200,6 +238,11 @@ +@@ -204,6 +241,11 @@ PkgConfig::libusb-1.0 z PkgConfig::libzstd) @@ -227,7 +219,7 @@ libbase/file.cpp libbase/hex.cpp libbase/logging.cpp -@@ -14,9 +13,19 @@ +@@ -14,9 +13,22 @@ libbase/stringprintf.cpp libbase/strings.cpp libbase/threads.cpp @@ -246,6 +238,9 @@ +endif() + +add_library(libbase STATIC ${libbase_SOURCES}) ++if(WIN32) ++ target_compile_definitions(libbase PUBLIC _POSIX_C_SOURCE) ++endif() target_include_directories(libbase PUBLIC libbase/include core/include) target_link_libraries(libbase PUBLIC fmt::fmt liblog) @@ -287,7 +282,7 @@ +endif() --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt -@@ -75,7 +75,7 @@ +@@ -91,7 +91,7 @@ find_package(Protobuf CONFIG) find_package(Protobuf REQUIRED) @@ -296,7 +291,7 @@ find_package(Threads REQUIRED) check_symbol_exists(strlcpy "string.h" HAVE_STRLCPY) -@@ -84,33 +84,48 @@ +@@ -100,25 +100,40 @@ include_directories(${PROTOBUF_INCLUDE_DIRS}) include_directories(${CMAKE_CURRENT_BINARY_DIR}) @@ -314,12 +309,14 @@ include(CMakeLists.adb.txt) include(CMakeLists.sparse.txt) include(CMakeLists.fastboot.txt) +-include(CMakeLists.f2fstools.txt) -include(CMakeLists.mke2fs.txt) include(CMakeLists.partition.txt) include(CMakeLists.mkbootimg.txt) include(CMakeLists.libufdt.txt) include(CMakeLists.avb.txt) +if(NOT WIN32) ++ include(CMakeLists.f2fstools.txt) + include(CMakeLists.mke2fs.txt) +endif() @@ -338,13 +335,17 @@ lpadd lpdump lpflash - lpmake +@@ -126,11 +141,11 @@ lpunpack + make_f2fs + sload_f2fs - simg2img - e2fsdroid ext2simg DESTINATION bin) +endif() - # Install common completion files. - install(FILES adb/adb.bash RENAME adb DESTINATION "${COMPLETION_COMMON_DIR}") +-if(NOT APPLE) ++if(NOT APPLE AND NOT WIN32) + install(TARGETS + e2fsdroid + DESTINATION bin) diff --git a/mingw-w64-android-tools/0002-android-tools-vendor.patch b/mingw-w64-android-tools/0002-android-tools-vendor.patch index aee5d89169..48b3ece6ae 100644 --- a/mingw-w64-android-tools/0002-android-tools-vendor.patch +++ b/mingw-w64-android-tools/0002-android-tools-vendor.patch @@ -1,7 +1,18 @@ ---- a/vendor/boringssl/include/openssl/base.h -+++ b/vendor/boringssl/include/openssl/base.h -@@ -136,8 +136,13 @@ +--- a/vendor/boringssl/crypto/curve25519/internal.h ++++ b/vendor/boringssl/crypto/curve25519/internal.h +@@ -32,7 +32,7 @@ #endif + + #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_SMALL) && \ +- defined(__GNUC__) && defined(__x86_64__) ++ defined(__GNUC__) && defined(__x86_64__) && !defined(OPENSSL_WINDOWS) + #define BORINGSSL_FE25519_ADX + + // fiat_curve25519_adx_mul is defined in +--- a/vendor/boringssl/include/openssl/target.h ++++ b/vendor/boringssl/include/openssl/target.h +@@ -66,8 +66,13 @@ + #define OPENSSL_APPLE #endif +// Unfortunate workaround to avoid symbol conflict with wincrypt.h @@ -13,7 +24,7 @@ +#undef X509_NAME #endif - // Trusty isn't Linux but currently defines __linux__. As a workaround, we + // Trusty and Android baremetal aren't't Linux but currently define __linux__. --- a/vendor/libziparchive/zip_cd_entry_map.h +++ b/vendor/libziparchive/zip_cd_entry_map.h @@ -90,7 +90,7 @@ diff --git a/mingw-w64-android-tools/PKGBUILD b/mingw-w64-android-tools/PKGBUILD index 937fe9107e..d844d0ce64 100644 --- a/mingw-w64-android-tools/PKGBUILD +++ b/mingw-w64-android-tools/PKGBUILD @@ -3,9 +3,9 @@ _realname=android-tools pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=34.0.4 +pkgver=34.0.5 _tag=${pkgver} -pkgrel=5 +pkgrel=1 pkgdesc='Android platform tools (mingw-w64)' arch=('any') mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') @@ -32,12 +32,12 @@ source=("https://github.com/nmeum/android-tools/releases/download/${_tag}/${_rea "0003-fix-building-with-gcc-mingw.patch" "0004-fix-SetThreadDescription-name-collision.patch") noextract=("${_realname}-${_tag}.tar.xz") -sha256sums=('7a22ff9cea81ff4f38f560687858e8f8fb733624412597e3cc1ab0262f8da3a1' - 'd8856c8d3e4315393c4c47cffa491e973932d39efbe8bfdd2a0456d16b9c56cc' - 'e853151874c9a97697219ce3c5f3c89843f7ef4e325c127b3ec002168d30d208' +sha256sums=('fb09cff12cfb82acf42a8ebebbc0342671bfcd02117716368bdc73fdda60304a' + '09f3774363bf710b9cdb902f4a722b424fd4d476f8fa3ada853d140300f57cf4' + '3e73291850b9c7f60ae65b5101666880d08a96f043666b9bcabccda9a37513d7' 'e6fc31c148e120fc69be53e0464434c492ab0eaa0dbc8f18dd3c19eb2dd2577b' - '7e394b2c0d86bec01c06995a07e7bcf90ff44fe93dc38f5b58c20d7d52d96a65' - '3c66c9756272a63d4e5b8a13b2d55e6b42bf3f0a297739cf3ea78e8fd7a3881e' + 'ac0d83631f3f12438d374f80757b1699c00317d45c5a025da2d6ec89bb81e253' + '181432d376b0448dac2d24b49ce34cdb6eed188826e61bd5706e53d5411c57b5' '528e7a2dbf366832d6ae339e013de7c311efb7fa9139ce3478bc18fe29b0542d' '2fe4ceec9d73cea98a37ae7b6844a1c1abbb7bf14cb696f4e14b632fea33aa3c')