1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

Update to 2.0.1 release, add LICENSE and switch to OptionsNG.

PR:		ports/170095
Submitted by:	mm
This commit is contained in:
Alex Dupre 2012-08-08 15:24:14 +00:00
parent 86847b8f1b
commit 2a73c09e29
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=302296
5 changed files with 32 additions and 77 deletions

View File

@ -6,29 +6,32 @@
#
PORTNAME= xcache
DISTVERSION= 2.0.0
PORTREVISION= 1
DISTVERSION= 2.0.1
CATEGORIES= www
MASTER_SITES= http://xcache.lighttpd.net/pub/Releases/${DISTVERSION}/
MAINTAINER= ale@FreeBSD.org
COMMENT= A fast and stable php opcode cacher
LICENSE= BSD
LICENSE_FILE= ${WRKSRC}/COPYING
USE_BZIP2= yes
USE_PHP= yes
USE_PHPIZE= yes
CONFIGURE_ARGS= --enable-xcache=shared
OPTIONS= CONSTANT "Enable handling of compile time constants" off \
COVERAGER "Enable code coverage dumper" off
OPTIONS_DEFINE= CONSTANT COVERAGER
CONSTANT_DESC= Enable handling of compile time constants
COVERAGER_DESC= Enable code coverage dumper
SUB_FILES= pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
ADMINFILES= common-en.lang.php common-zh-simplified-utf-8.lang.php \
common-zh-traditional-utf-8.lang.php common.php config.php.example \
edit.php edit.tpl.php footer.tpl.php header.tpl.php \
common-zh-traditional-utf-8.lang.php common.php config.default.php \
config.example.php edit.php edit.tpl.php footer.tpl.php header.tpl.php \
help-en.lang.php help-zh-simplified-utf-8.lang.php \
help-zh-traditional-utf-8.lang.php help.php index.php \
mkpassword.php tablesort.js xcache.css xcache.php xcache.tpl.php
@ -37,13 +40,13 @@ COVERAGERFILES= common-en.lang.php common-zh-simplified-gb2312.lang.php \
common-zh-simplified-utf-8.lang.php common.php config.php.example \
coverager.css coverager.php coverager.tpl.php index.php
.include <bsd.port.pre.mk>
.include <bsd.port.options.mk>
.if defined(WITH_CONSTANT)
.if ${PORT_OPTIONS:MCONSTANT}
CONFIGURE_ARGS+=--enable-xcache-constant
.endif
.if defined(WITH_COVERAGER)
.if ${PORT_OPTIONS:MCOVERAGER}
CONFIGURE_ARGS+=--enable-xcache-coverager
PLIST_SUB+= COVERAGER=""
.else
@ -75,4 +78,4 @@ post-install:
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (xcache-2.0.0.tar.bz2) = ca26b0772d8b88223f281f5099a3b7d9f4b6597a87ae857301271c1fd5a3f64a
SIZE (xcache-2.0.0.tar.bz2) = 108614
SHA256 (xcache-2.0.1.tar.bz2) = b6e350f3b327b11e033da44f8b5f464b173e2256b5acc792a1179d29cb499289
SIZE (xcache-2.0.1.tar.bz2) = 112352

View File

