From 39cba5b15f4d050c8b0a6b8cbd53e636a06442b9 Mon Sep 17 00:00:00 2001 From: ojab Date: Mon, 22 Apr 2013 20:47:42 +0400 Subject: [PATCH] New package: jsoncpp-0.6.0rc2 --- common/shlibs | 1 + srcpkgs/jsoncpp-devel | 1 + srcpkgs/jsoncpp/files/jsoncpp.pc | 11 ++++ .../patches/jsoncpp_cross-compile.patch | 16 ++++++ srcpkgs/jsoncpp/template | 50 +++++++++++++++++++ 5 files changed, 79 insertions(+) create mode 120000 srcpkgs/jsoncpp-devel create mode 100644 srcpkgs/jsoncpp/files/jsoncpp.pc create mode 100644 srcpkgs/jsoncpp/patches/jsoncpp_cross-compile.patch create mode 100644 srcpkgs/jsoncpp/template diff --git a/common/shlibs b/common/shlibs index 9bf2dd50f0d..9e13275b74d 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1231,3 +1231,4 @@ libspeechd.so.2 speech-dispatcher-0.8_1 libre2.so.0 re2-20130115_1 libminizip.so.1 minizip-1.2.7_1 libsrtp.so.0 libsrtp-1.4.4_1 +libjsoncpp.so.0 jsoncpp-0.6.0rc2_1 diff --git a/srcpkgs/jsoncpp-devel b/srcpkgs/jsoncpp-devel new file mode 120000 index 00000000000..66541f6761d --- /dev/null +++ b/srcpkgs/jsoncpp-devel @@ -0,0 +1 @@ +jsoncpp/ \ No newline at end of file diff --git a/srcpkgs/jsoncpp/files/jsoncpp.pc b/srcpkgs/jsoncpp/files/jsoncpp.pc new file mode 100644 index 00000000000..3900f20e9a0 --- /dev/null +++ b/srcpkgs/jsoncpp/files/jsoncpp.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: jsoncpp +Description: API for manipulating JSON +Version: 0.6.0 +URL: http://jsoncpp.sourceforge.net/ +Libs: -L${libdir} -ljsoncpp +Cflags: -I${includedir}/jsoncpp/ diff --git a/srcpkgs/jsoncpp/patches/jsoncpp_cross-compile.patch b/srcpkgs/jsoncpp/patches/jsoncpp_cross-compile.patch new file mode 100644 index 00000000000..0a104efa4ad --- /dev/null +++ b/srcpkgs/jsoncpp/patches/jsoncpp_cross-compile.patch @@ -0,0 +1,16 @@ +--- SConstruct.orig 2010-03-13 13:59:50.000000000 +0300 ++++ SConstruct 2013-04-23 19:31:39.042439981 +0400 +@@ -119,6 +119,13 @@ + env.Append( CPPDEFINES=[ "WIN32", "NDEBUG", "_MT" ] ) + elif platform.startswith('linux-gcc'): + env.Tool( 'default' ) ++ env.Replace(AS = os.environ['AS']) ++ env.Replace(AR = os.environ['AR']) ++ env.Replace(NM = os.environ['NM']) ++ env.Replace(CPP = os.environ['CPP']) ++ env.Replace(LD = os.environ['LD']) ++ env.Replace(CXX = os.environ['CXX']) ++ env.Replace(GCC = os.environ['GCC']) + env.Append( LIBS = ['pthread'], CCFLAGS = "-Wall" ) + env['SHARED_LIB_ENABLED'] = True + else: diff --git a/srcpkgs/jsoncpp/template b/srcpkgs/jsoncpp/template new file mode 100644 index 00000000000..cf0312ce588 --- /dev/null +++ b/srcpkgs/jsoncpp/template @@ -0,0 +1,50 @@ +# Template build file for 'jsoncpp'. +pkgname=jsoncpp +version=0.6.0rc2 +_srcversion=0.6.0-rc2 +revision=1 +hostmakedepends="scons" +wrksrc="${pkgname}-src-${_srcversion}" +short_desc="A JSON implementation in C++" +maintainer="ojab@ojab.ru" +license="Public Domain or MIT" +homepage="http://sourceforge.net/projects/${pkgname}" +distfiles="http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${_srcversion}/${pkgname}-src-${_srcversion}.tar.gz" +checksum=d4d193d163f520b08b9155cba978615892ca1359d77e3fb261fce2f86d09b283 + +do_build() { + sed -i SConstruct -e "s/g++/${CXX}/g" + scons CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS} " \ + DESTDIR="${DESTDIR}" platform=linux-gcc + ${CXX} -o libjsoncpp.so.0.0.0 -shared -Wl,-soname,libjsoncpp.so.0 \ + buildscons/linux-gcc-*/src/lib_json/*.os -lpthread +} + +do_install() { + vmkdir usr/lib + cp libjsoncpp.so.0.0.0 ${DESTDIR}/usr/lib/ + ln -sf libjsoncpp.so.0.0.0 ${DESTDIR}/usr/lib/libjsoncpp.so + ln -sf libjsoncpp.so.0.0.0 ${DESTDIR}/usr/lib/libjsoncpp.so.0 + vmkdir usr/include/jsoncpp/json + install -p -m 0644 include/json/*.h ${DESTDIR}/usr/include/jsoncpp/json +} + + +post_install() { + vinstall ${FILESDIR}/jsoncpp.pc 644 usr/lib/pkgconfig +} + +jsoncpp_package() { + pkg_install() { + vmove all + } +} + +jsoncpp-devel_package() { + depends="jsoncpp>=${version}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + } +}