# HG changeset patch # User David Demelier # Date 1565203200 -7200 # Node ID d5ffd41f80103e983d8535375989f7418eca911e # Parent 4b0cb6b86f6ac33c92ef047ef42b2aa1aa3ec84f text/json-glib: initial import, closes #1758 diff -r 4b0cb6b86f6a -r d5ffd41f8010 text/json-glib/json-glib.sh --- /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 +# +# 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 +} diff -r 4b0cb6b86f6a -r d5ffd41f8010 text/json-glib/json-glib.sha1 --- /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