# Template file for 'android-tools' pkgname=android-tools version=29.0.6 revision=3 archs="armv* aarch64* x86_64* i686* ppc64le*" build_style=cmake hostmakedepends="perl go" makedepends="gtest-devel zlib-devel libressl-devel libusb-devel pcre2-devel" short_desc="Android platform tools (adb and fastboot)" maintainer="John " license="Apache-2.0, ISC, GPL-2.0-only, MIT" homepage="http://developer.android.com/tools/help/adb.html" distfiles="https://github.com/nmeum/android-tools/releases/download/${version}/android-tools-${version}.tar.xz" checksum=7fb1c127c36b0752657593838b6823743bf8e5730f9f8b0f7ba2c185424cf376 if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then makedepends+=" libatomic-devel" fi pre_configure() { # Don't check for CROSS_COMPILING, since i686 container/chroot inside # x86_64 host will failed to build this. if [ "${XBPS_TARGET_MACHINE}" = i686 ] && [ "$(uname -m)" = "x86_64" ]; then boring_ssl_cmake_args="-DCMAKE_TOOLCHAIN_FILE=cross_boring_ssl.cmake" cat > cross_boring_ssl.cmake <<-_EOF SET(CMAKE_SYSTEM_NAME Linux) SET(CMAKE_SYSTEM_VERSION 1) SET(CMAKE_C_COMPILER ${CC}) SET(CMAKE_CXX_COMPILER ${CXX}) SET(CMAKE_SYSTEM_PROCESSOR x86) _EOF configure_args+=" ${boring_ssl_cmake_args}" fi if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then sed -i vendor/CMakeLists.adb.txt \ -e "/target_link_libraries/s;$; atomic;" fi } post_install() { vlicense vendor/boringssl/LICENSE boringssl.LICENSE vlicense vendor/boringssl/third_party/fiat/LICENSE fiat.LICENSE vlicense vendor/boringssl/third_party/googletest/LICENSE gtest.LICENSE vsv adb }