summaryrefslogtreecommitdiff
path: root/source/l/mlt/mlt.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/mlt/mlt.SlackBuild')
-rwxr-xr-xsource/l/mlt/mlt.SlackBuild74
1 files changed, 22 insertions, 52 deletions
diff --git a/source/l/mlt/mlt.SlackBuild b/source/l/mlt/mlt.SlackBuild
index 59182265..870e1b7d 100755
--- a/source/l/mlt/mlt.SlackBuild
+++ b/source/l/mlt/mlt.SlackBuild
@@ -1,7 +1,6 @@
#!/bin/bash
-# Copyright 2017, 2018, 2019, 2020 Eric Hameleers, Eindhoven, NL
-# Copyright 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2021 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -86,66 +85,37 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
-PYTHONSITEPKG=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
-
# Configure, build, and install:
-if [ ! -r configure ]; then
- if [ -x ./autogen.sh ]; then
- NOCONFIGURE=1 ./autogen.sh
- else
- autoreconf -vif
- fi
-fi
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --docdir=/usr/doc/$PKGNAM-$VERSION \
- --mandir=/usr/man \
- --infodir=/usr/info \
- --disable-static \
- --avformat-swscale \
- --disable-debug \
- --enable-gpl \
- --enable-gpl3 \
- --enable-motion-est \
- --enable-opencv \
- --enable-qt \
- --qt-libdir=$(pkg-config Qt5Core --variable=libdir) \
- --qt-includedir=$(pkg-config Qt5Core --variable=includedir) \
- --swig-languages="python" \
- --build=$ARCH-slackware-linux || exit 1
-make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
-
-# Install the extensions we enabled:
-install -D -m0755 src/swig/python/_mlt.so $PKG/$PYTHONSITEPKG/_mlt.so
-install -D -m0755 src/swig/python/mlt_wrap.o $PKG/$PYTHONSITEPKG/mlt_wrap.o
-install -D -m0755 src/swig/python/mlt.py $PKG/$PYTHONSITEPKG/mlt.py
-
-# Don't ship .la files:
-rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+mkdir cmake-build
+cd cmake-build
+ cmake \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+ -DDOC_INSTALL_DIR="doc" \
+ -DMAN_INSTALL_DIR=/usr/man \
+ .. || exit 1
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+cd ..
# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Compress manual pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \+
+for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+done
+
# Add a documentation directory:
mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
cp -a \
- AUTHORS* ChangeLog COPYING* GPL* NEWS* README* docs/*.txt \
+ AUTHORS* ChangeLog CHANGES COPYING* LICENSE* NEWS* README* THANKS* TODO* \
$PKG/usr/doc/${PKGNAM}-$VERSION
-# If there's a ChangeLog, installing at least part of the recent history
-# is useful, but don't let it get totally out of control:
-if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
- cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
- touch -r ChangeLog $DOCSDIR/ChangeLog
-fi
-
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc