The Google JsonNet for PHP.

Jsonnet language, from its most basic features to its powerful object model,
punctuated with examples drawn from the world of cocktails. These examples are
meant to be fun, and although a little contrived, do not restrict our thinking
to any one particular application of Jsonnet.

WWW: https://pecl.php.net/package/jsonnet

PR:		200676
Submitted by:	Gasol Wu <gasol.wu@gmail.com>
This commit is contained in:
Pawel Pekala 2015-10-28 18:05:03 +00:00
parent 839a71b6bf
commit a39bd5e3fa
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=400405
6 changed files with 82 additions and 0 deletions

View file

@ -3668,6 +3668,7 @@
SUBDIR += pecl-jsmin
SUBDIR += pecl-jsonc
SUBDIR += pecl-jsond
SUBDIR += pecl-jsonnet
SUBDIR += pecl-judy
SUBDIR += pecl-libevent
SUBDIR += pecl-mcve

View file

@ -0,0 +1,26 @@
# Created by: Gasol Wu <gasol.wu@gmail.com>
# $FreeBSD$
PORTNAME= jsonnet
PORTVERSION= 1.0.0
CATEGORIES= devel
MASTER_SITES= http://pecl.php.net/get/
PKGNAMEPREFIX= pecl-
DISTNAME= JsonNet-${PORTVERSION}
DIST_SUBDIR= PECL
MAINTAINER= gasol.wu@gmail.com
COMMENT= Google JsonNet for PHP
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libjsonnet.so:${PORTSDIR}/devel/jsonnet
USES= tar:tgz
USE_PHP= json
USE_PHPEXT= yes
USE_PHP_BUILD= yes
CONFIGURE_ARGS= --with-jsonnet=${LOCALBASE}
.include <bsd.port.mk>

View file

@ -0,0 +1,2 @@
SHA256 (PECL/JsonNet-1.0.0.tgz) = 40b3c193d53f23feae84c5b3c7b4ffc9c9ea4be116877d01612418f7d78ebcb7
SIZE (PECL/JsonNet-1.0.0.tgz) = 66922

View file

@ -0,0 +1,34 @@
--- config.m4.orig 2015-06-05 23:06:29 UTC
+++ config.m4
@@ -53,13 +53,9 @@ AC_DEFUN([AC_JSONNET_EPOLL],
])
if test "$PHP_JSONNET" != "no"; then
- cd libjsonnet
- make libjsonnet.so
- cd ../
-
# --with-jsonnet -> check with-path
SEARCH_PATH="/usr/lib/jsonnet"
- SEARCH_FOR="libjsonnet.h"
+ SEARCH_FOR="include/libjsonnet.h"
if test -r $PHP_JSONNET/$SEARCH_FOR; then # path given as parameter
JSONNET_DIR=$PHP_JSONNET
else # search default path list
@@ -78,13 +74,12 @@ if test "$PHP_JSONNET" != "no"; then
fi
# --with-jsonnet -> add include path
- PHP_ADD_INCLUDE($JSONNET_DIR)
+ PHP_ADD_INCLUDE($JSONNET_DIR/include)
# --with-jsonnet -> check for lib and symbol presence
- PHP_ADD_INCLUDE($JSONNET_DIR)
- PHP_EVAL_LIBLINE($JSONNET_DIR, JSONNET_SHARED_LIBADD)
- PHP_ADD_LIBRARY_WITH_PATH(jsonnet, $JSONNET_DIR, JSONNET_SHARED_LIBADD)
+ PHP_EVAL_LIBLINE($JSONNET_DIR/lib, JSONNET_SHARED_LIBADD)
+ PHP_ADD_LIBRARY_WITH_PATH(jsonnet, $JSONNET_DIR/lib, JSONNET_SHARED_LIBADD)
AC_JSONNET_EPOLL()

View file

@ -0,0 +1,11 @@
--- jsonnet.c.orig 2015-06-05 23:08:06 UTC
+++ jsonnet.c
@@ -128,7 +128,7 @@ PHP_MINFO_FUNCTION(jsonnet)
{
php_info_print_table_start();
php_info_print_table_header(2, "JsonNet support", "Enabled");
- php_info_print_table_row(2, "jsonnet Information", JSONNET_VERSION);
+ php_info_print_table_row(2, "jsonnet Information", jsonnet_version());
php_info_print_table_row(2, "Version", JSONNET_PHP_VERSION);
php_info_print_table_row(2, "Author", JSONNET_PHP_AUTHOR);
php_info_print_table_row(2,"Supports", "https://github.com/Neeke/JsonNet");

View file

@ -0,0 +1,8 @@
The Google JsonNet for PHP.
Jsonnet language, from its most basic features to its powerful object model,
punctuated with examples drawn from the world of cocktails. These examples are
meant to be fun, and although a little contrived, do not restrict our thinking
to any one particular application of Jsonnet.
WWW: https://pecl.php.net/package/jsonnet