mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
mosh: patch it the proper way.
We do have a forkpty, so let's just use that.
This commit is contained in:
@@ -11,7 +11,7 @@ and Android."
|
||||
HOMEPAGE="https://mosh.org/"
|
||||
COPYRIGHT="2012-2017 Keith Winstein"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://mosh.org/mosh-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="320e12f461e55d71566597976bd9440ba6c5265fa68fbf614c6f1c8401f93376"
|
||||
PATCHES="mosh-$portVersion.patchset"
|
||||
@@ -53,7 +53,8 @@ BUILD_PREREQUIRES="
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export LDFLAGS=-lnetwork
|
||||
export CFLAGS=-D_BSD_SOURCE
|
||||
export CXXFLAGS=-D_BSD_SOURCE
|
||||
./autogen.sh
|
||||
runConfigure ./configure --bindir=$prefix/bin --disable-hardening
|
||||
make $jobArgs
|
||||
@@ -63,3 +64,8 @@ INSTALL()
|
||||
{
|
||||
make install
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
|
||||
@@ -1,32 +1,68 @@
|
||||
From 81cecc46972ee3a10fe7c46bdee66d16cf5fa176 Mon Sep 17 00:00:00 2001
|
||||
From dbd5bd9882bf5bfe29c3ab371bdef898827a69e0 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@gmail.com>
|
||||
Date: Sun, 26 Oct 2014 22:05:31 +0100
|
||||
Subject: Fix build on Haiku.
|
||||
|
||||
- Look for socket in libnetwork
|
||||
- Look for forkpty in libbsd
|
||||
|
||||
diff --git a/src/util/pty_compat.cc b/src/util/pty_compat.cc
|
||||
index c723326..e3288fd 100644
|
||||
--- a/src/util/pty_compat.cc
|
||||
+++ b/src/util/pty_compat.cc
|
||||
@@ -39,7 +39,9 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
+#ifndef __HAIKU__
|
||||
#include <sys/stropts.h>
|
||||
+#endif
|
||||
#include <termios.h>
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a0857d3..f500a1f 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -179,7 +179,7 @@ AS_IF([test x"$with_utempter" != xno],
|
||||
|
||||
#include "pty_compat.h"
|
||||
@@ -92,7 +94,7 @@ pid_t my_forkpty( int *amaster, char *name,
|
||||
return -1;
|
||||
}
|
||||
AC_SEARCH_LIBS([compress], [z], , [AC_MSG_ERROR([Unable to find zlib.])])
|
||||
|
||||
-#ifndef _AIX
|
||||
+#if !defined(_AIX) && !defined(__HAIKU__)
|
||||
if ( ioctl(slave, I_PUSH, "ptem") < 0 ||
|
||||
ioctl(slave, I_PUSH, "ldterm") < 0 ) {
|
||||
perror( "ioctl(I_PUSH)" );
|
||||
-AC_SEARCH_LIBS([socket], [socket])
|
||||
+AC_SEARCH_LIBS([socket], [socket network])
|
||||
AC_SEARCH_LIBS([inet_addr], [nsl])
|
||||
|
||||
AC_SEARCH_LIBS([clock_gettime], [rt])
|
||||
@@ -352,10 +352,8 @@ AC_CHECK_DECL([forkpty],
|
||||
, [[#include <sys/types.h>
|
||||
#include <libutil.h>]])
|
||||
|
||||
-AC_CHECK_LIB([util], [forkpty], [
|
||||
+AC_SEARCH_LIBS([forkpty], [util bsd], [
|
||||
AC_DEFINE([HAVE_FORKPTY],, [Define if you have forkpty().])
|
||||
- LIBUTIL="-lutil"
|
||||
- AC_SUBST([LIBUTIL])
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([whether pipe2(..., O_CLOEXEC) is supported])
|
||||
--
|
||||
2.11.0
|
||||
2.12.2
|
||||
|
||||
|
||||
From ebc890544cb943ecf7045d4dfd99bc8f5131a9f7 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Sat, 8 Apr 2017 08:46:27 +0200
|
||||
Subject: Fix tests on Haiku
|
||||
|
||||
The long options to locale are not standardized by POSIX, use the short
|
||||
form, which is.
|
||||
|
||||
diff --git a/src/tests/e2e-test-subrs b/src/tests/e2e-test-subrs
|
||||
index b85938d..8ec2fad 100644
|
||||
--- a/src/tests/e2e-test-subrs
|
||||
+++ b/src/tests/e2e-test-subrs
|
||||
@@ -60,13 +60,13 @@ chr()
|
||||
set_locale()
|
||||
{
|
||||
# Test for a usable locale.
|
||||
- map=$(locale charmap 2>/dev/null)
|
||||
+ map=$(locale -m 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)"
|
||||
+ map="$(env LANG=$i locale -m 2>/dev/null)"
|
||||
if [ "$map" = "utf-8" ] || [ "$map" = "UTF-8" ]; then
|
||||
export LANG=$i LC_ALL=''
|
||||
return 0
|
||||
--
|
||||
2.12.2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user