diff options
Diffstat (limited to 'devel/yajl')
-rw-r--r-- | devel/yajl/Makefile | 19 | ||||
-rw-r--r-- | devel/yajl/distinfo | 3 | ||||
-rw-r--r-- | devel/yajl/files/patch-test__run_tests.sh | 82 | ||||
-rw-r--r-- | devel/yajl/pkg-descr | 5 | ||||
-rw-r--r-- | devel/yajl/pkg-plist | 10 |
5 files changed, 119 insertions, 0 deletions
diff --git a/devel/yajl/Makefile b/devel/yajl/Makefile new file mode 100644 index 000000000000..fe019953af33 --- /dev/null +++ b/devel/yajl/Makefile @@ -0,0 +1,19 @@ +# New ports collection makefile for: yajl +# Date created: 2010-03-29 +# Whom: Bapt <baptiste.daroussin@gmail.com> +# +# $FreeBSD$ +# + +PORTNAME= yajl +PORTVERSION= 1.0.9 +CATEGORIES= devel +MASTER_SITES= http://cloud.github.com/downloads/lloyd/yajl/ + +MAINTAINER= baptiste.daroussin@gmail.com +COMMENT= A Portable JSON parsing and serialization library in ANSI C + +USE_LDCONFIG= yes +USE_CMAKE= yes + +.include <bsd.port.mk> diff --git a/devel/yajl/distinfo b/devel/yajl/distinfo new file mode 100644 index 000000000000..0d6cbb658a3b --- /dev/null +++ b/devel/yajl/distinfo @@ -0,0 +1,3 @@ +MD5 (yajl-1.0.9.tar.gz) = 8643ff2fef762029e51c86882a4d0fc6 +SHA256 (yajl-1.0.9.tar.gz) = 690e3cf4f879aae623fc6b900665097132a77c504efc5260d36c085b93c84e9b +SIZE (yajl-1.0.9.tar.gz) = 53094 diff --git a/devel/yajl/files/patch-test__run_tests.sh b/devel/yajl/files/patch-test__run_tests.sh new file mode 100644 index 000000000000..23ee5d5b62e1 --- /dev/null +++ b/devel/yajl/files/patch-test__run_tests.sh @@ -0,0 +1,82 @@ +--- ./test/run_tests.sh.orig 2010-01-08 18:05:11.000000000 +0100 ++++ ./test/run_tests.sh 2010-03-29 19:19:09.218500262 +0200 +@@ -1,7 +1,7 @@ +-#!/usr/bin/env bash ++#!/bin/sh + + DIFF_FLAGS="-u" +-if [[ `uname` == *W32* ]] ; then ++if [ `uname` = "*W32*" ] ; then + DIFF_FLAGS="-wu" + fi + +@@ -9,9 +9,9 @@ + # particular test binary (useful for non-cmake build systems). + if [ -z "$testBin" ]; then + testBin="../build/test/Debug/yajl_test.exe" +- if [[ ! -x $testBin ]] ; then ++ if [ ! -x $testBin ] ; then + testBin="../build/test/yajl_test" +- if [[ ! -x $testBin ]] ; then ++ if [ ! -x $testBin ] ; then + echo "cannot execute test binary: '$testBin'" + exit 1; + fi +@@ -20,41 +20,44 @@ + + echo "using test binary: $testBin" + +-let testsSucceeded=0 +-let testsTotal=0 ++testsSucceeded=0 ++testsTotal=0 + + for file in cases/*.json ; do + allowComments="-c" + + # if the filename starts with dc_, we disallow comments for this test +- if [[ $(basename $file) == dc_* ]] ; then +- allowComments="" +- fi ++ case $(basename $file) in ++ dc_*) ++ allowComments="" ++ ;; ++ esac + echo -n " test case: '$file': " +- let iter=1 ++ iter=1 + success="success" + ++ echo "$testBin $allowComments -b $iter < $file > ${file}.test " + # parse with a read buffer size ranging from 1-31 to stress stream parsing +- while (( $iter < 32 )) && [ $success == "success" ] ; do ++ while [ $iter -lt 32 ] && [ $success = "success" ] ; do + $testBin $allowComments -b $iter < $file > ${file}.test 2>&1 + diff ${DIFF_FLAGS} ${file}.gold ${file}.test +- if [[ $? == 0 ]] ; then +- if (( $iter == 31 )) ; then let testsSucceeded+=1 ; fi ++ if [ $? -eq 0 ] ; then ++ if [ $iter -eq 31 ] ; then : $(( testsSucceeded += 1)) ; fi + else + success="FAILURE" +- let iter=32 ++ iter=32 + fi +- let iter+=1 ++ : $(( iter += 1 )) + rm ${file}.test + done + + echo $success +- let testsTotal+=1 ++ : $(( testsTotal += 1 )) + done + + echo $testsSucceeded/$testsTotal tests successful + +-if [[ $testsSucceeded != $testsTotal ]] ; then ++if [ $testsSucceeded != $testsTotal ] ; then + exit 1 + fi + diff --git a/devel/yajl/pkg-descr b/devel/yajl/pkg-descr new file mode 100644 index 000000000000..5406c825f66a --- /dev/null +++ b/devel/yajl/pkg-descr @@ -0,0 +1,5 @@ +Yet Another JSON Library. YAJL is a small event-driven (SAX-style) +JSON parser written in ANSI C, and a small validating JSON generator. +YAJL is released under the BSD license. + +WWW: http://lloyd.github.com/yajl/ diff --git a/devel/yajl/pkg-plist b/devel/yajl/pkg-plist new file mode 100644 index 000000000000..ca79de5eb906 --- /dev/null +++ b/devel/yajl/pkg-plist @@ -0,0 +1,10 @@ +bin/json_reformat +bin/json_verify +include/yajl/yajl_common.h +include/yajl/yajl_gen.h +include/yajl/yajl_parse.h +lib/libyajl.so +lib/libyajl.so.1 +lib/libyajl.so.1.0.9 +lib/libyajl_s.a +@dirrm include/yajl |