Json-c : bump (#2185)

This commit is contained in:
miqlas
2018-02-14 01:28:09 +01:00
committed by waddlesplash
parent aa902b76e3
commit e890ec95bd
3 changed files with 76 additions and 108 deletions

View File

@@ -1,64 +0,0 @@
SUMMARY="A JSON implementation in C"
DESCRIPTION="
JSON-C implements a reference counting object model that allows you to easily \
construct JSON objects in C, output them as JSON formatted strings and parse \
JSON formatted strings back into the C representation of JSON objects."
HOMEPAGE="https://github.com/json-c/json-c/wiki"
COPYRIGHT="2009-2012 Eric Haszlakiewicz
2004, 2005 Metaparadigm Pte Ltd"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://s3.amazonaws.com/json-c_releases/releases/json-c-$portVersion-nodoc.tar.gz"
CHECKSUM_SHA256="5a617da9aade997938197ef0f8aabd7f97b670c216dc173977e1d56eef9e1291"
SOURCE_DIR="json-c-$portVersion"
PATCHES="json_c-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
json_c$secondaryArchSuffix = $portVersion
lib:libjson_c$secondaryArchSuffix = 2.0.2 compat >= 2
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
json_c${secondaryArchSuffix}_devel = $portVersion
devel:libjson_c$secondaryArchSuffix = 2.0.2 compat >= 2
"
REQUIRES_devel="
json_c$secondaryArchSuffix == $portVersion base
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:aclocal
cmd:autoreconf
cmd:gcc$secondaryArchSuffix
cmd:libtool
cmd:make
"
BUILD()
{
autoreconf -fi
runConfigure ./configure
make
}
INSTALL()
{
make install
rm $libDir/libjson-c.la
prepareInstalledDevelLib libjson-c
fixPkgconfig
packageEntries devel $developDir
}
TEST()
{
make check
}

View File

@@ -0,0 +1,76 @@
SUMMARY="A JSON implementation in C"
DESCRIPTION="JSON-C implements a reference counting object model that allows \
you to easily construct JSON objects in C, output them as JSON formatted \
strings and parse JSON formatted strings back into the C representation of \
JSON objects."
HOMEPAGE="https://github.com/json-c/json-c/wiki"
COPYRIGHT="2009-2012, 2016-2017 Eric Haszlakiewicz
2004-2005, 2013 Metaparadigm Pte. Ltd.
2009-2012 Hewlett-Packard Development Company, L.P.
2008-2009 Yahoo! Inc.
2016 Alexandru Ardelean"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://s3.amazonaws.com/json-c_releases/releases/json-c-$portVersion.tar.gz"
CHECKSUM_SHA256="0316780be9ad16c42d7c26b015a784fd5df4b0909fef0aba51cfb13e492ac24d"
SOURCE_DIR="json-c-$portVersion"
ARCHITECTURES="?x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
libVersion="3.0.1"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
json_c$secondaryArchSuffix = $portVersion
lib:libjson_c$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
json_c${secondaryArchSuffix}_devel = $portVersion
devel:libjson_c$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
json_c$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoreconf
cmd:gcc$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
defineDebugInfoPackage json_c$secondaryArchSuffix \
$libDir/libjson-c.so.$libVersion
BUILD()
{
autoreconf -fi
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/libjson-c.la
prepareInstalledDevelLib libjson-c
fixPkgconfig
packageEntries devel $developDir
}
TEST()
{
make check
}

View File

@@ -1,44 +0,0 @@
From 260bd7c8cfe9c40e49cc04b5eea87786b1ea0e57 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 8 Jun 2014 19:35:53 +0200
Subject: Remove compiler options unknown to gcc2.
diff --git a/Makefile.am.inc b/Makefile.am.inc
index fec591b..21aec1f 100644
--- a/Makefile.am.inc
+++ b/Makefile.am.inc
@@ -1,2 +1,2 @@
-AM_CFLAGS = -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT
+AM_CFLAGS = -Wall -Wwrite-strings -std=gnu9x -D_GNU_SOURCE -D_REENTRANT
--
2.13.1
From e2f2dca5eb135051cbf4e3533b314509185e698b Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 8 Jun 2014 21:08:43 +0200
Subject: Avoid c99ism to make gcc2 happy.
diff --git a/json_tokener.c b/json_tokener.c
index 9a76293..4734fed 100644
--- a/json_tokener.c
+++ b/json_tokener.c
@@ -354,10 +354,11 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
{
int size_inf;
int is_negative = 0;
+ char *infbuf;
printbuf_memappend_fast(tok->pb, &c, 1);
size_inf = json_min(tok->st_pos+1, json_inf_str_len);
- char *infbuf = tok->pb->buf;
+ infbuf = tok->pb->buf;
if (*infbuf == '-')
{
infbuf++;
--
2.13.1