diff options
author | dholland <dholland@pkgsrc.org> | 2014-01-02 07:34:11 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2014-01-02 07:34:11 +0000 |
commit | 105eb29a04c302d22ac994fb3ae5b324999a7c7f (patch) | |
tree | 28db491af69c08846c6d4aefd3325422e056eac4 /graphics/urt | |
parent | 4f4385bb201d8b8af983aeef0aba45e5dbb2f57d (diff) | |
download | pkgsrc-105eb29a04c302d22ac994fb3ae5b324999a7c7f.tar.gz |
Don't use sys_errlist; among other things it apparently fails on
Solaris 11. While here, patch the same small offending program to
not use mktemp (probably unsafely) and to not exhibit void main.
PKGREVISION++.
Diffstat (limited to 'graphics/urt')
-rw-r--r-- | graphics/urt/Makefile | 4 | ||||
-rw-r--r-- | graphics/urt/distinfo | 4 | ||||
-rw-r--r-- | graphics/urt/patches/patch-ah | 75 |
3 files changed, 71 insertions, 12 deletions
diff --git a/graphics/urt/Makefile b/graphics/urt/Makefile index e4a0c753636..a2561ef7c45 100644 --- a/graphics/urt/Makefile +++ b/graphics/urt/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.60 2013/02/16 11:19:42 wiz Exp $ +# $NetBSD: Makefile,v 1.61 2014/01/02 07:34:11 dholland Exp $ DISTNAME= urt PKGNAME= urt-3.1b1 -PKGREVISION= 15 +PKGREVISION= 16 CATEGORIES= graphics MASTER_SITES= ftp://ftp.iastate.edu/pub/utah-raster/ DISTFILES= urt-3.1b.tar.Z urt-doc.tar.Z urt-img.tar.Z diff --git a/graphics/urt/distinfo b/graphics/urt/distinfo index e3c4800bc86..5c1c7614761 100644 --- a/graphics/urt/distinfo +++ b/graphics/urt/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.9 2007/05/28 20:14:00 heinz Exp $ +$NetBSD: distinfo,v 1.10 2014/01/02 07:34:11 dholland Exp $ SHA1 (urt-3.1b-3.1b1.patch) = 27aefd80b480af298fe4f9542a2efbddba8a174b RMD160 (urt-3.1b-3.1b1.patch) = 1eca13b44326f632c98312d364434d785751609a @@ -19,7 +19,7 @@ SHA1 (patch-ad) = 764806da7b3b4798ef2627df376db8dcc7c5e97f SHA1 (patch-ae) = f6bd6f34fa3b06a003d9daf563fefc14aab1a096 SHA1 (patch-af) = ef433d729a4c087eb9ff1474e393064701295b66 SHA1 (patch-ag) = 2017d46b8bf8281446cb092841f26753020d87f6 -SHA1 (patch-ah) = e7c89cc45258b40586843c83973e80a9ece34674 +SHA1 (patch-ah) = b5469457d2d49729e18280c9cb86d7baa349f006 SHA1 (patch-ai) = 27ae6c03df5a13bfcf3e56e64f0f1278cdaef5e8 SHA1 (patch-aj) = a3207a60ceacb7deedab1dc96efb8b4c452fea26 SHA1 (patch-ak) = e4efa3d7843e4258c735428361835001a5eb4fed diff --git a/graphics/urt/patches/patch-ah b/graphics/urt/patches/patch-ah index b2a2533f84d..117e3b94cb6 100644 --- a/graphics/urt/patches/patch-ah +++ b/graphics/urt/patches/patch-ah @@ -1,19 +1,46 @@ -$NetBSD: patch-ah,v 1.4 2006/05/11 14:46:35 joerg Exp $ +$NetBSD: patch-ah,v 1.5 2014/01/02 07:34:11 dholland Exp $ + +- use standard headers +- don't declare own errno +- don't use sys_errlist +- don't use mktemp +- avoid void main +- use c89 --- tools/into.c.orig 1992-04-30 14:10:15.000000000 +0000 +++ tools/into.c -@@ -40,8 +40,9 @@ static char temp[] = "intoXXXXXXXX"; +@@ -27,6 +27,7 @@ + + #include "rle_config.h" + #include <stdio.h> ++#include <string.h> + #include <errno.h> + #include <sys/types.h> + #include <sys/param.h> /* for MAXPATHLEN */ +@@ -40,19 +41,14 @@ static char temp[] = "intoXXXXXXXX"; static char buf[MAXPATHLEN+1]; short forceflg; /* overwrite an unwritable file? */ -extern int errno; -+#ifndef BSD - extern char *sys_errlist[]; -+#endif +-extern char *sys_errlist[]; +- +-void +-main(argc, argv) +-int argc; +-char **argv; ++int ++main(int argc, char **argv) + { + char *cp; + int c; + FILE * outf; + char iobuf[BUFSIZ]; +- int size; ++ int size, fd; - void - main(argc, argv) -@@ -72,7 +73,7 @@ char **argv; + /* Don't allow files named "-f" in order to catch common error */ + if (argc >= 2 && !strcmp(argv[1], "-f")) +@@ -72,7 +68,7 @@ char **argv; exit(1); } @@ -22,3 +49,35 @@ $NetBSD: patch-ah,v 1.4 2006/05/11 14:46:35 joerg Exp $ { c = *++cp; *cp = 0; +@@ -82,9 +78,9 @@ char **argv; + } + else + strcpy( buf, temp ); +- mktemp( buf ); ++ fd = mkstemp( buf ); + +- if ( (outf = fopen( buf, "w" )) == NULL ) ++ if ( fd < 0 || (outf = fdopen( fd, "w" )) == NULL ) + { + perror(buf); + exit(1); +@@ -103,7 +99,7 @@ char **argv; + if (ferror(outf)) + { + fprintf(stderr, "into: %s, \"%s\" not modified\n", +- sys_errlist[errno], argv[1]); ++ strerror(errno), argv[1]); + unlink(buf); + exit(1); + } +@@ -118,8 +114,8 @@ char **argv; + } + + #ifdef NEED_RENAME +-rename( file1, file2 ) +-char *file1, *file2; ++int ++rename( char *file1, char *file2 ) + { + struct stat st; + |