aboutsummaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2014-06-15 13:45:01 +0000
committerKurt Jaeger <pi@FreeBSD.org>2014-06-15 13:45:01 +0000
commitceba983ef66b08992dbada636adc6d92804e8063 (patch)
tree51d168f1460d8c8c97864c113061bf0f004b79af /archivers
parentb9a68330aa1e5a482f2d0119922997ad7cf39590 (diff)
downloadports-ceba983ef66b08992dbada636adc6d92804e8063.tar.gz
ports-ceba983ef66b08992dbada636adc6d92804e8063.zip
New port archivers/php5-snappy
PR: ports/189885 Submitted by: Melvyn Sopacua <melvyn@magemana.nl>
Notes
Notes: svn path=/head/; revision=357883
Diffstat (limited to 'archivers')
-rw-r--r--archivers/Makefile1
-rw-r--r--archivers/php5-snappy/Makefile37
-rw-r--r--archivers/php5-snappy/distinfo2
-rw-r--r--archivers/php5-snappy/files/patch-config.m444
-rw-r--r--archivers/php5-snappy/pkg-descr4
5 files changed, 88 insertions, 0 deletions
diff --git a/archivers/Makefile b/archivers/Makefile
index ef771db7ba51..23008f646d97 100644
--- a/archivers/Makefile
+++ b/archivers/Makefile
@@ -138,6 +138,7 @@
SUBDIR += php-horde_lz4
SUBDIR += php5-bz2
SUBDIR += php5-phar
+ SUBDIR += php5-snappy
SUBDIR += php5-zip
SUBDIR += php5-zlib
SUBDIR += php53-bz2
diff --git a/archivers/php5-snappy/Makefile b/archivers/php5-snappy/Makefile
new file mode 100644
index 000000000000..e5eb85b1f880
--- /dev/null
+++ b/archivers/php5-snappy/Makefile
@@ -0,0 +1,37 @@
+# Created by: Melvyn Sopacua <melvyn@magemana.nl>
+# $FreeBSD$
+
+PORTNAME= php5-snappy
+PORTVERSION= 0.0.2
+CATEGORIES= archivers
+MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
+PROJECTHOST= php-snappy
+DISTNAME= ${PROJECTHOST}-${PORTVERSION}
+
+MAINTAINER= melvyn@magemana.nl
+COMMENT= PHP extension for the snappy compression algorithm
+
+LICENSE= BSD2CLAUSE
+
+LIB_DEPENDS+= libsnappy.so:${PORTSDIR}/archivers/snappy
+CONFIGURE_ARGS+= --with-snappy-includedir=${LOCALBASE}/include
+
+USE_PHP= yes
+USE_PHPEXT= yes
+PHP_MODNAME= snappy
+WRKSRC= ${WRKDIR}/${PROJECTHOST}
+OPTIONS_DEFINE= TEST
+
+.include <bsd.port.options.mk>
+test: build
+ @(cd ${WRKSRC} && ${MAKE} ${MAKE_ENV} NO_INTERACTION=yes ${.TARGET})
+
+.if !empty(${PORT_OPTIONS:MTEST})
+post-stage: test
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/php/20100525/snappy.so
+.else
+post-stage:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/php/20100525/snappy.so
+.endif
+
+.include <bsd.port.mk>
diff --git a/archivers/php5-snappy/distinfo b/archivers/php5-snappy/distinfo
new file mode 100644
index 000000000000..a3a90d0bc716
--- /dev/null
+++ b/archivers/php5-snappy/distinfo
@@ -0,0 +1,2 @@
+SHA256 (php-snappy-0.0.2.tar.gz) = 7aa6be88e09985fc0f9054b3e3d06612383aaacbbc6db705913ad7d047dc9cd9
+SIZE (php-snappy-0.0.2.tar.gz) = 6801
diff --git a/archivers/php5-snappy/files/patch-config.m4 b/archivers/php5-snappy/files/patch-config.m4
new file mode 100644
index 000000000000..fef0debcffc5
--- /dev/null
+++ b/archivers/php5-snappy/files/patch-config.m4
@@ -0,0 +1,44 @@
+--- config.m4.orig 2011-09-07 10:27:21.000000000 +0200
++++ config.m4 2014-05-17 13:31:39.000000000 +0200
+@@ -53,7 +53,7 @@
+
+ if test "$PHP_SNAPPY_INCLUDEDIR" != "no" && test "$PHP_SNAPPY_INCLUDEDIR" != "yes"; then
+ if test -r "$PHP_SNAPPY_INCLUDEDIR/snappy.h"; then
+- SNAPPY_DIR="$PHP_SNAPPY_INCLUDEDIR"
++ SNAPPY_DIR="$(dirname $PHP_SNAPPY_INCLUDEDIR)"
+ else
+ AC_MSG_ERROR([Can't find snappy headers under "$PHP_SNAPPY_INCLUDEDIR"])
+ fi
+@@ -61,12 +61,12 @@
+ SEARCH_PATH="/usr/local /usr" # you might want to change this
+ SEARCH_FOR="/include/snappy-c.h" # you most likely want to change this
+ if test -r $PHP_SNAPPY/$SEARCH_FOR; then # path given as parameter
+- SNAPPY_DIR="$PHP_SNAPPY/include"
++ SNAPPY_DIR="$PHP_SNAPPY"
+ else # search default path list
+ AC_MSG_CHECKING([for snappy files in default path])
+ for i in $SEARCH_PATH ; do
+ if test -r $i/$SEARCH_FOR; then
+- SNAPPY_DIR="$i/include"
++ SNAPPY_DIR="$i"
+ AC_MSG_RESULT(found in $i)
+ fi
+ done
+@@ -80,7 +80,7 @@
+
+ dnl # add include path
+
+- PHP_ADD_INCLUDE($SNAPPY_DIR)
++ PHP_ADD_INCLUDE([$SNAPPY_DIR/include])
+
+ dnl # check for lib
+
+@@ -90,7 +90,7 @@
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE(
+ [
+- #include "$SNAPPY_DIR/snappy-c.h"
++ #include "$SNAPPY_DIR/include/snappy-c.h"
+ ],[
+ snappy_max_compressed_length(1);
+ ],[
diff --git a/archivers/php5-snappy/pkg-descr b/archivers/php5-snappy/pkg-descr
new file mode 100644
index 000000000000..a888fadefeee
--- /dev/null
+++ b/archivers/php5-snappy/pkg-descr
@@ -0,0 +1,4 @@
+Provides the API to PHP for the snappy compression algorithm by
+Google.
+
+WWW: http://code.google.com/p/php-snappy/