aboutsummaryrefslogtreecommitdiffstats
path: root/main/mosh
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2017-04-02 13:53:28 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2017-04-03 08:37:51 +0200
commitf28019456300458b3bd601b187d37df0de77867d (patch)
treef200cd2e0a66cd43518a3a5fedde89bff0b566a0 /main/mosh
parentd90a508f0c203ddb3193fe35114419c6e4ca6f65 (diff)
downloadaports-f28019456300458b3bd601b187d37df0de77867d.tar.bz2
aports-f28019456300458b3bd601b187d37df0de77867d.tar.xz
main/mosh: add check function
Diffstat (limited to 'main/mosh')
-rw-r--r--main/mosh/APKBUILD19
-rw-r--r--main/mosh/disable-utf8-check.patch41
2 files changed, 45 insertions, 15 deletions
diff --git a/main/mosh/APKBUILD b/main/mosh/APKBUILD
index 386e084c37..feb923be1c 100644
--- a/main/mosh/APKBUILD
+++ b/main/mosh/APKBUILD
@@ -2,15 +2,15 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=mosh
pkgver=1.3.0
-pkgrel=1
+pkgrel=2
pkgdesc="Mobile shell surviving disconnects with local echo and line editing"
url="https://mosh.org"
arch="all"
license="GPL3+"
depends="$pkgname-client $pkgname-server"
-options="!check"
-makedepends="ncurses-dev zlib-dev libressl-dev perl-dev perl-io-tty protobuf-dev
- automake autoconf libtool"
+checkdepends="tmux perl"
+makedepends="ncurses-dev zlib-dev libressl-dev perl-dev perl-io-tty
+ protobuf-dev automake autoconf libtool"
subpackages="$pkgname-doc $pkgname-client $pkgname-server
$pkgname-bash-completion:bashcomp:noarch"
source="https://mosh.org/$pkgname-$pkgver.tar.gz
@@ -32,10 +32,17 @@ build() {
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
- --localstatedir=/var
+ --localstatedir=/var \
+ --enable-compile-warnings=error \
+ --enable-examples
make
}
+check() {
+ cd "$builddir"
+ make distcheck VERBOSE=1 V=1
+}
+
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
@@ -68,4 +75,4 @@ client() {
}
sha512sums="2b43e3e3fb2ccf6c29a889f10dfc0d5504dbca6fabaf10419f4e355e4b73d64cc1e632324e447b25ac24ee18bb88d8a9a23f9c4824b267343fb86e26e7d5c54b mosh-1.3.0.tar.gz
-3c3b60b9aa837d76e53855907c59c3b1648e3a2e166b3ec902aec117e4e56d850553a089401a3bb9901412c125d30d4dac76d204721a17286a0ddc922508f6fc disable-utf8-check.patch"
+802afc138a31155352e403e61204c552107c624cd4f1da3141a956ea68a4c652df9b02baf72397e97af032c70feb5396a4262a80d5d3762cba9afd9acf9da660 disable-utf8-check.patch"
diff --git a/main/mosh/disable-utf8-check.patch b/main/mosh/disable-utf8-check.patch
index 3d8716aa15..4cac6582cf 100644
--- a/main/mosh/disable-utf8-check.patch
+++ b/main/mosh/disable-utf8-check.patch
@@ -1,16 +1,39 @@
---- a/src/util/locale_utils.cc
-+++ b/src/util/locale_utils.cc
-@@ -86,10 +86,10 @@ const char *locale_charset( void )
-
+diff -upr mosh-1.3.0.orig/src/tests/e2e-test-subrs mosh-1.3.0/src/tests/e2e-test-subrs
+--- mosh-1.3.0.orig/src/tests/e2e-test-subrs 2017-04-02 13:48:55.002568475 +0200
++++ mosh-1.3.0/src/tests/e2e-test-subrs 2017-04-02 13:50:03.839053154 +0200
+@@ -59,19 +59,5 @@ chr()
+ # or C.UTF-8.
+ set_locale()
+ {
+- # Test for a usable locale.
+- map=$(locale charmap 2>/dev/null)
+- if [ "$map" = "utf-8" ] || [ "$map" = "UTF-8" ]; then
+- return 0
+- fi
+- # Attempt to find/set a usable locale.
+- for i in en_US.UTF-8 en_US.utf8 C.UTF-8; do
+- map="$(env LANG=$i locale charmap 2>/dev/null)"
+- if [ "$map" = "utf-8" ] || [ "$map" = "UTF-8" ]; then
+- export LANG=$i LC_ALL=''
+- return 0
+- fi
+- done
+- # Fail.
+- return 1
++ return 0
+ }
+diff -upr mosh-1.3.0.orig/src/util/locale_utils.cc mosh-1.3.0/src/util/locale_utils.cc
+--- mosh-1.3.0.orig/src/util/locale_utils.cc 2017-04-02 13:48:54.989235240 +0200
++++ mosh-1.3.0/src/util/locale_utils.cc 2017-04-02 13:49:26.675805170 +0200
+@@ -85,11 +85,6 @@ const char *locale_charset( void )
+ }
+
bool is_utf8_locale( void ) {
- /* Verify locale calls for UTF-8 */
+- /* Verify locale calls for UTF-8 */
- if ( strcmp( locale_charset(), "UTF-8" ) != 0 &&
- strcmp( locale_charset(), "utf-8" ) != 0 ) {
- return 0;
- }
-+ //if ( strcmp( locale_charset(), "UTF-8" ) != 0 &&
-+ // strcmp( locale_charset(), "utf-8" ) != 0 ) {
-+ // return 0;
-+ //}
return 1;
}
+