diff options
author | Antoine Fontaine <antoine.fontaine@epfl.ch> | 2020-03-07 23:25:26 +0100 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2020-03-08 12:48:42 +0100 |
commit | 0e9c86d894d7530b079d2720ad795e4d9d79d3d3 (patch) | |
tree | d80b7f91bfba4816aae5fc1f7736b5c67ff28357 /testing/anbox/fix-gtest-use.patch | |
parent | 42e3d861078b3236dd6471ea4b3e16294ebad66f (diff) | |
download | aports-0e9c86d894d7530b079d2720ad795e4d9d79d3d3.tar.bz2 aports-0e9c86d894d7530b079d2720ad795e4d9d79d3d3.tar.xz |
testing/anbox: upgrade to 20200303 and fix issues
This commit upgrades to 3rd march master, and address the following:
* repair and enable unit tests.
* add icon.
* drop arm build patch as it was merged upstream.
* drop armhf architecture as there is no android image anyway for
this arch.
* drop -networkmanager subpackage: it isn't needed anymore as the
iptable script requirement are better known.
* remove files from a dependency that got installed to
`/usr/include` and similar, as they don't belong to the package
(it probably should be removed and split to another package altogether).
* add root shell script.
Diffstat (limited to 'testing/anbox/fix-gtest-use.patch')
-rw-r--r-- | testing/anbox/fix-gtest-use.patch | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/testing/anbox/fix-gtest-use.patch b/testing/anbox/fix-gtest-use.patch new file mode 100644 index 0000000000..8db059ccc7 --- /dev/null +++ b/testing/anbox/fix-gtest-use.patch @@ -0,0 +1,146 @@ +--- a/cmake/FindGMock.cmake ++++ b/cmake/FindGMock.cmake +@@ -1,92 +1,6 @@ +-# Copyright (C) 2014 Canonical Ltd +-# +-# This program is free software: you can redistribute it and/or modify +-# it under the terms of the GNU Lesser General Public License version 3 as +-# published by the Free Software Foundation. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU Lesser General Public License for more details. +-# +-# You should have received a copy of the GNU Lesser General Public License +-# along with this program. If not, see <http://www.gnu.org/licenses/>. ++pkg_check_modules(GTEST REQUIRED gtest ) ++pkg_check_modules(GTEST_MAIN REQUIRED gtest_main) ++pkg_check_modules(GMOCK REQUIRED gmock ) ++pkg_check_modules(GMOCK_MAIN REQUIRED gmock_main) + +-# Build with system gmock and embedded gtest +-# +-# Usage: +-# +-# find_package(GMock) +-# +-# ... +-# +-# target_link_libraries( +-# my-target +-# ${GTEST_BOTH_LIBRARIES} +-# ) +-# +-# NOTE: Due to the way this package finder is implemented, do not attempt +-# to find the GMock package more than once. +- +-find_package(Threads) +- +-if (EXISTS "/usr/src/googletest") +- # As of version 1.8.0 +- set(GMOCK_SOURCE_DIR "/usr/src/googletest/googlemock" CACHE PATH "gmock source directory") +- set(GMOCK_INCLUDE_DIRS "${GMOCK_SOURCE_DIR}/include" CACHE PATH "gmock source include directory") +- set(GTEST_INCLUDE_DIRS "/usr/src/googletest/googletest/include" CACHE PATH "gtest source include directory") +-else() +- set(GMOCK_SOURCE_DIR "/usr/src/gmock" CACHE PATH "gmock source directory") +- set(GMOCK_INCLUDE_DIRS "/usr/include" CACHE PATH "gmock source include directory") +- set(GTEST_INCLUDE_DIRS "/usr/include" CACHE PATH "gtest source include directory") +-endif() +- +-# We add -g so we get debug info for the gtest stack frames with gdb. +-# The warnings are suppressed so we get a noise-free build for gtest and gmock if the caller +-# has these warnings enabled. +-set(findgmock_cxx_flags "${CMAKE_CXX_FLAGS} -g -Wno-old-style-cast -Wno-missing-field-initializers -Wno-ctor-dtor-privacy -Wno-switch-default") +- +-set(findgmock_bin_dir "${CMAKE_CURRENT_BINARY_DIR}/gmock") +-set(findgmock_gtest_lib "${findgmock_bin_dir}/gtest/libgtest.a") +-set(findgmock_gtest_main_lib "${findgmock_bin_dir}/gtest/libgtest_main.a") +-set(findgmock_gmock_lib "${findgmock_bin_dir}/libgmock.a") +-set(findgmock_gmock_main_lib "${findgmock_bin_dir}/libgmock_main.a") +- +-include(ExternalProject) +-ExternalProject_Add(GMock SOURCE_DIR "${GMOCK_SOURCE_DIR}" +- BINARY_DIR "${findgmock_bin_dir}" +- BUILD_BYPRODUCTS "${findgmock_gtest_lib}" +- "${findgmock_gtest_main_lib}" +- "${findgmock_gmock_lib}" +- "${findgmock_gmock_main_lib}" +- INSTALL_COMMAND "" +- CMAKE_ARGS "-DCMAKE_CXX_FLAGS=${findgmock_cxx_flags}") +- +-add_library(gtest INTERFACE) +-target_include_directories(gtest INTERFACE ${GTEST_INCLUDE_DIRS}) +-target_link_libraries(gtest INTERFACE ${findgmock_gtest_lib} ${CMAKE_THREAD_LIBS_INIT}) +-add_dependencies(gtest GMock) +- +-add_library(gtest_main INTERFACE) +-target_include_directories(gtest_main INTERFACE ${GTEST_INCLUDE_DIRS}) +-target_link_libraries(gtest_main INTERFACE ${findgmock_gtest_main_lib} gtest) +- +-add_library(gmock INTERFACE) +-target_include_directories(gmock INTERFACE ${GMOCK_INCLUDE_DIRS}) +-target_link_libraries(gmock INTERFACE ${findgmock_gmock_lib} gtest) +- +-add_library(gmock_main INTERFACE) +-target_include_directories(gmock_main INTERFACE ${GMOCK_INCLUDE_DIRS}) +-target_link_libraries(gmock_main INTERFACE ${findgmock_gmock_main_lib} gmock gtest_main) +- +-set(GTEST_LIBRARIES gtest) +-set(GTEST_MAIN_LIBRARIES gtest_main) +-set(GMOCK_LIBRARIES gmock gmock_main) + set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES}) +- +-unset(findgmock_cxx_flags) +-unset(findgmock_bin_dir) +-unset(findgmock_gtest_lib) +-unset(findgmock_gtest_main_lib) +-unset(findgmock_gmock_lib) +-unset(findgmock_gmock_main_lib) +--- a/external/cpu_features/CMakeLists.txt ++++ b/external/cpu_features/CMakeLists.txt +@@ -159,44 +159,6 @@ endif() + + include(CTest) + if(BUILD_TESTING) +- # Automatically incorporate googletest into the CMake Project if target not +- # found. +- if(NOT TARGET gtest OR NOT TARGET gmock_main) +- # Download and unpack googletest at configure time. +- configure_file( +- cmake/googletest.CMakeLists.txt.in +- googletest-download/CMakeLists.txt +- ) +- +- execute_process( +- COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . +- RESULT_VARIABLE result +- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download) +- +- if(result) +- message(FATAL_ERROR "CMake step for googletest failed: ${result}") +- endif() +- +- execute_process( +- COMMAND ${CMAKE_COMMAND} --build . +- RESULT_VARIABLE result +- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download) +- +- if(result) +- message(FATAL_ERROR "Build step for googletest failed: ${result}") +- endif() +- +- # Prevent overriding the parent project's compiler/linker settings on +- # Windows. +- set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +- +- # Add googletest directly to our build. This defines the gtest and +- # gtest_main targets. +- add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src +- ${CMAKE_BINARY_DIR}/googletest-build +- EXCLUDE_FROM_ALL) +- endif() +- + add_subdirectory(test) + endif() + |