49 lines
1.6 KiB
Bash
49 lines
1.6 KiB
Bash
# Template file for 'android-tools'
|
|
pkgname=android-tools
|
|
version=29.0.4
|
|
revision=1
|
|
archs="armv* aarch64* x86_64* i686*"
|
|
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 <johnz@posteo.net>"
|
|
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=5428e16a2baba79665cac0b11be81aa0cfa6920dc20da039711cc3d3b96a333b
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
armv[56]*) makedepends+=" libatomic-devel"
|
|
;;
|
|
esac
|
|
|
|
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
|
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
armv[56]*) sed -i vendor/CMakeLists.adb.txt \
|
|
-e "/target_link_libraries/s;$; atomic;"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
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
|
|
}
|