jq is like sed for JSON data - you can use it to slice and filter
and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text. WWW: https://github.com/kjdev/php-ext-jq PR: 200438 Submitted by: Gasol Wu <gasol.wu@gmail.com>
This commit is contained in:
parent
54ff527b1a
commit
5d53ff11b3
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=400601
6 changed files with 68 additions and 0 deletions
|
@ -3714,6 +3714,7 @@
|
|||
SUBDIR += phabricator
|
||||
SUBDIR += php-Psr_Log
|
||||
SUBDIR += php-composer
|
||||
SUBDIR += php-jq
|
||||
SUBDIR += php-libawl
|
||||
SUBDIR += php-memoize
|
||||
SUBDIR += php-scalar_objects
|
||||
|
|
30
devel/php-jq/Makefile
Normal file
30
devel/php-jq/Makefile
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Created by: Gasol Wu <gasol.wu@gmail.com>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= jq
|
||||
PORTVERSION= 0.0.1
|
||||
CATEGORIES= devel
|
||||
PKGNAMEPREFIX= php-
|
||||
|
||||
MAINTAINER= gasol.wu@gmail.com
|
||||
COMMENT= Jq shared extension for php
|
||||
|
||||
LICENSE= MIT
|
||||
|
||||
LIB_DEPENDS= libjq.so:${PORTSDIR}/textproc/jq
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= kjdev
|
||||
GH_PROJECT= php-ext-jq
|
||||
|
||||
USE_PHP= yes
|
||||
USE_PHPIZE= yes
|
||||
USE_PHPEXT= yes
|
||||
USES= tar:tgz
|
||||
|
||||
JQ_CMD= ${LOCALBASE}/bin/jq
|
||||
|
||||
pre-build:
|
||||
(${JQ_CMD} -V | ${SED} 's,jq-\(.*\),#define JQ_VERSION "\1",' >> ${WRKSRC}/version.h)
|
||||
|
||||
.include <bsd.port.mk>
|
2
devel/php-jq/distinfo
Normal file
2
devel/php-jq/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (kjdev-php-ext-jq-0.0.1_GH0.tgz) = 084ef608e37551d75957dcf3870c3f8b056941693e65127eb4ca388869087f5b
|
||||
SIZE (kjdev-php-ext-jq-0.0.1_GH0.tgz) = 615397
|
17
devel/php-jq/files/patch-config.m4
Normal file
17
devel/php-jq/files/patch-config.m4
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- config.m4.orig 2014-11-20 06:16:09 UTC
|
||||
+++ config.m4
|
||||
@@ -32,11 +32,12 @@ PHP_ARG_ENABLE(jq, whether to enable jq
|
||||
if test "$PHP_JQ" != "no"; then
|
||||
|
||||
dnl Source jq
|
||||
- PHP_ADD_INCLUDE("jq/")
|
||||
+ PHP_ADD_INCLUDE("/usr/local/include")
|
||||
+ PHP_ADD_LIBRARY("jq")
|
||||
JQ_SOURCE="jq/locfile.c jq/bytecode.c jq/compile.c jq/execute.c jq/builtin.c jq/jv.c jq/jv_parse.c jq/jv_print.c jq/jv_dtoa.c jq/jv_unicode.c jq/jv_aux.c jq/jv_file.c jq/jv_alloc.c jq/lexer.c jq/parser.c"
|
||||
|
||||
dnl PHP Extension
|
||||
- PHP_NEW_EXTENSION(jq, jq.c $JQ_SOURCE, $ext_shared)
|
||||
+ PHP_NEW_EXTENSION(jq, jq.c, $ext_shared)
|
||||
fi
|
||||
|
||||
dnl coverage
|
13
devel/php-jq/files/patch-jq.c
Normal file
13
devel/php-jq/files/patch-jq.c
Normal file
|
@ -0,0 +1,13 @@
|
|||
--- jq.c.orig 2014-11-20 06:16:09 UTC
|
||||
+++ jq.c
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
#include "php_jq.h"
|
||||
|
||||
-#include "jq/jq.h"
|
||||
-#include "jq/version.h"
|
||||
+#include "jq.h"
|
||||
+#include "version.h"
|
||||
|
||||
ZEND_DECLARE_MODULE_GLOBALS(jq)
|
||||
|
5
devel/php-jq/pkg-descr
Normal file
5
devel/php-jq/pkg-descr
Normal file
|
@ -0,0 +1,5 @@
|
|||
jq is like sed for JSON data - you can use it to slice and filter
|
||||
and map and transform structured data with the same ease that sed,
|
||||
awk, grep and friends let you play with text.
|
||||
|
||||
WWW: https://github.com/kjdev/php-ext-jq
|
Loading…
Reference in a new issue