mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
screen: Add a recipe for latest git + my patchset
It finally decided to work, although crashes on exit if you hit a key before the 15s timeout, so there's still a bug there. make check fails currently.
This commit is contained in:
@@ -1,42 +1,44 @@
|
||||
From d4c14b8e4d524dc4514b2c0a2e552f157e562ec7 Mon Sep 17 00:00:00 2001
|
||||
From 1c70a8515a87e3d22bf03e9b2a71c04b76fb47fb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Mon, 17 Jul 2017 15:52:00 +0200
|
||||
Subject: [PATCH 1/7] add dirent.h test back to configure
|
||||
Subject: [PATCH 1/6] add dirent.h test back to configure
|
||||
|
||||
Haiku doesn't have sys/dir.h which is deprecated anyway,
|
||||
so it's better to actually use dirent.h if found.
|
||||
---
|
||||
src/configure.ac | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/configure.ac b/src/configure.ac
|
||||
index 9e46f00..0cdb199 100644
|
||||
index cad8633..3162f5d 100644
|
||||
--- a/src/configure.ac
|
||||
+++ b/src/configure.ac
|
||||
@@ -85,6 +85,9 @@ dnl
|
||||
@@ -84,6 +84,9 @@ AC_SEARCH_LIBS([openpty], [util openpty], [
|
||||
dnl
|
||||
AC_CHECK_HEADERS(langinfo.h)
|
||||
|
||||
dnl
|
||||
+dnl
|
||||
+AC_CHECK_HEADERS(dirent.h)
|
||||
+
|
||||
+dnl
|
||||
dnl
|
||||
dnl Check user changeable stuff
|
||||
dnl
|
||||
|
||||
--
|
||||
2.7.0
|
||||
2.24.1
|
||||
|
||||
|
||||
From b9a8a260fd996b540cf785ce248875a7d59756de Mon Sep 17 00:00:00 2001
|
||||
From b103f36b7832cca68b48161559000cab78f5a1fd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Mon, 17 Jul 2017 15:52:54 +0200
|
||||
Subject: [PATCH 2/7] remove hardcoded -lutil
|
||||
Subject: [PATCH 2/6] remove hardcoded -lutil
|
||||
|
||||
AC_SEARCH_LIBS prepends the found lib already.
|
||||
AC_SEARCH_LIBS prepends the found library already.
|
||||
---
|
||||
src/configure.ac | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/src/configure.ac b/src/configure.ac
|
||||
index 0cdb199..069c261 100644
|
||||
index 3162f5d..afc0c00 100644
|
||||
--- a/src/configure.ac
|
||||
+++ b/src/configure.ac
|
||||
@@ -76,7 +76,6 @@ dnl
|
||||
@@ -48,13 +50,13 @@ index 0cdb199..069c261 100644
|
||||
AC_MSG_ERROR([unable to find openpty() function])
|
||||
])
|
||||
--
|
||||
2.7.0
|
||||
2.24.1
|
||||
|
||||
|
||||
From d5b66363fd030051f9d9fe2609f513df5647db5c Mon Sep 17 00:00:00 2001
|
||||
From 2d2f2601287d2e25f3abed3fdeb207ba88fe647e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Mon, 17 Jul 2017 15:53:45 +0200
|
||||
Subject: [PATCH 3/7] fix mismatched types in prototype
|
||||
Subject: [PATCH 3/6] fix mismatched types in prototype
|
||||
|
||||
not everyone defines pid_t as int...
|
||||
---
|
||||
@@ -63,10 +65,10 @@ not everyone defines pid_t as int...
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/display.h b/src/display.h
|
||||
index 967585c..d29abad 100644
|
||||
index 1e257d6..0caaca1 100644
|
||||
--- a/src/display.h
|
||||
+++ b/src/display.h
|
||||
@@ -307,7 +307,7 @@ do \
|
||||
@@ -317,7 +317,7 @@ do \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
@@ -76,10 +78,10 @@ index 967585c..d29abad 100644
|
||||
void DefProcess (char **, size_t *);
|
||||
void DefRedisplayLine (int, int, int, int);
|
||||
diff --git a/src/screen.h b/src/screen.h
|
||||
index 1dd4fb2..b1cd577 100644
|
||||
index 63ac662..5f6f373 100644
|
||||
--- a/src/screen.h
|
||||
+++ b/src/screen.h
|
||||
@@ -220,7 +220,7 @@ void SigHup (int);
|
||||
@@ -221,7 +221,7 @@ void SigHup (int);
|
||||
void eexit (int) __attribute__((__noreturn__));
|
||||
void Detach (int);
|
||||
void Hangup (void);
|
||||
@@ -89,22 +91,22 @@ index 1dd4fb2..b1cd577 100644
|
||||
void Panic (int, const char *, ...) __attribute__((format(printf, 2, 3))) __attribute__((__noreturn__));
|
||||
void QueryMsg (int, const char *, ...) __attribute__((format(printf, 2, 3)));
|
||||
--
|
||||
2.7.0
|
||||
2.24.1
|
||||
|
||||
|
||||
From 2242916e8c18e6883f1a8d0a1bb98188314e50d5 Mon Sep 17 00:00:00 2001
|
||||
From a29dad2c3ef21c1f359007f1c0a15d339a3c868f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Fri, 20 Jun 2014 17:16:37 +0200
|
||||
Subject: [PATCH 4/7] Haiku port: Check for some libraries
|
||||
Subject: [PATCH 4/6] Haiku port: Check for some libraries
|
||||
|
||||
* libnetwork for sockets,
|
||||
* libbsd for getpass.
|
||||
* libbsd for getpass and openpty.
|
||||
---
|
||||
src/configure.ac | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/configure.ac b/src/configure.ac
|
||||
index 069c261..dd22c1b 100644
|
||||
index afc0c00..b71c400 100644
|
||||
--- a/src/configure.ac
|
||||
+++ b/src/configure.ac
|
||||
@@ -74,7 +74,7 @@ AC_SEARCH_LIBS([crypt], [crypt], [], [
|
||||
@@ -128,13 +130,13 @@ index 069c261..dd22c1b 100644
|
||||
AS_IF([test "x$with_pty_rofs" == "xyes"], [
|
||||
AC_DEFINE(PTY_ROFS)
|
||||
--
|
||||
2.7.0
|
||||
2.24.1
|
||||
|
||||
|
||||
From db40947a2526d8be1fd83ec6fa3165b3ca48fdaf Mon Sep 17 00:00:00 2001
|
||||
From b991405aad21cd100d66f14d741c7c8b998f5764 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Thu, 24 Sep 2015 01:30:00 +0200
|
||||
Subject: [PATCH 5/7] Haiku port: temporary workaround undefined TIOCCONS
|
||||
Subject: [PATCH 5/6] Haiku port: temporary workaround undefined TIOCCONS
|
||||
|
||||
We should either implement it or do something else, really.
|
||||
---
|
||||
@@ -142,10 +144,10 @@ We should either implement it or do something else, really.
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/tty.c b/src/tty.c
|
||||
index cd4acb9..9258348 100644
|
||||
index de5b8cd..b255aca 100644
|
||||
--- a/src/tty.c
|
||||
+++ b/src/tty.c
|
||||
@@ -830,8 +830,10 @@ int TtyGrabConsole(int fd, bool on, char *rc_name)
|
||||
@@ -867,8 +867,10 @@ int TtyGrabConsole(int fd, bool on, char *rc_name)
|
||||
InitTTY(&new1, 0);
|
||||
SetMode(&new1, &new2, 0, 0);
|
||||
SetTTY(consredirfd[1], &new2);
|
||||
@@ -157,13 +159,13 @@ index cd4acb9..9258348 100644
|
||||
Msg(errno, "%s: ioctl TIOCCONS failed", rc_name);
|
||||
close(consredirfd[0]);
|
||||
--
|
||||
2.7.0
|
||||
2.24.1
|
||||
|
||||
|
||||
From 7d985ccce374ad4a21a4f3b1acc6dd7268f1dc7a Mon Sep 17 00:00:00 2001
|
||||
From cea265c1e630c0f55f6ee86fbebe52e9407d6ba8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Thu, 24 Sep 2015 01:30:42 +0200
|
||||
Subject: [PATCH 6/7] define _NSIG as NSIG if not defined
|
||||
Subject: [PATCH 6/6] define _NSIG as NSIG if not defined
|
||||
|
||||
Neither seem to be part of POSIX, btw.
|
||||
---
|
||||
@@ -171,7 +173,7 @@ Neither seem to be part of POSIX, btw.
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/attacher.c b/src/attacher.c
|
||||
index 684f56b..46638ab 100644
|
||||
index d8de9d4..fe8ec40 100644
|
||||
--- a/src/attacher.c
|
||||
+++ b/src/attacher.c
|
||||
@@ -45,6 +45,10 @@
|
||||
@@ -186,49 +188,5 @@ index 684f56b..46638ab 100644
|
||||
#include "socket.h"
|
||||
#include "tty.h"
|
||||
--
|
||||
2.7.0
|
||||
|
||||
|
||||
From 0754ddf08ae65591b2236ab8441fcef16376e533 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Thu, 24 Sep 2015 01:34:32 +0200
|
||||
Subject: [PATCH 7/7] sched: actually calculate the nfds arg to select
|
||||
|
||||
Some select() implementations don't like being called with
|
||||
higher nfds than actually set in the masks.
|
||||
---
|
||||
src/sched.c | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/sched.c b/src/sched.c
|
||||
index bd0048f..a1dea95 100644
|
||||
--- a/src/sched.c
|
||||
+++ b/src/sched.c
|
||||
@@ -107,6 +107,7 @@ void sched()
|
||||
Event *timeoutev = 0;
|
||||
struct timeval timeout;
|
||||
int nsel;
|
||||
+ int nfds;
|
||||
|
||||
for (;;) {
|
||||
if (calctimeout)
|
||||
@@ -138,7 +139,15 @@ void sched()
|
||||
FD_SET(ev->fd, &w);
|
||||
}
|
||||
|
||||
- nsel = select(FD_SETSIZE, &r, &w, (fd_set *) 0, timeoutev ? &timeout : (struct timeval *)0);
|
||||
+ nfds = 1;
|
||||
+ for (nsel = 0; nsel < FD_SETSIZE; nsel++)
|
||||
+ if (FD_ISSET(nsel, &r))
|
||||
+ nfds = MAX(nfds, nsel + 1);
|
||||
+ for (nsel = 0; nsel < FD_SETSIZE; nsel++)
|
||||
+ if (FD_ISSET(nsel, &w))
|
||||
+ nfds = MAX(nfds, nsel + 1);
|
||||
+
|
||||
+ nsel = select(nfds, &r, &w, (fd_set *) 0, timeoutev ? &timeout : (struct timeval *)0);
|
||||
if (nsel < 0) {
|
||||
if (errno != EINTR) {
|
||||
Panic(errno, "select");
|
||||
--
|
||||
2.7.0
|
||||
2.24.1
|
||||
|
||||
@@ -29,15 +29,17 @@ COPYRIGHT="2010 Juergen Weigert, Sadrul Habib Chowdhury
|
||||
1987 Oliver Laumann"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="2"
|
||||
SOURCE_URI="git://git.savannah.gnu.org/screen.git#bb1ef155222d2c5706f30b6b0fe078a501932dd5"
|
||||
PATCHES="screen-4.2.1_git.patchset"
|
||||
SOURCE_URI="git://git.savannah.gnu.org/screen.git#9bf0a785ca8662e83fd3af425c661a984931e630"
|
||||
#SOURCE_DIR="screen.git"
|
||||
PATCHES="screen-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86"
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="?x86_gcc2 x86"
|
||||
|
||||
PROVIDES="
|
||||
screen$secondaryArchSuffix = $portVersion
|
||||
cmd:screen = $portVersion
|
||||
cmd:screen_${portVersion%~*} = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
@@ -46,7 +48,7 @@ REQUIRES="
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libncurses$secondaryArchSuffix >= 5.9
|
||||
devel:libncurses$secondaryArchSuffix >= 6
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
@@ -59,9 +61,11 @@ BUILD_PREREQUIRES="
|
||||
BUILD()
|
||||
{
|
||||
cd src
|
||||
./autogen.sh ...
|
||||
runConfigure ./configure
|
||||
make
|
||||
./autogen.sh
|
||||
runConfigure ./configure \
|
||||
--enable-socket-dir=`finddir B_SYSTEM_VAR_DIRECTORY`/screen \
|
||||
--enable-pam=no
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
@@ -69,3 +73,8 @@ INSTALL()
|
||||
cd src
|
||||
make install
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
Reference in New Issue
Block a user