mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
system/untex: New maintainer, minor fixes.
Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
parent
da0da5da8d
commit
fcf3687792
3 changed files with 65 additions and 8 deletions
|
@ -1 +1,3 @@
|
|||
untex (strip LaTeX commands from source file)
|
||||
|
||||
A tool for removing LaTeX commands from input.
|
||||
|
|
47
system/untex/fix_warnings.diff
Normal file
47
system/untex/fix_warnings.diff
Normal file
|
@ -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;
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue