summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Voges <svoges.sbo@gmail.com>2022-09-14 18:26:22 +0100
committerbedlam <dave@slackbuilds.org>2022-09-14 18:26:22 +0100
commit9da01a8c2166e10437bc789d3d0d62d0e37e8df0 (patch)
tree77ce1850091ce60aa0dcfcb2d5aed593142bf33e
parent2c69ec3e220c2cf1791cd723fe3a82eaf0c8d771 (diff)
downloadslackbuilds-9da01a8c2166e10437bc789d3d0d62d0e37e8df0.tar.gz
libraries/rapidyaml: Added (short description of app)
Signed-off-by: bedlam <dave@slackbuilds.org>
-rw-r--r--libraries/rapidyaml/README33
-rw-r--r--libraries/rapidyaml/rapidyaml.SlackBuild137
-rw-r--r--libraries/rapidyaml/rapidyaml.info16
-rw-r--r--libraries/rapidyaml/slack-desc19
4 files changed, 205 insertions, 0 deletions
diff --git a/libraries/rapidyaml/README b/libraries/rapidyaml/README
new file mode 100644
index 0000000000..16bf67689b
--- /dev/null
+++ b/libraries/rapidyaml/README
@@ -0,0 +1,33 @@
+Rapid YAML, or ryml for short. ryml is a C++ library to parse and emit
+YAML, and do it fast, on everything from x64 to bare-metal chips
+without operating system. (If you are looking to use your programs
+with a YAML tree as a configuration tree with override facilities,
+take a look at c4conf).
+
+ryml parses both read-only and in-situ source buffers; the resulting
+data nodes hold only views to sub-ranges of the source buffer. No
+string copies or duplications are done, and no virtual functions are
+used. The data tree is a flat index-based structure stored in a single
+array. Serialization happens only at your direct request, after
+parsing / before emitting. Internally, the data tree representation
+stores only string views and has no knowledge of types, but of course,
+every node can have a YAML type tag. ryml makes it easy and fast to
+read and modify the data tree.
+
+ryml is available as a single header file, or it can be used as a
+simple library with cmake -- both separately (ie build->install->
+find_package()) or together with your project (ie with
+add_subdirectory()).
+
+ryml can use custom global and per-tree memory allocators and error
+handler callbacks, and is exception-agnostic. ryml provides a default
+implementation for the allocator (using std::malloc()) and error
+handlers (using using std::abort() is provided, but you can opt out
+and provide your own memory allocation and eg, exception-throwing
+callbacks.
+
+ryml does not depend on the STL, ie, it does not use any std
+container as part of its data structures), but it can serialize and
+deserialize these containers into the data tree, with the use of
+optional headers. ryml ships with c4core a small C++ utilities
+multiplatform library.
diff --git a/libraries/rapidyaml/rapidyaml.SlackBuild b/libraries/rapidyaml/rapidyaml.SlackBuild
new file mode 100644
index 0000000000..74e8f7e7b5
--- /dev/null
+++ b/libraries/rapidyaml/rapidyaml.SlackBuild
@@ -0,0 +1,137 @@
+#!/bin/bash
+
+# Slackware build script for rapidyaml
+
+# Copyright 2022 Steven Voges <Oregon, USA>
+# 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.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=rapidyaml
+VERSION=${VERSION:-0.4.1}
+C4CORE=${C4CORE:-d35c7c9bf370134595699d791e6ff8db018ddc8d}
+CMAKE=${CMAKE:-371982300ff5a076d7c3199057ebed77bbe3472f}
+DEBUGBREAK=${DEBUGBREAK:-5dcbe41d2bd4712c8014aa7e843723ad7b40fd74}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+DEPS=$TMP/$PRGNAM-$VERSION/ext
+
+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
+
+tar xvf $CWD/c4core-$C4CORE.tar.gz -C \
+ $DEPS/c4core --strip-components 1
+tar xvf $CWD/cmake-$CMAKE.tar.gz -C \
+ $DEPS/c4core/cmake --strip-components 1
+tar xvf $CWD/debugbreak-$DEBUGBREAK.tar.gz -C \
+ $DEPS/c4core/src/c4/ext/debugbreak --strip-components 1
+export SETUPTOOLS_SCM_PRETEND_VERSION=$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 {} \;
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DRYML_BUILD_API=ON \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install/strip DESTDIR=$PKG
+cd ..
+python3 setup.py install --root=$PKG
+
+rm $PKG/usr/_ryml.so
+rm $PKG/usr/ryml.py
+
+if [ "$LIBDIRSUFFIX" != "" ]; then
+ mv $PKG/usr/lib/* $PKG/usr/lib${LIBDIRSUFFIX}/
+ rmdir $PKG/usr/lib
+ sed -i "s/\/lib\//\/lib${LIBDIRSUFFIX}\//g" \
+ $PKG/usr/lib${LIBDIRSUFFIX}/cmake/c4core/c4coreConfig.cmake
+ sed -i "s/\/lib\//\/lib${LIBDIRSUFFIX}\//g" \
+ $PKG/usr/lib${LIBDIRSUFFIX}/cmake/c4core/c4coreTargets.cmake
+ sed -i "s/\/lib\//\/lib${LIBDIRSUFFIX}\//g" \
+ $PKG/usr/lib${LIBDIRSUFFIX}/cmake/c4core/c4coreTargets-release.cmake
+ sed -i "s/\/lib\//\/lib${LIBDIRSUFFIX}\//g" \
+ $PKG/usr/lib${LIBDIRSUFFIX}/cmake/ryml/rymlConfig.cmake
+ sed -i "s/\/lib\//\/lib${LIBDIRSUFFIX}\//g" \
+ $PKG/usr/lib${LIBDIRSUFFIX}/cmake/ryml/rymlTargets.cmake
+ sed -i "s/\/lib\//\/lib${LIBDIRSUFFIX}\//g" \
+ $PKG/usr/lib${LIBDIRSUFFIX}/cmake/ryml/rymlTargets-release.cmake
+fi
+
+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 \
+ *.md LICENSE.txt \
+ $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
diff --git a/libraries/rapidyaml/rapidyaml.info b/libraries/rapidyaml/rapidyaml.info
new file mode 100644
index 0000000000..0268902a8e
--- /dev/null
+++ b/libraries/rapidyaml/rapidyaml.info
@@ -0,0 +1,16 @@
+PRGNAM="rapidyaml"
+VERSION="0.4.1"
+HOMEPAGE="https://github.com/biojppm/rapidyaml"
+DOWNLOAD="https://github.com/biojppm/rapidyaml/archive/v0.4.1/rapidyaml-0.4.1.tar.gz \
+ https://github.com/biojppm/c4core/archive/d35c7c9bf370134595699d791e6ff8db018ddc8d/c4core-d35c7c9bf370134595699d791e6ff8db018ddc8d.tar.gz \
+ https://github.com/biojppm/cmake/archive/371982300ff5a076d7c3199057ebed77bbe3472f/cmake-371982300ff5a076d7c3199057ebed77bbe3472f.tar.gz \
+ https://github.com/biojppm/debugbreak/archive/5dcbe41d2bd4712c8014aa7e843723ad7b40fd74/debugbreak-5dcbe41d2bd4712c8014aa7e843723ad7b40fd74.tar.gz"
+MD5SUM="7643e9744cbac0758db77512a177c0e1 \
+ 5b92fc9443a5c5670f6bef371e0f91ed \
+ 6c44a93583b12250f154f6256bd06e34 \
+ 910b9328f335ae67f42ab090c6607f26"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="python3-cmake-build-extension python-setuptools-git"
+MAINTAINER="Steven Voges"
+EMAIL="svoges.sbo@gmail.com"
diff --git a/libraries/rapidyaml/slack-desc b/libraries/rapidyaml/slack-desc
new file mode 100644
index 0000000000..381cd146cf
--- /dev/null
+++ b/libraries/rapidyaml/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------------------------------------------------------|
+rapidyaml: rapidyaml (short description of app)
+rapidyaml:
+rapidyaml: Rapid YAML is a library to parse and emit YAML, and do it fast.
+rapidyaml:
+rapidyaml: Homepage: https://github.com/biojppm/rapidyaml
+rapidyaml:
+rapidyaml:
+rapidyaml:
+rapidyaml:
+rapidyaml:
+rapidyaml: