File: pcre.patch

package info (click to toggle)
chktex 1.7.9-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,124 kB
  • sloc: ansic: 4,626; sh: 527; makefile: 326; perl: 150
file content (55 lines) | stat: -rw-r--r-- 2,036 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Description: PCRE (= PCRE3) is obsolete and need to be replaces by PCRE2
Index: chktex-1.7.8/FindErrs.c
===================================================================
--- chktex-1.7.8.orig/FindErrs.c	2022-12-10 23:58:35.908406442 +0100
+++ chktex-1.7.8/FindErrs.c	2022-12-10 23:58:35.904406444 +0100
@@ -36,7 +36,7 @@
 #if HAVE_PCRE || HAVE_POSIX_ERE
 
 #if HAVE_PCRE
-#include <pcreposix.h>
+#include <pcre2posix.h>
 #else
 #include <regex.h>
 #endif
Index: chktex-1.7.8/Makefile.in
===================================================================
--- chktex-1.7.8.orig/Makefile.in	2022-12-10 23:58:35.908406442 +0100
+++ chktex-1.7.8/Makefile.in	2022-12-10 23:58:35.904406444 +0100
@@ -159,7 +159,7 @@
 
 
 chktex: $(OBJS)
-	$(CC) $(LDFLAGS) -o chktex $(OBJS) $(LIBS)
+	$(CC) -o chktex $(OBJS) $(LIBS) $(LDFLAGS)
 
 install: chktex ChkTeX.dvi
 	$(MKDIR_P) $(DESTDIR)$(bindir)
@@ -185,7 +185,7 @@
 	rm -f $(DESTDIR)$(sysconfdir)/chktexrc  $(DESTDIR)$(mandir)/man1/deweb.1
 
 test:
-	chktex -v2 -mall $(srcdir)/Test.tex | less -r
+	./chktex -mall $(srcdir)/Test.tex
 
 indent:
 	indent -npsl -bli0 -npcs -nut -i4 $(SOURCEFILES)
Index: chktex-1.7.8/configure.ac
===================================================================
--- chktex-1.7.8.orig/configure.ac	2022-10-18 02:17:58.000000000 +0200
+++ chktex-1.7.8/configure.ac	2022-12-10 23:59:10.644379232 +0100
@@ -148,11 +148,11 @@
 AC_MSG_CHECKING(whether PCRE regular expressions are enabled)
 AC_MSG_RESULT($enable_pcre)
 if test "$enable_pcre" = "yes"; then
-  AC_CHECK_PROG(WITH_PCRE, pcre-config, yes, no)
+  AC_CHECK_PROG(WITH_PCRE, pcre2-config, yes, no)
   if test "$WITH_PCRE" = "yes"; then
     AC_DEFINE(HAVE_PCRE, 1, Whether PCRE can be used for user warnings.)
-    CFLAGS="${CFLAGS} $(pcre-config --cflags-posix)"
-    LDFLAGS="${LDFLAGS} $(pcre-config --libs-posix)"
+    CFLAGS="${CFLAGS} $(pcre2-config --cflags-posix)"
+    LDFLAGS="${LDFLAGS} $(pcre2-config --libs-posix)"
   else
     AC_DEFINE(HAVE_PCRE, 0)
     AC_MSG_WARN(PCRE library not found.)