Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add chktex 1.7.6 #12070

Merged
merged 16 commits into from
Jul 21, 2020
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); \
33 changes: 33 additions & 0 deletions recipes/chktex/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
:: 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

bash -lxc "ls -l %PREFIX%/bin"
scopatz marked this conversation as resolved.
Show resolved Hide resolved

bash -lxc "mv %PREFIX%/bin/deweb %PREFIX%/bin/deweb.exe"
if errorlevel 1 exit 1

bash -lxc "mv %PREFIX%/bin/chkweb %PREFIX%/bin/chkweb.exe"
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
75 changes: 75 additions & 0 deletions recipes/chktex/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{% 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]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@conda-forge/help-c-cpp I'm having some issues getting libncurses*.dylib to be picked up on OSX... any thoughts? Seems like it should just be another flag to configure, but it's eluding me...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it have to do with the version number in the file name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, i guess i need to just dig harder into all the configure tooling... all the r-* recipes call out this version in this location in specific, and it's somehow available in sysroot, but I don't know where that comes from...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this would go away if you also added --disable-posixre to the configure line on Mac? This is the only thing I could think of that would be pulling in system libraries. Alternatively. You could add a export CFLAGS="${CFLAGS} -l$PREFIX/lib/libnurses${SH_EXT}" or something to explicitly link against the right ncurses


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
# - deweb --version
# - chkweb --version

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