diff options
author | Andre Barboza <bmg.andre@gmail.com> | 2017-02-23 08:50:51 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-02-24 04:16:48 +0700 |
commit | 03336553423f9c1855865481e66477bc9bc0aceb (patch) | |
tree | 82176b6686a0dab50f64aa0d1f76efce662b1e0b /libraries | |
parent | cd5d83a59393e11ffd0486112712ade5a1eba583 (diff) |
libraries/libgraphqlparser: Added (A GraphQL query parser).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/libgraphqlparser/README | 6 | ||||
-rw-r--r-- | libraries/libgraphqlparser/libgraphqlparser.SlackBuild | 96 | ||||
-rw-r--r-- | libraries/libgraphqlparser/libgraphqlparser.info | 10 | ||||
-rw-r--r-- | libraries/libgraphqlparser/libgraphqlparser.patch | 32 | ||||
-rw-r--r-- | libraries/libgraphqlparser/slack-desc | 19 |
5 files changed, 163 insertions, 0 deletions
diff --git a/libraries/libgraphqlparser/README b/libraries/libgraphqlparser/README new file mode 100644 index 0000000000000..7b26172715ed1 --- /dev/null +++ b/libraries/libgraphqlparser/README @@ -0,0 +1,6 @@ +libgraphqlparser is a parser for GraphQL, a query language created by +Facebook for describing data requirements on complex application data +models, implemented in C++11. It can be used on its own in C++ code +(or in C code via the pure C API defined in the c subdirectory), or +you can use it as the basis for an extension module for your favorite +programming language instead of writing your own parser from scratch. diff --git a/libraries/libgraphqlparser/libgraphqlparser.SlackBuild b/libraries/libgraphqlparser/libgraphqlparser.SlackBuild new file mode 100644 index 0000000000000..01a3e86442257 --- /dev/null +++ b/libraries/libgraphqlparser/libgraphqlparser.SlackBuild @@ -0,0 +1,96 @@ +#!/bin/sh + +# Slackware build script for GraphQL parser library + +# Copyright 2017 Andre Barboza, Belo Horizonte - Brazil +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=libgraphqlparser +VERSION=${VERSION:-0.6.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +patch -p1 < $CWD/libgraphqlparser.patch +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a CONTRIBUTING.md LICENSE PATENTS README.md $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/libraries/libgraphqlparser/libgraphqlparser.info b/libraries/libgraphqlparser/libgraphqlparser.info new file mode 100644 index 0000000000000..3a5f089ed2f43 --- /dev/null +++ b/libraries/libgraphqlparser/libgraphqlparser.info @@ -0,0 +1,10 @@ +PRGNAM="libgraphqlparser" +VERSION="0.6.0" +HOMEPAGE="https://github.com/graphql/libgraphqlparser" +DOWNLOAD="https://github.com/graphql/libgraphqlparser/archive/v0.6.0/libgraphqlparser-0.6.0.tar.gz" +MD5SUM="f48b6e643084ab383d1d9aa5c17dd557" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Andre Barboza" +EMAIL="bmg.andre@gmail.com" diff --git a/libraries/libgraphqlparser/libgraphqlparser.patch b/libraries/libgraphqlparser/libgraphqlparser.patch new file mode 100644 index 0000000000000..5baaca4518068 --- /dev/null +++ b/libraries/libgraphqlparser/libgraphqlparser.patch @@ -0,0 +1,32 @@ +diff -ur libgraphqlparser-0.6.0.old/CMakeLists.txt libgraphqlparser-0.6.0/CMakeLists.txt +--- libgraphqlparser-0.6.0.old/CMakeLists.txt 2016-12-22 18:39:29.000000000 -0200 ++++ libgraphqlparser-0.6.0/CMakeLists.txt 2017-02-21 22:51:26.509154832 -0300 +@@ -99,7 +99,7 @@ + syntaxdefs.h + DESTINATION include/graphqlparser) + INSTALL(TARGETS graphqlparser +- LIBRARY DESTINATION lib) ++ LIBRARY DESTINATION lib${LIB_SUFFIX}) + + if (UNIX) + # generate pkgconfig file +@@ -108,7 +108,7 @@ + # generate .pc and install + configure_file("libgraphqlparser.pc.in" "libgraphqlparser.pc" @ONLY) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libgraphqlparser.pc" +- DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig") + endif() + endif() + +diff -ur libgraphqlparser-0.6.0.old/libgraphqlparser.pc.in libgraphqlparser-0.6.0/libgraphqlparser.pc.in +--- libgraphqlparser-0.6.0.old/libgraphqlparser.pc.in 2017-02-21 23:00:17.928182153 -0300 ++++ libgraphqlparser-0.6.0/libgraphqlparser.pc.in 2016-12-22 18:39:29.000000000 -0200 +@@ -1,6 +1,6 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=${prefix} +-libdir=${exec_prefix}/lib ++libdir=${exec_prefix}/lib@LIB_SUFFIX@ + includedir=${prefix}/include/graphqlparser + + Name: @CMAKE_PROJECT_NAME@ diff --git a/libraries/libgraphqlparser/slack-desc b/libraries/libgraphqlparser/slack-desc new file mode 100644 index 0000000000000..5439b372e6859 --- /dev/null +++ b/libraries/libgraphqlparser/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +libgraphqlparser: libgraphqlparser (A GraphQL query parser in C++ with C and C++ APIs) +libgraphqlparser: +libgraphqlparser: libgraphqlparser is a parser for GraphQL, a query language created by +libgraphqlparser: Facebook for describing data requirements on complex application data +libgraphqlparser: models, implemented in C++11. It can be used on its own in C++ code +libgraphqlparser: (or in C code via the pure C API defined in the c subdirectory), or +libgraphqlparser: you can use it as the basis for an extension module for your favorite +libgraphqlparser: programming language instead of writing your own parser from scratch. +libgraphqlparser: +libgraphqlparser: https://github.com/graphql/libgraphqlparser +libgraphqlparser: |