summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-connectivity/mosh/mosh/0001-configure.ac-add-support-of-protobuf-4.22.x.patch63
-rw-r--r--meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb7
2 files changed, 68 insertions, 2 deletions
diff --git a/meta-oe/recipes-connectivity/mosh/mosh/0001-configure.ac-add-support-of-protobuf-4.22.x.patch b/meta-oe/recipes-connectivity/mosh/mosh/0001-configure.ac-add-support-of-protobuf-4.22.x.patch
new file mode 100644
index 0000000000..088124391c
--- /dev/null
+++ b/meta-oe/recipes-connectivity/mosh/mosh/0001-configure.ac-add-support-of-protobuf-4.22.x.patch
@@ -0,0 +1,63 @@
1From d9a1a6aac5a3b270449d09ec0d2a556807ab9287 Mon Sep 17 00:00:00 2001
2From: Xiangyu Chen <xiangyu.chen@windriver.com>
3Date: Wed, 29 Mar 2023 13:53:44 +0800
4Subject: [PATCH] configure.ac: add support of protobuf 4.22.x
5
6the protobuf 4.22x is using c++14 as default, this caused the mosh cannot compile anymore and report following error:
7
8....
9/usr/include/google/protobuf/port_def.inc:200:15: error: static assertion failed: Protobuf only supports C++14 and newer.
10| 200 | static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and newer.");
11| | ^~~~~~~~~~~~~~~~~~~~~~
12....
13
14Upstream-Status: Pending [https://github.com/mobile-shell/mosh/pull/1266]
15
16Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
17---
18 configure.ac | 8 ++++++++
19 src/frontend/Makefile.am | 2 +-
20 2 files changed, 9 insertions(+), 1 deletion(-)
21
22diff --git a/configure.ac b/configure.ac
23index ee70c7b..5457009 100644
24--- a/configure.ac
25+++ b/configure.ac
26@@ -26,6 +26,10 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
27 AS_IF([pkg-config --atleast-version 3.6.0 protobuf],
28 [AX_CXX_COMPILE_STDCXX([11])])
29
30+# If current protobuf 4.22+ update the requires to C++14.
31+AS_IF([pkg-config --atleast-version 4.22.0 protobuf],
32+ [AX_CXX_COMPILE_STDCXX([14])])
33+
34 WARNING_CXXFLAGS=""
35 PICKY_CXXFLAGS=""
36 DISTCHECK_CXXFLAGS=""
37@@ -311,6 +315,10 @@ AC_CHECK_FUNCS(m4_normalize([
38 pledge
39 ]))
40
41+AS_IF([pkg-config --atleast-version 4.22.0 protobuf],
42+ [PKG_CHECK_MODULES([ABSL_LOG_INTERNAL_CHECK_OP], [absl_log_internal_check_op],[],
43+ [AC_MSG_ERROR([Missing abseil-cpp library.])])])
44+
45 # Start by trying to find the needed tinfo parts by pkg-config
46 PKG_CHECK_MODULES([TINFO], [tinfo],
47 [AC_DEFINE([HAVE_CURSES_H], [1], [Define to 1 if <curses.h> is present])],
48diff --git a/src/frontend/Makefile.am b/src/frontend/Makefile.am
49index 1aa83fd..399ecd6 100644
50--- a/src/frontend/Makefile.am
51+++ b/src/frontend/Makefile.am
52@@ -1,7 +1,7 @@
53 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)
54 AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) $(HARDEN_CFLAGS) $(MISC_CXXFLAGS) $(CODE_COVERAGE_CXXFLAGS)
55 AM_LDFLAGS = $(HARDEN_LDFLAGS) $(CODE_COVERAGE_LIBS)
56-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)
57+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)
58
59 mosh_server_LDADD = $(LDADD)
60
61--
622.34.1
63
diff --git a/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb b/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb
index 2869e06336..0ee050da99 100644
--- a/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb
+++ b/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb
@@ -12,9 +12,12 @@ HOMEPAGE = "http://mosh.mit.edu"
12LICENSE = "GPL-3.0-or-later" 12LICENSE = "GPL-3.0-or-later"
13LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" 13LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
14 14
15DEPENDS = "protobuf-native protobuf ncurses zlib libio-pty-perl openssl libutempter" 15DEPENDS = "protobuf-native protobuf ncurses zlib libio-pty-perl openssl libutempter abseil-cpp"
16
17SRC_URI = "https://mosh.org/${BP}.tar.gz \
18 file://0001-configure.ac-add-support-of-protobuf-4.22.x.patch \
19 "
16 20
17SRC_URI = "https://mosh.org/${BP}.tar.gz"
18SRC_URI[sha256sum] = "872e4b134e5df29c8933dff12350785054d2fd2839b5ae6b5587b14db1465ddd" 21SRC_URI[sha256sum] = "872e4b134e5df29c8933dff12350785054d2fd2839b5ae6b5587b14db1465ddd"
19 22
20inherit autotools pkgconfig 23inherit autotools pkgconfig