aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCeleste <20312-Celeste@users.gitlab.alpinelinux.org>2023-10-16 02:51:18 +0000
committeromni <omni+alpine@hack.org>2023-10-17 19:47:28 +0000
commit1496ae1e43b798e1a067473fa060a4af58ab096c (patch)
treea6dd8fd53066de75caf22fd06c4b992b6fcf7afc
parent3572904a489d2b05931f5bdf62dc03ef4f9e1f6f (diff)
community/cmake-extras: upgrade to 1.7
also, update project and source URLs
-rw-r--r--community/cmake-extras/0001-GMock-Extract-version-detection-code-into-function.patch102
-rw-r--r--community/cmake-extras/0002-GMock-Use-GMock-targets-from-CMake-if-possible.patch35
-rw-r--r--community/cmake-extras/APKBUILD15
3 files changed, 5 insertions, 147 deletions
diff --git a/community/cmake-extras/0001-GMock-Extract-version-detection-code-into-function.patch b/community/cmake-extras/0001-GMock-Extract-version-detection-code-into-function.patch
deleted file mode 100644
index 46240d0e7dd..00000000000
--- a/community/cmake-extras/0001-GMock-Extract-version-detection-code-into-function.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From a3cdd9af21f1e810925e2505118f37ebbd450160 Mon Sep 17 00:00:00 2001
-From: Luca Weiss <luca@z3ntu.xyz>
-Date: Sun, 4 Apr 2021 14:52:45 +0200
-Subject: [PATCH 1/2] GMock: Extract version detection code into function
-
----
- src/GMock/GMockConfig.cmake | 72 +++++++++++++++++++------------------
- 1 file changed, 38 insertions(+), 34 deletions(-)
-
-diff --git a/src/GMock/GMockConfig.cmake b/src/GMock/GMockConfig.cmake
-index 514c775..8cd44e8 100644
---- a/src/GMock/GMockConfig.cmake
-+++ b/src/GMock/GMockConfig.cmake
-@@ -37,6 +37,43 @@
- # NOTE: Due to the way this package finder is implemented, do not attempt
- # to find the GMock package more than once.
-
-+macro(add_gtest_version_defines)
-+ # get a gtest version string that the regex will match
-+ pkg_check_modules(GTEST_PKGCONFIG "gtest")
-+ if (GTEST_PKGCONFIG_FOUND)
-+ set(GTEST_VERSION_STR ${GTEST_PKGCONFIG_VERSION})
-+ set(GTEST_DETECTION_METHOD "pkg-config")
-+ elseif (DEFINED ENV{GTEST_VERSION})
-+ set(GTEST_VERSION_STR $ENV{GTEST_VERSION})
-+ set(GTEST_DETECTION_METHOD "GTEST_VERSION environment variable")
-+ else()
-+ message(WARNING "Could not detect GTest version, Assuming v${GTEST_VERSION_STR} (or compatible) and hoping for the best")
-+ add_definitions(-DGTEST_VERSION_UNKNOWN)
-+ set(GTEST_DETECTION_METHOD "best guess, could not detect")
-+ endif()
-+
-+ string(REGEX MATCH
-+ "([0-9]+)\\.([0-9]+)\\.([0-9]+)" GTEST_VERSION_PARSED
-+ ${GTEST_VERSION_STR})
-+ if (GTEST_VERSION_PARSED)
-+ set(GTEST_VERSION_MAJOR ${CMAKE_MATCH_1})
-+ set(GTEST_VERSION_MINOR ${CMAKE_MATCH_2})
-+ set(GTEST_VERSION_PATCH ${CMAKE_MATCH_3})
-+ message("-- Using GTest v${GTEST_VERSION_MAJOR}.${GTEST_VERSION_MINOR}.${GTEST_VERSION_PATCH} (parsed from ${GTEST_DETECTION_METHOD})")
-+ else()
-+ # fallback to 1.8.0
-+ message(WARNING "Could not parse GTest version: ${GTEST_VERSION_STR} (${GTEST_DETECTION_METHOD}), Assuming v1.8.0 (or compatible) and hoping for the best")
-+ set(GTEST_VERSION_MAJOR 1)
-+ set(GTEST_VERSION_MINOR 8)
-+ set(GTEST_VERSION_PATCH 0)
-+ add_definitions(-DGTEST_VERSION_UNKNOWN)
-+ endif()
-+
-+ add_definitions(-DGTEST_VERSION_MAJOR=${GTEST_VERSION_MAJOR})
-+ add_definitions(-DGTEST_VERSION_MINOR=${GTEST_VERSION_MINOR})
-+ add_definitions(-DGTEST_VERSION_PATCH=${GTEST_VERSION_PATCH})
-+endmacro()
-+
- find_package(Threads)
- find_package(PkgConfig)
-
-@@ -54,40 +91,7 @@ else()
- endif()
- message("-- Using ${GMOCK_SOURCE_DIR}/ as gmock source directory")
-
--# get a gtest version string that the regex will match
--pkg_check_modules(GTEST_PKGCONFIG "gtest")
--if (GTEST_PKGCONFIG_FOUND)
-- set(GTEST_VERSION_STR ${GTEST_PKGCONFIG_VERSION})
-- set(GTEST_DETECTION_METHOD "pkg-config")
--elseif (DEFINED ENV{GTEST_VERSION})
-- set(GTEST_VERSION_STR $ENV{GTEST_VERSION})
-- set(GTEST_DETECTION_METHOD "GTEST_VERSION environment variable")
--else()
-- message(WARNING "Could not detect GTest version, Assuming v${GTEST_VERSION_STR} (or compatible) and hoping for the best")
-- add_definitions(-DGTEST_VERSION_UNKNOWN)
-- set(GTEST_DETECTION_METHOD "best guess, could not detect")
--endif()
--
--string(REGEX MATCH
-- "([0-9]+)\\.([0-9]+)\\.([0-9]+)" GTEST_VERSION_PARSED
-- ${GTEST_VERSION_STR})
--if (GTEST_VERSION_PARSED)
-- set(GTEST_VERSION_MAJOR ${CMAKE_MATCH_1})
-- set(GTEST_VERSION_MINOR ${CMAKE_MATCH_2})
-- set(GTEST_VERSION_PATCH ${CMAKE_MATCH_3})
-- message("-- Using GTest v${GTEST_VERSION_MAJOR}.${GTEST_VERSION_MINOR}.${GTEST_VERSION_PATCH} (parsed from ${GTEST_DETECTION_METHOD})")
--else()
-- # fallback to 1.8.0
-- message(WARNING "Could not parse GTest version: ${GTEST_VERSION_STR} (${GTEST_DETECTION_METHOD}), Assuming v1.8.0 (or compatible) and hoping for the best")
-- set(GTEST_VERSION_MAJOR 1)
-- set(GTEST_VERSION_MINOR 8)
-- set(GTEST_VERSION_PATCH 0)
-- add_definitions(-DGTEST_VERSION_UNKNOWN)
--endif()
--
--add_definitions(-DGTEST_VERSION_MAJOR=${GTEST_VERSION_MAJOR})
--add_definitions(-DGTEST_VERSION_MINOR=${GTEST_VERSION_MINOR})
--add_definitions(-DGTEST_VERSION_PATCH=${GTEST_VERSION_PATCH})
-+add_gtest_version_defines()
-
- # 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
---
-2.32.0
-
diff --git a/community/cmake-extras/0002-GMock-Use-GMock-targets-from-CMake-if-possible.patch b/community/cmake-extras/0002-GMock-Use-GMock-targets-from-CMake-if-possible.patch
deleted file mode 100644
index dddf266de37..00000000000
--- a/community/cmake-extras/0002-GMock-Use-GMock-targets-from-CMake-if-possible.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 548ab2d45a532dc748875b8a1554e86642864297 Mon Sep 17 00:00:00 2001
-From: Luca Weiss <luca@z3ntu.xyz>
-Date: Sun, 4 Apr 2021 14:53:01 +0200
-Subject: [PATCH 2/2] GMock: Use GMock targets from CMake if possible
-
----
- src/GMock/GMockConfig.cmake | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/src/GMock/GMockConfig.cmake b/src/GMock/GMockConfig.cmake
-index 8cd44e8..5211e0b 100644
---- a/src/GMock/GMockConfig.cmake
-+++ b/src/GMock/GMockConfig.cmake
-@@ -74,6 +74,18 @@ macro(add_gtest_version_defines)
- add_definitions(-DGTEST_VERSION_PATCH=${GTEST_VERSION_PATCH})
- endmacro()
-
-+# Try using CMake targets provided by GTest
-+find_package (GTest)
-+if (GTest_FOUND AND TARGET GTest::gmock)
-+ set(GTEST_LIBRARIES GTest::gtest)
-+ set(GTEST_MAIN_LIBRARIES GTest::gtest_main)
-+ set(GMOCK_LIBRARIES GTest::gmock_main GTest::gmock)
-+ set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
-+
-+ add_gtest_version_defines()
-+ return()
-+endif()
-+
- find_package(Threads)
- find_package(PkgConfig)
-
---
-2.32.0
-
diff --git a/community/cmake-extras/APKBUILD b/community/cmake-extras/APKBUILD
index 7380c9f5c72..ccb9ba29419 100644
--- a/community/cmake-extras/APKBUILD
+++ b/community/cmake-extras/APKBUILD
@@ -1,19 +1,16 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=cmake-extras
-pkgver=1.6
-pkgrel=2
+pkgver=1.7
+pkgrel=0
pkgdesc="A collection of add-ons for the CMake build tool"
-url="https://gitlab.com/ubports/core/cmake-extras"
+url="https://gitlab.com/ubports/development/core/cmake-extras"
arch="noarch"
license="LGPL-3.0-only"
depends="cmake"
makedepends="samurai"
options="!check" # No testsuite
-source="https://gitlab.com/ubports/core/cmake-extras/-/archive/$pkgver/cmake-extras-$pkgver.tar.gz
- 0001-GMock-Extract-version-detection-code-into-function.patch
- 0002-GMock-Use-GMock-targets-from-CMake-if-possible.patch
- "
+source="https://gitlab.com/ubports/development/core/cmake-extras/-/archive/$pkgver/cmake-extras-$pkgver.tar.gz"
build() {
cmake -B build -G Ninja \
@@ -27,7 +24,5 @@ package() {
}
sha512sums="
-1c8133e783eebe8e2d0f302c85bc482429b76154abebd85d224d048da4cfc34983a3c234897a44249fb56ce4fd1ae937f16ded7d20864489de61747608d924e5 cmake-extras-1.6.tar.gz
-962eacb3f012bcb302911d684a2bfafd23b6e924cbf8365c04a3cbf575e714a819a8cbed5890646dc4e92ee6d73614923091176657c11f6f5cd7e9dd262135d8 0001-GMock-Extract-version-detection-code-into-function.patch
-835dec52303d4ff212f6a82e7ad768d8472c5ba00104c64ce25356461e63b00820f901914a1f2d28cf3f59ee1cd57edacb422688e93da81f5ad84c162fe8b51d 0002-GMock-Use-GMock-targets-from-CMake-if-possible.patch
+007a6bc247746196873e10584957fc7269776b7cd6e0a7b7c0701e8807c8e42bfdf6c71a92f13ed8961930260c6e62a7aef41840a7b79725fed182d59bb78621 cmake-extras-1.7.tar.gz
"