View | Details | Raw Unified | Return to bug 170095
Collapse All | Expand All

(-)Makefile (-16 / +39 lines)
Lines 6-49 Link Here
6
#
6
#
7
7
8
PORTNAME=	xcache
8
PORTNAME=	xcache
9
DISTVERSION=	2.0.0
9
PORTVERSION=	2.0.1
10
PORTREVISION=	1
11
CATEGORIES=	www
10
CATEGORIES=	www
12
MASTER_SITES=	http://xcache.lighttpd.net/pub/Releases/${DISTVERSION}/
11
MASTER_SITES=	http://xcache.lighttpd.net/pub/Releases/${DISTVERSION}/
13
12
14
MAINTAINER=	ale@FreeBSD.org
13
MAINTAINER=	ale@FreeBSD.org
15
COMMENT=	A fast and stable php opcode cacher
14
COMMENT=	A fast and stable php opcode cacher
16
15
16
LICENSE=	BSD
17
LICENSE_FILE=	${WRKSRC}/COPYING
18
17
USE_BZIP2=	yes
19
USE_BZIP2=	yes
18
USE_PHP=	yes
20
USE_PHP=	yes
19
USE_PHPIZE=	yes
21
USE_PHPIZE=	yes
20
22
21
CONFIGURE_ARGS=	--enable-xcache=shared
23
CONFIGURE_ARGS=	--enable-xcache=shared
22
24
23
OPTIONS=	CONSTANT "Enable handling of compile time constants" off \
25
OPTIONS_DEFINE=	CONSTANT COVERAGER
24
		COVERAGER "Enable code coverage dumper" off
26
CONSTANT_DESC=	Enable handling of compile time constants
27
COVERAGER_DESC=	Enable code coverage dumper
25
28
26
SUB_FILES=	pkg-message
29
SUB_FILES=	pkg-message
27
PKGMESSAGE=	${WRKDIR}/pkg-message
30
PKGMESSAGE=	${WRKDIR}/pkg-message
28
31
29
ADMINFILES=	common-en.lang.php common-zh-simplified-utf-8.lang.php \
32
ADMINFILES=	common-en.lang.php \
30
		common-zh-traditional-utf-8.lang.php common.php config.php.example \
33
		common-zh-simplified-utf-8.lang.php \
31
		edit.php edit.tpl.php footer.tpl.php header.tpl.php \
34
		common-zh-traditional-utf-8.lang.php \
32
		help-en.lang.php help-zh-simplified-utf-8.lang.php \
35
		common.php \
33
		help-zh-traditional-utf-8.lang.php help.php index.php \
36
		config.default.php \
34
		mkpassword.php tablesort.js xcache.css xcache.php xcache.tpl.php
37
		config.example.php \
35
38
		edit.php \
36
COVERAGERFILES=	common-en.lang.php common-zh-simplified-gb2312.lang.php \
39
		edit.tpl.php \
37
		common-zh-simplified-utf-8.lang.php common.php config.php.example \
40
		footer.tpl.php \
38
		coverager.css coverager.php coverager.tpl.php index.php
41
		header.tpl.php \
42
		help-en.lang.php \
43
		help-zh-simplified-utf-8.lang.php \
44
		help-zh-traditional-utf-8.lang.php \
45
		help.php \
46
		index.php \
47
		mkpassword.php \
48
		tablesort.js \
49
		xcache.css \
50
		xcache.php \
51
		xcache.tpl.php
52
53
COVERAGERFILES=	common-en.lang.php \
54
		common-zh-simplified-gb2312.lang.php \
55
		common-zh-simplified-utf-8.lang.php \
56
		common.php \
57
		config.php.example \
58
		coverager.css \
59
		coverager.php \
60
		coverager.tpl.php \
61
		index.php
39
62
40
.include <bsd.port.pre.mk>
63
.include <bsd.port.pre.mk>
41
64
42
.if defined(WITH_CONSTANT)
65
.if ${PORT_OPTIONS:MCONSTANT}
43
CONFIGURE_ARGS+=--enable-xcache-constant
66
CONFIGURE_ARGS+=--enable-xcache-constant
44
.endif
67
.endif
45
68
46
.if defined(WITH_COVERAGER)
69
.if ${PORT_OPTIONS:MCOVERAGER}
47
CONFIGURE_ARGS+=--enable-xcache-coverager
70
CONFIGURE_ARGS+=--enable-xcache-coverager
48
PLIST_SUB+=	COVERAGER=""
71
PLIST_SUB+=	COVERAGER=""
49
.else
72
.else
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (xcache-2.0.0.tar.bz2) = ca26b0772d8b88223f281f5099a3b7d9f4b6597a87ae857301271c1fd5a3f64a
1
SHA256 (xcache-2.0.1.tar.bz2) = b6e350f3b327b11e033da44f8b5f464b173e2256b5acc792a1179d29cb499289
2
SIZE (xcache-2.0.0.tar.bz2) = 108614
2
SIZE (xcache-2.0.1.tar.bz2) = 112352
(-)pkg-plist (-1 / +2 lines)
Lines 4-10 Link Here
4
%%EXAMPLESDIR%%/admin/common-zh-simplified-utf-8.lang.php
4
%%EXAMPLESDIR%%/admin/common-zh-simplified-utf-8.lang.php
5
%%EXAMPLESDIR%%/admin/common-zh-traditional-utf-8.lang.php
5
%%EXAMPLESDIR%%/admin/common-zh-traditional-utf-8.lang.php
6
%%EXAMPLESDIR%%/admin/common.php
6
%%EXAMPLESDIR%%/admin/common.php
7
%%EXAMPLESDIR%%/admin/config.php.example
7
%%EXAMPLESDIR%%/admin/config.default.php
8
%%EXAMPLESDIR%%/admin/config.example.php
8
%%EXAMPLESDIR%%/admin/edit.php
9
%%EXAMPLESDIR%%/admin/edit.php
9
%%EXAMPLESDIR%%/admin/edit.tpl.php
10
%%EXAMPLESDIR%%/admin/edit.tpl.php
10
%%EXAMPLESDIR%%/admin/footer.tpl.php
11
%%EXAMPLESDIR%%/admin/footer.tpl.php
(-)files/patch-xcache.c (-48 lines)
Removed Link Here
1
Index: xcache.c
2
===================================================================
3
--- xcache.c	(revision 899)
4
+++ xcache.c	(revision 900)
5
@@ -839,7 +839,7 @@
6
 				while (xc_stack_count(s)) {
7
 					entry_php = (xc_entry_php_t *) xc_stack_pop(s);
8
 					TRACE("unhold %d:%s", entry_php->file_inode, entry_php->entry.name.str.val);
9
-					entry_php->refcount ++;
10
+					--entry_php->refcount;
11
 					assert(entry_php->refcount >= 0);
12
 				}
