1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-07 06:40:06 +00:00

- Remove `-lcompat' again, the new patches contain code fixes.

- Fix paths in the documentation (/usr/lpp -> ${PREFIX}).
- patch-ae is no longer needed with gmake.
This commit is contained in:
Thomas Gellekum 2001-03-21 12:58:39 +00:00
parent 56c06bcbe7
commit 174fded7f6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=40155
6 changed files with 196 additions and 24 deletions

View File

@ -37,14 +37,18 @@ CONFIGURE_ENV= ARCH="" \
NO_MTREE= yes
PLIST_SUB= ARCH=${OPSYS:L}
# XXX the -lcompat below is an ugly kludge. opendx's code
# should be fixed to use the modern POSIX style regcomp(3)
# instead of the old V8 style one.
post-patch:
@find ${WRKSRC} -name Makefile.am | \
xargs ${PERL} -pi -e "s;-lXm ;-lcompat ${MOTIFLIB} ;g"
xargs ${PERL} -pi -e "s;-lXm ;${MOTIFLIB} ;g"
pre-configure:
@cd ${WRKSRC} && aclocal
@cd ${WRKSRC} && aclocal && ${SETENV} ${CONFIGURE_ENV} autoheader
post-install:
@${ECHO_MSG} "===> Fixing path in the docs (/usr/lpp -> ${PREFIX})"
.for dir in doc help html man
@find ${PREFIX}/dx/${dir} -type f | \
xargs ${PERL} -pi -e "s;/usr/lpp;${PREFIX};g"
.endfor
.include <bsd.port.mk>

View File

@ -0,0 +1,10 @@
--- acconfig.h.orig Fri Dec 3 17:23:57 1999
+++ acconfig.h Tue Mar 20 17:32:42 2001
@@ -196,6 +196,7 @@
#undef HAVE_OS2_H
#undef HAVE_PROCESS_H
#undef HAVE_PWD_H
+#undef HAVE_REGEX_H
#undef HAVE_REGEXP_H
#undef HAVE_SETJMP_H
#undef HAVE_SIGNAL_H

View File

@ -1,19 +0,0 @@
--- src/exec/dpexec/Makefile.in.orig Thu Jan 6 21:17:53 2000
+++ src/exec/dpexec/Makefile.in Sat Feb 12 15:22:32 2000
@@ -204,6 +204,7 @@
else :; fi
yuiif.h: yuiif.c
+lex.o: yuiif.h
tags: TAGS
@@ -302,7 +303,7 @@
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-$(libDPEXEC_a_SOURCES): yuiif.c yuiif.h
+# $(libDPEXEC_a_SOURCES): yuiif.c yuiif.h
include local.mk

View File

@ -0,0 +1,11 @@
--- configure.in.orig Tue Mar 20 11:52:53 2001
+++ configure.in Tue Mar 20 11:54:06 2001
@@ -935,7 +935,7 @@
get.h gl.h gl/device.h gl/gl.h invent.h io.h iop/afb.h iop/mov.h \
iop/pfs.h iostream.h license.h limits.h malloc.h math.h memory.h \
mingw32/dir.h mon.h net/if.h net/if_arp.h net/route.h netcdf.h netdb.h \
- netinet/in.h os2.h process.h pwd.h regexp.h setjmp.h signal.h \
+ netinet/in.h os2.h process.h pwd.h regex.h regexp.h setjmp.h signal.h \
starbase.c.h stdarg.h stddef.h stdio.h stdlib.h stream.h string.h \
strings.h strstrea.h strstream.h synch.h sys/access.h sys/bsd_types.h \
sys/file.h sys/filio.h sys/ioctl.h sys/ipc.h sys/ldr.h sys/m88kbcs.h \

View File

@ -0,0 +1,59 @@
--- src/uipp/dxui/MacroDefinition.C.orig Tue Mar 20 18:52:41 2001
+++ src/uipp/dxui/MacroDefinition.C Tue Mar 20 20:49:26 2001
@@ -42,7 +42,14 @@
#define OLD_DUMMY_DESCRIPTION_STRING "Generated dummy input"
-#if defined(HAVE_RE_COMP)
+#if HAVE_REGCOMP && HAVE_REGEX_H
+/* prefer POSIX style regcomp(3) over obsolete versions */
+extern "C" {
+#include <regex.h>
+}
+#undef HAVE_RE_COMP
+#undef HAVE_FINDFIRST
+#elif defined(HAVE_RE_COMP)
#undef HAVE_REGCMP
#undef HAVE_REGCOMP
#undef HAVE_FINDFIRST
@@ -53,7 +60,7 @@
#undef HAVE_FINDFIRST
extern "C" char *regcmp(...);
extern "C" char *regex(char *, char *, ...);
-#elif HAVE_REGCOMP
+#elif HAVE_REGCOMP && HAVE_REGEXP_H
extern "C" {
#include <regexp.h>
}
@@ -594,7 +601,18 @@
}
else
{
-#if defined(HAVE_REGCOMP)
+#if defined(HAVE_REGCOMP) && defined(HAVE_REGEX_H)
+
+ regex_t net_file;
+ ASSERT(regcomp(&net_file, ".[.]*\\.net$", REG_NOSUB) == 0);
+
+ struct dirent *entry;
+ while (entry = readdir(d))
+ {
+ boolean exists = regexec(&net_file, entry->d_name, 0, NULL, 0);
+ if (exists == 0)
+
+#elif defined(HAVE_REGCOMP) && defined(HAVE_REGEXP_H)
char *net_file = (char *)regcomp(".[.]*\\.net$");
ASSERT(net_file != NULL);
@@ -691,7 +709,10 @@
}
_findclose(handle);
delete srch_string;
-#elif defined(HAVE_REGCOMP)
+#elif defined(HAVE_REGCOMP) && defined(HAVE_REGEX_H)
+ }
+ }
+#elif defined(HAVE_REGCOMP) && defined(HAVE_REGEXP_H)
}
}
#elif defined(HAVE_RE_COMP)

View File

@ -0,0 +1,107 @@
--- src/uipp/prompter/Browser.C.orig Tue Mar 20 18:52:42 2001
+++ src/uipp/prompter/Browser.C Wed Mar 21 07:50:16 2001
@@ -38,7 +38,13 @@
#define stat _stat
#endif
-#if defined(HAVE_RE_COMP)
+#if HAVE_REGCOMP && HAVE_REGEX_H
+extern "C" {
+#include <regex.h>
+}
+#undef HAVE_RE_COMP
+#undef HAVE_FINDFIRST
+#elif defined(HAVE_RE_COMP)
#undef HAVE_REGCMP
#undef HAVE_REGCOMP
#undef HAVE_FINDFIRST
@@ -49,7 +55,7 @@
#undef HAVE_FINDFIRST
extern "C" char *regcmp(...);
extern "C" char *regex(char *, char *, ...);
-#elif HAVE_REGCOMP
+#elif HAVE_REGCOMP && HAVE_REGEXP_H
extern "C" {
#include <regexp.h>
}
@@ -1476,7 +1482,12 @@
theIBMApplication->setBusyCursor(TRUE);
-#if defined(HAVE_REGCOMP)
+#if defined(HAVE_REGCOMP) && defined(HAVE_REGEX_H)
+
+ regex_t search_for;
+ ASSERT(regcomp(&search_for, text, REG_NOSUB) == 0);
+
+#elif defined(HAVE_REGCOMP) && defined(HAVE_REGEXP_H)
char *search_for = (char *)regcomp(text);
ASSERT(search_for != NULL);
@@ -1533,7 +1544,20 @@
int offset;
-#if defined(HAVE_REGCOMP)
+#if defined(HAVE_REGCOMP) && defined(HAVE_REGEX_H)
+
+ int i;
+ for (i = 0; i < STRLEN(buf); i++)
+ if (regexec(&search_for, buf + i, 0, NULL, 0) != 0)
+ break;
+
+ if (i)
+ {
+ offset = i - 1;
+ found = 1;
+ }
+
+#elif defined(HAVE_REGCOMP) && defined(HAVE_REGEXP_H)
int i;
for (i = 0; i < STRLEN(buf); i++)
@@ -1610,7 +1634,7 @@
if(!found)
WarningMessage("Pattern not found");
-#if defined(HAVE_RECOMP) || defined(HAVE_REGCMP)
+#if defined(HAVE_RE_COMP) || defined(HAVE_REGCMP)
free(search_for);
#endif
@@ -1633,7 +1657,12 @@
theIBMApplication->setBusyCursor(TRUE);
-#if defined(HAVE_REGCOMP)
+#if defined(HAVE_REGCOMP) && defined(HAVE_REGEX_H)
+
+ regex_t search_for;
+ ASSERT(regcomp(&search_for, text, REG_NOSUB) == 0);
+
+#elif defined(HAVE_REGCOMP) && defined(HAVE_REGEXP_H)
char *search_for = (char *)regcomp(text);
ASSERT(search_for != NULL);
@@ -1695,7 +1724,20 @@
int offset;
-#if defined(HAVE_REGCOMP)
+#if defined(HAVE_REGCOMP) && defined(HAVE_REGEX_H)
+
+ if (regexec(&search_for, buf, 0, NULL, 0) == 0)
+ {
+ found = 1;
+
+ for (i = STRLEN(buf)-1; i >= 0; i--)
+ if (regexec(&search_for, buf + i, 0, NULL, 0) != 0)
+ break;
+
+ offset = i + 1;
+ }
+
+#elif defined(HAVE_REGCOMP) && defined(HAVE_REGEXP_H)
if (regexec((regexp *)search_for, buf))
{