diff options
author | Antoine Fontaine <antoine.fontaine@epfl.ch> | 2020-12-08 19:18:39 +0100 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2020-12-09 03:23:04 +0000 |
commit | 90d75e68c1fb5b63c61baacd74020bf173859cf3 (patch) | |
tree | 880439e19782aca439536bd6deb4f0d06b1a9d61 | |
parent | f414c39245c846fb28b63f2e088ae22ccc1e5eaf (diff) | |
download | aports-90d75e68c1fb5b63c61baacd74020bf173859cf3.tar.gz aports-90d75e68c1fb5b63c61baacd74020bf173859cf3.tar.bz2 aports-90d75e68c1fb5b63c61baacd74020bf173859cf3.tar.xz |
testing/anbox: upgrade to git20201129
* The dbus dependency has been replaced by sdbus-cpp
* Someone updated the python code to python3
* This now includes a patch that fixes keyboard display.
-rw-r--r-- | testing/anbox/APKBUILD | 32 | ||||
-rw-r--r-- | testing/anbox/no-bundled-sdbus.patch | 46 | ||||
-rw-r--r-- | testing/anbox/python3.patch | 250 |
3 files changed, 62 insertions, 266 deletions
diff --git a/testing/anbox/APKBUILD b/testing/anbox/APKBUILD index ab53cc1222..28f84c50c3 100644 --- a/testing/anbox/APKBUILD +++ b/testing/anbox/APKBUILD @@ -3,10 +3,10 @@ # Contributor: Antoine Fontaine <antoine.fontaine@epfl.ch> # Maintainer: Antoine Fontaine <antoine.fontaine@epfl.ch> pkgname=anbox -pkgver=0_git20200609 +pkgver=0_git20201129 pkgrel=1 -_commit="c898810050df67adccd64a84b2d763250a42e722" -_cpu_features_commit="b5c271c53759b2b15ff91df19bd0b32f2966e275" +_commit="6c10125a7f13908d2cbe56d2d9ab09872755f265" +_cpu_features_version="0.6.0" pkgdesc="Android in a box" url="https://github.com/anbox/anbox" arch="x86_64 armv7 aarch64" @@ -14,8 +14,6 @@ license="GPL-3.0-or-later" subpackages="$pkgname-openrc" install="$pkgname.post-install" depends=" - dbus - dbus-libs mesa-gles mesa-egl fuse3 @@ -30,6 +28,7 @@ makedepends=" sdl2_image-dev boost-dev dbus-dev + sdbus-cpp-dev libcap-dev libdwarf-dev protobuf-dev @@ -41,13 +40,13 @@ makedepends=" " source=" $pkgname-$_commit.tar.gz::https://github.com/anbox/anbox/archive/$_commit.tar.gz - cpu_features-$_cpu_features_commit.tar.gz::https://github.com/google/cpu_features/archive/$_cpu_features_commit.tar.gz + cpu_features-v$_cpu_features_version.tar.gz::https://github.com/google/cpu_features/archive/v$_cpu_features_version.tar.gz anbox-container-manager.initd anbox.confd + no-bundled-sdbus.patch musl-fixes.patch - python3.patch - fix-gtest-use.patch give-more-time-to-start.patch + https://github.com/ubports/anbox/commit/e34b59513422eb905b53d7dc6c0862cea535eb96.patch anbox-launch.sh anbox.desktop " @@ -68,7 +67,7 @@ build() { cmake "$builddir" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ - -DBUILD_SHARED_LIBS=True \ + -DBUILD_SHARED_LIBS=False \ -DCMAKE_BUILD_TYPE=None \ -DANBOX_VERSION=alpine-$pkgver-r$pkgrel \ -DWerror=OFF @@ -87,8 +86,9 @@ package() { # CPU Feature install itself. That's bad. rm "$pkgdir"/usr/bin/list_cpu_features - rm "$pkgdir"/usr/lib/backward/BackwardConfig.cmake - rm -r "$pkgdir"/usr/lib/cmake/CpuFeatures + rm "$pkgdir"/usr/lib/libcpu_features.a + rm -r "$pkgdir"/usr/lib/backward/ + rm -r "$pkgdir"/usr/lib/cmake/ rm -r "$pkgdir"/usr/include install -m755 -D "$srcdir"/anbox-container-manager.initd \ @@ -106,18 +106,18 @@ package() { # this is a dependency of the init script install -m755 -D "$builddir"/scripts/anbox-bridge.sh \ "$pkgdir"/usr/share/anbox/anbox-bridge.sh - # this is for convinience, to allow someone to get root access + # this is for convenience, to allow someone to get root access install -m755 -D "$builddir"/scripts/anbox-shell.sh \ "$pkgdir"/usr/share/anbox/anbox-shell.sh } -sha512sums="72656fa51e112492f1fdde46e08025201e3435aa5d6c69fc0ab15aa674e979c2c5e9f280966fe2d533a09019d99139addff68e700d163baaa782943b186e32fb anbox-c898810050df67adccd64a84b2d763250a42e722.tar.gz -c0ec9b603cec2cc9049923e15ef50c85806bc0a0ffe57b63348631061aeddb73c1eca910b25696cf5eac2606aec3f86db29e8a01e01cf438bfee86edfe909e4a cpu_features-b5c271c53759b2b15ff91df19bd0b32f2966e275.tar.gz +sha512sums="c4878745b62719c6cbecde047386858bd2ec7a5dbd37462967cab60fd118f31b89c157b4a00412b51bf130c7b46a83a3c3ab5162ee13baa0e789f773649e8745 anbox-6c10125a7f13908d2cbe56d2d9ab09872755f265.tar.gz +006a2e05253712cf605ecabccdda63dd9325445f8d145d5e2432c4342332e652f318810997321849be131082db435d88143020fdc85268fba204586cf37eef0d cpu_features-v0.6.0.tar.gz 959058eb1c1e3eb0d1593695ee57fbc0cc567f260235e81d7b56da62b0b80fca9112d5f16a1e1c5c0e6223c8a1899f97f906c7cc763dc015e094aacded818a2f anbox-container-manager.initd 6a3bc88142c5287ec54d481a4788eceb7772d9974af950b5286ce63a49d05d9d49fce5ba1d02b4b1c9893896fd4ba218fd4d39b8e640bdd61ad196b5d5c9a021 anbox.confd +e97f3c859998eaf9fe417eac4f40bec6c24b7144686aee00c76d3197a037538c09e307659f9bbc9e133c7ed445ddf4e0f2363c7b762ac0d2dd75c60b3a53be9f no-bundled-sdbus.patch 401669509e05eb586ad40fc9e8f4284b52183f06c60e87bf4e923be165a72f10263daf226db7fd610ef6ff25d09abd140ca2d59187e2d1b85a0bd6ae887dd944 musl-fixes.patch -1130520444223f14cb865916f16c460bb0627b72c1c0a7e73564f99ca86fe5f6bdb1669c6d690cc963ca01dba8f8aff0a2e91897aa5779fed4c423aba38fdac8 python3.patch -12723c70e09c14f5e36499545edd1ec2a613e1d2bdc2cf134e8ddd9cb2d91695c9a74efa4530dce129a74f4b345ef59dff74c6703ed789b994e66c7e2901f11f fix-gtest-use.patch 0f6324231028d32467dc95d43ed4865c29fde3396524479f514533e079179b0b068f1b38cbdf227af13d64ab117a27f3b962d8a99f5ecacf3fff4302d3ffe702 give-more-time-to-start.patch +049ef6e5d02bc1bb39c24d623b00c048443cfaba72637a22d27e202a42731d8e9e71cccd59c8f7dafc1816f1fd4508d337ec75f59891ebbdadc275b2daba466f e34b59513422eb905b53d7dc6c0862cea535eb96.patch 921d69e28a2f63a6eaccdfbd6f53173d2e0c59dd650dd83c0d8f816b5f23f1ba61abb393b0cf5e48d80ce363df4f3e609de34a4e5a73c2b520dba96b76eda0c9 anbox-launch.sh 3e458e6215ecf0ac94d749f4d78e464850dcf2cc2b616b2f7ddf26e9617d63a90bd0c8be59e4540141a813af4bad84d0f84874105f7ef9de8149666fc3828da7 anbox.desktop" diff --git a/testing/anbox/no-bundled-sdbus.patch b/testing/anbox/no-bundled-sdbus.patch new file mode 100644 index 0000000000..2dbe7ea722 --- /dev/null +++ b/testing/anbox/no-bundled-sdbus.patch @@ -0,0 +1,46 @@ +Upstream: no. I've tried to write a proper (upstreamable) fix, but it's not ready yet. + +--- a/external/CMakeLists.txt ++++ b/external/CMakeLists.txt +@@ -6,12 +6,3 @@ add_subdirectory(backward-cpp) + set(BUILD_TESTING OFF) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error") + add_subdirectory(cpu_features) +-include(ExternalProject) +-ExternalProject_Add(sdbus-cpp +- PREFIX sdbus-cpp +- SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/sdbus-cpp" +- INSTALL_COMMAND "" +- CMAKE_CACHE_ARGS +- -DBUILD_CODE_GEN:BOOL=ON +- -DBUILD_SHARED_LIBS:BOOL=OFF +-) +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -26,7 +26,6 @@ include_directories( + ${CMAKE_SOURCE_DIR}/external/android-emugl/host/libs/renderControl_dec + ${CMAKE_BINARY_DIR}/external/android-emugl/host/libs/renderControl_dec + ${CMAKE_SOURCE_DIR}/external/cpu_features/include +- ${CMAKE_SOURCE_DIR}/external/sdbus-cpp/include + ) + + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBINDERFS_PATH=\"\\\"${BINDERFS_PATH}\\\"\"") +@@ -59,7 +59,7 @@ add_library(anbox-protobuf + target_link_libraries(anbox-protobuf + ${PROTOBUF_LITE_LIBRARIES}) + +-set(XML2CPP ${CMAKE_BINARY_DIR}/external/sdbus-cpp/src/sdbus-cpp-build/tools/sdbus-c++-xml2cpp) ++set(XML2CPP sdbus-c++-xml2cpp) + + macro(DBusServer BaseName) + add_custom_command( +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -59,6 +59,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) + find_package(Boost COMPONENTS filesystem log serialization system thread program_options) + find_package(PkgConfig) + find_package(Threads) ++find_package(SDBus-C++ REQUIRED) + find_package(EGL REQUIRED) + find_package(GLESv2 REQUIRED) + find_package(Protobuf REQUIRED) diff --git a/testing/anbox/python3.patch b/testing/anbox/python3.patch deleted file mode 100644 index c4fe1f2455..0000000000 --- a/testing/anbox/python3.patch +++ /dev/null @@ -1,250 +0,0 @@ -Taken from https://copr-dist-git.fedorainfracloud.org/cgit/eclipseo/anbox/anbox.git/tree/0001-convert-script-to-python3.patch - -diff -up anbox-cd829e9ccd3a5d654c8aa5e16e32f0d3915d54a8/scripts/gen-emugl-entries.py.convert_to_python3 anbox-cd829e9ccd3a5d654c8aa5e16e32f0d3915d54a8/scripts/gen-emugl-entries.py ---- anbox-cd829e9ccd3a5d654c8aa5e16e32f0d3915d54a8/scripts/gen-emugl-entries.py.convert_to_python3 2019-06-26 11:21:50.000000000 +0200 -+++ anbox-cd829e9ccd3a5d654c8aa5e16e32f0d3915d54a8/scripts/gen-emugl-entries.py 2019-07-21 19:32:14.307308135 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/python3 - - # Copyright 2015 The Android Open Source Project - # -@@ -25,7 +25,7 @@ - # - # Anything else is an error. - --from __future__ import print_function -+ - import re - import sys - import argparse -@@ -43,7 +43,7 @@ class Entry: - |return_type| its return type, and |parameters| is a list of - (type,name) tuples from the entry's signature. - """ -- self.func_name = func_name -+ self.__name__ = func_name - self.return_type = return_type - self.parameters = "" - self.vartypes = [] -@@ -145,11 +145,11 @@ def gen_functions_header(entries, prefix - for entry in entries: - if with_args: - print(" X(%s, %s, (%s), (%s)) \\" % \ -- (entry.return_type, entry.func_name, entry.parameters, -+ (entry.return_type, entry.__name__, entry.parameters, - entry.call)) - else: - print(" X(%s, %s, (%s)) \\" % \ -- (entry.return_type, entry.func_name, entry.parameters)) -+ (entry.return_type, entry.__name__, entry.parameters)) - - print("") - print("") -@@ -170,27 +170,27 @@ def gen_translator(entries): - from gles3translatorgen import gles31_custom - - translator_custom_share_processing = { } -- for (k, v) in gles30_custom.custom_share_processing.items(): -+ for (k, v) in list(gles30_custom.custom_share_processing.items()): - translator_custom_share_processing[k] = v -- for (k, v) in gles31_custom.custom_share_processing.items(): -+ for (k, v) in list(gles31_custom.custom_share_processing.items()): - translator_custom_share_processing[k] = v - - translator_custom_pre = { } -- for (k, v) in gles30_custom.custom_preprocesses.items(): -+ for (k, v) in list(gles30_custom.custom_preprocesses.items()): - translator_custom_pre[k] = v -- for (k, v) in gles31_custom.custom_preprocesses.items(): -+ for (k, v) in list(gles31_custom.custom_preprocesses.items()): - translator_custom_pre[k] = v - - translator_custom_post = { } -- for (k, v) in gles30_custom.custom_postprocesses.items(): -+ for (k, v) in list(gles30_custom.custom_postprocesses.items()): - translator_custom_post[k] = v -- for (k, v) in gles31_custom.custom_postprocesses.items(): -+ for (k, v) in list(gles31_custom.custom_postprocesses.items()): - translator_custom_post[k] = v - - translator_no_passthrough = {} -- for (k, v) in gles30_custom.no_passthrough.items(): -+ for (k, v) in list(gles30_custom.no_passthrough.items()): - translator_no_passthrough[k] = v -- for (k, v) in gles31_custom.no_passthrough.items(): -+ for (k, v) in list(gles31_custom.no_passthrough.items()): - translator_no_passthrough[k] = v - - translator_needexternc = { -@@ -208,13 +208,13 @@ def gen_translator(entries): - "glClientWaitSync" : "GL_WAIT_FAILED", - } - def needExternC(entry): -- if translator_needexternc.has_key(entry.func_name): -+ if entry.__name__ in translator_needexternc: - return "extern \"C\" " - else: - return "" - def get_fail_code(entry): -- if translator_nocontext_fail_codes.has_key(entry.func_name): -- return translator_nocontext_fail_codes[entry.func_name] -+ if entry.__name__ in translator_nocontext_fail_codes: -+ return translator_nocontext_fail_codes[entry.__name__] - else: - return "0" - def gen_cxt_getter(entry): -@@ -224,9 +224,9 @@ def gen_translator(entries): - print(" GET_CTX_V2_RET(%s);" % get_fail_code(entry)) - - def gen_validations_custom_impl(entry): -- isGen = entry.func_name.startswith("glGen") -- isDelete = entry.func_name.startswith("glDelete") -- isBufferOp = "Buffer" in entry.func_name -+ isGen = entry.__name__.startswith("glGen") -+ isDelete = entry.__name__.startswith("glDelete") -+ isBufferOp = "Buffer" in entry.__name__ - - hasTargetArg = "target" in entry.varnames - hasProgramArg = "program" in entry.varnames -@@ -241,8 +241,8 @@ def gen_translator(entries): - print(" %s;" % mySetError("n < 0", "GL_INVALID_VALUE")) - if (isBufferOp and hasTargetArg): - print(" %s;" % mySetError("!GLESv2Validate::bufferTarget(ctx, target)", "GL_INVALID_ENUM")) -- if translator_custom_pre.has_key(entry.func_name): -- print(translator_custom_pre[entry.func_name],) -+ if entry.__name__ in translator_custom_pre: -+ print(translator_custom_pre[entry.__name__],) - - def gen_call_ret(entry): - globalNameTypes = { -@@ -262,44 +262,44 @@ def gen_translator(entries): - - needsShareGroup = False - for v in zip(entry.vartypes, entry.varnames): -- if v in globalNameTypes.keys(): -+ if v in list(globalNameTypes.keys()): - needsShareGroup = True - - if needsShareGroup: - print(" if (ctx->shareGroup().get()) {") - for key in zip(entry.vartypes, entry.varnames): - vartype, varname = key -- if globalNames.has_key(key): -+ if key in globalNames: - print(" const GLuint %s = ctx->shareGroup()->getGlobalName(%s, %s);" % (globalNames[key], globalNameTypes[key], varname)) - -- globalCall = ", ".join(map(lambda k: globalNames.get(k, k[1]), zip(entry.vartypes, entry.varnames))) -+ globalCall = ", ".join([globalNames.get(k, k[1]) for k in zip(entry.vartypes, entry.varnames)]) - -- if needsShareGroup and translator_custom_share_processing.has_key(entry.func_name): -- print(translator_custom_share_processing[entry.func_name]) -+ if needsShareGroup and entry.__name__ in translator_custom_share_processing: -+ print(translator_custom_share_processing[entry.__name__]) - - if (entry.return_type == "void"): - if (needsShareGroup): - print(" "), - -- if not translator_no_passthrough.has_key(entry.func_name): -- print(" ctx->dispatcher().%s(%s);" % (entry.func_name, globalCall)) -+ if entry.__name__ not in translator_no_passthrough: -+ print(" ctx->dispatcher().%s(%s);" % (entry.__name__, globalCall)) - - if needsShareGroup: - print(" }") -- if translator_custom_post.has_key(entry.func_name): -- print(translator_custom_post[entry.func_name]) -+ if entry.__name__ in translator_custom_post: -+ print(translator_custom_post[entry.__name__]) - else: - if (needsShareGroup): - print(" "), -- if not translator_no_passthrough.has_key(entry.func_name): -- print(" %s %s = ctx->dispatcher().%s(%s);" % (entry.return_type, entry.func_name + "RET", entry.func_name, globalCall)) -+ if entry.__name__ not in translator_no_passthrough: -+ print(" %s %s = ctx->dispatcher().%s(%s);" % (entry.return_type, entry.__name__ + "RET", entry.__name__, globalCall)) - else: - print(") %s %s = %s" % (entry.return_type, entry_func_name + "RET", get_fail_code(entry))) - -- if translator_custom_post.has_key(entry.func_name): -- print(translator_custom_post[entry.func_name]) -+ if entry.__name__ in translator_custom_post: -+ print(translator_custom_post[entry.__name__]) - -- print(" return %s;" % (entry.func_name + "RET")) -+ print(" return %s;" % (entry.__name__ + "RET")) - if needsShareGroup: - print(" } else return %s;" % (get_fail_code(entry))) - -@@ -308,7 +308,7 @@ def gen_translator(entries): - print("// Try to make changes through gen_translator in gen-entries.py,") - print("// and/or parcel out custom functionality in separate code.") - for entry in entries: -- print("%sGL_APICALL %s GL_APIENTRY %s(%s) {" % (needExternC(entry), entry.return_type, entry.func_name, entry.parameters)) -+ print("%sGL_APICALL %s GL_APIENTRY %s(%s) {" % (needExternC(entry), entry.return_type, entry.__name__, entry.parameters)) - gen_cxt_getter(entry) - gen_validations_custom_impl(entry) - gen_call_ret(entry) -@@ -339,7 +339,7 @@ def gen_dll_wrapper(entries, prefix_name - print("///") - print("") - for entry in entries: -- ptr_name = ENTRY_PREFIX + entry.func_name -+ ptr_name = ENTRY_PREFIX + entry.__name__ - print("static %s (*%s)(%s) = 0;" % \ - (entry.return_type, ptr_name, entry.parameters)) - -@@ -351,8 +351,8 @@ def gen_dll_wrapper(entries, prefix_name - - for entry in entries: - print ("%s %s(%s) {" % \ -- (entry.return_type, entry.func_name, entry.parameters)) -- ptr_name = ENTRY_PREFIX + entry.func_name -+ (entry.return_type, entry.__name__, entry.parameters)) -+ ptr_name = ENTRY_PREFIX + entry.__name__ - if entry.return_type != "void": - print(" return %s(%s);" % (ptr_name, entry.call)) - else: -@@ -367,12 +367,12 @@ def gen_dll_wrapper(entries, prefix_name - - print("int %s_dynlink_init(void* lib) {" % prefix_name) - for entry in entries: -- ptr_name = ENTRY_PREFIX + entry.func_name -+ ptr_name = ENTRY_PREFIX + entry.__name__ - print(" %s = (%s(*)(%s))dlsym(lib, \"%s\");" % \ - (ptr_name, - entry.return_type, - entry.parameters, -- entry.func_name)) -+ entry.__name__)) - print(" if (!%s) return -1;" % ptr_name) - print(" return 0;") - print("}") -@@ -383,7 +383,7 @@ def gen_windows_def_file(entries): - """ - print("EXPORTS") - for entry in entries: -- print(" %s" % entry.func_name) -+ print(" %s" % entry.__name__) - - - def gen_unix_sym_file(entries): -@@ -393,7 +393,7 @@ def gen_unix_sym_file(entries): - print("VERSION {") - print("\tglobal:") - for entry in entries: -- print("\t\t%s;" % entry.func_name) -+ print("\t\t%s;" % entry.__name__) - print("\tlocal:") - print("\t\t*;") - print("};") -@@ -407,7 +407,7 @@ def gen_symbols(entries, underscore): - if underscore: - prefix = "_" - for entry in entries: -- print("%s%s" % (prefix, entry.func_name)) -+ print("%s%s" % (prefix, entry.__name__)) - - def parse_file(filename, lines, mode): - """Generate one of possible outputs from |filename|. |lines| must be a list |