def package_host_tools(out_dir, dist_dir, host): packages = [ 'gdb-multiarch-7.11', 'ndk-depends', 'ndk-make', 'ndk-python', 'ndk-stack', 'ndk-yasm', ] files = [ 'ndk-gdb', 'ndk-gdb.py', 'ndk-which', ] if host in ('windows', 'windows64'): packages.append('toolbox') files.append('ndk-gdb.cmd') host_tag = build_support.host_to_tag(host) package_names = [p + '-' + host_tag + '.tar.bz2' for p in packages] for package_name in package_names: package_path = os.path.join(out_dir, package_name) subprocess.check_call(['tar', 'xf', package_path, '-C', out_dir]) for f in files: shutil.copy2(f, os.path.join(out_dir, 'host-tools/bin')) build_support.merge_license_files( os.path.join(out_dir, 'host-tools/NOTICE'), [ build_support.android_path('toolchain/gdb/gdb-7.11/COPYING'), build_support.ndk_path('sources/host-tools/ndk-depends/NOTICE'), build_support.ndk_path('sources/host-tools/make-3.81/COPYING'), build_support.android_path( 'toolchain/python/Python-2.7.5/LICENSE'), build_support.ndk_path('sources/host-tools/ndk-stack/NOTICE'), build_support.ndk_path('sources/host-tools/toolbox/NOTICE'), build_support.android_path('toolchain/yasm/COPYING'), build_support.android_path('toolchain/yasm/BSD.txt'), build_support.android_path('toolchain/yasm/Artistic.txt'), build_support.android_path('toolchain/yasm/GNU_GPL-2.0'), build_support.android_path('toolchain/yasm/GNU_LGPL-2.0'), ]) package_name = 'host-tools-' + host_tag path = os.path.join(out_dir, 'host-tools') build_support.make_package(package_name, path, dist_dir)
class Meta(ndk.builds.PackageModule): name = 'meta' path = 'meta' src = build_support.ndk_path('meta') def validate_notice(self, _install_base): # No license needed for meta. pass
class Changelog(ndk.builds.FileModule): name = 'changelog' path = 'CHANGELOG.md' src = build_support.ndk_path('CHANGELOG.md') def validate_notice(self, _install_base): # No license needed for the changelog. pass
class Readme(ndk.builds.FileModule): name = 'readme' path = 'README.md' src = build_support.ndk_path('UserReadme.md')
class RenderscriptLibs(ndk.builds.PackageModule): name = 'renderscript-libs' path = 'sources/android/renderscript' src = build_support.ndk_path('sources/android/renderscript') create_repo_prop = True
class LibAndroidSupport(ndk.builds.PackageModule): name = 'libandroid_support' path = 'sources/android/support' src = build_support.ndk_path('sources/android/support') create_repo_prop = True
class SystemStl(ndk.builds.PackageModule): name = 'system-stl' path = 'sources/cxx-stl/system' src = build_support.ndk_path('sources/cxx-stl/system') create_repo_prop = True
class Gabixx(ndk.builds.PackageModule): name = 'gabi++' path = 'sources/cxx-stl/gabi++' src = build_support.ndk_path('sources/cxx-stl/gabi++') create_repo_prop = True
class NdkBuild(ndk.builds.PackageModule): name = 'ndk-build' path = 'build' src = build_support.ndk_path('build') create_repo_prop = True
class Gtest(ndk.builds.PackageModule): name = 'gtest' path = 'sources/third_party/googletest' src = build_support.ndk_path('sources/third_party/googletest') create_repo_prop = True
class NdkHelper(ndk.builds.PackageModule): name = 'ndk_helper' path = 'sources/android/ndk_helper' src = build_support.ndk_path('sources/android/ndk_helper') create_repo_prop = True
class NativeAppGlue(ndk.builds.PackageModule): name = 'native_app_glue' path = 'sources/android/native_app_glue' src = build_support.ndk_path('sources/android/native_app_glue') create_repo_prop = True
class CpuFeatures(ndk.builds.PackageModule): name = 'cpufeatures' path = 'sources/android/cpufeatures' src = build_support.ndk_path('sources/android/cpufeatures') create_repo_prop = True