Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Update to r21 #6

Merged
merged 3 commits into from
Jan 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ environment:
PYTHON_HOME: "C:\\Python37"

matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH_BUILD: x86
ARCH: x86
CONAN_MAKE_PROGRAM: C:\\tools\\mingw64\\binmingw32-make.exe
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH_BUILD: x86
ARCH: x86_64
CONAN_MAKE_PROGRAM: C:\\tools\\mingw64\\binmingw32-make.exe
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH_BUILD: x86
ARCH: armv7
CONAN_MAKE_PROGRAM: C:\\tools\\mingw64\\binmingw32-make.exe
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH_BUILD: x86
ARCH: armv8
CONAN_MAKE_PROGRAM: C:\\tools\\mingw64\\binmingw32-make.exe
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH_BUILD: x86_64
ARCH: x86
Expand Down
4 changes: 2 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

settings = dict()
settings['compiler'] = 'clang'
settings['compiler.version'] = '8'
settings['compiler.version'] = '9'
settings['compiler.libcxx'] = 'libc++'
settings['os'] = 'Android'
if platform.system() == 'Windows':
settings['os_build'] = 'Windows'
if 'ARCH_BUILD' in os.environ:
arches_build = [os.environ['ARCH_BUILD']]
else:
arches_build = ['x86', 'x86_64']
arches_build = ['x86_64']
elif platform.system() == 'Linux':
settings['os_build'] = 'Linux'
arches_build = ['x86_64']
Expand Down
24 changes: 8 additions & 16 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class AndroidNDKInstallerConan(ConanFile):
name = "android_ndk_installer"
version = "r20b"
version = "r21"
description = "The Android NDK is a toolset that lets you implement parts of your app in " \
"native code, using languages such as C and C++"
url = "https://github.com/bincrafters/conan-android_ndk_installer"
Expand All @@ -18,24 +18,21 @@ class AndroidNDKInstallerConan(ConanFile):
exports_sources = ["cmake-wrapper.cmd", "cmake-wrapper"]

settings = {"os_build": ["Windows", "Linux", "Macos"],
"arch_build": ["x86", "x86_64"],
"arch_build": ["x86_64"],
"compiler": ["clang"],
"os": ["Android"],
"arch": ["x86", "x86_64", "armv7", "armv8"]}

def configure(self):
api_level = int(str(self.settings.os.api_level))
if self.settings.os_build in ["Linux", "Macos"] and self.settings.arch_build == "x86":
raise ConanInvalidConfiguration("x86 host is not supported "
"for %s" % self.settings.os_build)
if api_level < 16:
raise ConanInvalidConfiguration("minumum API version for architecture %s is 16, "
"but used %s" % (self.settings.arch, api_level))
if self.settings.arch in ["x86_64", "armv8"] and api_level < 21:
raise ConanInvalidConfiguration("minumum API version for architecture %s is 21, "
"but used %s" % (self.settings.arch, api_level))
if self.settings.compiler.version != "8":
raise ConanInvalidConfiguration("only Clang 8 is supported")
if self.settings.compiler.version != "9":
raise ConanInvalidConfiguration("only Clang 9 is supported")
if not str(self.settings.compiler.libcxx) in ["c++_shared", "c++_static"]:
raise ConanInvalidConfiguration("only libc++ standard library is supported")

Expand All @@ -44,10 +41,9 @@ def source(self):
archive_name = "android-ndk-{0}-{1}.zip".format(self.version, variant)
source_url = "https://dl.google.com/android/repository/" + archive_name

sha1 = {"windows-x86": "71a1ba20475da1d83b0f1a1826813008f628d59b",
"windows-x86_64": "ead0846608040b8344ad2bc9bc721b88cf13fb8d",
"darwin-x86_64": "b51290ab69cb89de1f0ba108702277bc333b38be",
"linux-x86_64": "d903fdf077039ad9331fb6c3bee78aa46d45527b"}.get(variant)
sha1 = {"windows-x86_64": "c61631eacbd40c30273b716a4e589c6877b85419",
"darwin-x86_64": "0d50636cc0e34ed3ba540d6d5818ea0cf10f16aa",
"linux-x86_64": "afc9c0b9faad222898ac8168c78ad4ccac8a1b5c"}.get(variant)
tools.get(source_url, sha1=sha1)

@property
Expand Down Expand Up @@ -116,15 +112,11 @@ def package(self):
self.copy("cmake-wrapper.cmd")
self.copy("cmake-wrapper")

if self.settings.arch_build == "x86":
tools.replace_in_file(os.path.join(self.package_folder, "build", "cmake", "android.toolchain.cmake"),
"set(ANDROID_HOST_TAG windows-x86_64)",
"set(ANDROID_HOST_TAG windows)", strict=False)
self._fix_permissions()

@property
def _host(self):
return self._platform if self.settings.arch_build == "x86" else self._platform + "-x86_64"
return self._platform + "-x86_64"

@property
def _ndk_root(self):
Expand Down