From a36838626e4ae2625e12bc3d6665a6a4dc68d1fb Mon Sep 17 00:00:00 2001 From: hgy59 Date: Thu, 28 Oct 2021 23:53:19 +0200 Subject: [PATCH] Mosh: add libutempter (#4667) * added libutempter mosh now builds against libutempter, this is a requirement for adding support for displaying detached sessions. * updated libutempter to 1.1.6 * libutempter: fixed helper binary so that it runs under DSM * update libutempter to 1.2.1 - redesign an rename patch - avoid libutempter_post_patch * fix bild of cross/protobuf for DSM7 * mosh: fix build with utempter * cpp code optimization * Add Perl dependency for advanced customization and scripting * update changelog * remove duplicate definition Co-authored-by: Adrian Carpenter Co-authored-by: Yves Martin --- cross/libutempter/Makefile | 16 +++++++++++++++ cross/libutempter/PLIST | 3 +++ cross/libutempter/digests | 3 +++ .../001-Makefile-configurable-prefix.patch | 20 +++++++++++++++++++ cross/mosh/Makefile | 4 ++-- cross/protobuf/Makefile | 7 +++++++ spk/mosh/Makefile | 8 ++++++-- 7 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 cross/libutempter/Makefile create mode 100644 cross/libutempter/PLIST create mode 100644 cross/libutempter/digests create mode 100644 cross/libutempter/patches/001-Makefile-configurable-prefix.patch diff --git a/cross/libutempter/Makefile b/cross/libutempter/Makefile new file mode 100644 index 00000000000..b7de422f448 --- /dev/null +++ b/cross/libutempter/Makefile @@ -0,0 +1,16 @@ +PKG_NAME = libutempter +PKG_VERS = 1.2.1 +PKG_EXT = tar.gz +PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) +PKG_DIST_SITE = ftp://ftp.altlinux.org/pub/people/ldv/utempter/ +PKG_DIR = $(PKG_NAME)-$(PKG_VERS) + +DEPENDS = + +HOMEPAGE = http://freshmeat.sourceforge.net/projects/libutempter +COMMENT = libutempter provides a library interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files. +LICENSE = LGPLv2 + +CONFIGURE_TARGET = nop + +include ../../mk/spksrc.cross-cc.mk diff --git a/cross/libutempter/PLIST b/cross/libutempter/PLIST new file mode 100644 index 00000000000..0a6dce80e5b --- /dev/null +++ b/cross/libutempter/PLIST @@ -0,0 +1,3 @@ +lnk:lib/libutempter.so +lnk:lib/libutempter.so.0 +lib:lib/libutempter.so.1.2.1 diff --git a/cross/libutempter/digests b/cross/libutempter/digests new file mode 100644 index 00000000000..54e6fa64274 --- /dev/null +++ b/cross/libutempter/digests @@ -0,0 +1,3 @@ +libutempter-1.2.1.tar.gz SHA1 f5787a80e87619ec2b45e7e2aadb8c20be55f099 +libutempter-1.2.1.tar.gz SHA256 967fef372f391de501843ad87570c6cf5dabd9651f00f1783090fbc12b2a34cb +libutempter-1.2.1.tar.gz MD5 afe828ce87262d7e043770553004e162 diff --git a/cross/libutempter/patches/001-Makefile-configurable-prefix.patch b/cross/libutempter/patches/001-Makefile-configurable-prefix.patch new file mode 100644 index 00000000000..3e99f300a28 --- /dev/null +++ b/cross/libutempter/patches/001-Makefile-configurable-prefix.patch @@ -0,0 +1,20 @@ +# make prefix configurable +# +--- Makefile.orig 2020-07-06 08:00:00.000000000 +0000 ++++ Makefile 2021-05-16 23:32:38.309124941 +0000 +@@ -30,10 +30,11 @@ + TARGETS = $(PROJECT) $(SHAREDLIB) $(STATICLIB) + + INSTALL = install +-libdir = /usr/lib +-libexecdir = /usr/lib +-includedir = /usr/include +-mandir = /usr/share/man ++prefix ?= /usr ++libdir = $(prefix)/lib ++libexecdir = $(prefix)/lib ++includedir = $(prefix)/include ++mandir = $(prefix)/share/man + man3dir = $(mandir)/man3 + DESTDIR = + diff --git a/cross/mosh/Makefile b/cross/mosh/Makefile index ecebec88f4b..7e9aa0bfac4 100644 --- a/cross/mosh/Makefile +++ b/cross/mosh/Makefile @@ -5,8 +5,7 @@ PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://github.com/mobile-shell/mosh/releases/download/$(PKG_NAME)-$(PKG_VERS) PKG_DIR = $(PKG_NAME)-$(PKG_VERS) -BUILD_DEPENDS = native/protoc -DEPENDS = cross/zlib cross/openssl cross/protobuf cross/ncurses +DEPENDS = cross/zlib cross/openssl cross/protobuf cross/ncurses cross/libutempter HOMEPAGE = https://mosh.org COMMENT = Mosh: the mobile shell @@ -15,6 +14,7 @@ LICENSE = GPLv3+ GNU_CONFIGURE = 1 # avoid warning: _FORTIFY_SOURCE requires compiling with optimization (-O) ADDITIONAL_CPPFLAGS = -O2 +CONFIGURE_ARGS += --with-utempter include ../../mk/spksrc.cross-cc.mk diff --git a/cross/protobuf/Makefile b/cross/protobuf/Makefile index f2bd42114c8..42e3376c0c4 100644 --- a/cross/protobuf/Makefile +++ b/cross/protobuf/Makefile @@ -17,6 +17,13 @@ CONFIGURE_ARGS = cross_compiling=yes --with-protoc=$(NATIVE_PROTOC) PRE_COMPILE_TARGET = protobuf_pre_compile + +include ../../mk/spksrc.common.mk +ifeq ($(call version_ge, ${TCVERSION}, 7.0),1) +# fix compilation with newer compilers +ADDITIONAL_CXXFLAGS = -D_GLIBCXX_USE_C99_MATH=1 +endif + include ../../mk/spksrc.cross-cc.mk .PHONY: protobuf_pre_compile diff --git a/spk/mosh/Makefile b/spk/mosh/Makefile index 4007d641a2e..9ce5e62c741 100644 --- a/spk/mosh/Makefile +++ b/spk/mosh/Makefile @@ -1,14 +1,18 @@ SPK_NAME = mosh SPK_VERS = 1.3.2 -SPK_REV = 1 +SPK_REV = 2 SPK_ICON = src/mosh.png DEPENDS = cross/$(SPK_NAME) +SPK_DEPENDS = "Perl>=5.14" + MAINTAINER = SynoCommunity -DESCRIPTION = Mosh: the mobile shell +DESCRIPTION = mosh, the mobile shell is a remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes. Mosh is a replacement for interactive SSH terminals. It's more robust and responsive, especially over Wi-Fi, cellular, and long-distance links. + DISPLAY_NAME = mosh STARTABLE = no +CHANGELOG = "1. Add libutempter to show detached sessions.
2. Update openssl to v1.1.1l.
3. Add Perl dependency for advanced customization and scripting." HOMEPAGE = https://mosh.org LICENSE = GPLv3+