mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-17 04:37:19 +00:00
mosh: add support of protobuf 4.22.x
Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 69d96dc3ac)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
committed by
Armin Kuster
parent
8223add092
commit
1b6f8a73fd
+63
@@ -0,0 +1,63 @@
|
|||||||
|
From d9a1a6aac5a3b270449d09ec0d2a556807ab9287 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Xiangyu Chen <xiangyu.chen@windriver.com>
|
||||||
|
Date: Wed, 29 Mar 2023 13:53:44 +0800
|
||||||
|
Subject: [PATCH] configure.ac: add support of protobuf 4.22.x
|
||||||
|
|
||||||
|
the protobuf 4.22x is using c++14 as default, this caused the mosh cannot compile anymore and report following error:
|
||||||
|
|
||||||
|
....
|
||||||
|
/usr/include/google/protobuf/port_def.inc:200:15: error: static assertion failed: Protobuf only supports C++14 and newer.
|
||||||
|
| 200 | static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and newer.");
|
||||||
|
| | ^~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
....
|
||||||
|
|
||||||
|
Upstream-Status: Pending [https://github.com/mobile-shell/mosh/pull/1266]
|
||||||
|
|
||||||
|
Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
|
||||||
|
---
|
||||||
|
configure.ac | 8 ++++++++
|
||||||
|
src/frontend/Makefile.am | 2 +-
|
||||||
|
2 files changed, 9 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index ee70c7b..5457009 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -26,6 +26,10 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||||
|
AS_IF([pkg-config --atleast-version 3.6.0 protobuf],
|
||||||
|
[AX_CXX_COMPILE_STDCXX([11])])
|
||||||
|
|
||||||
|
+# If current protobuf 4.22+ update the requires to C++14.
|
||||||
|
+AS_IF([pkg-config --atleast-version 4.22.0 protobuf],
|
||||||
|
+ [AX_CXX_COMPILE_STDCXX([14])])
|
||||||
|
+
|
||||||
|
WARNING_CXXFLAGS=""
|
||||||
|
PICKY_CXXFLAGS=""
|
||||||
|
DISTCHECK_CXXFLAGS=""
|
||||||
|
@@ -311,6 +315,10 @@ AC_CHECK_FUNCS(m4_normalize([
|
||||||
|
pledge
|
||||||
|
]))
|
||||||
|
|
||||||
|
+AS_IF([pkg-config --atleast-version 4.22.0 protobuf],
|
||||||
|
+ [PKG_CHECK_MODULES([ABSL_LOG_INTERNAL_CHECK_OP], [absl_log_internal_check_op],[],
|
||||||
|
+ [AC_MSG_ERROR([Missing abseil-cpp library.])])])
|
||||||
|
+
|
||||||
|
# Start by trying to find the needed tinfo parts by pkg-config
|
||||||
|
PKG_CHECK_MODULES([TINFO], [tinfo],
|
||||||
|
[AC_DEFINE([HAVE_CURSES_H], [1], [Define to 1 if <curses.h> is present])],
|
||||||
|
diff --git a/src/frontend/Makefile.am b/src/frontend/Makefile.am
|
||||||
|
index 1aa83fd..399ecd6 100644
|
||||||
|
--- a/src/frontend/Makefile.am
|
||||||
|
+++ b/src/frontend/Makefile.am
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
AM_CPPFLAGS = -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I$(srcdir)/../network -I$(srcdir)/../crypto -I../protobufs -I$(srcdir)/../util $(TINFO_CFLAGS) $(protobuf_CFLAGS) $(CRYPTO_CFLAGS)
|
||||||
|
AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) $(HARDEN_CFLAGS) $(MISC_CXXFLAGS) $(CODE_COVERAGE_CXXFLAGS)
|
||||||
|
AM_LDFLAGS = $(HARDEN_LDFLAGS) $(CODE_COVERAGE_LIBS)
|
||||||
|
-LDADD = ../crypto/libmoshcrypto.a ../network/libmoshnetwork.a ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../util/libmoshutil.a ../protobufs/libmoshprotos.a -lm $(TINFO_LIBS) $(protobuf_LIBS) $(CRYPTO_LIBS)
|
||||||
|
+LDADD = ../crypto/libmoshcrypto.a ../network/libmoshnetwork.a ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../util/libmoshutil.a ../protobufs/libmoshprotos.a -lm $(TINFO_LIBS) $(protobuf_LIBS) $(CRYPTO_LIBS) $(ABSL_LOG_INTERNAL_CHECK_OP_LIBS)
|
||||||
|
|
||||||
|
mosh_server_LDADD = $(LDADD)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -12,9 +12,12 @@ HOMEPAGE = "http://mosh.mit.edu"
|
|||||||
LICENSE = "GPL-3.0-or-later"
|
LICENSE = "GPL-3.0-or-later"
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
||||||
|
|
||||||
DEPENDS = "protobuf-native protobuf ncurses zlib libio-pty-perl openssl libutempter"
|
DEPENDS = "protobuf-native protobuf ncurses zlib libio-pty-perl openssl libutempter abseil-cpp"
|
||||||
|
|
||||||
|
SRC_URI = "https://mosh.org/${BP}.tar.gz \
|
||||||
|
file://0001-configure.ac-add-support-of-protobuf-4.22.x.patch \
|
||||||
|
"
|
||||||
|
|
||||||
SRC_URI = "https://mosh.org/${BP}.tar.gz"
|
|
||||||
SRC_URI[sha256sum] = "872e4b134e5df29c8933dff12350785054d2fd2839b5ae6b5587b14db1465ddd"
|
SRC_URI[sha256sum] = "872e4b134e5df29c8933dff12350785054d2fd2839b5ae6b5587b14db1465ddd"
|
||||||
|
|
||||||
inherit autotools pkgconfig
|
inherit autotools pkgconfig
|
||||||
|
|||||||
Reference in New Issue
Block a user