summaryrefslogtreecommitdiffstats
path: root/multimedia/lives/lives.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/lives/lives.SlackBuild')
-rw-r--r--multimedia/lives/lives.SlackBuild38
1 files changed, 24 insertions, 14 deletions
diff --git a/multimedia/lives/lives.SlackBuild b/multimedia/lives/lives.SlackBuild
index 862aa7da36..c224ef53ef 100644
--- a/multimedia/lives/lives.SlackBuild
+++ b/multimedia/lives/lives.SlackBuild
@@ -4,6 +4,7 @@
# Copyright 2014-2015 Yanes Checcacci Balod <yanes@pobox.com>, Brazil
# Copyright 2015-2016 Marcel Saegebarth <marc@mos6581.de>
+# Copyright 2020 Lenard Spencer, Orlando,Florida, USA
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -28,7 +29,7 @@
PRGNAM=lives
SRCNAM=LiVES
VERSION=${VERSION:-3.0.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -58,11 +59,17 @@ else
LIBDIRSUFFIX=""
fi
+# Check for a previous LiVES installation:
+if [ -e /usr/bin/lives ]; then
+ echo "ERROR: A previous LiVES installation is detected!"
+ echo "Please remove it before running this script."
+ exit 1
+fi
+
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
@@ -74,14 +81,16 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Don't build toonz plugin (build failure when opencv is present)
-# https://sourceforge.net/p/lives/bugs/217/
-sed -i -e '/toonz/d' lives-plugins/weed-plugins/Makefile.am
-autoreconf -fi
-automake
+# Don't build toonz plugin if opencv-legacy is found (breaks build)
+# (opencv 4.x reports as opencv4):
+if [ pkg-config --exists opencv ]; then
+ sed -i -e '/toonz/d' lives-plugins/weed-plugins/Makefile.am
+ autoreconf -fiv
+ automake
+fi
CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS -std=c++11" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -91,16 +100,17 @@ CXXFLAGS="$SLKCFLAGS" \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
-# Parallel builds break, so we make sure MAKEFLAGS is clear:
-unset MAKEFLAGS
-make
-make install-strip DESTDIR=$PKG
+make -j1 # Parallel builds have a tendency to fail
+make install DESTDIR=$PKG
+
+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 \
- ABOUT-NLS AUTHORS COPYING* ChangeLog FEATURES GETTING.STARTED INSTALL \
+ ABOUT-NLS AUTHORS COPYING ChangeLog FEATURES GETTING.STARTED INSTALL \
NEWS README \
- $PKG/usr/doc/$PRGNAM-$VERSION || true
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
(