summaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authorEdward W. Koenig <kingbeowulf@gmail.com>2016-10-29 05:54:05 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-10-29 05:54:05 +0700
commita22919819fb62e3c01efb5cde1f0df49d6e6f182 (patch)
tree067612ee7d48184ff7e57645a1145be55570ac8e /multimedia
parent6495237d5ccb8a7e9861789a987723b1cfeccb48 (diff)
downloadslackbuilds-a22919819fb62e3c01efb5cde1f0df49d6e6f182.tar.gz
multimedia/mlt: added optional qt5 support, various fixes.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/mlt/README2
-rw-r--r--multimedia/mlt/doinst.sh14
-rw-r--r--multimedia/mlt/mlt.SlackBuild30
3 files changed, 38 insertions, 8 deletions
diff --git a/multimedia/mlt/README b/multimedia/mlt/README
index 20911bafcd..e06846f043 100644
--- a/multimedia/mlt/README
+++ b/multimedia/mlt/README
@@ -5,7 +5,7 @@ of applications. The functionality of the system is provided via an
assortment of ready to use tools, XML authoring components, and an
extensible plug-in based API.
-Optional dependencies are ladspa_sdk, frei0r, swfdec, libvdpau and
+Optional dependencies are qt5, ladspa_sdk, frei0r, swfdec, libvdpau and
jack-rack.
The build script autodetect language interpreters on your system
diff --git a/multimedia/mlt/doinst.sh b/multimedia/mlt/doinst.sh
index e4e6459838..a5c05bf595 100644
--- a/multimedia/mlt/doinst.sh
+++ b/multimedia/mlt/doinst.sh
@@ -1,3 +1,16 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
@@ -6,3 +19,4 @@ if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi
+config etc/php.d/mlt.ini.new
diff --git a/multimedia/mlt/mlt.SlackBuild b/multimedia/mlt/mlt.SlackBuild
index 45859d033c..4d6a3de0b8 100644
--- a/multimedia/mlt/mlt.SlackBuild
+++ b/multimedia/mlt/mlt.SlackBuild
@@ -47,10 +47,11 @@
# +---------------------------------------+
# 20-MAR-2016 new maintainer, version update to 6.0.0
# 11-OCT-2016 version update
+# 22-OCT-2016 add qt5 support, bug fixes/addenda (Larry Hajali)
PRGNAM=mlt
VERSION=${VERSION:-6.2.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -75,11 +76,19 @@ if [ -f "$(which php)" ]; then php="php"; else php=""; fi
if [ -f "$(which python)" ]; then python="python"; else python=""; fi
if [ -h "$(which tclsh)" ]; then tcl="tcl"; else tcl=""; fi
if [ -f "$(which csharp)" ]; then csharp="csharp"; else csharp=""; fi
-# missing mlt.h in mlt-6.0.0/src/swig/ruby; broken src
-ruby="" #if [ -f "$(which ruby)" ]; then ruby="ruby"; else ruby=""; fi
+if [ -f "$(which ruby)" ]; then ruby="ruby"; else ruby=""; fi
if pkg-config --exists vdpau ; then vdpau="--avformat-vdpau" ; else vdpau="" ; fi
+# Use qt5 if present, otherwise system default
+if pkg-config --exists Qt5 ; then
+ qt="--qt-libdir=$(pkg-config Qt5 --variable=libdir)
+ --qt-includedir=$(pkg-config Qt5 --variable=headerdir)"
+else
+ qt="--qt-libdir=$(pkg-config Qt --variable=libdir)
+ --qt-includedir=$(pkg-config Qt --variable=headerdir)"
+fi
+
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
@@ -115,12 +124,12 @@ CXXFLAGS="$SLKCFLAGS" \
--disable-debug \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
- --qimage-libdir=${QT4DIR}/qt/lib \
- --qimage-includedir=${QT4DIR}/qt/include \
--enable-gpl \
+ --enable-gpl3 \
--luma-compress \
--enable-motion-est \
$vdpau \
+ $qt \
--swig-languages="$java $lua $perl $php $python $ruby $tcl $csharp" \
--build=$ARCH-slackware-linux
@@ -149,7 +158,13 @@ if [ "$php" ]; then
( cd $TMP/$PRGNAM-$VERSION/src/swig/php
install -D -m 0755 mlt.so $PKG/usr/lib$LIBDIRSUFFIX/php/extensions/mlt.so
install -D -m 0644 play.php $PKG/usr/doc/$PRGNAM-$VERSION/play.php
+ mkdir -p $PKG/etc/php.d
+ cat > $PKG/etc/php.d/$PRGNAM.ini.new << EOF
+; Enable mlt extension module
+; extension=$PRGNAM.so
+EOF
)
+ echo "config etc/php.d/$PRGNAM.ini.new" >> $CWD/doinst.sh
fi
if [ "$python" ]; then
PYTHONSITEPKG=$(python -c "import sys, os; print os.path.join('/usr/lib${LIBDIRSUFFIX}', 'python%s' % sys.version[:3], 'site-packages')")
@@ -175,14 +190,15 @@ if [ "$tcl" ]; then
install -D -m 0755 play.tcl $PKG/usr/doc/$PRGNAM-$VERSION/play.tcl
)
fi
+
# todo: java, csharp
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 AUTHORS ChangeLog NEWS COPYING README GPL \
-$PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS ChangeLog NEWS COPYING README GPL $PKG/usr/doc/$PRGNAM-$VERSION
+cat src/modules/motion_est/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.motion_est
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install