Add ptyfs support based on the one in emacs24; from Anon.
Bump PKGREVISION.
This commit is contained in:
parent
b49dbc33b1
commit
afad6926e5
5 changed files with 95 additions and 19 deletions
|
@ -1,6 +1,6 @@
|
|||
# $NetBSD: Makefile,v 1.32 2014/05/31 15:56:26 wiz Exp $
|
||||
# $NetBSD: Makefile,v 1.33 2015/02/19 14:18:52 wiz Exp $
|
||||
|
||||
PKGREVISION= 31
|
||||
PKGREVISION= 32
|
||||
CATEGORIES= editors
|
||||
|
||||
CONFLICTS+= emacs21-nox11-[0-9]*
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
$NetBSD: distinfo,v 1.17 2015/01/06 17:45:46 wiz Exp $
|
||||
$NetBSD: distinfo,v 1.18 2015/02/19 14:18:52 wiz Exp $
|
||||
|
||||
SHA1 (emacs-21.4a.tar.gz) = cdb33731180fe4a912838af805dd35e3f55394d4
|
||||
RMD160 (emacs-21.4a.tar.gz) = c312e739935b56d08783bbfe97992297a363cb8a
|
||||
Size (emacs-21.4a.tar.gz) = 20403483 bytes
|
||||
SHA1 (patch-aa) = fee6fe91fb9a2f75300903cc5c6e023bb8de6be5
|
||||
SHA1 (patch-ab) = 3a435a126d8ef849a9e04f13343207cb8e55c6d7
|
||||
SHA1 (patch-ab) = 884b8fe5643b06340948c1f10b7c5d643fad2bf6
|
||||
SHA1 (patch-ac) = a2de7619fece50cb42b0e23b1651b5bf742ff69a
|
||||
SHA1 (patch-ad) = 39a11bc214ae3d2f9d634c30b196a46d473ab92f
|
||||
SHA1 (patch-ae) = e2b66b23efb90608470aef5ebd0c75e27bcd6b55
|
||||
SHA1 (patch-af) = 821e0c3cce819ce11f393ce5f498f13d652e4d94
|
||||
SHA1 (patch-ag) = 3d64c0d53e3a8a737eeb04a6080a92a826b73620
|
||||
SHA1 (patch-ag) = 86fa9384abfb6c0c23119cf8a7709415a488f517
|
||||
SHA1 (patch-ah) = 6cd1b122b370ee7110e096088a132cd420356714
|
||||
SHA1 (patch-ai) = 20fb931d649a55ae7ee6eb27ec5ba7cc938db0f7
|
||||
SHA1 (patch-aj) = 7f28335b3da583e5cef9e527cd1f9d4b0d92faa7
|
||||
|
@ -35,4 +35,4 @@ SHA1 (patch-bg) = 567ccce83e2b6d898a87f20763d5ff4b19c30deb
|
|||
SHA1 (patch-cf) = 1b5b83eb02872414fd7ca29c344c0560feaf1b7e
|
||||
SHA1 (patch-src_Makefile.in) = cecef2516c4b9a4171926080a32826fad92ea077
|
||||
SHA1 (patch-src_alloc_c) = c9d2c7832b8b48835b81789f938540e3827f7cd8
|
||||
SHA1 (patch-xx) = cf1cb21e0bd96202622ff54e39d202bdae78c942
|
||||
SHA1 (patch-xx) = 6e5b55c1738c4e8ef58e45065b55629ec26c9b91
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: patch-ab,v 1.6 2015/01/06 17:45:46 wiz Exp $
|
||||
$NetBSD: patch-ab,v 1.7 2015/02/19 14:18:52 wiz Exp $
|
||||
|
||||
Caution: the extra cpp checking (the three hunks containing "Should be
|
||||
one line") is manually hacked and not reflected in configure.in; do
|
||||
|
@ -10,7 +10,7 @@ started doing regrettable things with backslash-escaped newlines.
|
|||
results syntax error. Use -traditional-cpp for Makefile generation only.
|
||||
|
||||
--- configure.orig 2003-03-18 09:19:12.000000000 -0500
|
||||
+++ configure 2015-01-05 04:09:09.000000000 -0500
|
||||
+++ configure 2015-02-16 21:19:13.000000000 -0500
|
||||
@@ -821,10 +821,18 @@ case "${canonical}" in
|
||||
powerpc-*-netbsd*) machine=macppc ;;
|
||||
sparc*-*-netbsd*) machine=sparc ;;
|
||||
|
@ -152,7 +152,7 @@ started doing regrettable things with backslash-escaped newlines.
|
|||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
@@ -9124,6 +9148,22 @@ EOF
|
||||
@@ -9124,6 +9148,60 @@ EOF
|
||||
fi
|
||||
|
||||
|
||||
|
@ -171,11 +171,49 @@ started doing regrettable things with backslash-escaped newlines.
|
|||
+
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
+# XXX: handcoded test for ptyfs
|
||||
+echo $ac_n "checking for ptyfs""... $ac_c" 1>&6
|
||||
+echo "configure:9095: checking for ptyfs" >&5
|
||||
+cat > conftest.$ac_ext <<EOF
|
||||
+#include "confdefs.h"
|
||||
+#include <stdlib.h>
|
||||
+#include <fcntl.h>
|
||||
+
|
||||
+int
|
||||
+main(void)
|
||||
+{
|
||||
+ int fd;
|
||||
+
|
||||
+ fd = posix_openpt(O_RDWR);
|
||||
+ if (fd == -1)
|
||||
+ return 1;
|
||||
+ close(fd);
|
||||
+ return 0;
|
||||
+}
|
||||
+EOF
|
||||
+if { (eval echo configure:9185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
+then
|
||||
+ ac_cv_have_ptyfs=yes
|
||||
+else
|
||||
+ echo "configure: failed program was:" >&5
|
||||
+ cat conftest.$ac_ext >&5
|
||||
+ rm -fr conftest*
|
||||
+ ac_cv_have_ptyfs=no
|
||||
+fi
|
||||
+rm -fr conftest*
|
||||
+
|
||||
+echo "$ac_t""$ac_cv_have_ptyfs" 1>&6
|
||||
+if test $ac_cv_have_ptyfs = yes; then
|
||||
+ cat >> confdefs.h <<\EOF
|
||||
+#define HAVE_PTYFS 1
|
||||
+EOF
|
||||
+fi
|
||||
+
|
||||
# Set up the CFLAGS for real compilation, so we can substitute it.
|
||||
CFLAGS="$REAL_CFLAGS"
|
||||
CPPFLAGS="$REAL_CPPFLAGS"
|
||||
@@ -9735,7 +9777,7 @@ echo creating lib-src/Makefile
|
||||
@@ -9735,7 +9813,7 @@ echo creating lib-src/Makefile
|
||||
sed -e '1,/start of cpp stuff/d'\
|
||||
-e 's,/\*\*/#\(.*\)$,/* \1 */,' \
|
||||
< Makefile.c > junk.c
|
||||
|
@ -184,7 +222,7 @@ started doing regrettable things with backslash-escaped newlines.
|
|||
sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c
|
||||
cat junk1.c junk2.c > Makefile.new
|
||||
rm -f junk.c junk1.c junk2.c
|
||||
@@ -9751,7 +9793,7 @@ echo creating src/Makefile
|
||||
@@ -9751,7 +9829,7 @@ echo creating src/Makefile
|
||||
sed -e '1,/start of cpp stuff/d'\
|
||||
-e 's,/\*\*/#\(.*\)$,/* \1 */,' \
|
||||
< Makefile.c > junk.c
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
$NetBSD: patch-ag,v 1.1 2007/06/11 13:38:35 markd Exp $
|
||||
$NetBSD: patch-ag,v 1.2 2015/02/19 14:18:52 wiz Exp $
|
||||
|
||||
--- src/config.in.orig Tue Jul 9 07:23:31 2002
|
||||
+++ src/config.in
|
||||
@@ -354,6 +354,12 @@ Boston, MA 02111-1307, USA. */
|
||||
--- src/config.in.orig 2002-07-08 18:23:31.000000000 -0400
|
||||
+++ src/config.in 2015-02-16 15:52:16.000000000 -0500
|
||||
@@ -354,6 +354,15 @@ Boston, MA 02111-1307, USA. */
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
|
@ -11,6 +11,9 @@ $NetBSD: patch-ag,v 1.1 2007/06/11 13:38:35 markd Exp $
|
|||
+ or it won't boot. */
|
||||
+#undef HAVE_NETBSD_CRTI
|
||||
+#undef HAVE_NETBSD_CRTN
|
||||
+
|
||||
+/* Define if your system supports ptyfs. */
|
||||
+#undef HAVE_PTYFS
|
||||
+
|
||||
#undef EMACS_CONFIGURATION
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
$NetBSD: patch-xx,v 1.3 2007/06/11 13:38:44 markd Exp $
|
||||
$NetBSD: patch-xx,v 1.4 2015/02/19 14:18:52 wiz Exp $
|
||||
|
||||
--- src/s/netbsd.h.orig 2002-05-31 18:29:02.000000000 +0200
|
||||
+++ src/s/netbsd.h
|
||||
--- src/s/netbsd.h.orig 2002-05-31 12:29:02.000000000 -0400
|
||||
+++ src/s/netbsd.h 2015-02-16 18:13:17.000000000 -0500
|
||||
@@ -60,9 +60,17 @@
|
||||
#endif /* not NO_SHARED_LIBS and not ELF */
|
||||
|
||||
|
@ -20,7 +20,7 @@ $NetBSD: patch-xx,v 1.3 2007/06/11 13:38:44 markd Exp $
|
|||
#undef LIB_GCC
|
||||
#define LIB_GCC
|
||||
#endif
|
||||
@@ -123,3 +131,7 @@
|
||||
@@ -123,3 +131,42 @@
|
||||
|
||||
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
|
||||
|
||||
|
@ -28,3 +28,38 @@ $NetBSD: patch-xx,v 1.3 2007/06/11 13:38:44 markd Exp $
|
|||
+ of sigblock says it is obsolete. */
|
||||
+
|
||||
+#define POSIX_SIGNALS 1
|
||||
+
|
||||
+#ifdef HAVE_PTYFS /* Support ptyfs */
|
||||
+
|
||||
+/* How to iterate over PTYs. */
|
||||
+#define PTY_ITERATION for (i = 0; i < 1; i++)
|
||||
+
|
||||
+/* How to get the device name of the control end of a PTY, if non-standard. */
|
||||
+#define PTY_NAME_SPRINTF /**/
|
||||
+
|
||||
+/* How to open a PTY, if non-standard. */
|
||||
+#define PTY_OPEN { \
|
||||
+ fd = posix_openpt(O_RDWR | O_CLOEXEC | O_NOCTTY); \
|
||||
+ if (fd < 0 && errno == EINVAL) \
|
||||
+ fd = posix_openpt(O_RDWR | O_NOCTTY); \
|
||||
+}
|
||||
+
|
||||
+/* How to get device name of the tty end of a PTY, if non-standard. */
|
||||
+#define PTY_TTY_NAME_SPRINTF { \
|
||||
+ char *ptyname = NULL; \
|
||||
+ sigset_t blocked; \
|
||||
+ \
|
||||
+ sigemptyset (&blocked); \
|
||||
+ sigaddset(&blocked, SIGCHLD); \
|
||||
+ pthread_sigmask(SIG_BLOCK, &blocked, 0); \
|
||||
+ if (grantpt(fd) != -1 && unlockpt(fd) != -1) \
|
||||
+ ptyname = ptsname(fd); \
|
||||
+ pthread_sigmask(SIG_UNBLOCK, &blocked, 0); \
|
||||
+ if (!ptyname) { \
|
||||
+ emacs_close(fd); \
|
||||
+ return -1; \
|
||||
+ } \
|
||||
+ snprintf(pty_name, sizeof(pty_name), "%s", ptyname); \
|
||||
+}
|
||||
+
|
||||
+#endif /* HAVE_PTYFS */
|
||||
|
|
Loading…
Reference in a new issue