Thu Aug 21 15:22:45 2008 UTC ()
libfetch-2.15:
Rewrite errlist processing to include the full message, not just the
first word.


(joerg)
diff -r1.17 -r1.18 pkgsrc/net/libfetch/Makefile
diff -r1.3 -r1.4 pkgsrc/net/libfetch/files/Makefile
diff -r1.1.1.1 -r0 pkgsrc/net/libfetch/files/errlist.awk
diff -r0 -r1.1 pkgsrc/net/libfetch/files/errlist.sh

cvs diff -r1.17 -r1.18 pkgsrc/net/libfetch/Makefile (expand / switch to unified diff)

--- pkgsrc/net/libfetch/Makefile 2008/05/09 00:39:06 1.17
+++ pkgsrc/net/libfetch/Makefile 2008/08/21 15:22:45 1.18
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.17 2008/05/09 00:39:06 joerg Exp $ 1# $NetBSD: Makefile,v 1.18 2008/08/21 15:22:45 joerg Exp $
2# 2#
3 3
4DISTNAME= libfetch-2.14 4DISTNAME= libfetch-2.15
5CATEGORIES= net 5CATEGORIES= net
6MASTER_SITES= # empty 6MASTER_SITES= # empty
7DISTFILES= # empty 7DISTFILES= # empty
8 8
9NO_CHECKSUM= yes 9NO_CHECKSUM= yes
10 10
11MAINTAINER= joerg@NetBSD.org 11MAINTAINER= joerg@NetBSD.org
12HOMEPAGE= http://www.FreeBSD.org/ 12HOMEPAGE= http://www.FreeBSD.org/
13COMMENT= Library to access HTTP/FTP server 13COMMENT= Library to access HTTP/FTP server
14#LICENSE= modified-bsd 14#LICENSE= modified-bsd
15 15
16PKG_DESTDIR_SUPPORT= user-destdir 16PKG_DESTDIR_SUPPORT= user-destdir
17 17

cvs diff -r1.3 -r1.4 pkgsrc/net/libfetch/files/Makefile (expand / switch to unified diff)

--- pkgsrc/net/libfetch/files/Makefile 2008/04/07 19:39:24 1.3
+++ pkgsrc/net/libfetch/files/Makefile 2008/08/21 15:22:45 1.4
@@ -21,22 +21,22 @@ FETCH_WITH_OPENSSL?= no @@ -21,22 +21,22 @@ FETCH_WITH_OPENSSL?= no
21.if !empty(FETCH_WITH_INET6:M[yY][eE][sS]) 21.if !empty(FETCH_WITH_INET6:M[yY][eE][sS])
22CPPFLAGS+= -DINET6 22CPPFLAGS+= -DINET6
23.endif 23.endif
24 24
25.if !empty(FETCH_WITH_OPENSSL:M[yY][eE][sS]) 25.if !empty(FETCH_WITH_OPENSSL:M[yY][eE][sS])
26CPPFLAGS+= -DWITH_SSL 26CPPFLAGS+= -DWITH_SSL
27LDADD= -lssl -lcrypto 27LDADD= -lssl -lcrypto
28.endif 28.endif
29 29
30CPPFLAGS+= -DFTP_COMBINE_CWDS 30CPPFLAGS+= -DFTP_COMBINE_CWDS
31 31
32WARNS?= 4 32WARNS?= 4
33 33
34ftperr.h: ${.CURDIR}/ftp.errors ${.CURDIR}/Makefile ${.CURDIR}/errlist.awk 34ftperr.h: ${.CURDIR}/ftp.errors ${.CURDIR}/Makefile ${.CURDIR}/errlist.sh
35 awk -v variable=ftp_errlist -v protocol=FTP \ 35 ${.CURDIR}/errlist.sh ftp_errlist FTP \
36 -f ${.CURDIR}/errlist.awk ${.CURDIR}/ftp.errors > ${.TARGET} 36 ${.CURDIR}/ftp.errors > ${.TARGET}
37 37
38httperr.h: ${.CURDIR}/http.errors ${.CURDIR}/Makefile ${.CURDIR}/errlist.awk 38httperr.h: ${.CURDIR}/http.errors ${.CURDIR}/Makefile ${.CURDIR}/errlist.sh
39 awk -v variable=http_errlist -v protocol=HTTP \ 39 ${.CURDIR}/errlist.sh http_errlist HTTP \
40 -f ${.CURDIR}/errlist.awk ${.CURDIR}/http.errors > ${.TARGET} 40 ${.CURDIR}/http.errors > ${.TARGET}
41 41
42.include <bsd.lib.mk> 42.include <bsd.lib.mk>

File Deleted: pkgsrc/net/libfetch/files/Attic/errlist.awk

File Added: pkgsrc/net/libfetch/files/errlist.sh
#!/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"