diff options
author | Ebben Aries <slackbuilds@dscp.org> | 2022-06-17 23:02:08 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-06-18 09:10:00 +0700 |
commit | 2f0019de1bb231e6d6b50ae64cba8d411675d6a6 (patch) | |
tree | 9a361815a1f64f6219b6f37ca13ce64dad6205da | |
parent | 3ae0863347199b10b9743a6f3053e9d1b5d97760 (diff) |
libraries/range-v3: Added (C++ Range Library)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | libraries/range-v3/README | 5 | ||||
-rw-r--r-- | libraries/range-v3/range-v3.SlackBuild | 110 | ||||
-rw-r--r-- | libraries/range-v3/range-v3.info | 10 | ||||
-rw-r--r-- | libraries/range-v3/slack-desc | 19 |
4 files changed, 144 insertions, 0 deletions
diff --git a/libraries/range-v3/README b/libraries/range-v3/README new file mode 100644 index 000000000000..bcf2dece0336 --- /dev/null +++ b/libraries/range-v3/README @@ -0,0 +1,5 @@ +Range library for C++14/17/20. This code was the basis of a formal +proposal to add range support to the C++ standard library. That proposal +evolved through a Technical Specification, and finally into P0896R4 "The +One Ranges Proposal" which was merged into the C++20 working drafts in +November 2018. diff --git a/libraries/range-v3/range-v3.SlackBuild b/libraries/range-v3/range-v3.SlackBuild new file mode 100644 index 000000000000..ecb72ea9c5aa --- /dev/null +++ b/libraries/range-v3/range-v3.SlackBuild @@ -0,0 +1,110 @@ +#!/bin/bash + +# Slackware build script for range-v3 + +# Copyright 2022 Ebben Aries <slackbuilds@dscp.org> +# 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=range-v3 +VERSION=${VERSION:-20220602_0fa54d7} +GITHASH=${GITHASH:-0fa54d7de5dc00655e38a08e87cda61f7aa6d5b9} +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 the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +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} + +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-$GITHASH +tar xvf $CWD/$PRGNAM-$GITHASH.tar.gz +cd $PRGNAM-$GITHASH +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 \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=ON \ + .. + + 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 +rm -rf $PKG/usr/share/ $PKG/usr/doc/$PRGNAM-$VERSION/NEWS +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +rm -f $PKG/usr/lib*/*.la + +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/range-v3/range-v3.info b/libraries/range-v3/range-v3.info new file mode 100644 index 000000000000..38442e0bdbe9 --- /dev/null +++ b/libraries/range-v3/range-v3.info @@ -0,0 +1,10 @@ +PRGNAM="range-v3" +VERSION="20220602_0fa54d7" +HOMEPAGE="https://github.com/ericniebler/range-v3" +DOWNLOAD="https://github.com/ericniebler/range-v3/archive/0fa54d7/range-v3-0fa54d7de5dc00655e38a08e87cda61f7aa6d5b9.tar.gz" +MD5SUM="17a87a10406c6b3cf2bcb8a4c5e2fed4" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Ebben Aries" +EMAIL="slackbuilds@dscp.org" diff --git a/libraries/range-v3/slack-desc b/libraries/range-v3/slack-desc new file mode 100644 index 000000000000..b9deca3b7a92 --- /dev/null +++ b/libraries/range-v3/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------------------------------------------------------| +range-v3: range-v3 (C++ Range Library) +range-v3: +range-v3: Range library for C++14/17/20. This code was the basis of a formal +range-v3: proposal to add range support to the C++ standard library. That +range-v3: proposal evolved through a Technical Specification, and finally into +range-v3: P0896R4 "The One Ranges Proposal" which was merged into the C++20 +range-v3: working drafts in November 2018. +range-v3: +range-v3: +range-v3: Homepage: https://github.com/ericniebler/range-v3 +range-v3: |