diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e09650..1a7f6cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: run: | sudo apt-get update DEBIAN_FRONTEND=noninteractive sudo apt-get install -yq \ - ${{ matrix.pkgs }} cmake git golang libbrotli-dev libfmt-dev \ + ${{ matrix.pkgs }} cmake git golang libbrotli-dev \ libgtest-dev liblz4-dev libpcre2-dev libprotobuf-dev libunwind-dev \ libusb-1.0-0-dev libzstd-dev make pkg-config - name: checkout @@ -71,7 +71,7 @@ jobs: run: | zypper -n ref zypper -n in ${{ matrix.pkgs }} cmake git go gtest pcre2-devel pkgconfig \ - 'pkgconfig(fmt)' 'pkgconfig(libbrotlicommon)' 'pkgconfig(liblz4)' \ + 'pkgconfig(libbrotlicommon)' 'pkgconfig(liblz4)' \ 'pkgconfig(libunwind-generic)' 'pkgconfig(libusb-1.0)' \ 'pkgconfig(libzstd)' 'pkgconfig(protobuf)' ninja @@ -79,7 +79,7 @@ jobs: if: startsWith(matrix.os, 'archlinux') run: | pacman -Syu --needed --noconfirm \ - ${{ matrix.pkgs }} brotli cmake fmt git go gtest libunwind \ + ${{ matrix.pkgs }} brotli cmake git go gtest libunwind \ libusb lz4 pcre2 pkgconfig protobuf zstd ninja - name: prep ubuntu @@ -87,7 +87,7 @@ jobs: run: | apt-get update DEBIAN_FRONTEND=noninteractive apt-get install -yq \ - ${{ matrix.pkgs }} cmake git golang libbrotli-dev libfmt-dev \ + ${{ matrix.pkgs }} cmake git golang libbrotli-dev \ libgtest-dev liblz4-dev libpcre2-dev libprotobuf-dev libunwind-dev \ libusb-1.0-0-dev libzstd-dev pkg-config protobuf-compiler ninja-build @@ -95,7 +95,7 @@ jobs: if: startsWith(matrix.os, 'alpine') run: | apk add build-base pcre2-dev linux-headers libusb-dev gtest-dev samurai \ - go git perl cmake protobuf-dev brotli-dev zstd-dev lz4-dev fmt-dev + go git perl cmake protobuf-dev brotli-dev zstd-dev lz4-dev # required for patches - name: git config diff --git a/.gitmodules b/.gitmodules index f875dbd..f6be677 100644 --- a/.gitmodules +++ b/.gitmodules @@ -58,3 +58,7 @@ shallow = true path = vendor/incremental_delivery url = https://android.googlesource.com/platform/system/incremental_delivery +[submodule "vendor/fmtlib"] + shallow = true + path = vendor/fmtlib + url = https://android.googlesource.com/platform/external/fmtlib.git diff --git a/README.md b/README.md index 2abb6f7..c385493 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,6 @@ The following libraries are required by android-tools: 5. [brotli][brotli] 6. [zstd][zstd] 7. [lz4][lz4] -8. [fmt][fmt] Additionally the following software is required at compile-time: @@ -109,5 +108,4 @@ have been copied from Anatol's ruby script. [brotli]: https://github.com/google/brotli [zstd]: https://facebook.github.io/zstd/ [lz4]: https://github.com/lz4/lz4 -[fmt]: https://github.com/fmtlib/fmt [anatol.pomozov]: https://github.com/anatol diff --git a/vendor/CMakeLists.fastboot.txt b/vendor/CMakeLists.fastboot.txt index a56a3a2..1d43937 100644 --- a/vendor/CMakeLists.fastboot.txt +++ b/vendor/CMakeLists.fastboot.txt @@ -45,6 +45,7 @@ target_include_directories(libfsmgr PRIVATE core/fs_mgr/liblp/include libbase/include extras/ext4_utils/include core/libsparse/include boringssl/include) +target_link_libraries(libfsmgr PUBLIC fmt::fmt) add_library(libselinux STATIC selinux/libselinux/src/booleans.c @@ -134,4 +135,4 @@ target_compile_definitions(fastboot PRIVATE target_link_libraries(fastboot libsparse libzip libcutils liblog libfsmgr libutil libbase libext4 libselinux libsepol libdiagnoseusb crypto - z pcre2-8 pthread dl fmt::fmt) + z pcre2-8 pthread dl) diff --git a/vendor/CMakeLists.libandroidfw.txt b/vendor/CMakeLists.libandroidfw.txt index a0626f0..0fcebe7 100644 --- a/vendor/CMakeLists.libandroidfw.txt +++ b/vendor/CMakeLists.libandroidfw.txt @@ -34,3 +34,4 @@ target_include_directories(libandroidfw PUBLIC native/include libziparchive/include incremental_delivery/incfs/util/include) +target_link_libraries(libandroidfw PUBLIC fmt::fmt) diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt index b2aa90a..c9ccb3c 100644 --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt @@ -15,6 +15,7 @@ set(android-vendored f2fs-tools e2fsprogs incremental_delivery + fmtlib boringssl) if(EXISTS "${ANDROID_PATCH_DIR}/") @@ -34,9 +35,8 @@ if(EXISTS "${ANDROID_PATCH_DIR}/") endif() add_subdirectory(boringssl EXCLUDE_FROM_ALL) +add_subdirectory(fmtlib EXCLUDE_FROM_ALL) find_package(Protobuf REQUIRED) -find_package(fmt REQUIRED) -include_directories(${fmt_INCLUDE_DIRS}) include_directories(${PROTOBUF_INCLUDE_DIRS}) include_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/vendor/fmtlib b/vendor/fmtlib new file mode 160000 index 0000000..fc21810 --- /dev/null +++ b/vendor/fmtlib @@ -0,0 +1 @@ +Subproject commit fc218102b4f20095f8a5f6d0f085a2957d22fdf4