pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/libfetch libfetch-2.15:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/df9a538efc64
branches:  trunk
changeset: 546104:df9a538efc64
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Aug 21 15:22:45 2008 +0000

description:
libfetch-2.15:
Rewrite errlist processing to include the full message, not just the
first word.

diffstat:

 net/libfetch/Makefile          |   4 ++--
 net/libfetch/files/Makefile    |  12 ++++++------
 net/libfetch/files/errlist.awk |  12 ------------
 net/libfetch/files/errlist.sh  |  11 +++++++++++
 4 files changed, 19 insertions(+), 20 deletions(-)

diffs (66 lines):

diff -r 658eb6248094 -r df9a538efc64 net/libfetch/Makefile
--- a/net/libfetch/Makefile     Thu Aug 21 13:33:39 2008 +0000
+++ b/net/libfetch/Makefile     Thu Aug 21 15:22:45 2008 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.17 2008/05/09 00:39:06 joerg Exp $
+# $NetBSD: Makefile,v 1.18 2008/08/21 15:22:45 joerg Exp $
 #
 
-DISTNAME=      libfetch-2.14
+DISTNAME=      libfetch-2.15
 CATEGORIES=    net
 MASTER_SITES=  # empty
 DISTFILES=     # empty
diff -r 658eb6248094 -r df9a538efc64 net/libfetch/files/Makefile
--- a/net/libfetch/files/Makefile       Thu Aug 21 13:33:39 2008 +0000
+++ b/net/libfetch/files/Makefile       Thu Aug 21 15:22:45 2008 +0000
@@ -31,12 +31,12 @@
 
 WARNS?=                4
 
-ftperr.h: ${.CURDIR}/ftp.errors ${.CURDIR}/Makefile ${.CURDIR}/errlist.awk
-       awk -v variable=ftp_errlist -v protocol=FTP \
-           -f ${.CURDIR}/errlist.awk ${.CURDIR}/ftp.errors > ${.TARGET}
+ftperr.h: ${.CURDIR}/ftp.errors ${.CURDIR}/Makefile ${.CURDIR}/errlist.sh
+       ${.CURDIR}/errlist.sh ftp_errlist FTP \
+           ${.CURDIR}/ftp.errors > ${.TARGET}
 
-httperr.h: ${.CURDIR}/http.errors ${.CURDIR}/Makefile ${.CURDIR}/errlist.awk
-       awk -v variable=http_errlist -v protocol=HTTP \
-           -f ${.CURDIR}/errlist.awk ${.CURDIR}/http.errors > ${.TARGET}
+httperr.h: ${.CURDIR}/http.errors ${.CURDIR}/Makefile ${.CURDIR}/errlist.sh
+       ${.CURDIR}/errlist.sh http_errlist HTTP \
+           ${.CURDIR}/http.errors > ${.TARGET}
 
 .include <bsd.lib.mk>
diff -r 658eb6248094 -r df9a538efc64 net/libfetch/files/errlist.awk
--- a/net/libfetch/files/errlist.awk    Thu Aug 21 13:33:39 2008 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-BEGIN {
-       printf "static struct fetcherr %s[] = {\n", variable
-}
-
-/^#/   { next }
-
-{      printf "\t{ %d, FETCH_%s, \"%s\" },\n", $1, $2, $3 }
-
-END {
-       printf "\t{ -1, FETCH_UNKNOWN, \"Unknown %s error\" }\n", protocol
-       printf "};\n"
-}
diff -r 658eb6248094 -r df9a538efc64 net/libfetch/files/errlist.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/libfetch/files/errlist.sh     Thu Aug 21 15:22:45 2008 +0000
@@ -0,0 +1,11 @@
+#!/bin/sh
+# $NetBSD: errlist.sh,v 1.1 2008/08/21 15:22:45 joerg Exp $
+
+printf "static struct fetcherr $1[] = {\n"
+while read code type msg; do
+       [ "${code}" = "#" ] && continue
+       printf "\t{ ${code}, FETCH_${type}, \"${msg}\" },\n"
+done < $3
+
+printf "\t{ -1, FETCH_UNKNOWN, \"Unknown $2 error\" }\n"
+printf "};\n"



Home | Main Index | Thread Index | Old Index