13
 			} LEAVE_LOCK(cache);
14
@@ -1939,11 +1939,16 @@
15
 
16
 		if (stored_php) {
17
 			compiler->new_entry.php = stored_php;
18
-			xc_php_addref_unlocked(stored_php);
19
 			xc_entry_php_init(&compiler->new_entry, compiler->opened_path TSRMLS_CC);
20
 			stored_entry = xc_entry_php_store_unlocked(cache, compiler->entry_hash.entryslotid, &compiler->new_entry TSRMLS_CC);
21
-			TRACE(" cached %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
22
-			xc_entry_hold_php_unlocked(cache, stored_entry TSRMLS_CC);
23
+			if (stored_entry) {
24
+				xc_php_addref_unlocked(stored_php);
25
+				TRACE(" cached %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
26
+				xc_entry_hold_php_unlocked(cache, stored_entry TSRMLS_CC);
27
+			}
28
+			else {
29
+				gaveup = 1;
30
+			}
31
 			break;
32
 		}
33
 
34
@@ -2021,10 +2026,11 @@
35
 		}
36
 		/* entry_store */
37
 		compiler->new_entry.php = stored_php;
38
-		xc_php_addref_unlocked(stored_php);
39
 		stored_entry = xc_entry_php_store_unlocked(cache, compiler->entry_hash.entryslotid, &compiler->new_entry TSRMLS_CC);
40
-		if (!stored_entry) {
41
-			xc_php_release_unlocked(cache, stored_php);
42
+		if (stored_entry) {
43
+			xc_php_addref_unlocked(stored_php);
44
+			TRACE(" cached %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
45
+			xc_entry_hold_php_unlocked(cache, stored_entry TSRMLS_CC);
46
 		}
47
 	} LEAVE_LOCK_EX(cache);
48
 	/* }}} */
(-)files/patch-xcache.ini (-18 / +12 lines)
Lines 1-25 Link Here
1
--- xcache.ini.orig	2012-04-12 12:05:56.000000000 +0200
1
--- xcache.ini.orig	2012-06-26 12:11:30.000000000 +0200
2
+++ xcache.ini	2012-04-12 12:07:57.000000000 +0200
2
+++ xcache.ini	2012-07-23 21:46:53.540225111 +0200
3
@@ -1,17 +1,13 @@
3
@@ -2,14 +2,8 @@
4
 [xcache-common]
4
 [xcache-common]
5
-;; install as zend extension (recommended), normally "$extension_dir/xcache.so"
5
 ;; WARNING: zend_extension* = *xcache* MUST be the first(above) of all zend_extension*=*
6
 ;; using extension=xcache.so is not recommended
7
-
8
-;; non-windows example
9
-;; update xxx accordingly
6
-zend_extension = /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so
10
-zend_extension = /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so
7
-; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so
11
-;; windows example:
8
-;; For windows users, replace xcache.so with php_xcache.dll
9
-zend_extension_ts = c:/php/extensions/php_xcache.dll
12
-zend_extension_ts = c:/php/extensions/php_xcache.dll
10
-;; or install as extension, make sure your extension_dir setting is correct
13
-;; for newer PHP, _ts is removed, use the following line instead
11
+;; install as zend extension (recommended)
14
-zend_extension = c:/php/extensions/php_xcache.dll
12
+zend_extension = %%LOCALBASE%%/lib/php/%%PHP_EXT_DIR%%/xcache.so
15
+zend_extension = %%LOCALBASE%%/lib/php/%%PHP_EXT_DIR%%/xcache.so
13
+zend_extension_ts = %%LOCALBASE%%/lib/php/%%PHP_EXT_DIR%%/xcache.so
16
+;zend_extension_ts = %%LOCALBASE%%/lib/php/%%PHP_EXT_DIR%%/xcache.so
14
+;; or install as extension
15
 ; extension = xcache.so
16
-;; or win32:
17
-; extension = php_xcache.dll
18
 
17
 
19
 [xcache.admin]
18
 [xcache.admin]
20
 xcache.admin.enable_auth = On
19
 xcache.admin.enable_auth = On
21
-xcache.admin.user = "mOo"
22
+xcache.admin.user = "admin"
23
 ; xcache.admin.pass = md5($your_password)
24
 xcache.admin.pass = ""
25
 

Return to bug 170095