diff options
author | osa <osa@FreeBSD.org> | 2009-02-09 15:11:29 +0800 |
---|---|---|
committer | osa <osa@FreeBSD.org> | 2009-02-09 15:11:29 +0800 |
commit | ddc83c4e6646f4942b691c17e5ddf8d6b52d3e1f (patch) | |
tree | 753da003b78754617def284ec7d4d9ddc9dca67d /www | |
parent | dbc7999d77ec7cbe82724a6da045305f9fdd1f58 (diff) | |
download | freebsd-ports-gnome-ddc83c4e6646f4942b691c17e5ddf8d6b52d3e1f.tar.gz freebsd-ports-gnome-ddc83c4e6646f4942b691c17e5ddf8d6b52d3e1f.tar.zst freebsd-ports-gnome-ddc83c4e6646f4942b691c17e5ddf8d6b52d3e1f.zip |
Add fancyindex module support. [1]
Make fancyindex module linkable for 0.7.X. [2]
Do not bump PORTREVISION.
Spotted by: Rafal Szkodzinski <uid at atnus dot com> [1]
Obtained from: Russian nginx maillist <nginx-ru at sysoev dot ru> [2]
Author: Sergey Bochenkov <bachan at j3qq4 dot org> [2]
Diffstat (limited to 'www')
-rw-r--r-- | www/nginx-devel/Makefile | 12 | ||||
-rw-r--r-- | www/nginx-devel/distinfo | 3 | ||||
-rw-r--r-- | www/nginx-devel/files/extra-patch-ngx_http_fancyindex_module.c | 37 |
3 files changed, 52 insertions, 0 deletions
diff --git a/www/nginx-devel/Makefile b/www/nginx-devel/Makefile index d2b9af5fe1d1..315126ee0fc0 100644 --- a/www/nginx-devel/Makefile +++ b/www/nginx-devel/Makefile @@ -23,6 +23,7 @@ OPTIONS= DEBUG "Enable nginx debugging" off \ HTTP_ACCESSKEY_MODULE "Enable http_accesskey module" off \ HTTP_ADDITION_MODULE "Enable http_addition module" off \ HTTP_DAV_MODULE "Enable http_webdav module" off \ + HTTP_FANCYINDEX_MODULE "Enable http_fancyindex module" off \ HTTP_FLV_MODULE "Enable http_flv module" off \ HTTP_PERL_MODULE "Enable http_perl module" off \ HTTP_RANDOM_INDEX_MODULE "Enable http_random_index module" off \ @@ -105,6 +106,13 @@ CONFIGURE_ARGS+=--with-http_addition_module CONFIGURE_ARGS+=--with-http_dav_module .endif +.if defined(WITH_HTTP_FANCYINDEX_MODULE) +NGINX_FANCYINDEX_MODULE_VERSION= 0.1b5 +MASTER_SITES+= http://furi-ku.org/nginx/fancyindex/:fancyindex +DISTFILES+= nginx-fancyindex-${NGINX_FANCYINDEX_MODULE_VERSION:S/b/_beta/}.tar.bz2:fancyindex +CONFIGURE_ARGS+=--add-module=${WRKDIR}/nginx-fancyindex-${NGINX_FANCYINDEX_MODULE_VERSION:S/b/_beta/} +.endif + .if defined(WITH_HTTP_FLV_MODULE) CONFIGURE_ARGS+=--with-http_flv_module .endif @@ -218,6 +226,10 @@ post-patch: 's!$$HTTP_ACCESSKEY_MODULE!ngx_http_accesskey_module!' \ ${WRKDIR}/nginx-accesskey-${NGINX_ACCESSKEY_MODULE_VERSION}/config .endif +.if defined(WITH_HTTP_FANCYINDEX_MODULE) + @${PATCH} ${PATCH_ARGS} < \ + ${PATCHDIR}/extra-patch-ngx_http_fancyindex_module.c +.endif do-build: @cd ${WRKSRC} && ${MAKE} diff --git a/www/nginx-devel/distinfo b/www/nginx-devel/distinfo index 44b8736ee534..48924eb984ee 100644 --- a/www/nginx-devel/distinfo +++ b/www/nginx-devel/distinfo @@ -4,6 +4,9 @@ SIZE (nginx-0.7.33.tar.gz) = 566684 MD5 (nginx-accesskey-2.0.3.tar.gz) = 9b5304346d5139b1841f5baa01ab0cbe SHA256 (nginx-accesskey-2.0.3.tar.gz) = d9e94321e78a02de16c57f3e048fd31059fd8116ed03d6de7180f435c52502b1 SIZE (nginx-accesskey-2.0.3.tar.gz) = 2632 +MD5 (nginx-fancyindex-0.1_beta5.tar.bz2) = ac371c8c03e7235f1e8e8c187a5a93cb +SHA256 (nginx-fancyindex-0.1_beta5.tar.bz2) = 155c0fac05a7f6c013b5cc368926d71d5da73e4e5a9f2506b2e5114eee8680a2 +SIZE (nginx-fancyindex-0.1_beta5.tar.bz2) = 12211 MD5 (nginx_upload_module-2.0.8.tar.gz) = 308d43743158263b0d5016aeffadaaa7 SHA256 (nginx_upload_module-2.0.8.tar.gz) = eaacf4dd4d254df5f2666e13f07edd8c1c7e51ddfe625b88e422583cfbcb6165 SIZE (nginx_upload_module-2.0.8.tar.gz) = 17497 diff --git a/www/nginx-devel/files/extra-patch-ngx_http_fancyindex_module.c b/www/nginx-devel/files/extra-patch-ngx_http_fancyindex_module.c new file mode 100644 index 000000000000..0fce6e00699b --- /dev/null +++ b/www/nginx-devel/files/extra-patch-ngx_http_fancyindex_module.c @@ -0,0 +1,37 @@ +--- ../nginx-fancyindex-0.1_beta5/ngx_http_fancyindex_module.c.orig 2007-09-29 01:02:05.000000000 +0400 ++++ ../nginx-fancyindex-0.1_beta5/ngx_http_fancyindex_module.c 2008-08-11 17:33:42.810249087 +0400 +@@ -290,7 +290,7 @@ + ngx_http_fancyindex_entry_t *entry; + + off_t length; +- size_t len, root, copy, allocated; ++ size_t len, root, utf_len, allocated; + u_char *filename, *last, scale; + ngx_tm_t tm; + ngx_array_t entries; +@@ -426,7 +426,7 @@ + entry->mtime = ngx_de_mtime(&dir); + entry->size = ngx_de_size(&dir); + entry->utf_len = (r->utf8) +- ? ngx_utf_length(entry->name.data, entry->name.len) ++ ? ngx_utf8_length(entry->name.data, entry->name.len) + : len; + } + +@@ -563,12 +563,13 @@ + + if (entry[i].name.len - len) { + if (len > NGX_HTTP_FANCYINDEX_NAME_LEN) { +- copy = NGX_HTTP_FANCYINDEX_NAME_LEN - 3 + 1; ++ utf_len = NGX_HTTP_FANCYINDEX_NAME_LEN - 3 + 1; + } else { +- copy = NGX_HTTP_FANCYINDEX_NAME_LEN + 1; ++ utf_len = NGX_HTTP_FANCYINDEX_NAME_LEN + 1; + } + +- b->last = ngx_utf_cpystrn(b->last, entry[i].name.data, copy); ++ b->last = ngx_utf8_cpystrn(b->last, entry[i].name.data, ++ utf_len, entry[i].name.len + 1); + last = b->last; + + } else { |