mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
chktex: unbundle from texlive_core
This commit is contained in:
@@ -89,8 +89,6 @@ PROVIDES="
|
||||
cmd:checklistings
|
||||
cmd:chkdvifont
|
||||
cmd:chklref
|
||||
cmd:chktex
|
||||
cmd:chkweb
|
||||
cmd:citeproc_lua
|
||||
cmd:cjk_gs_integrate
|
||||
cmd:cllualatex
|
||||
@@ -114,7 +112,6 @@ PROVIDES="
|
||||
cmd:depythontex
|
||||
cmd:detex
|
||||
cmd:devnag
|
||||
cmd:deweb
|
||||
cmd:diadia
|
||||
cmd:digestif
|
||||
cmd:disdvi
|
||||
@@ -595,7 +592,6 @@ defineDebugInfoPackage texlive_core$secondaryArchSuffix \
|
||||
$prefix/bin/cefsconv \
|
||||
$prefix/bin/cfftot1 \
|
||||
$prefix/bin/chkdvifont \
|
||||
$prefix/bin/chktex \
|
||||
$prefix/bin/ctangle \
|
||||
$prefix/bin/ctie \
|
||||
$prefix/bin/ctwill \
|
||||
@@ -898,6 +894,7 @@ BUILD()
|
||||
--with-system-harfbuzz \
|
||||
--with-system-teckit \
|
||||
--without-x \
|
||||
--disable-chktex \
|
||||
--disable-t1utils \
|
||||
--build=$HOST --host=$HOST
|
||||
|
||||
|
||||
73
dev-tex/chktex/chktex-1.7.9.recipe
Normal file
73
dev-tex/chktex/chktex-1.7.9.recipe
Normal file
@@ -0,0 +1,73 @@
|
||||
SUMMARY="LaTeX semantic checker"
|
||||
DESCRIPTION="ChkTeX is a tool to check for common errors in LaTeX files. It also supports \
|
||||
checking CWEB files (uses a perl5 script). It is highly customizable allowing you turn off any \
|
||||
warnings you don't like, as well as add your own warnings. It works easily with Emacs and AUCTeX, \
|
||||
but should also be easy to interface with other editors. If you have interfaced ChkTeX with \
|
||||
another editor, please contribute how you did it.
|
||||
|
||||
It is important to remember that ChkTeX is only intended as a guide to fixing faults. It is by no \
|
||||
means always correct. This means that correct LaTeX code may produce errors in ChkTeX, and vice \
|
||||
versa: incorrect LaTeX code may pass silently through. If you have ideas for new warnings or ways \
|
||||
in which current warnings could be improved, please report them on the bug tracker."
|
||||
HOMEPAGE="https://www.nongnu.org/chktex/"
|
||||
COPYRIGHT="1995-96 Jens T. Berger Thielemann"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://download.savannah.gnu.org/releases/chktex/chktex-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="df6ee31632a4f4a8e18849b804657e27e3d96deb3f237edbd25656415eb31195"
|
||||
PATCHES="chktex-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all"
|
||||
|
||||
PROVIDES="
|
||||
chktex = $portVersion
|
||||
cmd:chktex = $portVersion
|
||||
cmd:chkweb
|
||||
cmd:deweb
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
cmd:perl
|
||||
lib:libpcre
|
||||
lib:libpcreposix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
devel:libpcre
|
||||
devel:libpcreposix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:awk
|
||||
cmd:gcc
|
||||
cmd:make
|
||||
cmd:perl
|
||||
"
|
||||
|
||||
TEST_REQUIRES="
|
||||
cmd:cmp
|
||||
cmd:dash
|
||||
"
|
||||
|
||||
GLOBAL_WRITABLE_FILES="
|
||||
settings/chktexrc auto-merge
|
||||
"
|
||||
|
||||
defineDebugInfoPackage chktex \
|
||||
$binDir/chktex
|
||||
|
||||
BUILD()
|
||||
{
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
119
dev-tex/chktex/patches/chktex-1.7.9.patchset
Normal file
119
dev-tex/chktex/patches/chktex-1.7.9.patchset
Normal file
@@ -0,0 +1,119 @@
|
||||
From 7459a6821fa040b2d24fcc0572a9bbe9dd9027ad Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
|
||||
Date: Mon, 19 Aug 2024 15:44:04 +0200
|
||||
Subject: fix make install
|
||||
|
||||
The DVI documentation needs not be made, it isn't installed anyway by default.
|
||||
If needed, it is available in texlive_binextra_doc.
|
||||
|
||||
Also install the other man pages.
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 4c8222e..746ad9e 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -161,7 +161,7 @@ check: chktex $(srcdir)/$(TestOutFile) chktexrc
|
||||
chktex: $(OBJS)
|
||||
$(CC) $(LDFLAGS) -o chktex $(OBJS) $(LIBS)
|
||||
|
||||
-install: chktex ChkTeX.dvi
|
||||
+install: chktex
|
||||
$(MKDIR_P) $(DESTDIR)$(bindir)
|
||||
for program in chktex $(BUILT_SCRIPTS); do \
|
||||
$(INSTALL_PROGRAM) $$program $(DESTDIR)$(bindir); \
|
||||
@@ -173,6 +173,8 @@ install: chktex ChkTeX.dvi
|
||||
$(INSTALL_DATA) $(srcdir)/chktexrc $(DESTDIR)$(sysconfdir)
|
||||
if (eval echo "$(BUILT_SCRIPTS)") | egrep deweb >/dev/null 2>&1; then \
|
||||
$(MKDIR_P) $(DESTDIR)$(mandir)/man1; \
|
||||
+ cp $(srcdir)/chktex.1 $(DESTDIR)$(mandir)/man1; \
|
||||
+ cp $(srcdir)/chkweb.1 $(DESTDIR)$(mandir)/man1; \
|
||||
cp $(srcdir)/deweb.1 $(DESTDIR)$(mandir)/man1; \
|
||||
fi
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
||||
From 3ccc269f7a3b003d4017225d5b24f18c70d4afda Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
|
||||
Date: Mon, 19 Aug 2024 17:23:59 +0200
|
||||
Subject: gcc2 fixes
|
||||
|
||||
|
||||
diff --git a/FindErrs.c b/FindErrs.c
|
||||
index d817369..b46c010 100644
|
||||
--- a/FindErrs.c
|
||||
+++ b/FindErrs.c
|
||||
@@ -351,6 +351,7 @@ static char *PreProcess(void)
|
||||
|
||||
EscapePtr = TmpPtr; /* Save it for later */
|
||||
while ((TmpPtr = strstr(TmpPtr, FileSuppDelim))) {
|
||||
+ uint64_t errbit;
|
||||
TmpPtr += STRLEN(FileSuppDelim);
|
||||
error = atoi(TmpPtr);
|
||||
|
||||
@@ -358,7 +359,7 @@ static char *PreProcess(void)
|
||||
{
|
||||
PrintPrgErr(pmSuppTooHigh, error, MaxSuppressionBits);
|
||||
}
|
||||
- uint64_t errbit = ((uint64_t)1 << abs(error));
|
||||
+ errbit = ((uint64_t)1 << abs(error));
|
||||
if (error > 0)
|
||||
{
|
||||
*(uint64_t *)StkTop(&FileSuppStack) |= errbit;
|
||||
@@ -1133,19 +1134,19 @@ static void CheckDash(void)
|
||||
* this on the first dash */
|
||||
if (*TmpPtr != '-')
|
||||
{
|
||||
+ struct WordList *el = &DashExcpt;
|
||||
+
|
||||
/* PrePtr now points to the beginning of the hyphenated phrase */
|
||||
PrePtr = ++TmpPtr;
|
||||
|
||||
- struct WordList *el = &DashExcpt;
|
||||
-
|
||||
FORWL(i, *el)
|
||||
{
|
||||
char *e = el->Stack.Data[i];
|
||||
+ int FoundHyphenDiff = FALSE;
|
||||
TmpPtr = PrePtr;
|
||||
|
||||
/* Walk through the strings until we find a
|
||||
* mismatch. */
|
||||
- int FoundHyphenDiff = FALSE;
|
||||
while (*e && *TmpPtr && *e == *TmpPtr)
|
||||
{
|
||||
/* Skip past characters that are the same */
|
||||
diff --git a/OpSys.c b/OpSys.c
|
||||
index 67e2bea..4645966 100644
|
||||
--- a/OpSys.c
|
||||
+++ b/OpSys.c
|
||||
@@ -484,6 +484,8 @@ static int HasFile(char *Dir, const char *Filename, const char *App)
|
||||
|
||||
void AddDirectoryFromRelativeFile(const char * Filename, struct WordList *TeXInputs)
|
||||
{
|
||||
+ char buf[BUFFER_SIZE];
|
||||
+ char * end;
|
||||
if ( ! Filename )
|
||||
return;
|
||||
|
||||
@@ -492,7 +494,6 @@ void AddDirectoryFromRelativeFile(const char * Filename, struct WordList *TeXInp
|
||||
return;
|
||||
|
||||
|
||||
- char buf[BUFFER_SIZE];
|
||||
if ( strchr(DIRCHARS,Filename[0]) ) {
|
||||
strcpy(buf,Filename);
|
||||
} else {
|
||||
@@ -501,7 +502,7 @@ void AddDirectoryFromRelativeFile(const char * Filename, struct WordList *TeXInp
|
||||
}
|
||||
|
||||
/* Keep up to the final SLASH -- that will be the directory. */
|
||||
- char * end = strrchr(buf,SLASH);
|
||||
+ end = strrchr(buf,SLASH);
|
||||
*end = '\0';
|
||||
InsertWord(buf,TeXInputs);
|
||||
}
|
||||
--
|
||||
2.45.2
|
||||
|
||||
Reference in New Issue
Block a user