Skip to content

Commit

Permalink
Merge pull request #12070 from bollwyvl/add-chktex-176
Browse files Browse the repository at this point in the history
add chktex 1.7.6
  • Loading branch information
scopatz authored Jul 21, 2020
2 parents bac0329 + 19bd72a commit 3c126c7
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 0 deletions.
11 changes: 11 additions & 0 deletions recipes/chktex/000-makefile-no-dvi.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- Makefile.in 2016-09-10 00:14:58.000000000 -0400
+++ Makefile.in 2020-06-30 23:30:05.594897450 -0400
@@ -159,7 +159,7 @@
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); \
25 changes: 25 additions & 0 deletions recipes/chktex/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
:: Delegate to the Unix script. We need to translate the key path variables
:: to be Unix-y rather than Windows-y, though.

copy "%RECIPE_DIR%\build.sh" .

set MSYSTEM=MINGW%ARCH%
set MSYS2_PATH_TYPE=inherit
set CHERE_INVOKING=1

set "saved_recipe_dir=%RECIPE_DIR%"
FOR /F "delims=" %%i IN ('cygpath.exe -u -p "%PATH%"') DO set "PATH_OVERRIDE=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -u "%BUILD_PREFIX%"') DO set "BUILD_PREFIX=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -m "%LIBRARY_PREFIX%"') DO set "LIBRARY_PREFIX_M=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -u "%LIBRARY_PREFIX%"') DO set "LIBRARY_PREFIX_U=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -u "%PREFIX%"') DO set "PREFIX=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -u "%PYTHON%"') DO set "PYTHON=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -u "%RECIPE_DIR%"') DO set "RECIPE_DIR=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -u "%SP_DIR%"') DO set "SP_DIR=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -u "%SRC_DIR%"') DO set "SRC_DIR=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -u "%STDLIB_DIR%"') DO set "STDLIB_DIR=%%i"

bash -lxc "./build.sh"
if errorlevel 1 exit 1

exit 0
13 changes: 13 additions & 0 deletions recipes/chktex/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -eux

# TODO: probably want pcre, but keep segfaulting with 8.44
./configure \
--prefix=$PREFIX \
--disable-pcre

make chktex

make install

make test
76 changes: 76 additions & 0 deletions recipes/chktex/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{% set name = "chktex" %}
{% set version = "1.7.6" %}
{% set am_version = "1.15" %}

package:
name: {{ name }}
version: {{ version }}

source:
url: https://download.savannah.gnu.org/releases/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: 8ac0e5ca213b2012d44c28f9e4feb9783df44750eb0c30a237d81ff58ef34c8d
patches:
- 000-makefile-no-dvi.patch
# TODO: figure out how to get osx to use ncurses

build:
number: 0
missing_dso_whitelist:
- /usr/lib/libncurses.5.4.dylib # [osx]

requirements:
build:
- m2-autoconf # [win]
- m2-automake{{ am_version }} # [win]
- m2-libtool # [win]
- m2-patch # [win]
- m2-sed # [win]
- m2w64-pkg-config # [win]
- posix # [win]
- {{ compiler('m2w64_c') }} # [win]
- {{ compiler('c') }} # [unix]
- autoconf # [unix]
- automake # [unix]
- gettext # [unix]
- libtool # [unix]
- make # [unix]
- patch # [unix]
- pkg-config # [unix]
- sed # [unix]
host:
- ncurses # [unix]
- m2-ncurses # [win]
# TODO: probably want pcre, but keep segfaulting with 8.44
# - pcre # [unix]
# - m2-pcre # [win]
run:
- ncurses # [unix]
- m2-ncurses # [win]
# - pcre # [unix]
# - m2-pcre # [win]

test:
commands:
- conda inspect linkages -p $PREFIX {{ name }} # [unix]
- chktex --version
# these are shell scripts... but don't appear to be needed for chktex to "work"
- deweb --version # [unix]
- chkweb --version # [unix]

about:
home: https://www.nongnu.org/chktex
license: GPL-2.0-or-later
license_family: GPL
license_file: COPYING
summary: LaTeX semantic checker
description: |
This program has been written in frustration because some constructs in
LaTeX are sometimes non-intuitive, and easy to forget. It is _not_ a
replacement for the built-in checker in LaTeX; however it catches some
typographic errors LaTeX oversees. In other words, it is Lint for LaTeX.
Filters are also provided for checking the LaTeX parts of CWEB documents.
dev_url: https://savannah.nongnu.org/projects/chktex

extra:
recipe-maintainers:
- bollwyvl

0 comments on commit 3c126c7

Please sign in to comment.