summaryrefslogtreecommitdiff
path: root/multimedia/mediatomb/mediatomb-mp4v2-check.patch
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@slackbuilds.org>2013-11-03 19:35:13 +0100
committerRobby Workman <rworkman@slackbuilds.org>2013-11-04 00:46:04 -0600
commit23f6a701163591343d44ad55b36fecba20ee25f1 (patch)
tree666eff8d4a7396de6530831d04cd8beccab25799 /multimedia/mediatomb/mediatomb-mp4v2-check.patch
parent1c3f749344fc820ebfff38a183b9caece401c160 (diff)
downloadslackbuilds-23f6a701163591343d44ad55b36fecba20ee25f1.tar.gz
multimedia/mediatomb: Updated for version b66dc1f.
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Diffstat (limited to 'multimedia/mediatomb/mediatomb-mp4v2-check.patch')
-rw-r--r--multimedia/mediatomb/mediatomb-mp4v2-check.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/multimedia/mediatomb/mediatomb-mp4v2-check.patch b/multimedia/mediatomb/mediatomb-mp4v2-check.patch
new file mode 100644
index 0000000000..226a22a631
--- /dev/null
+++ b/multimedia/mediatomb/mediatomb-mp4v2-check.patch
@@ -0,0 +1,86 @@
+commit bed8f03202336fc7863ec6a39e130473f59061c6
+Author: Sergey 'Jin' Bostandzhyan <jin at mediatomb dot cc>
+Date: Sun Jan 27 23:08:04 2013 +0100
+
+ Extra configure check for libmp4v2 compatibility
+
+ We do not support the newer libmpv2 version yet, so don't error out when
+ compiling, catch it in configure.
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index f4962c6..3cc5ec3 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -533,7 +533,8 @@ AC_DEFUN([MT_CHECK_OPTIONAL_PACKAGE],
+ AC_MSG_ERROR([unable to configure $1 support])
+ fi
+
+- if test "x$mt_[]translit($1, `/.-', `___')_status" = xyes; then
++ if ((test "x$mt_[]translit($1, `/.-', `___')_status" = xyes) &&
++ (test "x$9" != "xundef")); then
+ AC_DEFINE(translit(HAVE_$1, `a-z/.-', `A-Z___'), [1], [$1 library presence])
+ fi
+
+diff --git a/configure.ac b/configure.ac
+index e72dd78..9241797 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1390,7 +1390,7 @@ LIBMP4V2_STATUS=
+
+ MT_CHECK_OPTIONAL_PACKAGE([libmp4v2], [disable],
+ [libmp4v2 support for mp4 metadata extraction],
+- [$MP4_HEADER], [mp4v2], [MP4Read])
++ [$MP4_HEADER], [mp4v2], [MP4Read], [], [], [undef])
+
+ if test "x$LIBMP4V2_STATUS" = xyes; then
+ CFLAGS="$CFLAGS $LIBMP4V2_CFLAGS"
+@@ -1399,6 +1399,37 @@ if test "x$LIBMP4V2_STATUS" = xyes; then
+ AC_DEFINE_UNQUOTED([LIBMP4V2_INCLUDE], [<$MP4_HEADER.h>], [$MP4_HEADER.h])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
++ AC_MSG_CHECKING([for libmp4v2 compatibility])
++ AC_COMPILE_IFELSE(
++ [AC_LANG_PROGRAM(
++ [
++ #include <$MP4_HEADER.h>
++ ],
++ [
++ (void)MP4GetMetadataName(0, 0);
++ ]
++ )],
++ [
++ AC_MSG_RESULT([yes])
++ AC_DEFINE([HAVE_LIBMP4V2], [1], [libmp4v2 library presence])
++ ],
++ [
++ AC_MSG_RESULT([not compatible])
++ if test "x$LIBMP4V2_OPTION_REQUESTED" = "xyes"; then
++ AC_MSG_ERROR([Unable to configure libmp4v2 support])
++ else
++ LIBMP4V2_STATUS="not compatible"
++ fi
++ ])
++ LDFLAGS="$LDFLAGS_SAVE"
++ CFLAGS="$CFLAGS_SAVE"
++ CXXFLAGS="$CXXFLAGS_SAVE"
++fi
++
++if test "x$LIBMP4V2_STATUS" = "xyes"; then
++ CFLAGS="$CFLAGS $LIBMP4V2_CFLAGS"
++ CXXFLAGS="$CXXFLAGS $LIBMP4V2_CFLAGS"
++ LDFLAGS="$LDFLAGS $LIBMP4V2_LDFLAGS $LIBMP4V2_LIBS"
+ AC_MSG_CHECKING([for MP4GetMetadataCoverArtCount() in libmp4v2])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+@@ -1437,7 +1468,10 @@ if test "x$LIBMP4V2_STATUS" = xyes; then
+ AC_MSG_RESULT([no])
+ ])
+
+- AC_LANG_RESTORE
++ AC_LANG_RESTORE
++ LDFLAGS="$LDFLAGS_SAVE"
++ CFLAGS="$CFLAGS_SAVE"
++ CXXFLAGS="$CXXFLAGS_SAVE"
+ fi
+
+ ########## INOTIFY TOOLS