aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2012-11-23 02:51:49 +0800
committerpawel <pawel@FreeBSD.org>2012-11-23 02:51:49 +0800
commit7b8b99e8e16cc51e1ef93201e40ec3a8a37a9194 (patch)
treef6cd74e3030452cbc27941910e10ee89a09288df /devel
parent4a2b759f75a48734b898b330e9391d50e3b87125 (diff)
downloadfreebsd-ports-gnome-7b8b99e8e16cc51e1ef93201e40ec3a8a37a9194.tar.gz
freebsd-ports-gnome-7b8b99e8e16cc51e1ef93201e40ec3a8a37a9194.tar.zst
freebsd-ports-gnome-7b8b99e8e16cc51e1ef93201e40ec3a8a37a9194.zip
The inotify extension allows to use inotify functions in a PHP script.
WWW: http://pecl.php.net/package/inotify PR: ports/169506 Submitted by: Gasol Wu <gasol.wu@gmail.com> Feature safe: yes
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/pecl-inotify/Makefile25
-rw-r--r--devel/pecl-inotify/distinfo2
-rw-r--r--devel/pecl-inotify/files/patch-config.m467
-rw-r--r--devel/pecl-inotify/pkg-descr3
5 files changed, 98 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 4a03c52fe507..43811124c8f5 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -3067,6 +3067,7 @@
SUBDIR += pecl-hidef
SUBDIR += pecl-htscanner
SUBDIR += pecl-inclued
+ SUBDIR += pecl-inotify
SUBDIR += pecl-intl
SUBDIR += pecl-libevent
SUBDIR += pecl-mcve
diff --git a/devel/pecl-inotify/Makefile b/devel/pecl-inotify/Makefile
new file mode 100644
index 000000000000..618d7d6d8100
--- /dev/null
+++ b/devel/pecl-inotify/Makefile
@@ -0,0 +1,25 @@
+# Created by: Gasol Wu <gasol.wu@gmail.com>
+# $FreeBSD$
+
+PORTNAME= inotify
+PORTVERSION= 0.1.6
+CATEGORIES= devel
+MASTER_SITES= http://pecl.php.net/get/
+PKGNAMEPREFIX= pecl-
+EXTRACT_SUFX= .tgz
+DIST_SUBDIR= PECL
+
+MAINTAINER= gasol.wu@gmail.com
+COMMENT= This extension allows to use inotify functions in a PHP scripts
+
+LICENSE= PHP301
+
+LIB_DEPENDS= inotify:${PORTSDIR}/devel/libinotify
+
+USE_PHP= yes
+USE_PHP_BUILD= yes
+USE_PHPIZE= yes
+USE_PHPEXT= yes
+IGNORE_WITH_PHP=4
+
+.include <bsd.port.mk>
diff --git a/devel/pecl-inotify/distinfo b/devel/pecl-inotify/distinfo
new file mode 100644
index 000000000000..0085235f5df8
--- /dev/null
+++ b/devel/pecl-inotify/distinfo
@@ -0,0 +1,2 @@
+SHA256 (PECL/inotify-0.1.6.tgz) = 979f80a25d4eb0de282617ffc0df46f07346a8383f310b9b943e48992e5b494e
+SIZE (PECL/inotify-0.1.6.tgz) = 8568
diff --git a/devel/pecl-inotify/files/patch-config.m4 b/devel/pecl-inotify/files/patch-config.m4
new file mode 100644
index 000000000000..38392faa1975
--- /dev/null
+++ b/devel/pecl-inotify/files/patch-config.m4
@@ -0,0 +1,67 @@
+--- ./config.m4.orig 2012-05-04 17:51:20.000000000 +0800
++++ ./config.m4 2012-06-27 12:05:19.620198000 +0800
+@@ -1,22 +1,52 @@
+ dnl $Id: config.m4 262896 2008-07-17 19:11:16Z lbarnaud $
+ dnl config.m4 for extension inotify
+
+-PHP_ARG_ENABLE(inotify, whether to enable inotify support,
+-[ --enable-inotify Enable inotify support])
++PHP_ARG_WITH(inotify, whether to enable inotify support,
++[ --with-inotify Enable inotify support])
+
+ if test "$PHP_INOTIFY" != "no"; then
++ SEARCH_PATH="/usr /usr/local"
++ SEARCH_FOR="/sys/inotify.h"
+
+- AC_TRY_RUN([
+- #include <sys/inotify.h>
+- void testfunc(int (*passedfunc)()) {
+- }
+- int main() {
+- testfunc(inotify_init);
+- return 0;
+- }
+- ],[],[
+- AC_MSG_ERROR(Your system does not support inotify)
++ if test "$PHP_INOTIFY" = "yes"; then
++ AC_MSG_CHECKING([for libinotify headers in default path])
++ for i in $SEARCH_PATH ; do
++ if test -r $i/include/$SEARCH_FOR; then
++ LIBINOTIFY_DIR=$i
++ AC_MSG_RESULT(found in $i)
++ fi
++ done
++ else
++ AC_MSG_CHECKING([for libinotify headers in $PHP_INOTIFY])
++ if test -r $PHP_INOTIFY/$SEARCH_FOR; then
++ LIBINOTIFY_DIR=$PHP_INOTIFY
++ AC_MSG_RESULT([found])
++ fi
++ fi
++
++ if test -z "$LIBINOTIFY_DIR"; then
++ AC_MSG_RESULT([not found])
++ AC_MSG_ERROR([Cannot find libevent headers])
++ fi
++
++ PHP_ADD_INCLUDE($LIBINOTIFY_DIR/include)
++
++ LIBNAME=inotify
++ LIBSYMBOL=inotify_init
++
++ if test "x$PHP_LIBDIR" = "x"; then
++ PHP_LIBDIR=lib
++ fi
++
++ PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
++ [
++ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $LIBINOTIFY_DIR/$PHP_LIBDIR, LIBINOTIFY_SHARED_LIBADD)
++ ],[
++ AC_MSG_ERROR([Your system does not support inotify])
++ ],[
++ -L$LIBINOTIFY_DIR/$PHP_LIBDIR
+ ])
+
++ PHP_SUBST(LIBINOTIFY_SHARED_LIBADD)
+ PHP_NEW_EXTENSION(inotify, inotify.c, $ext_shared)
+ fi
diff --git a/devel/pecl-inotify/pkg-descr b/devel/pecl-inotify/pkg-descr
new file mode 100644
index 000000000000..cbc2c785b801
--- /dev/null
+++ b/devel/pecl-inotify/pkg-descr
@@ -0,0 +1,3 @@
+The inotify extension allows to use inotify functions in a PHP script.
+
+WWW: http://pecl.php.net/package/inotify