diff options
author | B. Watson <yalhcru@gmail.com> | 2017-06-26 17:35:24 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-07-01 07:42:26 +0700 |
commit | fcf3687792713dbe269f4e72b0378be88f540246 (patch) | |
tree | bc2341e7e61b488835957c1df2c61c2eec252700 /system/untex | |
parent | da0da5da8d33a6c28f8f6c5ed73873dc85ef8610 (diff) | |
download | slackbuilds-fcf3687792713dbe269f4e72b0378be88f540246.tar.gz |
system/untex: New maintainer, minor fixes.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'system/untex')
-rw-r--r-- | system/untex/README | 2 | ||||
-rw-r--r-- | system/untex/fix_warnings.diff | 47 | ||||
-rw-r--r-- | system/untex/untex.SlackBuild | 24 |
3 files changed, 65 insertions, 8 deletions
diff --git a/system/untex/README b/system/untex/README index d505214683..63b64978cc 100644 --- a/system/untex/README +++ b/system/untex/README @@ -1 +1,3 @@ +untex (strip LaTeX commands from source file) + A tool for removing LaTeX commands from input. diff --git a/system/untex/fix_warnings.diff b/system/untex/fix_warnings.diff new file mode 100644 index 0000000000..23d3de71fe --- /dev/null +++ b/system/untex/fix_warnings.diff @@ -0,0 +1,47 @@ +diff -Naur a/untex.c b/untex.c +--- a/untex.c 1995-11-22 10:07:51.000000000 -0500 ++++ b/untex.c 2017-06-26 17:18:46.919412040 -0400 +@@ -43,6 +43,8 @@ + */ + + ++#include <stdlib.h> ++#include <string.h> + #include <stddef.h> + #include <stdio.h> + #include <ctype.h> +@@ -75,7 +77,7 @@ + char *umlaut(int c); + int parsecmd(FILE *inf); + int skipcomment(FILE *inf, int *c); +-int skip(FILE *inf, int c); ++void skip(FILE *inf, int c); + + int main(int argc, char *argv[]) + { +@@ -292,7 +294,7 @@ + return((*c != EOF)); + } + +-int skip(FILE *inf, int c) ++void skip(FILE *inf, int c) + { + int cc, ec, openb, closeb; + switch (c) { +@@ -304,7 +306,7 @@ + cc = getc(inf); + if (cc != c) { + ungetc(cc, inf); +- return(cc != EOF); ++ return; + } + openb = 1; + closeb = 0; +@@ -342,7 +344,6 @@ + int c, ce; + char cmd[MAXCMDLEN], env[MAXCMDLEN], envtst[MAXCMDLEN]; + int fnc, cmdc, envc, i, openb, closeb; +- int proceed; + char fname[MAXFILENAMELEN]; + + fnc = envc = cmdc = 0; diff --git a/system/untex/untex.SlackBuild b/system/untex/untex.SlackBuild index b6250d6acb..0b3af3470a 100644 --- a/system/untex/untex.SlackBuild +++ b/system/untex/untex.SlackBuild @@ -2,7 +2,9 @@ # Slackware build script for untex -# Written by Niki Kovacs <info@microlinux.fr> +# Written by Niki Kovacs (email removed) +# +# Now maintained by B. Watson <yalhcru@gmail.com> # # All rights reserved. # @@ -23,9 +25,14 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20170626 bkw: +# - take over maintenance +# - fix missing includes and other compiler warnings +# - minor script tweaks + PRGNAM=untex VERSION=${VERSION:-1.3} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -71,13 +78,14 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -make -install -Dm 0755 untex $PKG/usr/bin/untex -install -Dm 0644 untex.man $PKG/usr/man/man1/untex.1 -gzip -9 $PKG/usr/man/man1/untex.1 +# 20170626 bkw: fix most of the compiler warnings we get with -Wall. This +# should help with -current's gcc7, which is quite picky. +patch -p1 < $CWD/fix_warnings.diff -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +make CFLAGS="$SLKCFLAGS" +install -s -Dm 0755 $PRGNAM $PKG/usr/bin/$PRGNAM +install -Dm 0644 $PRGNAM.man $PKG/usr/man/man1/$PRGNAM.1 +gzip -9 $PKG/usr/man/man1/$PRGNAM.1 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |