aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorMartin Bångens <marbangens@gmail.com>2022-07-02 09:27:50 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-07-02 09:42:32 +0700
commitc9ca904756502fc2cd49a5ff497af15a3faa8f14 (patch)
tree7acf8d6e97780ee0b8f012aeeb2f2751ba937329 /libraries
parent62239c6d1c89462ce4582c2c3a6b1500ffa73b39 (diff)
libraries/ghc_filesystem: Added (std::filesystem helper library).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/ghc_filesystem/README17
-rw-r--r--libraries/ghc_filesystem/cmake_project_version.patch31
-rw-r--r--libraries/ghc_filesystem/ghc_filesystem.SlackBuild86
-rw-r--r--libraries/ghc_filesystem/ghc_filesystem.info10
-rw-r--r--libraries/ghc_filesystem/slack-desc19
5 files changed, 163 insertions, 0 deletions
diff --git a/libraries/ghc_filesystem/README b/libraries/ghc_filesystem/README
new file mode 100644
index 000000000000..7f173566d794
--- /dev/null
+++ b/libraries/ghc_filesystem/README
@@ -0,0 +1,17 @@
+This is a header-only single-file std::filesystem compatible helper
+library, based on the C++17 and C++20 specs, but implemented for C++11,
+C++14, C++17 or C++20 (tightly following the C++17 standard with very
+few documented exceptions).
+
+It is currently tested on macOS 10.12/10.14/10.15/11.6, Windows 10,
+Ubuntu 18.04, Ubuntu 20.04, CentOS 7, CentOS 8, FreeBSD 12,
+Alpine ARM/ARM64 Linux and Solaris 10 but should work on other
+systems too, as long as you have at least a C++11 compatible compiler.
+It should work with Android NDK, Emscripten and I even had reports of
+it being used on iOS (within sandboxing constraints) and with v1.5.6
+there is experimental support for QNX. The support of Android NDK,
+Emscripten and QNX is not backed up by automated testing but PRs and
+bug reports are welcome for those too. It is of course in its own
+namespace ghc::filesystem to not interfere with a regular
+std::filesystem should you use it in a mixed C++17 environment
+(which is possible).
diff --git a/libraries/ghc_filesystem/cmake_project_version.patch b/libraries/ghc_filesystem/cmake_project_version.patch
new file mode 100644
index 000000000000..7ff8fe83922a
--- /dev/null
+++ b/libraries/ghc_filesystem/cmake_project_version.patch
@@ -0,0 +1,31 @@
+--- a/CMakeLists.txt 2022-06-26 22:21:15.977039733 +0200
++++ b/CMakeLists.txt 2022-06-26 22:20:35.782042699 +0200
+@@ -1,5 +1,8 @@
+ cmake_minimum_required(VERSION 3.7.2)
+-project(ghcfilesystem)
++project(
++ ghcfilesystem,
++ VERSION 1.5.12
++)
+
+ if (POLICY CMP0077)
+ cmake_policy(SET CMP0077 NEW)
+@@ -70,7 +73,16 @@
+ "${PROJECT_BINARY_DIR}/cmake/ghc_filesystem-config.cmake"
+ INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ghc_filesystem"
+ PATH_VARS CMAKE_INSTALL_INCLUDEDIR)
+- install(FILES "${PROJECT_BINARY_DIR}/cmake/ghc_filesystem-config.cmake"
+- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ghc_filesystem")
++ write_basic_package_version_file(
++ "${PROJECT_BINARY_DIR}/cmake/ghc_filesystem-config-version.cmake"
++ VERSION ${PROJECT_VERSION}
++ COMPATIBILITY SameMajorVersion
++ )
++ install(
++ FILES
++ "${PROJECT_BINARY_DIR}/cmake/ghc_filesystem-config.cmake"
++ "${PROJECT_BINARY_DIR}/cmake/ghc_filesystem-config-version.cmake"
++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ghc_filesystem"
++ )
+ add_library(ghcFilesystem::ghc_filesystem ALIAS ghc_filesystem)
+ endif()
diff --git a/libraries/ghc_filesystem/ghc_filesystem.SlackBuild b/libraries/ghc_filesystem/ghc_filesystem.SlackBuild
new file mode 100644
index 000000000000..307bb4bbcd9f
--- /dev/null
+++ b/libraries/ghc_filesystem/ghc_filesystem.SlackBuild
@@ -0,0 +1,86 @@
+#!/bin/bash
+
+# Slackware build script for ghc::filesystem
+
+# Copyright 2022 Martin Bångens Sweden
+# 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=ghc_filesystem
+VERSION=${VERSION:-1.5.12}
+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}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf filesystem-$VERSION
+tar xvf $CWD/filesystem-$VERSION.tar.gz
+cd filesystem-$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 {} \;
+
+cat $CWD/cmake_project_version.patch | patch -Np1
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=None ..
+ cmake --build .
+ ctest --test-dir ../test
+ DESTDIR=$PKG cmake --install .
+cd ..
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE 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
diff --git a/libraries/ghc_filesystem/ghc_filesystem.info b/libraries/ghc_filesystem/ghc_filesystem.info
new file mode 100644
index 000000000000..e931cccca492
--- /dev/null
+++ b/libraries/ghc_filesystem/ghc_filesystem.info
@@ -0,0 +1,10 @@
+PRGNAM="ghc_filesystem"
+VERSION="1.5.12"
+HOMEPAGE="https://github.com/gulrak/filesystem"
+DOWNLOAD="https://github.com/gulrak/filesystem/archive/v1.5.12/filesystem-1.5.12.tar.gz"
+MD5SUM="88ebdd8120216ddd3ca7be99310a7310"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Martin Bångens"
+EMAIL="marbangens@gmail.com"
diff --git a/libraries/ghc_filesystem/slack-desc b/libraries/ghc_filesystem/slack-desc
new file mode 100644
index 000000000000..b468fe8ad698
--- /dev/null
+++ b/libraries/ghc_filesystem/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------------------------------------------------------|
+ghc_filesystem: ghc_filesystem (header-only std::filesystem helper library)
+ghc_filesystem:
+ghc_filesystem: An implementation of C++17 std::filesystem for C++11,C++14,C++17
+ghc_filesystem: and C++20 on Windows, macOS, Linux and FreeBSD. Test coverage is
+ghc_filesystem: well above 90%, and starting with v1.3.6 and in v1.5.0 more time
+ghc_filesystem: was invested in benchmarking and optimizing parts of the library.
+ghc_filesystem:
+ghc_filesystem:
+ghc_filesystem:
+ghc_filesystem:
+ghc_filesystem: