From 91b00fa6020d3ac78542cf7217fcbe6e1740c652 Mon Sep 17 00:00:00 2001 From: Thomas D Date: Mon, 14 Mar 2016 20:11:35 +0100 Subject: [PATCH] dev-libs/libfastjson: Add libfastjson to the tree. libfastjson will be a requirement for the upcoming app-admin/rsyslog-8.17.0 ebuild. Package-Manager: portage-2.2.28 Closes: https://github.com/gentoo/gentoo/pull/1050 --- dev-libs/libfastjson/Manifest | 1 + ...or-implicit-declaration-of-vasprintf.patch | 27 +++++++++++ .../libfastjson/libfastjson-0.99.2.ebuild | 48 +++++++++++++++++++ dev-libs/libfastjson/metadata.xml | 16 +++++++ 4 files changed, 92 insertions(+) create mode 100644 dev-libs/libfastjson/Manifest create mode 100644 dev-libs/libfastjson/files/libfastjson-0.99.2-fix-for-implicit-declaration-of-vasprintf.patch create mode 100644 dev-libs/libfastjson/libfastjson-0.99.2.ebuild create mode 100644 dev-libs/libfastjson/metadata.xml diff --git a/dev-libs/libfastjson/Manifest b/dev-libs/libfastjson/Manifest new file mode 100644 index 000000000000..2bbace04608e --- /dev/null +++ b/dev-libs/libfastjson/Manifest @@ -0,0 +1 @@ +DIST libfastjson-0.99.2.tar.gz 366602 SHA256 6ff053d455243a81014f37b4d81c746d9b8d40256a56326c3a7921c8bf458dfd SHA512 4b57697cbb901bc12a26d98c3d6df998aba373d4f38339189c9bd3e5a32777fa4796039fe82581337e576fa93c6deb87759eba04326134f587064c82e1b3daaf WHIRLPOOL 56010125b4ba905aba3fa7ad69faf38237426c1ef5cbaad90458fe31e96b86719d2766d2099928dc22aa7d98a64d079a3bd9de31702b28547d1f1d416170d487 diff --git a/dev-libs/libfastjson/files/libfastjson-0.99.2-fix-for-implicit-declaration-of-vasprintf.patch b/dev-libs/libfastjson/files/libfastjson-0.99.2-fix-for-implicit-declaration-of-vasprintf.patch new file mode 100644 index 000000000000..8772cf403df9 --- /dev/null +++ b/dev-libs/libfastjson/files/libfastjson-0.99.2-fix-for-implicit-declaration-of-vasprintf.patch @@ -0,0 +1,27 @@ +From d895b1327814fad6846fec9370fade177a587aa3 Mon Sep 17 00:00:00 2001 +From: Thomas D. +Date: Tue, 8 Mar 2016 16:05:08 +0100 +Subject: [PATCH] printbuf.c: Fix for implicit declaration of function + 'vasprintf' + +Using the same q'n'd fix from eabae907c9d991143e17da278a239819f2e8ae1c for +printbuf.c as well. +--- + printbuf.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/printbuf.c b/printbuf.c +index 18237f6..d529d23 100644 +--- a/printbuf.c ++++ b/printbuf.c +@@ -15,6 +15,7 @@ + + #include "config.h" + ++#define _GNU_SOURCE + #include + #include + #include +-- +2.7.2 + diff --git a/dev-libs/libfastjson/libfastjson-0.99.2.ebuild b/dev-libs/libfastjson/libfastjson-0.99.2.ebuild new file mode 100644 index 000000000000..1c5e9e06dbda --- /dev/null +++ b/dev-libs/libfastjson/libfastjson-0.99.2.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit autotools + +DESCRIPTION="Fork of the json-c library, which is optimized for liblognorm processing" +HOMEPAGE="http://www.rsyslog.com/tag/libfastjson/" +SRC_URI="http://download.rsyslog.com/${PN}/${P}.tar.gz" + +LICENSE="MIT" + +# subslot = soname version +SLOT="0/3.0.0" + +KEYWORDS="~amd64 ~x86" +IUSE="static-libs" + +DEPEND="" +RDEPEND="" + +src_prepare() { + local PATCHES=( + "${FILESDIR}"/${PN}-0.99.2-fix-for-implicit-declaration-of-vasprintf.patch + ) + + default + + eautoreconf +} + +src_configure() { + local myeconfargs=( + $(use_enable static-libs static) + --disable-rdrand + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + local DOCS=( AUTHORS ChangeLog ) + default + + find "${ED}"usr/lib* -name '*.la' -delete || die +} diff --git a/dev-libs/libfastjson/metadata.xml b/dev-libs/libfastjson/metadata.xml new file mode 100644 index 000000000000..1dbc276b9e84 --- /dev/null +++ b/dev-libs/libfastjson/metadata.xml @@ -0,0 +1,16 @@ + + + + + whissi@whissi.de + Thomas D. (Whissi) + + + proxy-maint@gentoo.org + Proxy Maintainers + + + https://github.com/rsyslog/libfastjson/issues + rsyslog/libfastjson + + -- 2.26.2