diff options
author | mnag <mnag@FreeBSD.org> | 2008-01-25 11:01:54 +0800 |
---|---|---|
committer | mnag <mnag@FreeBSD.org> | 2008-01-25 11:01:54 +0800 |
commit | 57c04330a41408bf638d92d2fb9df45ca78a6b36 (patch) | |
tree | 7510d7f38a3a61bcc8a9273636e6dbec119f63ff /www | |
parent | 4b3d447ce4cd162f2861e355aaa590597f873fa1 (diff) | |
download | freebsd-ports-gnome-57c04330a41408bf638d92d2fb9df45ca78a6b36.tar.gz freebsd-ports-gnome-57c04330a41408bf638d92d2fb9df45ca78a6b36.tar.zst freebsd-ports-gnome-57c04330a41408bf638d92d2fb9df45ca78a6b36.zip |
- Add FILEHITS option [1]
- Add patch to fix a problem with semaphores [2]
- Bump PORTREVISION
PR: 119390 [1]
Submitted by: Martin Matuska <mm___FreeBSD.org> [1], Maxim Khitrov <mkhitrov__gmail.com> [2]
Diffstat (limited to 'www')
-rw-r--r-- | www/pecl-APC-devel/Makefile | 6 | ||||
-rw-r--r-- | www/pecl-APC-devel/files/patch-apc_sem.c | 35 | ||||
-rw-r--r-- | www/pecl-APC/Makefile | 6 | ||||
-rw-r--r-- | www/pecl-APC/files/patch-apc_sem.c | 35 |
4 files changed, 82 insertions, 0 deletions
diff --git a/www/pecl-APC-devel/Makefile b/www/pecl-APC-devel/Makefile index 3b7354a1616f..20e429e0829e 100644 --- a/www/pecl-APC-devel/Makefile +++ b/www/pecl-APC-devel/Makefile @@ -7,6 +7,7 @@ PORTNAME= APC DISTVERSION= 3.0.16 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://pecl.php.net/get/ PKGNAMEPREFIX= pecl- @@ -27,6 +28,7 @@ CONFIGURE_ARGS= --enable-apc OPTIONS= MMAP "Enable mmap memory support (default: IPC shm)" off \ SEMAPHORES "Enable sysv IPC semaphores (default: fcntl())" off \ + FILEHITS "Enable per request cache info" off \ PHP4_OPT "Little optimization to PHP4" off PORTDOCS= * @@ -41,6 +43,10 @@ CONFIGURE_ARGS+= --enable-apc-mmap CONFIGURE_ARGS+= --enable-apc-sem .endif +.if defined(WITH_FILEHITS) +CONFIGURE_ARGS+= --enable-apc-filehits +.endif + .if defined(WITH_PHP4_OPT) .if ${PHP_VER} == 4 .if exists(${LOCALBASE}/include/apache/httpd.h) diff --git a/www/pecl-APC-devel/files/patch-apc_sem.c b/www/pecl-APC-devel/files/patch-apc_sem.c new file mode 100644 index 000000000000..d83ba6d5a51f --- /dev/null +++ b/www/pecl-APC-devel/files/patch-apc_sem.c @@ -0,0 +1,35 @@ +# +# Fix http://pecl.php.net/bugs/bug.php?id=5280 +# +--- apc_sem.c.orig 2008-01-25 00:32:24.000000000 -0200 ++++ apc_sem.c 2008-01-25 00:35:28.000000000 -0200 +@@ -82,12 +82,16 @@ + } + } + +- if ((semid = semget(key, 1, IPC_CREAT | IPC_EXCL | perms)) >= 0) { ++ if ((semid = semget(key, 2, IPC_CREAT | IPC_EXCL | perms)) >= 0) { + /* sempahore created for the first time, initialize now */ + arg.val = initval; + if (semctl(semid, 0, SETVAL, arg) < 0) { + apc_eprint("apc_sem_create: semctl(%d,...) failed:", semid); + } ++ arg.val = getpid(); ++ if (semctl(semid, 1, SETVAL, arg) < 0) { ++ apc_eprint("apc_sem_create: semctl(%d,...) failed:", semid); ++ } + } + else if (errno == EEXIST) { + /* sempahore already exists, don't initialize */ +@@ -107,7 +111,10 @@ + { + /* we expect this call to fail often, so we do not check */ + union semun arg; +- semctl(semid, 0, IPC_RMID, arg); ++ int semPid = semctl(semid, 1, GETVAL, 0); ++ if (semPid == getpid()) { ++ semctl(semid, 0, IPC_RMID, arg); ++ } + } + + void apc_sem_lock(int semid) diff --git a/www/pecl-APC/Makefile b/www/pecl-APC/Makefile index 3b7354a1616f..20e429e0829e 100644 --- a/www/pecl-APC/Makefile +++ b/www/pecl-APC/Makefile @@ -7,6 +7,7 @@ PORTNAME= APC DISTVERSION= 3.0.16 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://pecl.php.net/get/ PKGNAMEPREFIX= pecl- @@ -27,6 +28,7 @@ CONFIGURE_ARGS= --enable-apc OPTIONS= MMAP "Enable mmap memory support (default: IPC shm)" off \ SEMAPHORES "Enable sysv IPC semaphores (default: fcntl())" off \ + FILEHITS "Enable per request cache info" off \ PHP4_OPT "Little optimization to PHP4" off PORTDOCS= * @@ -41,6 +43,10 @@ CONFIGURE_ARGS+= --enable-apc-mmap CONFIGURE_ARGS+= --enable-apc-sem .endif +.if defined(WITH_FILEHITS) +CONFIGURE_ARGS+= --enable-apc-filehits +.endif + .if defined(WITH_PHP4_OPT) .if ${PHP_VER} == 4 .if exists(${LOCALBASE}/include/apache/httpd.h) diff --git a/www/pecl-APC/files/patch-apc_sem.c b/www/pecl-APC/files/patch-apc_sem.c new file mode 100644 index 000000000000..d83ba6d5a51f --- /dev/null +++ b/www/pecl-APC/files/patch-apc_sem.c @@ -0,0 +1,35 @@ +# +# Fix http://pecl.php.net/bugs/bug.php?id=5280 +# +--- apc_sem.c.orig 2008-01-25 00:32:24.000000000 -0200 ++++ apc_sem.c 2008-01-25 00:35:28.000000000 -0200 +@@ -82,12 +82,16 @@ + } + } + +- if ((semid = semget(key, 1, IPC_CREAT | IPC_EXCL | perms)) >= 0) { ++ if ((semid = semget(key, 2, IPC_CREAT | IPC_EXCL | perms)) >= 0) { + /* sempahore created for the first time, initialize now */ + arg.val = initval; + if (semctl(semid, 0, SETVAL, arg) < 0) { + apc_eprint("apc_sem_create: semctl(%d,...) failed:", semid); + } ++ arg.val = getpid(); ++ if (semctl(semid, 1, SETVAL, arg) < 0) { ++ apc_eprint("apc_sem_create: semctl(%d,...) failed:", semid); ++ } + } + else if (errno == EEXIST) { + /* sempahore already exists, don't initialize */ +@@ -107,7 +111,10 @@ + { + /* we expect this call to fail often, so we do not check */ + union semun arg; +- semctl(semid, 0, IPC_RMID, arg); ++ int semPid = semctl(semid, 1, GETVAL, 0); ++ if (semPid == getpid()) { ++ semctl(semid, 0, IPC_RMID, arg); ++ } + } + + void apc_sem_lock(int semid) |