summaryrefslogtreecommitdiff
path: root/libraries/folly
diff options
context:
space:
mode:
authorEbben Aries <slackbuilds@dscp.org>2022-06-17 21:46:22 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-06-18 09:09:59 +0700
commit1d6cff872956c9b8f07577f447ebbf01bbf9aed2 (patch)
tree2df4162da4b6a3d5cc84e9f21c12f755e756cfa3 /libraries/folly
parent1c6795519d714e5ebee5fb884a0682e051135717 (diff)
downloadslackbuilds-1d6cff872956c9b8f07577f447ebbf01bbf9aed2.tar.gz
libraries/folly: Added (Facebook Open-source Library)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/folly')
-rw-r--r--libraries/folly/0001-Fix-CMakeLists.txt-to-honor-CMAKE_INSTALL_LIBDIR.patch30
-rw-r--r--libraries/folly/README6
-rw-r--r--libraries/folly/folly.SlackBuild117
-rw-r--r--libraries/folly/folly.info10
-rw-r--r--libraries/folly/slack-desc19
5 files changed, 182 insertions, 0 deletions
diff --git a/libraries/folly/0001-Fix-CMakeLists.txt-to-honor-CMAKE_INSTALL_LIBDIR.patch b/libraries/folly/0001-Fix-CMakeLists.txt-to-honor-CMAKE_INSTALL_LIBDIR.patch
new file mode 100644
index 0000000000..87c0fa6a25
--- /dev/null
+++ b/libraries/folly/0001-Fix-CMakeLists.txt-to-honor-CMAKE_INSTALL_LIBDIR.patch
@@ -0,0 +1,30 @@
+From 85422b744ae2294d60fdae9074ad8eae53323e66 Mon Sep 17 00:00:00 2001
+From: Ebben Aries <exa@dscp.org>
+Date: Thu, 16 Jun 2022 08:18:06 -0700
+Subject: [PATCH] Fix CMakeLists.txt to honor CMAKE_INSTALL_LIBDIR
+
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 21d24ba6e..8f83f22c4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -52,11 +52,11 @@ project(${PACKAGE_NAME} CXX C ASM)
+
+ set(INCLUDE_INSTALL_DIR include CACHE STRING
+ "The subdirectory where header files should be installed")
+-set(LIB_INSTALL_DIR lib CACHE STRING
++set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR} CACHE STRING
+ "The subdirectory where libraries should be installed")
+ set(BIN_INSTALL_DIR bin CACHE STRING
+ "The subdirectory where binaries should be installed")
+-set(CMAKE_INSTALL_DIR lib/cmake/folly CACHE STRING
++set(CMAKE_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/folly CACHE STRING
+ "The subdirectory where CMake package config files should be installed")
+
+ option(BUILD_SHARED_LIBS
+--
+2.36.1
+
diff --git a/libraries/folly/README b/libraries/folly/README
new file mode 100644
index 0000000000..9dea6f4127
--- /dev/null
+++ b/libraries/folly/README
@@ -0,0 +1,6 @@
+Folly (acronymed loosely after Facebook Open Source Library) is a
+library of C++14 components designed with practicality and efficiency in
+mind. Folly contains a variety of core library components used
+extensively at Facebook. In particular, it's often a dependency of
+Facebook's other open source C++ efforts and place where those projects
+can share code.
diff --git a/libraries/folly/folly.SlackBuild b/libraries/folly/folly.SlackBuild
new file mode 100644
index 0000000000..6663ebb279
--- /dev/null
+++ b/libraries/folly/folly.SlackBuild
@@ -0,0 +1,117 @@
+#!/bin/bash
+
+# Slackware build script for folly
+
+# 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=folly
+VERSION=${VERSION:-2022.06.13.00}
+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-$VERSION
+mkdir $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-v$VERSION.tar.gz -C $PRGNAM-$VERSION
+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 {} \;
+
+# Fix for CMAKE_INSTALL_LIBDIR
+# https://github.com/facebook/folly/pull/1796
+patch -p1 < $CWD/0001-Fix-CMakeLists.txt-to-honor-CMAKE_INSTALL_LIBDIR.patch
+
+mkdir -p _build
+cd _build
+ cmake \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc \
+ -DCMAKE_INSTALL_LOCALSTATEDIR=/var \
+ -DCMAKE_INSTALL_MANDIR=/usr/man \
+ -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/folly/folly.info b/libraries/folly/folly.info
new file mode 100644
index 0000000000..ef15e9aea8
--- /dev/null
+++ b/libraries/folly/folly.info
@@ -0,0 +1,10 @@
+PRGNAM="folly"
+VERSION="2022.06.13.00"
+HOMEPAGE="https://github.com/facebook/folly"
+DOWNLOAD="https://github.com/facebook/folly/releases/download/v2022.06.13.00/folly-v2022.06.13.00.tar.gz"
+MD5SUM="9df89a822f9c435e43befec07a6483f1"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="double-conversion glog fmt"
+MAINTAINER="Ebben Aries"
+EMAIL="slackbuilds@dscp.org"
diff --git a/libraries/folly/slack-desc b/libraries/folly/slack-desc
new file mode 100644
index 0000000000..51dcacc036
--- /dev/null
+++ b/libraries/folly/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------------------------------------------------------|
+folly: folly (Facebook Open-source Library)
+folly:
+folly: Folly is a library of C++14 components designed with practicality and
+folly: efficiency in mind. It complements (as opposed to competing against)
+folly: offerings such as Boost and of course std.
+folly:
+folly:
+folly:
+folly:
+folly: Homepage: https://github.com/facebook/folly
+folly: