summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--multimedia/mediainfo/README7
-rw-r--r--multimedia/mediainfo/doinst.sh9
-rw-r--r--multimedia/mediainfo/mediainfo.SlackBuild124
-rw-r--r--multimedia/mediainfo/mediainfo.info4
-rw-r--r--multimedia/mediainfo/remove-internal-libzen-support.patch132
5 files changed, 242 insertions, 34 deletions
diff --git a/multimedia/mediainfo/README b/multimedia/mediainfo/README
index 2a227676eb..e5c873c577 100644
--- a/multimedia/mediainfo/README
+++ b/multimedia/mediainfo/README
@@ -1,2 +1,9 @@
MediaInfo supplies technical and tag information about a video or
audio file.
+
+It will build the CLI version by default, however, you can optionally
+build mediainfo-gui by passing GUI=yes to the SlackBuild script, or
+you can disable the CLI version by passing CLI=no. Either the CLI
+or GUI verison must be enabled.
+
+mediainfo-gui requires wxPython.
diff --git a/multimedia/mediainfo/doinst.sh b/multimedia/mediainfo/doinst.sh
new file mode 100644
index 0000000000..65c7e2eeb9
--- /dev/null
+++ b/multimedia/mediainfo/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/multimedia/mediainfo/mediainfo.SlackBuild b/multimedia/mediainfo/mediainfo.SlackBuild
index 9f947b1493..a70a139474 100644
--- a/multimedia/mediainfo/mediainfo.SlackBuild
+++ b/multimedia/mediainfo/mediainfo.SlackBuild
@@ -2,10 +2,9 @@
# Slackware build script for mediainfo
-# Copyright 2017 Jeremy Hansen <jebrhansen+SBo -at- gmail.com>
-# Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org
-
# Copyright 2010-2012 Binh Nguyen <binhvng@gmail.com>
+# Copyright 2012-2017 Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org
+# Copyright 2017 Jeremy Hansen <jebrhansen+SBo -at- gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,10 +26,26 @@
PRGNAM=mediainfo
VERSION=${VERSION:-0.7.93}
-SRCNAM=MediaInfo_CLI_${VERSION}_GNU_FromSource
-BUILD=${BUILD:-1}
+SRCNAM=MediaInfo
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+# CLI is built by default, GUI is optional
+CLI=${CLI:-yes}
+GUI=${GUI:-no}
+
+# Clear the document variables to make sure it works
+CLIDOC=""
+GUIDOC=""
+
+# Let's make sure that at least one of the interfaces will be built
+if [ "${CLI}" != "yes" ] && [ "${GUI}" != "yes" ]; then
+ echo -e "\n\n\t=========================================================\n"
+ echo -e "\tYou must choose either the CLI or GUI (or both) to be built."
+ echo -e "\n\t=========================================================\n\n"
+ exit 1
+fi
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@@ -63,9 +78,9 @@ set -eu
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf MediaInfo
-tar xvf $CWD/${SRCNAM}.tar.xz
-cd MediaInfo_CLI_GNU_FromSource
+rm -rf ${SRCNAM}-${VERSION}
+tar xvf $CWD/${SRCNAM}-${VERSION}.tar.gz
+cd $SRCNAM-${VERSION}
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -73,42 +88,87 @@ 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 {} \;
-# We do not want builtin libmediainfo
-if [ -d $TMP/MediaInfoLib ]; then
- rm -rf $TMP/MediaInfoLib
+# Patch to force using system libzen and error out if not present
+patch -p1 < $CWD/remove-internal-libzen-support.patch
+
+# Make compiling the CLI version optional
+if [ "$CLI" == "yes" ]; then
+
+ cd Project/GNU/CLI
+ ./autogen.sh
+
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --localedir=/usr/share/locale \
+ --disable-static \
+ --enable-shared \
+ --build=$ARCH-slackware-linux
+
+ make
+ make install DESTDIR=$PKG
+ cd -
+
+ CLIDOC=History_CLI.txt
fi
-cd MediaInfo/Project/GNU/CLI
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --infodir=/usr/info \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --localedir=/usr/share/locale \
- --disable-static \
- --enable-shared \
- --build=$ARCH-slackware-linux
-
-make
-make install DESTDIR=$PKG
-cd -
+# Make compiling the GUI optional -- requires wxWidgets/wxPython
+if [ "$GUI" == "yes" ]; then
+
+ # Error out if missing WxWidgets/wxPython rather than try downloading and compiling it
+ cd Project/GNU/GUI
+ sed -i 's|WxWidgets not yet compiled, try to compile|wxPython not found. Please install first.|' configure.ac
+ sed -i 's|WxBuiltInCompile$|with_wxwidgets="no"|g' configure.ac
+
+ ./autogen.sh
+
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --localedir=/usr/share/locale \
+ --disable-static \
+ --enable-shared \
+ --build=$ARCH-slackware-linux
+
+ make
+ make install DESTDIR=$PKG
+ cd -
+
+ # We need an icon file
+ install -D -m 0644 Source/Resource/Image/MediaInfo.png \
+ $PKG/usr/share/pixmaps/mediainfo.png
+
+ # Manually install the .desktop file
+ install -D -m 0644 Project/GNU/GUI/mediainfo-gui.desktop \
+ $PKG/usr/share/applications/mediainfo-gui.desktop
+
+ GUIDOC=History_GUI.txt
+fi
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 MediaInfo/History_CLI.txt MediaInfo/License.html MediaInfo/LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a ${CLIDOC} ${GUIDOC} License.html LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chmod 0644 $PKG/usr/doc/$PRGNAM-$VERSION/*
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/multimedia/mediainfo/mediainfo.info b/multimedia/mediainfo/mediainfo.info
index 4a44f3a84d..c386fe2c0e 100644
--- a/multimedia/mediainfo/mediainfo.info
+++ b/multimedia/mediainfo/mediainfo.info
@@ -1,8 +1,8 @@
PRGNAM="mediainfo"
VERSION="0.7.93"
HOMEPAGE="https://mediaarea.net/en/MediaInfo/"
-DOWNLOAD="https://mediaarea.net/download/binary/mediainfo/0.7.93/MediaInfo_CLI_0.7.93_GNU_FromSource.tar.xz"
-MD5SUM="7a9501afc0b98280c860dc35435fc95e"
+DOWNLOAD="https://github.com/MediaArea/MediaInfo/archive/v0.7.93/MediaInfo-0.7.93.tar.gz"
+MD5SUM="bca1b7d217408327fdacc89e9a2b99da"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libmediainfo"
diff --git a/multimedia/mediainfo/remove-internal-libzen-support.patch b/multimedia/mediainfo/remove-internal-libzen-support.patch
new file mode 100644
index 0000000000..535dfda039
--- /dev/null
+++ b/multimedia/mediainfo/remove-internal-libzen-support.patch
@@ -0,0 +1,132 @@
+diff --git a/Project/GNU/CLI/configure.ac b/Project/GNU/CLI/configure.ac
+index 959868f..517ebd5 100644
+--- a/Project/GNU/CLI/configure.ac
++++ b/Project/GNU/CLI/configure.ac
+@@ -65,16 +65,10 @@ dnl #########################################################################
+ dnl -------------------------------------------------------------------------
+ dnl Unicode
+ dnl
+-if test -e ../../../../ZenLib/Project/GNU/Library/libzen-config; then
+- enable_unicode="$(../../../../ZenLib/Project/GNU/Library/libzen-config Unicode)"
+-elif test "$(libzen-config Exists)" = "yes" ; then
+- enable_unicode="$(libzen-config Unicode)"
++if pkg-config --exists libzen; then
++ enable_unicode="$(pkg-config --variable=Unicode libzen)"
+ else
+- if pkg-config --exists libzen; then
+- enable_unicode="$(pkg-config --variable=Unicode libzen)"
+- else
+- AC_MSG_ERROR([libzen configuration is not found])
+- fi
++ AC_MSG_ERROR([libzen package is not found])
+ fi
+
+ dnl #########################################################################
+@@ -197,40 +191,18 @@ fi
+ dnl -------------------------------------------------------------------------
+ dnl ZenLib
+ dnl
+-if test -e ../../../../ZenLib/Project/GNU/Library/libzen.la; then
+- CXXFLAGS="$CXXFLAGS $(../../../../ZenLib/Project/GNU/Library/libzen-config CXXFLAGS)"
+- MediaInfoLib_CXXFLAGS="$MediaInfoLib_CXXFLAGS $(../../../../ZenLib/Project/GNU/Library/libzen-config CXXFLAGS)"
+- if test "$enable_staticlibs" = "yes"; then
+- with_zenlib="builtin (static)"
+- LIBS="$LIBS $(../../../../ZenLib/Project/GNU/Library/libzen-config LIBS_Static)"
+- else
+- with_zenlib="builtin"
+- LIBS="$LIBS $(../../../../ZenLib/Project/GNU/Library/libzen-config LIBS)"
+- fi
+-elif test "$(libzen-config Exists)" = "yes" ; then
+- CXXFLAGS="$CXXFLAGS $(libzen-config CXXFLAGS)"
+- MediaInfoLib_CXXFLAGS="$MediaInfoLib_CXXFLAGS $(libzen-config CXXFLAGS)"
++if pkg-config --exists libzen; then
++ CXXFLAGS="$CXXFLAGS $(pkg-config --cflags libzen)"
++ MediaInfoLib_CXXFLAGS="$MediaInfoLib_CXXFLAGS $(pkg-config --cflags libzen)"
+ if test "$enable_staticlibs" = "yes"; then
+ with_zenlib="system (static)"
+- LIBS="$LIBS $(libzen-config LIBS_Static)"
++ LIBS="$LIBS $(pkg-config --variable=Libs_Static libzen)"
+ else
+ with_zenlib="system"
+- LIBS="$LIBS $(libzen-config LIBS)"
++ LIBS="$LIBS $(pkg-config --libs libzen)"
+ fi
+ else
+- if pkg-config --exists libzen; then
+- CXXFLAGS="$CXXFLAGS $(pkg-config --cflags libzen)"
+- MediaInfoLib_CXXFLAGS="$MediaInfoLib_CXXFLAGS $(pkg-config --cflags libzen)"
+- if test "$enable_staticlibs" = "yes"; then
+- with_zenlib="system (static)"
+- LIBS="$LIBS $(pkg-config --variable=Libs_Static libzen)"
+- else
+- with_zenlib="system"
+- LIBS="$LIBS $(pkg-config --libs libzen)"
+- fi
+- else
+- AC_MSG_ERROR([libzen configuration is not found])
+- fi
++ AC_MSG_ERROR([libzen package is not found])
+ fi
+
+ dnl #########################################################################
+diff --git a/Project/GNU/GUI/configure.ac b/Project/GNU/GUI/configure.ac
+index 3402da7..67102d8 100644
+--- a/Project/GNU/GUI/configure.ac
++++ b/Project/GNU/GUI/configure.ac
+@@ -79,14 +79,10 @@ dnl #########################################################################
+ dnl -------------------------------------------------------------------------
+ dnl Unicode
+ dnl
+-if test -e ../../../../ZenLib/Project/GNU/Library/libzen-config; then
+- enable_unicode="$(../../../../ZenLib/Project/GNU/Library/libzen-config Unicode)"
++if pkg-config --exists libzen; then
++ enable_unicode="$(pkg-config --variable=Unicode libzen)"
+ else
+- if pkg-config --exists libzen; then
+- enable_unicode="$(pkg-config --variable=Unicode libzen)"
+- else
+- AC_MSG_ERROR([libzen configuration is not found])
+- fi
++ AC_MSG_ERROR([libzen package is not found])
+ fi
+
+ dnl #########################################################################
+@@ -312,30 +308,18 @@ fi
+ dnl -------------------------------------------------------------------------
+ dnl ZenLib
+ dnl
+-if test -e ../../../../ZenLib/Project/GNU/Library/libzen.la; then
+- CXXFLAGS="$CXXFLAGS $(../../../../ZenLib/Project/GNU/Library/libzen-config CXXFLAGS)"
+- MediaInfoLib_CXXFLAGS="$MediaInfoLib_CXXFLAGS $(../../../../ZenLib/Project/GNU/Library/libzen-config CXXFLAGS)"
++if pkg-config --exists libzen; then
++ CXXFLAGS="$CXXFLAGS $(pkg-config --cflags libzen)"
++ MediaInfoLib_CXXFLAGS="$MediaInfoLib_CXXFLAGS $(pkg-config --cflags libzen)"
+ if test "$enable_staticlibs" = "yes"; then
+- with_zenlib="builtin (static)"
+- LIBS="$LIBS $(../../../../ZenLib/Project/GNU/Library/libzen-config LIBS_Static)"
++ with_zenlib="system (static)"
++ LIBS="$LIBS $(pkg-config --variable=Libs_Static libzen)"
+ else
+- with_zenlib="builtin"
+- LIBS="$LIBS $(../../../../ZenLib/Project/GNU/Library/libzen-config LIBS)"
++ with_zenlib="system"
++ LIBS="$LIBS $(pkg-config --libs libzen)"
+ fi
+ else
+- if pkg-config --exists libzen; then
+- CXXFLAGS="$CXXFLAGS $(pkg-config --cflags libzen)"
+- MediaInfoLib_CXXFLAGS="$MediaInfoLib_CXXFLAGS $(pkg-config --cflags libzen)"
+- if test "$enable_staticlibs" = "yes"; then
+- with_zenlib="system (static)"
+- LIBS="$LIBS $(pkg-config --variable=Libs_Static libzen)"
+- else
+- with_zenlib="system"
+- LIBS="$LIBS $(pkg-config --libs libzen)"
+- fi
+- else
+- AC_MSG_ERROR([libzen configuration is not found])
+- fi
++ AC_MSG_ERROR([libzen package is not found])
+ fi
+
+ dnl #########################################################################