mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
Add recipe for json-c 0.12
Remove old non-recipe for 0.9.
This commit is contained in:
64
dev-libs/json_c/json_c-0.12.recipe
Normal file
64
dev-libs/json_c/json_c-0.12.recipe
Normal file
@@ -0,0 +1,64 @@
|
||||
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.
|
||||
"
|
||||
SRC_URI="https://s3.amazonaws.com/json-c_releases/releases/json-c-0.12-nodoc.tar.gz"
|
||||
CHECKSUM_SHA256="6fd6d2311d610b279e1bcdd5c6d4f699700159d3e0786de8306af7b4bc94fb35"
|
||||
HOMEPAGE="https://github.com/json-c/json-c/wiki"
|
||||
ARCHITECTURES="x86_gcc2"
|
||||
REVISION="1"
|
||||
LICENSE="MIT"
|
||||
COPYRIGHT="
|
||||
2009-2012 Eric Haszlakiewicz
|
||||
2004, 2005 Metaparadigm Pte Ltd
|
||||
"
|
||||
|
||||
PROVIDES="
|
||||
json_c = $portVersion
|
||||
lib:libjson_c = $portVersion
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku >= $haikuVersion
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
haiku_devel >= $haikuVersion
|
||||
cmd:aclocal
|
||||
cmd:autoreconf
|
||||
cmd:gcc
|
||||
cmd:libtool
|
||||
cmd:make
|
||||
"
|
||||
|
||||
SOURCE_DIR="json-c-$portVersion"
|
||||
PATCHES="json_c-$portVersion.patchset"
|
||||
BUILD()
|
||||
{
|
||||
sh autogen.sh
|
||||
runConfigure ./configure
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
prepareInstalledDevelLib libjson-c
|
||||
fixPkgconfig libjson-c
|
||||
packageEntries devel $developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
|
||||
PROVIDES_devel="
|
||||
json_c_devel = $portVersion
|
||||
devel:libjson_c = $portVersion
|
||||
"
|
||||
|
||||
REQUIRES_devel="json_c == $portVersion base"
|
||||
@@ -1,26 +0,0 @@
|
||||
DESCRIPTION="A JSON implementation in C"
|
||||
HOMEPAGE="http://oss.metaparadigm.com/json-c/"
|
||||
SRC_URI="http://oss.metaparadigm.com/json-c/json-c-0.9.tar.gz"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
DEPEND=""
|
||||
CHECKSUM_MD5="3a13d264528dcbaf3931b0cede24abae"
|
||||
BUILD()
|
||||
{
|
||||
cd json-c-0.9
|
||||
libtoolize --force --install --copy
|
||||
aclocal
|
||||
autoconf
|
||||
automake
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd json-c-0.9
|
||||
make install DESTDIR=${DESTDIR}
|
||||
}
|
||||
|
||||
LICENSE="MIT"
|
||||
COPYRIGHT="2004-2005 Metaparadigm Pte Ltd"
|
||||
45
dev-libs/json_c/patches/json_c-0.12.patchset
Normal file
45
dev-libs/json_c/patches/json_c-0.12.patchset
Normal file
@@ -0,0 +1,45 @@
|
||||
From 42928f5769cc98b8cd791dfa2c58f7dc0634dba5 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
|
||||
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From d75281fd4c7e7b91913d25f3a2052221af50116e 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 19de8ef..80841f1 100644
|
||||
--- a/json_tokener.c
|
||||
+++ b/json_tokener.c
|
||||
@@ -355,11 +355,12 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
|
||||
int size;
|
||||
int size_inf;
|
||||
int is_negative = 0;
|
||||
+ char* infbuf;
|
||||
|
||||
printbuf_memappend_fast(tok->pb, &c, 1);
|
||||
size = json_min(tok->st_pos+1, json_null_str_len);
|
||||
size_inf = json_min(tok->st_pos+1, json_inf_str_len);
|
||||
- char *infbuf = tok->pb->buf;
|
||||
+ infbuf = tok->pb->buf;
|
||||
if (*infbuf == '-')
|
||||
{
|
||||
infbuf++;
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
Reference in New Issue
Block a user