git: 04a09c2ce889 - 2024Q3 - textproc/mgdiff: Fix segfault when with open file dialogue box
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 16 Jul 2024 12:45:01 UTC
The branch 2024Q3 has been updated by cy:
URL: https://cgit.FreeBSD.org/ports/commit/?id=04a09c2ce8894c4f5252d6d0256f5bce799ec289
commit 04a09c2ce8894c4f5252d6d0256f5bce799ec289
Author: Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2024-07-16 02:47:29 +0000
Commit: Cy Schubert <cy@FreeBSD.org>
CommitDate: 2024-07-16 12:44:47 +0000
textproc/mgdiff: Fix segfault when with open file dialogue box
Under open-motif we see a segfault when mgdiff calls regexec() in
libgnuregexec's regexec.c at line 782. Let's avoid libgnuregexec
entirely and use the regexec(3) provided by FreeBSD's libc instead.
This resolves the segfault and as a bonus we reduce mgdiff's
dependency list.
We also remove a now incorrect comment in the patch. It was misleading
since the EXTRA_LIBRARIES for Dell SVR4 had already been removed.
PR: 280289
Approved by: portmaster@BSDforge.com (maintainer)
(cherry picked from commit 0ba6ae2c12e3a5c0b7a2aac812e25a02a32ae0b3)
---
textproc/mgdiff/Makefile | 4 +---
textproc/mgdiff/files/patch-Imakefile | 16 ++++++++++------
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/textproc/mgdiff/Makefile b/textproc/mgdiff/Makefile
index eec90044081a..8dbf744a3bbc 100644
--- a/textproc/mgdiff/Makefile
+++ b/textproc/mgdiff/Makefile
@@ -1,6 +1,6 @@
PORTNAME= mgdiff
PORTVERSION= 1.0
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= textproc
MASTER_SITES= XCONTRIB/applications
DISTNAME= ${PORTNAME}
@@ -11,8 +11,6 @@ WWW= https://BSDforge.com/projects/textproc/mgdiff/
LICENSE= MIT
-LIB_DEPENDS= libgnuregex.so:devel/libgnuregex
-
USES= imake motif xorg
USE_XORG= ice sm x11 xext xmu xt
diff --git a/textproc/mgdiff/files/patch-Imakefile b/textproc/mgdiff/files/patch-Imakefile
index 19bd1d2e89a3..1f4b65832d85 100644
--- a/textproc/mgdiff/files/patch-Imakefile
+++ b/textproc/mgdiff/files/patch-Imakefile
@@ -1,11 +1,15 @@
---- Imakefile.orig 2019-09-28 11:43:48 UTC
+diff a/Imakefile.orig b/Imakefile
+index 963bd53..36a7257 100644
+--- Imakefile.orig
+++ Imakefile
-@@ -8,7 +8,7 @@ XMLIB = -lXm
- XCOMM
- XCOMM for Dell SVR4
- XCOMM
+@@ -5,10 +5,6 @@
+ XCOMM Imakefile,v 2.0 1994/05/19 02:01:00 dan Exp
+
+ XMLIB = -lXm
+-XCOMM
+-XCOMM for Dell SVR4
+-XCOMM
-EXTRA_LIBRARIES = -lc -lucb
-+EXTRA_LIBRARIES = -lgnuregex
SRCS = mgdiff.c rundiff.c misc.c files.c spawn.c manual.c modal.c legend.c
OBJS = mgdiff.o rundiff.o misc.o files.o spawn.o manual.o modal.o legend.o