changeset 751:d5ffd41f8010

text/json-glib: initial import, closes #1758
author David Demelier <markand@malikania.fr>
date Wed, 07 Aug 2019 20:40:00 +0200
parents 4b0cb6b86f6a
children b6404b1d0656
files text/json-glib/json-glib.sh text/json-glib/json-glib.sha1
diffstat 2 files changed, 62 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/text/json-glib/json-glib.sh	Wed Aug 07 20:40:00 2019 +0200
@@ -0,0 +1,61 @@
+#!/bin/sh
+#
+# Copyright (c) 2019 David Demelier <markand@malikania.fr>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+PKGNAME=json-glib
+PKGVERSION=1.4.4
+PKGREVISION=1
+PKGLICENSE="??"
+PKGSUMMARY="JSON library based on glib"
+PKGDOWNLOAD="https://download.gnome.org/sources/$PKGNAME/${PKGVERSION%.*}/$PKGNAME-$PKGVERSION.tar.xz"
+PKGDEPENDS="dev/meson:build lib/glib text/libxslt"
+PKGOPTIONS="INTROSPECTION"
+
+: ${CC:=clang}
+: ${CFLAGS:=-O2}
+: ${CXX:=clang++}
+: ${CXXFLAGS:=-O2}
+: ${LDFLAGS:=}
+: ${INTROSPECTION:=yes}
+
+if [ "$INTROSPECTION" = "yes" ]; then
+	PKGDEPENDS="dev/gobject-introspection:build $PKGDEPENDS"
+	with_introspection="-D introspection=true"
+else
+	with_introspection="-D introspection=true"
+fi
+
+build()
+{
+	rm -rf $PKGNAME-$PKGVERSION
+	tar xvf $PKGNAME-$PKGVERSION.tar.xz
+	cd $PKGNAME-$PKGVERSION
+
+	CC="$CC" \
+	CFLAGS="$CFLAGS" \
+	CXX="$CXX" \
+	CXXFLAGS="$CXXFLAGS" \
+	LDFLAGS="$LDFLAGS" \
+	meson . build \
+		--prefix / \
+		--buildtype release \
+		$with_introspection
+	CC="$CC" ninja -C build
+	DESTDIR=$DESTDIR ninja -C build install
+
+	cd ..
+	rm -rf $PKGNAME-$PKGVERSION
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/text/json-glib/json-glib.sha1	Wed Aug 07 20:40:00 2019 +0200
@@ -0,0 +1,1 @@
+d9b6d58c0a5b45aa86fbf0da31c65c19254edf96  json-glib-1.4.4.tar.xz