@ -1,48 +0,0 @@
Index: xcache.c
===================================================================
--- xcache.c (revision 899)
+++ xcache.c (revision 900)
@@ -839,7 +839,7 @@
while (xc_stack_count(s)) {
entry_php = (xc_entry_php_t *) xc_stack_pop(s);
TRACE("unhold %d:%s", entry_php->file_inode, entry_php->entry.name.str.val);
- entry_php->refcount ++;
+ --entry_php->refcount;
assert(entry_php->refcount >= 0);
}
} LEAVE_LOCK(cache);
@@ -1939,11 +1939,16 @@
if (stored_php) {
compiler->new_entry.php = stored_php;
- xc_php_addref_unlocked(stored_php);
xc_entry_php_init(&compiler->new_entry, compiler->opened_path TSRMLS_CC);
stored_entry = xc_entry_php_store_unlocked(cache, compiler->entry_hash.entryslotid, &compiler->new_entry TSRMLS_CC);
- TRACE(" cached %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
- xc_entry_hold_php_unlocked(cache, stored_entry TSRMLS_CC);
+ if (stored_entry) {
+ xc_php_addref_unlocked(stored_php);
+ TRACE(" cached %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
+ xc_entry_hold_php_unlocked(cache, stored_entry TSRMLS_CC);
+ }
+ else {
+ gaveup = 1;
+ }
break;
}
@@ -2021,10 +2026,11 @@
}
/* entry_store */
compiler->new_entry.php = stored_php;
- xc_php_addref_unlocked(stored_php);
stored_entry = xc_entry_php_store_unlocked(cache, compiler->entry_hash.entryslotid, &compiler->new_entry TSRMLS_CC);
- if (!stored_entry) {
- xc_php_release_unlocked(cache, stored_php);
+ if (stored_entry) {
+ xc_php_addref_unlocked(stored_php);
+ TRACE(" cached %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
+ xc_entry_hold_php_unlocked(cache, stored_entry TSRMLS_CC);
}
} LEAVE_LOCK_EX(cache);
/* }}} */

View File

@ -1,25 +1,24 @@
--- xcache.ini.orig 2012-04-12 12:05:56.000000000 +0200
+++ xcache.ini 2012-04-12 12:07:57.000000000 +0200
@@ -1,17 +1,13 @@
[xcache-common]
-;; install as zend extension (recommended), normally "$extension_dir/xcache.so"
--- xcache.ini.orig 2012-08-08 16:59:55.000000000 +0200
+++ xcache.ini 2012-08-08 17:03:46.000000000 +0200
@@ -3,17 +3,13 @@
;; WARNING: zend_extension* = *xcache* MUST be the first(above) of all zend_extension*=*
;; using extension=xcache.so is not recommended
-;; non-windows example
-;; update xxx accordingly
-zend_extension = /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so
-; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so
-;; For windows users, replace xcache.so with php_xcache.dll
-;; windows example:
-zend_extension_ts = c:/php/extensions/php_xcache.dll
-;; or install as extension, make sure your extension_dir setting is correct
+;; install as zend extension (recommended)
-;; for newer PHP, _ts is removed, use the following line instead
-zend_extension = c:/php/extensions/php_xcache.dll
+zend_extension = %%LOCALBASE%%/lib/php/%%PHP_EXT_DIR%%/xcache.so
+zend_extension_ts = %%LOCALBASE%%/lib/php/%%PHP_EXT_DIR%%/xcache.so
+;; or install as extension
; extension = xcache.so
-;; or win32:
-; extension = php_xcache.dll
+;; for older and thread-safe PHP, _ts is needed
+; zend_extension_ts = %%LOCALBASE%%/lib/php/%%PHP_EXT_DIR%%/xcache.so
[xcache.admin]
xcache.admin.enable_auth = On
-xcache.admin.user = "mOo"
+xcache.admin.user = "admin"
; xcache.admin.pass = md5($your_password)
; set xcache.admin.pass = md5($your_password)
; login use $your_password
xcache.admin.pass = ""

View File

@ -4,7 +4,8 @@ lib/php/%%PHP_EXT_DIR%%/xcache.so
%%EXAMPLESDIR%%/admin/common-zh-simplified-utf-8.lang.php
%%EXAMPLESDIR%%/admin/common-zh-traditional-utf-8.lang.php
%%EXAMPLESDIR%%/admin/common.php
%%EXAMPLESDIR%%/admin/config.php.example
%%EXAMPLESDIR%%/admin/config.default.php
%%EXAMPLESDIR%%/admin/config.example.php
%%EXAMPLESDIR%%/admin/edit.php
%%EXAMPLESDIR%%/admin/edit.tpl.php
%%EXAMPLESDIR%%/admin/footer.tpl.php