summaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorhans <hans@pkgsrc.org>2012-02-16 18:00:20 +0000
committerhans <hans@pkgsrc.org>2012-02-16 18:00:20 +0000
commitc95fc8aefd4418ebcf58b8c61efe51f8ab9f0aa6 (patch)
tree1e6b1d531eddaa3ebe736f763abfb55339918378 /comms
parent705bbd10fc1849f39ae801bc5f3bc88b69a5a255 (diff)
downloadpkgsrc-c95fc8aefd4418ebcf58b8c61efe51f8ab9f0aa6.tar.gz
Fix build on SunOS.
Diffstat (limited to 'comms')
-rw-r--r--comms/xtel/Makefile7
-rw-r--r--comms/xtel/distinfo9
-rw-r--r--comms/xtel/patches/patch-Xsra_SelFile.c30
-rw-r--r--comms/xtel/patches/patch-mdmdetect.c22
-rw-r--r--comms/xtel/patches/patch-modem.c27
-rw-r--r--comms/xtel/patches/patch-procedure.c22
-rw-r--r--comms/xtel/patches/patch-teleinfo.c33
-rw-r--r--comms/xtel/patches/patch-xaw.c13
-rw-r--r--comms/xtel/patches/patch-xteld.c13
9 files changed, 174 insertions, 2 deletions
diff --git a/comms/xtel/Makefile b/comms/xtel/Makefile
index 32873bc7364..490d6f049df 100644
--- a/comms/xtel/Makefile
+++ b/comms/xtel/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.24 2011/10/09 03:53:31 dholland Exp $
+# $NetBSD: Makefile,v 1.25 2012/02/16 18:00:20 hans Exp $
#
DISTNAME= xtel-3.3.0
@@ -36,6 +36,11 @@ INSTALL_MAKE_FLAGS= PPPDIR=${PREFIX}/share/examples/xtel
SPECIAL_PERMS+= bin/mdmdetect ${SETUID_ROOT_PERMS}
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "SunOS"
+BUILDLINK_TRANSFORM+= rm:-lucb
+.endif
+
.include "../../mk/jpeg.buildlink3.mk"
.include "../../x11/libXaw/buildlink3.mk"
.include "../../x11/libXpm/buildlink3.mk"
diff --git a/comms/xtel/distinfo b/comms/xtel/distinfo
index 41ca4cfe96c..19bfa91d277 100644
--- a/comms/xtel/distinfo
+++ b/comms/xtel/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2011/10/09 03:35:26 dholland Exp $
+$NetBSD: distinfo,v 1.8 2012/02/16 18:00:20 hans Exp $
SHA1 (xtel-3.3.0.tar.gz) = 7ee5a5afa20bea46e08c346605c53cdd32d69dc9
RMD160 (xtel-3.3.0.tar.gz) = 0ba51e9129b24db33ac96cff23ffc88d3f13b653
@@ -6,6 +6,13 @@ Size (xtel-3.3.0.tar.gz) = 309426 bytes
SHA1 (xtel-jumbo-patch-20111008.gz) = 868afb6a47402ae4eb819fed5509733b4fafebca
RMD160 (xtel-jumbo-patch-20111008.gz) = 4f23535a9c93347aa45dce8959e3e6aea6e3957c
Size (xtel-jumbo-patch-20111008.gz) = 43856 bytes
+SHA1 (patch-Xsra_SelFile.c) = f0e9847f2d2793fdc8cbd15ca3c5b1778cde6a40
SHA1 (patch-ab) = 991cd916bbb4c20c71214d4d74a43736940fd5ce
SHA1 (patch-ae) = 38a846ba1ece5f4267771a062d9691f24057b4e1
SHA1 (patch-ai) = 7ee6020f7cbf0f53be43c8aa264958fc1cab6322
+SHA1 (patch-mdmdetect.c) = 02a1ee23571b629939b5da7016a33b60180fb49a
+SHA1 (patch-modem.c) = 7349bdcd853a7357ead7b2447e96c64fae457428
+SHA1 (patch-procedure.c) = d5e1016f52ee28754f646ea58a06537ca98bdb57
+SHA1 (patch-teleinfo.c) = 2b20b19d470357a4ac85053bfb6cef19d4ed977f
+SHA1 (patch-xaw.c) = 0667f974f101cdb61c2c96abd92b5533bb6f49f1
+SHA1 (patch-xteld.c) = 75a9e3e738723e1a637c2cf427837146c64de9c4
diff --git a/comms/xtel/patches/patch-Xsra_SelFile.c b/comms/xtel/patches/patch-Xsra_SelFile.c
new file mode 100644
index 00000000000..bb1f9b5cfb9
--- /dev/null
+++ b/comms/xtel/patches/patch-Xsra_SelFile.c
@@ -0,0 +1,30 @@
+$NetBSD: patch-Xsra_SelFile.c,v 1.1 2012/02/16 18:00:20 hans Exp $
+
+--- Xsra/SelFile.c.orig 2012-01-26 22:11:41.896431520 +0100
++++ Xsra/SelFile.c 2012-01-26 22:14:33.883023396 +0100
+@@ -561,19 +561,12 @@ SFopenFile(const char *name, const char
+ SFchdir(SFstartDir);
+ if ((fp = fopen(name, mode)) == NULL) {
+ char *buf;
+- if (errno <= sys_nerr) {
+- buf = XtMalloc(strlen(failed) + strlen(sys_errlist[errno]) +
+- strlen(prompt) + 2);
+- strcpy(buf, failed);
+- strcat(buf, sys_errlist[errno]);
+- strcat(buf, "\n");
+- strcat(buf, prompt);
+- } else {
+- buf = XtMalloc(strlen(failed) + strlen(prompt) + 2);
+- strcpy(buf, failed);
+- strcat(buf, "\n");
+- strcat(buf, prompt);
+- }
++ buf = XtMalloc(strlen(failed) + strlen(strerror(errno)) +
++ strlen(prompt) + 2);
++ strcpy(buf, failed);
++ strcat(buf, strerror(errno));
++ strcat(buf, "\n");
++ strcat(buf, prompt);
+ XtSetArg(args[0], XtNlabel, buf);
+ XtSetValues(selFilePrompt, args, 1);
+ XtFree(buf);
diff --git a/comms/xtel/patches/patch-mdmdetect.c b/comms/xtel/patches/patch-mdmdetect.c
new file mode 100644
index 00000000000..ea40df77004
--- /dev/null
+++ b/comms/xtel/patches/patch-mdmdetect.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-mdmdetect.c,v 1.1 2012/02/16 18:00:20 hans Exp $
+
+--- mdmdetect.c.orig 2012-01-27 10:38:52.533510304 +0100
++++ mdmdetect.c 2012-01-27 10:46:55.339779068 +0100
+@@ -102,7 +102,7 @@ static void check_and_lock (char *line)
+ #ifdef SVR4
+ sprintf (buf, "/dev/%s", line);
+ if (stat (buf, &statb) != 0) {
+- fprintf (stderr, "%s: %s\n", buf, sys_errlist[errno]);
++ fprintf (stderr, "%s: %s\n", buf, strerror(errno));
+ the_end (1);
+ }
+
+@@ -119,7 +119,7 @@ static void check_and_lock (char *line)
+
+ /* Pose le lock */
+ if (!(fplock = fopen (lock_file, "w"))) {
+- fprintf (stderr, "%s: %s\n", lock_file, sys_errlist[errno]);
++ fprintf (stderr, "%s: %s\n", lock_file, strerror(errno));
+ the_end (1);
+ }
+
diff --git a/comms/xtel/patches/patch-modem.c b/comms/xtel/patches/patch-modem.c
new file mode 100644
index 00000000000..a1dbbbd315b
--- /dev/null
+++ b/comms/xtel/patches/patch-modem.c
@@ -0,0 +1,27 @@
+$NetBSD: patch-modem.c,v 1.1 2012/02/16 18:00:20 hans Exp $
+
+--- modem.c.orig 2012-01-27 10:38:52.460117270 +0100
++++ modem.c 2012-01-27 10:44:00.399646906 +0100
+@@ -144,9 +144,10 @@ void init_tty (int fd, int speed, int cs
+ term.c_lflag &= ~(ICANON|ISIG|ECHO|IEXTEN);
+ #endif
+
+-#ifdef __NetBSD__
++#if defined(__NetBSD__) || defined(__sun)
+ term.c_cflag = (CREAD | HUPCL | CRTSCTS);
+- cfsetspeed( &term, speed);
++ cfsetospeed( &term, speed);
++ cfsetispeed( &term, speed);
+ #else
+ /*
+ * FreeBSD 1.1 (Beta) n'a pas l'air d'apprecier qu'on mette clocal
+@@ -212,7 +213,8 @@ void restore_tty(int fd)
+ #endif
+
+ /* remet la ligne en l'etat */
+- cfsetspeed(&term_sauve, B0);
++ cfsetospeed(&term_sauve, B0);
++ cfsetispeed(&term_sauve, B0);
+ if (tcsetattr (fd, TCSADRAIN, &term_sauve) < 0) {
+ log_err("tcsetattr(2):%s", strerror(errno));
+ exit(1);
diff --git a/comms/xtel/patches/patch-procedure.c b/comms/xtel/patches/patch-procedure.c
new file mode 100644
index 00000000000..488fcc6bb10
--- /dev/null
+++ b/comms/xtel/patches/patch-procedure.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-procedure.c,v 1.1 2012/02/16 18:00:20 hans Exp $
+
+--- procedure.c.orig 2012-01-26 22:15:20.413787876 +0100
++++ procedure.c 2012-01-26 22:16:24.356173831 +0100
+@@ -241,7 +241,7 @@ int fd;
+ fclose (fp);
+ }
+ else
+- fprintf (stderr, "run_procedure: %s: %s\n", (current_pd->p).filename, sys_errlist[errno]);
++ fprintf (stderr, "run_procedure: %s: %s\n", (current_pd->p).filename, strerror(errno));
+ }
+ break;
+
+@@ -255,7 +255,7 @@ int fd;
+ fclose (fp);
+ }
+ else
+- fprintf (stderr, "run_procedure: %s: %s\n", (current_pd->p).filename, sys_errlist[errno]);
++ fprintf (stderr, "run_procedure: %s: %s\n", (current_pd->p).filename, strerror(errno));
+ }
+
+ break;
diff --git a/comms/xtel/patches/patch-teleinfo.c b/comms/xtel/patches/patch-teleinfo.c
new file mode 100644
index 00000000000..a8a869fc26b
--- /dev/null
+++ b/comms/xtel/patches/patch-teleinfo.c
@@ -0,0 +1,33 @@
+$NetBSD: patch-teleinfo.c,v 1.1 2012/02/16 18:00:20 hans Exp $
+
+--- teleinfo.c.orig 2012-01-26 22:15:20.421519776 +0100
++++ teleinfo.c 2012-01-26 22:17:29.154924079 +0100
+@@ -24,6 +24,10 @@ char rcsid_teleinfo_c[] = "$Id: teleinfo
+ * Inspire du programme "minitel" de Sylvain Meunier...
+ */
+
++#ifdef __sun
++#include <sys/stropts.h>
++#endif
++
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/wait.h>
+@@ -74,7 +78,7 @@ int *pl, *pc;
+ */
+ strcpy (master, "/dev/ptmx");
+ if ((fd_master = open ("/dev/ptmx", O_RDWR)) < 0)
+- teleinfo_fatal ("/dev/ptmx", sys_errlist[errno]);
++ teleinfo_fatal ("/dev/ptmx", strerror(errno));
+ sighold (SIGCLD);
+ if (grantpt (fd_master) == -1)
+ teleinfo_fatal ("could not grant slave pty");
+@@ -136,7 +140,7 @@ char *nom;
+ teleinfo_fatal ("erreur ouverture maitre");
+
+ if ((fd_teleinfo = open (pty_s, O_RDWR)) < 0)
+- teleinfo_fatal (pty_s, sys_errlist[errno]);
++ teleinfo_fatal (pty_s, strerror(errno));
+
+ /* Configuration de la ligne (mode RAW) */
+ #ifdef SVR4
diff --git a/comms/xtel/patches/patch-xaw.c b/comms/xtel/patches/patch-xaw.c
new file mode 100644
index 00000000000..660bb5284c1
--- /dev/null
+++ b/comms/xtel/patches/patch-xaw.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-xaw.c,v 1.1 2012/02/16 18:00:20 hans Exp $
+
+--- xaw.c.orig 2012-01-26 22:15:20.415642876 +0100
++++ xaw.c 2012-01-26 22:19:32.247692788 +0100
+@@ -1330,7 +1330,7 @@ int code_erreur;
+ hand_cursor = XCreateFontCursor (XtDisplay(top), XC_hand2);
+
+ if (code_erreur != 0)
+- sprintf (buf, "%s : %s", s, sys_errlist[code_erreur]);
++ sprintf (buf, "%s : %s", s, strerror(code_erreur));
+ else {
+ if (s[0] == '[')
+ strcpy (buf, rsc_xtel.erreur[s[1]-'0']);
diff --git a/comms/xtel/patches/patch-xteld.c b/comms/xtel/patches/patch-xteld.c
new file mode 100644
index 00000000000..9e123d04bfc
--- /dev/null
+++ b/comms/xtel/patches/patch-xteld.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-xteld.c,v 1.1 2012/02/16 18:00:20 hans Exp $
+
+--- xteld.c.orig 2012-01-27 10:38:52.463694864 +0100
++++ xteld.c 2012-01-27 10:41:01.412450708 +0100
+@@ -264,7 +264,7 @@ int code_erreur;
+ }
+ else if (type_client == CLIENT_W_HYPER) {
+ if (e)
+- sprintf (buf, "%s: %s", s, sys_errlist[errno]);
++ sprintf (buf, "%s: %s", s, strerror(errno));
+ else {
+ if (*s == '[')
+ strcpy (buf, s + 3);