Browse code

remove pecl-apc, no longer needed, upstream version should have all neccessary fixes

Hanno Böck authored on 04/05/2012 11:08:34
Showing 3 changed files
1 1
deleted file mode 100644
... ...
@@ -1,3 +0,0 @@
1
-AUX pecl-apc-3.0.17-fix-useless-warnings.diff 4325 RMD160 9eaee3a7fdcf6e199a45993da087710cecf0f4b1 SHA1 ddb66d3806e8dbe80a897b77989ac3389cbe0ef6 SHA256 478e9f6483915351af78c11fac8b0805450f09cca00f51de2e4b05a1b6f986b0
2
-DIST APC-3.1.7.tgz 152735 RMD160 523c3b6aec6b712a89e36243cb7bf2a3297ae7ac SHA1 fd30aa79c7632f3da90193376a91152d157fa91f SHA256 9a526bdaa51ec8e84c2413e0f9c15099b951c39c995439ff2f54a3340a879b76
3
-EBUILD pecl-apc-3.1.7.ebuild 2639 RMD160 71159ce864b869bad95bb6ad99ce888d4b34c6de SHA1 11e2a495df57b0956925cd67124e453e2632d10c SHA256 9c8fccb3c9a2b312b989ccc57f6bb2c129854cc2c82028024659523258c40748
4 0
deleted file mode 100644
... ...
@@ -1,86 +0,0 @@
1
-diff -Naur APC-3.1.7/apc_bin.c APC-3.1.7-1//apc_bin.c
2
-+++ APC-3.1.7-1//apc_bin.c	2011-04-06 19:28:51.048623272 +0200
3
-@@ -703,7 +703,7 @@
4
-     apc_bd_alloc_ex(pool_ptr, sizeof(apc_pool) TSRMLS_CC);
5
-     ctxt.pool = apc_pool_create(APC_UNPOOL, apc_bd_alloc, apc_bd_free, NULL, NULL TSRMLS_CC);  /* ideally the pool wouldn't be alloc'd as part of this */
6
-     if (!ctxt.pool) { /* TODO need to cleanup */
7
--        apc_warning("Unable to allocate memory for pool." TSRMLS_CC);
8
-+        php_log_err("Unable to allocate memory for pool." TSRMLS_CC);
9
-         return NULL;
10
-     }
11
-     ctxt.copy = APC_COPY_IN_USER;  /* avoid stupid ALLOC_ZVAL calls here, hack */
12
-@@ -854,7 +854,7 @@
13
-     for(i = 0; i < bd->num_entries; i++) {
14
-         ctxt.pool = apc_pool_create(APC_SMALL_POOL, apc_sma_malloc, apc_sma_free, apc_sma_protect, apc_sma_unprotect TSRMLS_CC);
15
-         if (!ctxt.pool) { /* TODO need to cleanup previous pools */
16
--            apc_warning("Unable to allocate memory for pool." TSRMLS_CC);
17
-+            php_log_err("Unable to allocate memory for pool." TSRMLS_CC);
18
-             goto failure;
19
-         }
20
-         ep = &bd->entries[i];
21
-diff -Naur APC-3.1.7/apc_cache.c APC-3.1.7-1//apc_cache.c
22
-+++ APC-3.1.7-1//apc_cache.c	2011-04-06 19:29:39.271030454 +0200
23
-@@ -1270,6 +1270,7 @@
24
- /* {{{ apc_cache_is_last_key */
25
- zend_bool apc_cache_is_last_key(apc_cache_t* cache, apc_cache_key_t* key, unsigned int h, time_t t TSRMLS_DC)
26
- {
27
-+    char *log_message;
28
-     apc_keyid_t *lastkey = &cache->header->lastkey;
29
-     unsigned int keylen = key->data.user.identifier_len;
30
- #ifdef ZTS
31
-@@ -1288,7 +1289,10 @@
32
-         if(lastkey->mtime == t && FROM_DIFFERENT_THREAD(lastkey)) {
33
-             /* potential cache slam */
34
-             if(APCG(slam_defense)) {
35
--                apc_warning("Potential cache slam averted for key '%s'" TSRMLS_CC, key->data.user.identifier);
36
-+                log_message = emalloc((key->data.user.identifier_len + 40) * sizeof(char));
37
-+                sprintf(log_message, "Potential cache slam averted for key '%s'", key->data.user.identifier);
38
-+                php_log_err(log_message TSRMLS_CC);
39
-+                efree(log_message);
40
-                 return 1;
41
-             }
42
-         }
43
-diff -Naur APC-3.1.7/apc_main.c APC-3.1.7-1//apc_main.c
44
-+++ APC-3.1.7-1//apc_main.c	2011-04-06 19:28:51.049623231 +0200
45
-@@ -414,7 +414,7 @@
46
-     ctxt.pool = apc_pool_create(APC_MEDIUM_POOL, apc_sma_malloc, apc_sma_free, 
47
-                                                  apc_sma_protect, apc_sma_unprotect TSRMLS_CC);
48
-     if (!ctxt.pool) {
49
--        apc_warning("Unable to allocate memory for pool." TSRMLS_CC);
50
-+        php_log_err("Unable to allocate memory for pool." TSRMLS_CC);
51
-         return FAILURE;
52
-     }
53
-     ctxt.copy = APC_COPY_IN_OPCODE;
54
-@@ -539,7 +539,7 @@
55
-         ctxt.pool = apc_pool_create(APC_UNPOOL, apc_php_malloc, apc_php_free,
56
-                                                 apc_sma_protect, apc_sma_unprotect TSRMLS_CC);
57
-         if (!ctxt.pool) {
58
--            apc_warning("Unable to allocate memory for pool." TSRMLS_CC);
59
-+            php_log_err("Unable to allocate memory for pool." TSRMLS_CC);
60
-             return old_compile_file(h, type TSRMLS_CC);
61
-         }
62
-         ctxt.copy = APC_COPY_OUT_OPCODE;
63
-diff -Naur APC-3.1.7/php_apc.c APC-3.1.7-1//php_apc.c
64
-+++ APC-3.1.7-1//php_apc.c	2011-04-06 19:28:51.049623231 +0200
65
-@@ -578,7 +578,7 @@
66
- 
67
-     ctxt.pool = apc_pool_create(APC_SMALL_POOL, apc_sma_malloc, apc_sma_free, apc_sma_protect, apc_sma_unprotect TSRMLS_CC);
68
-     if (!ctxt.pool) {
69
--        apc_warning("Unable to allocate memory for pool." TSRMLS_CC);
70
-+        php_log_err("Unable to allocate memory for pool." TSRMLS_CC);
71
-         return 0;
72
-     }
73
-     ctxt.copy = APC_COPY_IN_USER;
74
-@@ -819,7 +819,7 @@
75
- 
76
-     ctxt.pool = apc_pool_create(APC_UNPOOL, apc_php_malloc, apc_php_free, NULL, NULL TSRMLS_CC);
77
-     if (!ctxt.pool) {
78
--        apc_warning("Unable to allocate memory for pool." TSRMLS_CC);
79
-+        php_log_err("Unable to allocate memory for pool." TSRMLS_CC);
80
-         RETURN_FALSE;
81
-     }
82
-     ctxt.copy = APC_COPY_OUT_USER;
83 0
deleted file mode 100644
... ...
@@ -1,74 +0,0 @@
1
-# Copyright 1999-2011 Gentoo Foundation
2
-# Distributed under the terms of the GNU General Public License v2
3
-# $Header: /var/cvsroot/gentoo-x86/dev-php5/pecl-apc/pecl-apc-3.1.7.ebuild,v 1.5 2011/03/24 17:49:38 xarthisius Exp $
4
-
5
-EAPI=2
6
-
7
-PHP_EXT_NAME="apc"
8
-PHP_EXT_PECL_PKG="APC"
9
-PHP_EXT_INI="yes"
10
-PHP_EXT_ZENDEXT="no"
11
-DOCS="CHANGELOG INSTALL NOTICE TECHNOTES.txt TODO"
12
-
13
-inherit php-ext-pecl-r2 confutils eutils
14
-
15
-KEYWORDS="amd64 ppc ppc64 x86"
16
-
17
-DESCRIPTION="A free, open, and robust framework for caching and optimizing PHP code."
18
-LICENSE="PHP-3.01"
19
-SLOT="0"
20
-IUSE="mmap"
21
-
22
-DEPEND="!dev-php/eaccelerator !dev-php5/xcache"
23
-RDEPEND="${DEPEND}"
24
-
25
-src_prepare() {
26
-	epatch "${FILESDIR}"/pecl-apc-3.0.17-fix-useless-warnings.diff
27
-	php-ext-source-r2_src_prepare
28
-}
29
-
30
-src_configure() {
31
-	my_conf="--enable-apc"
32
-	enable_extension_enable "apc-mmap" "mmap" 0
33
-
34
-	php-ext-source-r2_src_configure
35
-}
36
-
37
-src_install() {
38
-	php-ext-pecl-r2_src_install
39
-
40
-	php-ext-source-r2_addtoinifiles "apc.enabled" '"1"'
41
-	php-ext-source-r2_addtoinifiles "apc.shm_segments" '"1"'
42
-	php-ext-source-r2_addtoinifiles "apc.shm_size" '"30M"'
43
-	php-ext-source-r2_addtoinifiles "apc.num_files_hint" '"1024"'
44
-	php-ext-source-r2_addtoinifiles "apc.ttl" '"7200"'
45
-	php-ext-source-r2_addtoinifiles "apc.user_ttl" '"7200"'
46
-	php-ext-source-r2_addtoinifiles "apc.gc_ttl" '"3600"'
47
-	php-ext-source-r2_addtoinifiles "apc.cache_by_default" '"1"'
48
-	php-ext-source-r2_addtoinifiles ";apc.filters" '""'
49
-	php-ext-source-r2_addtoinifiles ";apc.mmap_file_mask" '"/tmp/apcphp5.XXXXXX"'
50
-	php-ext-source-r2_addtoinifiles "apc.slam_defense" '"0"'
51
-	php-ext-source-r2_addtoinifiles "apc.file_update_protection" '"2"'
52
-	php-ext-source-r2_addtoinifiles "apc.enable_cli" '"0"'
53
-	php-ext-source-r2_addtoinifiles "apc.max_file_size" '"1M"'
54
-	php-ext-source-r2_addtoinifiles "apc.stat" '"1"'
55
-	php-ext-source-r2_addtoinifiles "apc.write_lock" '"1"'
56
-	php-ext-source-r2_addtoinifiles "apc.report_autofilter" '"0"'
57
-	php-ext-source-r2_addtoinifiles "apc.include_once_override" '"0"'
58
-	php-ext-source-r2_addtoinifiles "apc.rfc1867" '"0"'
59
-	php-ext-source-r2_addtoinifiles "apc.rfc1867_prefix" '"upload_"'
60
-	php-ext-source-r2_addtoinifiles "apc.rfc1867_name" '"APC_UPLOAD_PROGRESS"'
61
-	php-ext-source-r2_addtoinifiles "apc.rfc1867_freq" '"0"'
62
-	php-ext-source-r2_addtoinifiles "apc.localcache" '"0"'
63
-	php-ext-source-r2_addtoinifiles "apc.localcache.size" '"512"'
64
-	php-ext-source-r2_addtoinifiles "apc.coredump_unmap" '"0"'
65
-
66
-	dodir "${PHP_EXT_SHARED_DIR}"
67
-	insinto "${PHP_EXT_SHARED_DIR}"
68
-	doins apc.php
69
-}
70
-
71
-pkg_postinst() {
72
-	elog "The apc.php file shipped with this release of PECL-APC was"
73
-	elog "installed into ${PHP_EXT_SHARED_DIR}/apc/."
74
-}