From d1f0b61f3bf3496ac013d67bc39fa40a68a92478 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 10 Feb 2018 19:09:27 +0100 Subject: Update the deps for the next release Notably: - qt5 was updated to 5.9.4 and a patch was applied which is essential for the Plasma desktop's correct drag & drop behavior. - cryptopp and cryfs were added to give the Plasma Vault a storage backend. --- deps/cryptopp/.url | 1 + deps/cryptopp/cryptopp.SlackBuild | 121 +++++++++++++++++++++++++ deps/cryptopp/cryptopp.pc | 15 +++ deps/cryptopp/patches/cryptopp_slkcflags.patch | 11 +++ deps/cryptopp/slack-desc | 19 ++++ 5 files changed, 167 insertions(+) create mode 100644 deps/cryptopp/.url create mode 100755 deps/cryptopp/cryptopp.SlackBuild create mode 100644 deps/cryptopp/cryptopp.pc create mode 100644 deps/cryptopp/patches/cryptopp_slkcflags.patch create mode 100644 deps/cryptopp/slack-desc (limited to 'deps/cryptopp') diff --git a/deps/cryptopp/.url b/deps/cryptopp/.url new file mode 100644 index 0000000..84ca719 --- /dev/null +++ b/deps/cryptopp/.url @@ -0,0 +1 @@ +https://www.cryptopp.com/cryptopp600.zip diff --git a/deps/cryptopp/cryptopp.SlackBuild b/deps/cryptopp/cryptopp.SlackBuild new file mode 100755 index 0000000..7c1916f --- /dev/null +++ b/deps/cryptopp/cryptopp.SlackBuild @@ -0,0 +1,121 @@ +#!/bin/sh + +# Copyright 2014, 2018 Eric Hameleers, Eindhoven, NL +# Copyright 2018 Patrick J. Volkerding, Sebeka, MN, USA +# All rights reserved. +# +# Permission to use, copy, modify, and distribute this software for +# any purpose with or without fee is hereby granted, provided that +# the above copyright notice and this permission notice appear in all +# copies. +# +# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR +# CONTRIBUTORS 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. +# ----------------------------------------------------------------------------- + + +PKGNAM=cryptopp +VERSION=${VERSION:-6.0.0} +SRCVER=$(echo $VERSION | tr -d '.') +BUILD=${BUILD:-1} +NUMJOBS=${NUMJOBS:--j7} + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-$PKGNAM + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$(uname -m) ;; + esac + export ARCH +fi + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + SLKLDFLAGS="" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + SLKLDFLAGS="-L/usr/lib64" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "armv7hl" ]; then + SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16" + SLKLDFLAGS="" + LIBDIRSUFFIX="" +else + SLKCFLAGS="-O2" + SLKLDFLAGS="" + LIBDIRSUFFIX="" +fi + +case "$ARCH" in + arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; + *) TARGET=$ARCH-slackware-linux ;; +esac + +# Extract the sources: +rm -rf $PKG +mkdir -p $TMP $PKG +cd $TMP +rm -rf ${PKGNAM}-${VERSION} +mkdir -p ${PKGNAM}-${VERSION} +unzip -a ${CWD}/${PKGNAM}${SRCVER}.zip -d ${PKGNAM}-${VERSION} || exit 1 +cd ${PKGNAM}-${VERSION} || exit 1 + +## Do not mess up the CXXFLAGS: +#cat $CWD/patches/cryptopp_slkcflags.patch | patch -p1 --verbose || exit 1 + +# Fix bogus permissions: +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Cater to 64-bit Slackware: +sed -i -e "s,(PREFIX)/lib,(PREFIX)/lib${LIBDIRSUFFIX},g" GNUmakefile + +# Compile and install: +make dynamic $NUMJOBS \ + CXXFLAGS="${SLKCFLAGS} -DNDEBUG" LDFLAGS="${LDFLAGS}" +make install PREFIX=$PKG/usr + +# Install a pkg-config file: +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig +cat $CWD/${PKGNAM}.pc | sed \ + -e "s,@LIBDIRSUFFIX@,${LIBDIRSUFFIX},g" \ + -e "s,@VERSION@,${VERSION},g" \ + > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/cryptopp.pc + +# Add documentation: +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION +cp -a *.txt $PKG/usr/doc/$PKGNAM-$VERSION + +# Strip binaries (if any): +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +# Add a package description: +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +# Build the package: +cd $PKG +/sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz + diff --git a/deps/cryptopp/cryptopp.pc b/deps/cryptopp/cryptopp.pc new file mode 100644 index 0000000..c6bc476 --- /dev/null +++ b/deps/cryptopp/cryptopp.pc @@ -0,0 +1,15 @@ +prefix/usr +exec_prefix=/usr +libdir=/usr/lib@LIBDIRSUFFIX@ +includedir=${prefix}/include/cryptopp + +Name: Crypto++ +Description: A free C++ class library of cryptographic schemes +Version: @VERSION@ +URL: http://www.cryptopp.com +Requires: +Conflicts: +Libs: -L${libdir} -lcryptopp +Libs.private: +Cflags: -I${includedir} + diff --git a/deps/cryptopp/patches/cryptopp_slkcflags.patch b/deps/cryptopp/patches/cryptopp_slkcflags.patch new file mode 100644 index 0000000..3c0c14d --- /dev/null +++ b/deps/cryptopp/patches/cryptopp_slkcflags.patch @@ -0,0 +1,11 @@ +--- cryptopp-5.6.2/GNUmakefile.orig 2014-03-16 23:04:04.185871759 +0100 ++++ cryptopp-5.6.2/GNUmakefile 2014-03-16 23:30:49.726841806 +0100 +@@ -38,8 +38,6 @@ + ifneq ($(GCC42_OR_LATER),0) + ifeq ($(UNAME),Darwin) + CXXFLAGS += -arch x86_64 -arch i386 +-else +-CXXFLAGS += -march=native + endif + endif + diff --git a/deps/cryptopp/slack-desc b/deps/cryptopp/slack-desc new file mode 100644 index 0000000..08599cf --- /dev/null +++ b/deps/cryptopp/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------------------------------------------------------| +cryptopp: cryptopp (library of cryptographic schemes) +cryptopp: +cryptopp: Crypto++ Library is a free C++ class library of cryptographic schemes. +cryptopp: See http://www.cryptopp.com/ for a list of supported algorithms. +cryptopp: One purpose of Crypto++ is to act as a repository of public domain +cryptopp: (not copyrighted) source code. Although the library is copyrighted as +cryptopp: a compilation, the individual files in it are in the public domain. +cryptopp: +cryptopp: +cryptopp: cryptopp home: http://www.cryptopp.com/ +cryptopp: -- cgit v1.2.3