Skip to content
Snippets Groups Projects
Commit a7f7c921 authored by alice's avatar alice
Browse files

main/cmake: add a patch to handle protobuf23 version renaming

parent 687008ce
No related branches found
No related tags found
1 merge request!44306main/protobuf: upgrade to 23.0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cmake pkgname=cmake
pkgver=3.26.4 pkgver=3.26.4
pkgrel=1 pkgrel=2
pkgdesc="Cross-platform, open-source make system" pkgdesc="Cross-platform, open-source make system"
url="https://www.cmake.org/" url="https://www.cmake.org/"
arch="all" arch="all"
...@@ -33,7 +33,9 @@ case $pkgver in ...@@ -33,7 +33,9 @@ case $pkgver in
*.*.*.*) _v=v${pkgver%.*.*};; *.*.*.*) _v=v${pkgver%.*.*};;
*.*.*) _v=v${pkgver%.*};; *.*.*) _v=v${pkgver%.*};;
esac esac
source="https://www.cmake.org/files/$_v/cmake-$pkgver.tar.gz" source="https://www.cmake.org/files/$_v/cmake-$pkgver.tar.gz
proto-23-rename.patch
"
options="!check" options="!check"
build() { build() {
...@@ -85,4 +87,5 @@ vim() { ...@@ -85,4 +87,5 @@ vim() {
sha512sums=" sha512sums="
fe817c8d5e247db3f0a9a58ee37c466a47220100d9e90711cd5d06c223cef87e41d1a756e75d1537e5f8cd010dcb8971cbeab4684b1ac12bcecf84bf7b720167 cmake-3.26.4.tar.gz fe817c8d5e247db3f0a9a58ee37c466a47220100d9e90711cd5d06c223cef87e41d1a756e75d1537e5f8cd010dcb8971cbeab4684b1ac12bcecf84bf7b720167 cmake-3.26.4.tar.gz
9210cd7821d63871b970b046fb6b8b4771806517829fbb58b17ef3ed611b6d4a5a310f35eb486c1c5d19bcd19b2f3ad177f121a1a5448b44241ea5a50c96fc52 proto-23-rename.patch
" "
Patch-Source: https://gitlab.kitware.com/cmake/cmake/-/commit/fc7dcc6a24ffd33b780104ebd9dbb115d306827e
--
From fc7dcc6a24ffd33b780104ebd9dbb115d306827e Mon Sep 17 00:00:00 2001
From: Jannik Beyerstedt <beyerstedt@consider-it.de>
Date: Mon, 19 Jun 2023 17:29:47 +0200
Subject: [PATCH] FindProtobuf: Support new version number scheme
Protobuf changed it's version number scheme with version 21. The first number
(usually the major version) is not synchronized between compiler and library
version, but the second and third number are. See
https://protobuf.dev/news/2022-05-06/ for more details.
Fixes: #24847
---
Modules/FindProtobuf.cmake | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake
index c73a2d81ab0..b046fcc7334 100644
--- a/Modules/FindProtobuf.cmake
+++ b/Modules/FindProtobuf.cmake
@@ -499,7 +499,11 @@ if(Protobuf_INCLUDE_DIR)
math(EXPR _PROTOBUF_MAJOR_VERSION "${Protobuf_LIB_VERSION} / 1000000")
math(EXPR _PROTOBUF_MINOR_VERSION "${Protobuf_LIB_VERSION} / 1000 % 1000")
math(EXPR _PROTOBUF_SUBMINOR_VERSION "${Protobuf_LIB_VERSION} % 1000")
- set(Protobuf_VERSION "${_PROTOBUF_MAJOR_VERSION}.${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}")
+ if (_PROTOBUF_MINOR_VERSION GREATER_EQUAL "21")
+ set(Protobuf_VERSION "${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}")
+ else()
+ set(Protobuf_VERSION "${_PROTOBUF_MAJOR_VERSION}.${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}")
+ endif()
if(Protobuf_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
--
GitLab
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment