# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # yajl # yajl/pkg-descr # yajl/pkg-plist # yajl/Makefile # yajl/distinfo # yajl/files # yajl/files/patch-test__run_tests.sh # echo c - yajl mkdir -p yajl > /dev/null 2>&1 echo x - yajl/pkg-descr sed 's/^X//' >yajl/pkg-descr << '583517fac0e7ea55984e44a202f3458c' XYet Another JSON Library. YAJL is a small event-driven (SAX-style) JSON parser Xwritten in ANSI C, and a small validating JSON generator. YAJL is released Xunder the BSD license. X XWWW: http://lloyd.github.com/yajl/ 583517fac0e7ea55984e44a202f3458c echo x - yajl/pkg-plist sed 's/^X//' >yajl/pkg-plist << '95cf658bb4e58d3f73b8a6e2eb86fdc9' Xbin/json_reformat Xbin/json_verify Xinclude/yajl/yajl_common.h Xinclude/yajl/yajl_gen.h Xinclude/yajl/yajl_parse.h Xlib/libyajl.so Xlib/libyajl.so.1 Xlib/libyajl.so.1.0.9 Xlib/libyajl_s.a X@dirrm include/yajl 95cf658bb4e58d3f73b8a6e2eb86fdc9 echo x - yajl/Makefile sed 's/^X//' >yajl/Makefile << 'a304f3d1471396cf0b6f036ccdee48d6' X# New ports collection makefile for: yajl X# Date created: 2010-03-29 X# Whom: Bapt X# X# $FreeBSD$ X# X XPORTNAME= yajl XPORTVERSION= 1.0.9 XCATEGORIES= devel XMASTER_SITES= http://cloud.github.com/downloads/lloyd/yajl/ X XMAINTAINER= baptiste.daroussin@gmail.com XCOMMENT= A Portable JSON parsing and serialization library in ANSI C X XUSE_LDCONFIG= yes XUSE_CMAKE= yes X X.include a304f3d1471396cf0b6f036ccdee48d6 echo x - yajl/distinfo sed 's/^X//' >yajl/distinfo << 'd803a505191fb3afe325d6cc4971e73a' XMD5 (yajl-1.0.9.tar.gz) = 8643ff2fef762029e51c86882a4d0fc6 XSHA256 (yajl-1.0.9.tar.gz) = 690e3cf4f879aae623fc6b900665097132a77c504efc5260d36c085b93c84e9b XSIZE (yajl-1.0.9.tar.gz) = 53094 d803a505191fb3afe325d6cc4971e73a echo c - yajl/files mkdir -p yajl/files > /dev/null 2>&1 echo x - yajl/files/patch-test__run_tests.sh sed 's/^X//' >yajl/files/patch-test__run_tests.sh << 'f9ed91aa1d2835370fa522ab8cbfe260' X--- ./test/run_tests.sh.orig 2010-01-08 18:05:11.000000000 +0100 X+++ ./test/run_tests.sh 2010-03-29 19:19:09.218500262 +0200 X@@ -1,7 +1,7 @@ X-#!/usr/bin/env bash X+#!/bin/sh X X DIFF_FLAGS="-u" X-if [[ `uname` == *W32* ]] ; then X+if [ `uname` = "*W32*" ] ; then X DIFF_FLAGS="-wu" X fi X X@@ -9,9 +9,9 @@ X # particular test binary (useful for non-cmake build systems). X if [ -z "$testBin" ]; then X testBin="../build/test/Debug/yajl_test.exe" X- if [[ ! -x $testBin ]] ; then X+ if [ ! -x $testBin ] ; then X testBin="../build/test/yajl_test" X- if [[ ! -x $testBin ]] ; then X+ if [ ! -x $testBin ] ; then X echo "cannot execute test binary: '$testBin'" X exit 1; X fi X@@ -20,41 +20,44 @@ X X echo "using test binary: $testBin" X X-let testsSucceeded=0 X-let testsTotal=0 X+testsSucceeded=0 X+testsTotal=0 X X for file in cases/*.json ; do X allowComments="-c" X X # if the filename starts with dc_, we disallow comments for this test X- if [[ $(basename $file) == dc_* ]] ; then X- allowComments="" X- fi X+ case $(basename $file) in X+ dc_*) X+ allowComments="" X+ ;; X+ esac X echo -n " test case: '$file': " X- let iter=1 X+ iter=1 X success="success" X X+ echo "$testBin $allowComments -b $iter < $file > ${file}.test " X # parse with a read buffer size ranging from 1-31 to stress stream parsing X- while (( $iter < 32 )) && [ $success == "success" ] ; do X+ while [ $iter -lt 32 ] && [ $success = "success" ] ; do X $testBin $allowComments -b $iter < $file > ${file}.test 2>&1 X diff ${DIFF_FLAGS} ${file}.gold ${file}.test X- if [[ $? == 0 ]] ; then X- if (( $iter == 31 )) ; then let testsSucceeded+=1 ; fi X+ if [ $? -eq 0 ] ; then X+ if [ $iter -eq 31 ] ; then : $(( testsSucceeded += 1)) ; fi X else X success="FAILURE" X- let iter=32 X+ iter=32 X fi X- let iter+=1 X+ : $(( iter += 1 )) X rm ${file}.test X done X X echo $success X- let testsTotal+=1 X+ : $(( testsTotal += 1 )) X done X X echo $testsSucceeded/$testsTotal tests successful X X-if [[ $testsSucceeded != $testsTotal ]] ; then X+if [ $testsSucceeded != $testsTotal ] ; then X exit 1 X fi X f9ed91aa1d2835370fa522ab8cbfe260 exit