aboutsummaryrefslogtreecommitdiffstats
path: root/devel/xxgdb
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2014-03-27 03:48:45 +0800
committercy <cy@FreeBSD.org>2014-03-27 03:48:45 +0800
commit2b4955b14b3572f670b9e6cb9297800de99d7622 (patch)
treeee83907738bbb3b8e3002aa4920e574f24cd9cb4 /devel/xxgdb
parent42a4d0143c37ca034d3289403e35b65e00331614 (diff)
downloadfreebsd-ports-gnome-2b4955b14b3572f670b9e6cb9297800de99d7622.tar.gz
freebsd-ports-gnome-2b4955b14b3572f670b9e6cb9297800de99d7622.tar.zst
freebsd-ports-gnome-2b4955b14b3572f670b9e6cb9297800de99d7622.zip
Fix:
- pty creation - segmentation violations - bus errors - alternate gdb invocation (prompt through environment) Stagify.
Diffstat (limited to 'devel/xxgdb')
-rw-r--r--devel/xxgdb/Makefile6
-rw-r--r--devel/xxgdb/files/patch-ab20
-rw-r--r--devel/xxgdb/files/patch-ac91
-rw-r--r--devel/xxgdb/files/patch-xdbx.c14
-rw-r--r--devel/xxgdb/files/patch-xxgdb.man12
-rw-r--r--devel/xxgdb/pkg-plist1
6 files changed, 131 insertions, 13 deletions
diff --git a/devel/xxgdb/Makefile b/devel/xxgdb/Makefile
index f109ec12387b..edf96069d275 100644
--- a/devel/xxgdb/Makefile
+++ b/devel/xxgdb/Makefile
@@ -3,7 +3,7 @@
PORTNAME= xxgdb
PORTVERSION= 1.12
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_XCONTRIB}
MASTER_SITE_SUBDIR= utilities
@@ -13,17 +13,15 @@ COMMENT= X window interface for gdb
USES= imake
USE_XORG= ice sm x11 xaw xext xmu xt
-MAN1= xxgdb.1
# This isn't included in the original Imakefile for some reason.
# Yes, I know this will recompile the program every time, but
# we have the cookie anyway and it's much easier this way
# than modifying the Imakefile.
-NO_STAGE= yes
post-build:
cd ${WRKSRC} && ${CC} ${CFLAGS} -o xxgdbiowin xxgdbiowin.c
post-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/xxgdbiowin ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/xxgdbiowin ${STAGEDIR}${PREFIX}/bin
.include <bsd.port.mk>
diff --git a/devel/xxgdb/files/patch-ab b/devel/xxgdb/files/patch-ab
index 0468150dc770..b185567c7df3 100644
--- a/devel/xxgdb/files/patch-ab
+++ b/devel/xxgdb/files/patch-ab
@@ -1,6 +1,14 @@
---- Imakefile.orig Tue Jun 20 07:20:55 1995
-+++ Imakefile Fri Nov 17 21:27:09 2000
-@@ -79,6 +79,10 @@
+--- Imakefile.orig 1995-06-19 15:20:55.000000000 -0700
++++ Imakefile 2014-03-25 21:44:23.829815727 -0700
+@@ -8,6 +8,7 @@
+ #endif
+
+ #CC = gcc
++CCOPTIONS=-O0
+
+ #if mc68000 /* for SUN 3 */
+ CCOPTIONS=-m68881
+@@ -79,11 +80,15 @@
# Add to open all windows at startup
#DEFINES+=-DOPEN_ALL_WINDOWS
@@ -11,3 +19,9 @@
mallocc = #malloc.c
malloco = #malloc.o
+ DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
+-LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
++LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) -lutil
+
+ SRCS = calldbx.c command.c dbx.c dialog.c datadpy.c filemenu.c \
+ handler.c parser.c regex.c signs.c signals.c source.c \
diff --git a/devel/xxgdb/files/patch-ac b/devel/xxgdb/files/patch-ac
index bfb34fdfe095..966a60557d1f 100644
--- a/devel/xxgdb/files/patch-ac
+++ b/devel/xxgdb/files/patch-ac
@@ -1,6 +1,6 @@
---- calldbx.c.orig Tue Jun 20 07:11:00 1995
-+++ calldbx.c Fri Nov 17 21:27:09 2000
-@@ -74,8 +74,8 @@
+--- calldbx.c.orig 1995-06-19 15:11:00.000000000 -0700
++++ calldbx.c 2014-03-26 12:20:00.741924675 -0700
+@@ -74,8 +74,16 @@
#include <string.h>
#include <fcntl.h>
#include "global.h"
@@ -8,10 +8,26 @@
-#include <termio.h>
+#if !(defined(OLDSUNOS) || defined(BSD)) || defined(__FreeBSD__)
+#include <termios.h>
++#include <sys/param.h>
++#if defined(__FreeBSD_version) && __FreeBSD_version >= 900007
++#define NEW_FREEBSD_PTYS
++#include <sys/types.h>
++#include <sys/ioctl.h>
++#include <termios.h>
++#include <libutil.h>
++#endif
#else
#include <sgtty.h>
#endif
-@@ -137,13 +137,17 @@
+@@ -116,6 +124,7 @@
+ char iowintty[] = "/dev/ttyp0";
+ int iowinpid = 0;
+ #endif /* CREATE_IO_WINDOW */
++#ifndef NEW_FREEBSD_PTYS
+ /*
+ * Xdbx talks to dbx through a pseudo terminal which is a pair of master
+ * and slave devices: /dev/pty?? and /dev/tty??, where ?? goes from p0 to
+@@ -137,13 +146,17 @@
#ifndef sco
for (c='p'; c<'t'; c++) {
@@ -30,7 +46,15 @@
if ((master = open(pty, O_RDWR)) >= 0)
return (master);
}
-@@ -246,8 +250,8 @@
+@@ -194,6 +207,7 @@
+ return slave;
+ #endif /* SVR4 */
+ }
++#endif /* NEW_FREEBSD_PTYS */
+
+ #ifdef CREATE_IO_WINDOW
+ /* use a separate io window to talk to gdb, so program output is not confused with gdb output. */
+@@ -246,8 +260,8 @@
/*
* (JBL)10MAY91 : use sgttyb if generic BSD
*/
@@ -41,7 +65,62 @@
#else
struct sgttyb Termio;
#endif
-@@ -355,11 +359,11 @@
+@@ -261,8 +275,10 @@
+
+ #ifdef GDB /* for GDB, we use XXGDB_DEBUGGER instead */
+ debugger = (char *) getenv("XXGDB_DEBUGGER"); /* first looks up env var */
++ dbxprompt = (char *) getenv("XXGDB_DBXPROMPT"); /* first looks up env var */
+ #else
+ debugger = (char *) getenv("DEBUGGER"); /* first looks up env var */
++ dbxprompt = (char *) getenv("DBXPROMPT"); /* first looks up env var */
+ #endif
+
+ /* CRL mod 4 3/15/91 GWC if no env var then try app res for db_name */
+@@ -275,7 +291,8 @@
+ debugger = XtNewString(DEBUGGER);
+
+ /* CRL mod 4 3/15/91 GWC - allow the user to specify a db_prompt */
+- if (app_resources.db_prompt &&
++ if (dbxprompt == NULL &&
++ app_resources.db_prompt &&
+ strcmp(app_resources.db_prompt, "") != 0)
+ dbxprompt = XtNewString(app_resources.db_prompt);
+
+@@ -288,7 +305,15 @@
+ if (debug)
+ fprintf(stderr,"debugger=\"%s\"\nprompt=\"%s\"\n",debugger,dbxprompt);
+
++#ifdef NEW_FREEBSD_PTYS
++ if (openpty(&master, &slave, NULL, NULL, NULL) == -1) {
++ sprintf(errmsg,"%s error: openpty failed\n");
++ perror(errmsg);
++ exit(1);
++ }
++#else
+ master = open_master();
++#endif
+
+ dbxpid = fork();
+ if (dbxpid == -1) {
+@@ -305,6 +330,7 @@
+ * set line buffered mode
+ * register dbx input with X
+ */
++ close(slave);
+ close(0);
+ close(1);
+
+@@ -345,7 +371,9 @@
+ }
+ #endif
+
++#ifndef NEW_FREEBSD_PTYS
+ slave = open_slave(master);
++#endif
+ close(master);
+
+ /*
+@@ -355,11 +383,11 @@
/*
* (JBL)10MAY91 : use sgttyb if OLDSUN or generic BSD
*/
diff --git a/devel/xxgdb/files/patch-xdbx.c b/devel/xxgdb/files/patch-xdbx.c
new file mode 100644
index 000000000000..0fdb4d1a0a75
--- /dev/null
+++ b/devel/xxgdb/files/patch-xdbx.c
@@ -0,0 +1,14 @@
+--- xdbx.c.orig 1995-04-20 19:37:31.000000000 -0700
++++ xdbx.c 2014-03-25 20:54:19.951463142 -0700
+@@ -74,11 +74,9 @@
+ #define XGDBVERSION "1.12"
+ #endif
+
+-#ifdef SYSV
+ # include <stdio.h>
+ # include <stdlib.h>
+ # include <sys/param.h>
+-#endif
+
+ #include "global.h"
+ #include "bitmaps.h"
diff --git a/devel/xxgdb/files/patch-xxgdb.man b/devel/xxgdb/files/patch-xxgdb.man
new file mode 100644
index 000000000000..a354eab3a12e
--- /dev/null
+++ b/devel/xxgdb/files/patch-xxgdb.man
@@ -0,0 +1,12 @@
+--- xxgdb.man.orig 1994-12-02 17:40:19.000000000 -0800
++++ xxgdb.man 2014-03-26 12:27:51.559896216 -0700
+@@ -29,7 +29,8 @@
+ .LP
+ The name of the debugger invoked by \fIxxgdb\fP is, by default, gdb, but
+ it can be overridden with the environment variable XXGDB_DEBUGGER or with
+-the db_name option.
++the db_name option. Additionally, the prompt string can be overridden with
++the environment variable XXGDB_DBXPROMPT or with the db_prompt option.
+ .SH OPTIONS
+ \fIXxgdb\fP accepts all of the standard X Toolkit command line options
+ (see \fIX\fP(1)), and all the gdb options (see \fIgdb\fP(1)), plus
diff --git a/devel/xxgdb/pkg-plist b/devel/xxgdb/pkg-plist
index c4498d15353f..47633ff38a1a 100644
--- a/devel/xxgdb/pkg-plist
+++ b/devel/xxgdb/pkg-plist
@@ -1,3 +1,4 @@
bin/xxgdb
bin/xxgdbiowin
lib/X11/app-defaults/XDbx
+man/man1/xxgdb.1.gz