From 169c1b3595a7bdaae38d81d24c024503bc20dc3b Mon Sep 17 00:00:00 2001 From: okan Date: Tue, 18 Nov 2008 20:00:09 +0000 Subject: [PATCH] backout 0.10.5 update due incompatible license (apache 1 -> apache 2) change requested by mbalmer@ --- www/clearsilver/Makefile | 10 +++-- www/clearsilver/distinfo | 10 ++--- www/clearsilver/patches/patch-cgi_cgi_c | 10 ++--- www/clearsilver/patches/patch-cgi_cgi_h | 8 ++-- www/clearsilver/patches/patch-cgi_cgiwrap_c | 11 +++++ www/clearsilver/patches/patch-cgi_html_c | 8 ++-- www/clearsilver/patches/patch-cs_csparse_c | 17 ++------ www/clearsilver/patches/patch-python_setup_py | 17 ++++++++ www/clearsilver/patches/patch-util_filter_h | 6 +-- www/clearsilver/patches/patch-util_neo_err_h | 43 ++++++++++++------- www/clearsilver/patches/patch-util_neo_hdf_c | 32 +++----------- www/clearsilver/patches/patch-util_neo_str_c | 10 ++--- www/clearsilver/pkg/PLIST | 13 +++--- 13 files changed, 103 insertions(+), 92 deletions(-) create mode 100644 www/clearsilver/patches/patch-cgi_cgiwrap_c create mode 100644 www/clearsilver/patches/patch-python_setup_py diff --git a/www/clearsilver/Makefile b/www/clearsilver/Makefile index d533f2ad86a..a3acd15a94e 100644 --- a/www/clearsilver/Makefile +++ b/www/clearsilver/Makefile @@ -1,17 +1,18 @@ -# $OpenBSD: Makefile,v 1.15 2008/11/11 19:58:15 okan Exp $ +# $OpenBSD: Makefile,v 1.16 2008/11/18 20:00:09 okan Exp $ SHARED_ONLY= Yes COMMENT= fast, powerful, and language-neutral HTML template system -DISTNAME= clearsilver-0.10.5 +DISTNAME= clearsilver-0.10.4 +PKGNAME= ${DISTNAME}p1v0 CATEGORIES= www net HOMEPAGE= http://www.clearsilver.net/ MAINTAINER= Markus Friedl -# Apache 2 +# Apache 1 PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes @@ -37,6 +38,9 @@ CONFIGURE_ARGS+= --with-python=${MODPY_BIN} CONFIGURE_ARGS+= --disable-python .endif +pre-configure: + @perl -pi -e 's|%%WRKSRC%%|${WRKSRC}|g' ${WRKSRC}/python/setup.py + do-regress: @cd ${WRKSRC}/perl && ${MAKE_PROGRAM} test diff --git a/www/clearsilver/distinfo b/www/clearsilver/distinfo index 4d1870d87da..9f43b786aa5 100644 --- a/www/clearsilver/distinfo +++ b/www/clearsilver/distinfo @@ -1,5 +1,5 @@ -MD5 (clearsilver-0.10.5.tar.gz) = uMDH++DvXgbgyTXxNDBNRA== -RMD160 (clearsilver-0.10.5.tar.gz) = vVxhbzJrVE34p07scamKR0tAgkk= -SHA1 (clearsilver-0.10.5.tar.gz) = E4hl3JHicyj+KfyqrBvGVY8Z3XU= -SHA256 (clearsilver-0.10.5.tar.gz) = Hp2gON6v3dPQwcUQYmwovloPTxe5CR1Xf9MOfFuohoA= -SIZE (clearsilver-0.10.5.tar.gz) = 439190 +MD5 (clearsilver-0.10.4.tar.gz) = lSPffvF+QaAduuUDKj5FCw== +RMD160 (clearsilver-0.10.4.tar.gz) = IFDP0mbpxOMNtoQXxuKq8rm8+NU= +SHA1 (clearsilver-0.10.4.tar.gz) = 8fMDmDpPQ+LzG+cwLn7L3oAQVp8= +SHA256 (clearsilver-0.10.4.tar.gz) = fY5K3bNHj8quxirIdOAiUC1vk7iZsQsUOUFwrEQ+tCs= +SIZE (clearsilver-0.10.4.tar.gz) = 655730 diff --git a/www/clearsilver/patches/patch-cgi_cgi_c b/www/clearsilver/patches/patch-cgi_cgi_c index 6717ffc231f..7b9ff1819aa 100644 --- a/www/clearsilver/patches/patch-cgi_cgi_c +++ b/www/clearsilver/patches/patch-cgi_cgi_c @@ -1,6 +1,6 @@ ---- cgi/cgi.c.orig Wed Jul 11 22:38:03 2007 -+++ cgi/cgi.c Thu Jun 26 13:42:32 2008 -@@ -508,7 +508,7 @@ static void _launch_debugger (CGI *cgi, char *display) +--- cgi/cgi.c.orig Fri Dec 2 10:34:04 2005 ++++ cgi/cgi.c Mon May 8 16:54:19 2006 +@@ -646,7 +646,7 @@ static void _launch_debugger (CGI *cgi, if (!pid) { @@ -9,7 +9,7 @@ execl("/bin/sh", "sh", "-c", buffer, NULL); } else -@@ -1210,11 +1210,11 @@ NEOERR *cgi_output (CGI *cgi, STRING *str) +@@ -1341,11 +1341,11 @@ NEOERR *cgi_output (CGI *cgi, STRING *st { if (use_gzip) { @@ -23,7 +23,7 @@ Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE); err = cgiwrap_write(gz_buf, 10); -@@ -1226,7 +1226,7 @@ NEOERR *cgi_output (CGI *cgi, STRING *str) +@@ -1357,7 +1357,7 @@ NEOERR *cgi_output (CGI *cgi, STRING *st if (use_gzip) { /* write crc and len in network order */ diff --git a/www/clearsilver/patches/patch-cgi_cgi_h b/www/clearsilver/patches/patch-cgi_cgi_h index fbc611617c8..4a9004b032b 100644 --- a/www/clearsilver/patches/patch-cgi_cgi_h +++ b/www/clearsilver/patches/patch-cgi_cgi_h @@ -1,7 +1,7 @@ -$OpenBSD: patch-cgi_cgi_h,v 1.3 2008/11/11 19:58:15 okan Exp $ ---- cgi/cgi.h.orig Wed Jul 11 22:35:55 2007 -+++ cgi/cgi.h Thu Jun 26 13:42:32 2008 -@@ -267,11 +267,11 @@ FILE *cgi_filehandle (CGI *cgi, const char *form_name) +$OpenBSD: patch-cgi_cgi_h,v 1.4 2008/11/18 20:00:09 okan Exp $ +--- cgi/cgi.h.orig Thu Dec 1 04:57:32 2005 ++++ cgi/cgi.h Mon May 8 16:54:19 2006 +@@ -267,11 +267,11 @@ FILE *cgi_filehandle (CGI *cgi, const ch * removed from future versions in favor of some sort of * user error mechanism. * Input: cgi - a pointer to a CGI struct diff --git a/www/clearsilver/patches/patch-cgi_cgiwrap_c b/www/clearsilver/patches/patch-cgi_cgiwrap_c new file mode 100644 index 00000000000..f6743ee9d5c --- /dev/null +++ b/www/clearsilver/patches/patch-cgi_cgiwrap_c @@ -0,0 +1,11 @@ +$OpenBSD: patch-cgi_cgiwrap_c,v 1.3 2008/11/18 20:00:09 okan Exp $ +--- cgi/cgiwrap.c.orig Tue Nov 18 14:53:10 2008 ++++ cgi/cgiwrap.c Tue Nov 18 14:53:21 2008 +@@ -11,7 +11,6 @@ + + #include "cs_config.h" + +-#include + #include + #include + #include diff --git a/www/clearsilver/patches/patch-cgi_html_c b/www/clearsilver/patches/patch-cgi_html_c index b9cee809c40..66a1da0f439 100644 --- a/www/clearsilver/patches/patch-cgi_html_c +++ b/www/clearsilver/patches/patch-cgi_html_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-cgi_html_c,v 1.3 2008/11/11 19:58:15 okan Exp $ ---- cgi/html.c.orig Thu Oct 19 19:26:35 2006 -+++ cgi/html.c Thu Jun 26 13:42:32 2008 -@@ -392,7 +392,7 @@ static NEOERR *split_and_convert (const char *src, int +$OpenBSD: patch-cgi_html_c,v 1.4 2008/11/18 20:00:09 okan Exp $ +--- cgi/html.c.orig Thu Dec 1 05:03:09 2005 ++++ cgi/html.c Mon May 8 16:54:19 2006 +@@ -392,7 +392,7 @@ static NEOERR *split_and_convert (const "Unable to allocate memory to convert url"); break; } diff --git a/www/clearsilver/patches/patch-cs_csparse_c b/www/clearsilver/patches/patch-cs_csparse_c index 27b36b810b2..dc57b880adf 100644 --- a/www/clearsilver/patches/patch-cs_csparse_c +++ b/www/clearsilver/patches/patch-cs_csparse_c @@ -1,6 +1,6 @@ ---- cs/csparse.c.orig Wed Jul 11 22:37:34 2007 -+++ cs/csparse.c Sun Nov 9 16:28:06 2008 -@@ -1948,6 +1948,7 @@ static NEOERR *eval_expr_string(CSPARSE *parse, CSARG +--- cs/csparse.c.orig Fri Feb 3 03:17:41 2006 ++++ cs/csparse.c Mon May 8 16:54:19 2006 +@@ -1706,6 +1706,7 @@ static NEOERR *eval_expr_string(CSPARSE { char *s1, *s2; int out; @@ -8,7 +8,7 @@ result->op_type = CS_TYPE_NUM; s1 = arg_eval (parse, arg1); -@@ -2022,11 +2023,12 @@ static NEOERR *eval_expr_string(CSPARSE *parse, CSARG +@@ -1780,11 +1781,12 @@ static NEOERR *eval_expr_string(CSPARSE case CS_OP_ADD: result->op_type = CS_TYPE_STRING; result->alloc = 1; @@ -24,12 +24,3 @@ break; default: ne_warn ("Unsupported op %s in eval_expr_string", expand_token_type(op, 1)); -@@ -3717,7 +3719,7 @@ static NEOERR * _builtin_str_crc(CSPARSE *parse, CS_FU - if (val.op_type & (CS_TYPE_VAR | CS_TYPE_STRING)) - { - char *s = arg_eval(parse, &val); -- if (s) result->n = ne_crc((unsigned char *)s, strlen(s)); -+ if (s) result->n = (INT32) ne_crc((unsigned char *)s, strlen(s)); - } - if (val.alloc) free(val.s); - return STATUS_OK; diff --git a/www/clearsilver/patches/patch-python_setup_py b/www/clearsilver/patches/patch-python_setup_py new file mode 100644 index 00000000000..45508275cbd --- /dev/null +++ b/www/clearsilver/patches/patch-python_setup_py @@ -0,0 +1,17 @@ +$OpenBSD: patch-python_setup_py,v 1.4 2008/11/18 20:00:09 okan Exp $ +--- python/setup.py.orig Tue Nov 18 14:53:47 2008 ++++ python/setup.py Tue Nov 18 14:54:31 2008 +@@ -28,11 +28,11 @@ LDSHARED = "gcc -shared" + ## Actually, forget that, I'm just going to load and parse the rules.mk + ## file and build what I need + +-if not os.path.exists("../rules.mk"): ++if not os.path.exists("%%WRKSRC%%/rules.mk"): + raise "You need to run configure first to generate the rules.mk file!" + + make_vars = {} +-rules = open("../rules.mk").read() ++rules = open("%%WRKSRC%%/rules.mk").read() + for line in string.split(rules, "\n"): + parts = string.split(line, '=', 1) + if len(parts) != 2: continue diff --git a/www/clearsilver/patches/patch-util_filter_h b/www/clearsilver/patches/patch-util_filter_h index 06dcc7c65cf..14b3405d4d0 100644 --- a/www/clearsilver/patches/patch-util_filter_h +++ b/www/clearsilver/patches/patch-util_filter_h @@ -1,6 +1,6 @@ ---- util/filter.h.orig Thu Jun 30 14:58:05 2005 -+++ util/filter.h Thu Jun 26 13:42:32 2008 -@@ -84,7 +84,7 @@ NEOERR *filter_create_fd(const char *cmd, int *fdin, i +--- util/filter.h.orig Thu Jun 30 20:58:05 2005 ++++ util/filter.h Mon May 8 16:54:19 2006 +@@ -84,7 +84,7 @@ NEOERR *filter_create_fd(const char *cmd * pid -> the pid of the sub process * Returns: NERR_SYSTEM, NERR_IO */ diff --git a/www/clearsilver/patches/patch-util_neo_err_h b/www/clearsilver/patches/patch-util_neo_err_h index 7d657e4aed0..6423528e654 100644 --- a/www/clearsilver/patches/patch-util_neo_err_h +++ b/www/clearsilver/patches/patch-util_neo_err_h @@ -1,21 +1,21 @@ ---- util/neo_err.h.orig Wed Jul 11 23:09:09 2007 -+++ util/neo_err.h Thu Jun 26 13:53:40 2008 -@@ -122,7 +122,7 @@ NEOERR *nerr_raise_errnof (const char *func, const cha +--- util/neo_err.h.orig Thu Dec 15 23:17:36 2005 ++++ util/neo_err.h Mon May 8 16:54:19 2006 +@@ -105,7 +105,7 @@ NEOERR *nerr_raise_errnof (const char *f + #define nerr_pass(e) \ nerr_passf(__PRETTY_FUNCTION__,__FILE__,__LINE__,e) - - NEOERR *nerr_passf (const char *func, const char *file, int lineno, + NEOERR *nerr_passf (const char *func, const char *file, int lineno, - NEOERR *err); + NEOERR *nerr); /* function: nerr_pass_ctx * description: this function is used to pass an error up a level in the -@@ -146,24 +146,24 @@ NEOERR *nerr_passf (const char *func, const char *file +@@ -127,47 +127,47 @@ NEOERR *nerr_passf (const char *func, co + #define nerr_pass_ctx(e,f,...) \ + nerr_pass_ctxf(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__) #endif - - NEOERR *nerr_pass_ctxf (const char *func, const char *file, int lineno, -- NEOERR *err, const char *fmt, ...) -+ NEOERR *nerr, const char *fmt, ...) - ATTRIBUTE_PRINTF(5,6); +-NEOERR *nerr_pass_ctxf (const char *func, const char *file, int lineno, NEOERR *err, ++NEOERR *nerr_pass_ctxf (const char *func, const char *file, int lineno, NEOERR *nerr, + const char *fmt, ...); /* function: nerr_log_error * description: currently, this prints out the error to stderr, and @@ -38,7 +38,8 @@ /* function: nerr_error_traceback * description: returns the full traceback of the error chain -@@ -171,13 +171,13 @@ void nerr_error_string (NEOERR *err, STRING *str); +- * arguments: err - error ++ * arguments: nerr - error * str - string to which the data is appended * returns: None - errors appending to the string are ignored */ @@ -54,8 +55,10 @@ /* function: nerr_register * description: register an error type. This will assign a numeric value -@@ -186,7 +186,7 @@ void nerr_ignore (NEOERR **err); - * name - pretty name for the error type + * to the type, and keep track of the "pretty name" for it. +- * arguments: err - pointer to a NERR_TYPE ++ * arguments: nerr - pointer to a NERR_TYPE + * name - pretty name for the error type * returns: NERR_NOMEM on no memory */ -NEOERR *nerr_register (NERR_TYPE *err, const char *name); @@ -63,7 +66,12 @@ /* function: nerr_init * description: initialize the NEOERR system. Can be called more than once. -@@ -209,7 +209,7 @@ NEOERR *nerr_init (void); +@@ -186,21 +186,21 @@ NEOERR *nerr_init (void); + * parlance, this would be the equivalent of "catch". + * Typically, you can just compare a NEOERR against STATUS_OK + * or just test for true if you are checking for any error. +- * arguments: err - the NEOERR that has an error. ++ * arguments: nerr - the NEOERR that has an error. * type - the NEOERR type, as registered with nerr_register * returns: true on match */ @@ -72,7 +80,10 @@ /* function: nerr_handle * description: nerr_handle is a convenience function. It is the equivalent -@@ -219,7 +219,7 @@ int nerr_match (NEOERR *err, NERR_TYPE type); + * of nerr_match, but it will also deallocate the error chain + * on a match. +- * arguments: err - pointer to a pointer NEOERR ++ * arguments: nerr - pointer to a pointer NEOERR * type - the NEOERR type, as registered with nerr_register * returns: true on match */ diff --git a/www/clearsilver/patches/patch-util_neo_hdf_c b/www/clearsilver/patches/patch-util_neo_hdf_c index 1ab3e0ad553..7510ace828e 100644 --- a/www/clearsilver/patches/patch-util_neo_hdf_c +++ b/www/clearsilver/patches/patch-util_neo_hdf_c @@ -1,27 +1,7 @@ -$OpenBSD: patch-util_neo_hdf_c,v 1.3 2008/11/11 19:58:15 okan Exp $ ---- util/neo_hdf.c.orig Wed Jul 11 21:52:37 2007 -+++ util/neo_hdf.c Sun Nov 9 16:31:10 2008 -@@ -642,14 +642,15 @@ static NEOERR* _set_value (HDF *hdf, const char *name, - - if (hdf->link) - { -- char *new_name = (char *) malloc(strlen(hdf->value) + 1 + strlen(name) + 1); -+ size_t nn_siz = strlen(hdf->value) + 1 + strlen(name) + 1; -+ char *new_name = (char *) malloc(nn_siz); - if (new_name == NULL) - { - return nerr_raise(NERR_NOMEM, "Unable to allocate memory"); - } -- strcpy(new_name, hdf->value); -- strcat(new_name, "."); -- strcat(new_name, name); -+ strlcpy(new_name, hdf->value, nn_siz); -+ strlcat(new_name, ".", nn_siz); -+ strlcat(new_name, name, nn_siz); - err = _set_value (hdf->top, new_name, value, dup, wf, link, attr, set_node); - free(new_name); - return nerr_pass(err); -@@ -789,13 +790,14 @@ skip_search: +$OpenBSD: patch-util_neo_hdf_c,v 1.4 2008/11/18 20:00:09 okan Exp $ +--- util/neo_hdf.c.orig Tue Mar 7 21:24:44 2006 ++++ util/neo_hdf.c Mon May 8 16:57:13 2006 +@@ -771,13 +771,14 @@ skip_search: } else if (hp->link) { @@ -36,10 +16,10 @@ $OpenBSD: patch-util_neo_hdf_c,v 1.3 2008/11/11 19:58:15 okan Exp $ - strcat(new_name, s); + strlcpy(new_name, hp->value, nn_siz); + strlcat(new_name, s, nn_siz); - err = _set_value (hdf->top, new_name, value, dup, wf, link, attr, set_node); + err = _set_value (hdf, new_name, value, dup, wf, link, attr, set_node); free(new_name); return nerr_pass(err); -@@ -1228,8 +1230,9 @@ static NEOERR* hdf_dump_cb(HDF *hdf, const char *prefi +@@ -1170,8 +1171,9 @@ static NEOERR* hdf_dump_cb(HDF *hdf, con { if (prefix && (dtype == DUMP_TYPE_DOTTED)) { diff --git a/www/clearsilver/patches/patch-util_neo_str_c b/www/clearsilver/patches/patch-util_neo_str_c index cc724ad64c3..2ac84ab9e67 100644 --- a/www/clearsilver/patches/patch-util_neo_str_c +++ b/www/clearsilver/patches/patch-util_neo_str_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-util_neo_str_c,v 1.3 2008/11/11 19:58:15 okan Exp $ ---- util/neo_str.c.orig Wed Jul 11 21:24:00 2007 -+++ util/neo_str.c Thu Jun 26 13:42:33 2008 -@@ -122,7 +122,7 @@ NEOERR *string_append (STRING *str, const char *buf) +$OpenBSD: patch-util_neo_str_c,v 1.4 2008/11/18 20:00:09 okan Exp $ +--- util/neo_str.c.orig Fri Jul 1 02:42:50 2005 ++++ util/neo_str.c Mon May 8 16:54:19 2006 +@@ -122,7 +122,7 @@ NEOERR *string_append (STRING *str, cons l = strlen(buf); err = string_check_length (str, l); if (err != STATUS_OK) return nerr_pass (err); @@ -10,7 +10,7 @@ $OpenBSD: patch-util_neo_str_c,v 1.3 2008/11/11 19:58:15 okan Exp $ str->len += l; return STATUS_OK; -@@ -174,7 +174,7 @@ NEOERR *string_appendvf (STRING *str, const char *fmt, +@@ -174,7 +174,7 @@ NEOERR *string_appendvf (STRING *str, co err = string_check_length (str, bl+1); if (err != STATUS_OK) return nerr_pass (err); va_copy(tmp, ap); diff --git a/www/clearsilver/pkg/PLIST b/www/clearsilver/pkg/PLIST index 8716a159771..fc2038e953a 100644 --- a/www/clearsilver/pkg/PLIST +++ b/www/clearsilver/pkg/PLIST @@ -1,7 +1,7 @@ -@comment $OpenBSD: PLIST,v 1.4 2008/11/11 19:58:15 okan Exp $ -@bin bin/cs -@bin bin/cs_static.cgi -@bin bin/cstest +@comment $OpenBSD: PLIST,v 1.5 2008/11/18 20:00:09 okan Exp $ +bin/cs +bin/cs_static.cgi +bin/cstest include/ClearSilver/ include/ClearSilver/ClearSilver.h include/ClearSilver/cgi/ @@ -33,9 +33,6 @@ include/ClearSilver/util/wildmat.h lib/libneo_cgi.a lib/libneo_cs.a lib/libneo_utl.a -@comment libdata/perl5/${MACHINE_ARCH}-openbsd/ -@comment libdata/perl5/${MACHINE_ARCH}-openbsd/5.10.0/ -@comment libdata/perl5/${MACHINE_ARCH}-openbsd/5.10.0/perllocal.pod libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/ libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/ClearSilver.pm libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/ @@ -67,7 +64,6 @@ libexec/mod_ecs.so @man man/man3/cgi_url_escape.3 @man man/man3/cgi_url_escape_more.3 @man man/man3/cgi_url_unescape.3 -@man man/man3/cgi_url_validate.3 @man man/man3/cgi_vredirect.3 @man man/man3/cgiwrap_getenv.3 @man man/man3/cgiwrap_init_emu.3 @@ -154,6 +150,7 @@ libexec/mod_ecs.so @man man/man3/nerr_match.3 @man man/man3/nerr_pass.3 @man man/man3/nerr_pass_ctx.3 +@man man/man3/nerr_raise.3 @man man/man3/nerr_register.3 @man man/man3/skipDelete.3 @man man/man3/skipFreeList.3