media-libs/libmp4v2: Fix build with clang
authorAndreas Sturmlechner <asturm@gentoo.org>
Sun, 4 Nov 2018 21:50:31 +0000 (22:50 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sun, 4 Nov 2018 21:53:23 +0000 (22:53 +0100)
Thanks-to: David Carlos Manuelda <StormByte@gmail.com>
Closes: https://bugs.gentoo.org/669148
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
media-libs/libmp4v2/files/libmp4v2-2.0.0-clang.patch [new file with mode: 0644]
media-libs/libmp4v2/files/libmp4v2-2.0.0-mp4tags-corruption.patch
media-libs/libmp4v2/libmp4v2-2.0.0-r1.ebuild

diff --git a/media-libs/libmp4v2/files/libmp4v2-2.0.0-clang.patch b/media-libs/libmp4v2/files/libmp4v2-2.0.0-clang.patch
new file mode 100644 (file)
index 0000000..34aa81c
--- /dev/null
@@ -0,0 +1,36 @@
+From edc4f0ad8f37bb8aeae4e3ea34766dc6cdbb2f15 Mon Sep 17 00:00:00 2001
+From: David Carlos Manuelda <StormByte@gmail.com>
+Date: Tue, 7 Aug 2018 05:42:28 +0200
+Subject: [PATCH] Fix clang compilation
+
+---
+ src/mp4.cpp   | 2 +-
+ src/mp4util.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/mp4.cpp b/src/mp4.cpp
+index 1016f79..d576103 100644
+--- a/src/mp4.cpp
++++ b/src/mp4.cpp
+@@ -896,7 +896,7 @@ MP4FileHandle MP4ReadProvider( const char* fileName, const MP4FileProvider* file
+         }
+ 
+         catch (...) {
+-            return MP4_INVALID_TRACK_ID;
++            return (mp4v2_ismacrypParams *)MP4_INVALID_TRACK_ID;
+         }
+     }
+ 
+diff --git a/src/mp4util.h b/src/mp4util.h
+index 1fbbd81..b33bb44 100644
+--- a/src/mp4util.h
++++ b/src/mp4util.h
+@@ -33,7 +33,7 @@ namespace mp4v2 { namespace impl {
+ #ifndef ASSERT
+ #   define ASSERT(expr) \
+         if (!(expr)) { \
+-            throw new Exception("assert failure: "LIBMPV42_STRINGIFY((expr)), __FILE__, __LINE__, __FUNCTION__ ); \
++            throw new Exception("assert failure: " LIBMPV42_STRINGIFY((expr)), __FILE__, __LINE__, __FUNCTION__ ); \
+         }
+ #endif
+ 
\ No newline at end of file
index 1c41a41da9883b8d0626d465dd7062b24ab2e10d..182d41bb8123df0eb2ab141396b4dbfcc14490d8 100644 (file)
@@ -17,4 +17,4 @@ index 1b9e866..80e89d4 100644
 +                        break;
                      }
                      case OPT_ALBUM_ARTIST:
-                         MP4TagsSetAlbumArtist( mdata, tags[i] );
\ No newline at end of file
+                         MP4TagsSetAlbumArtist( mdata, tags[i] );
index 9f5cac1bf14047064f821f66650a1b02122e8e60..35c8f626279b022889b7288f7191af3d781c7d97 100644 (file)
@@ -15,9 +15,11 @@ SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
 IUSE="static-libs test utils"
 
-BDEPEND="sys-apps/sed
+BDEPEND="
+       sys-apps/sed
+       test? ( dev-util/dejagnu )
        utils? ( sys-apps/help2man )
-       test? ( dev-util/dejagnu )"
+"
 
 DOCS=( doc/{Authors,BuildSource,Documentation,ReleaseNotes,ToolGuide}.txt README )
 
@@ -26,6 +28,7 @@ S=${WORKDIR}/${MY_P}
 PATCHES=(
        "${FILESDIR}/${P}-gcc7.patch"
        "${FILESDIR}/${P}-mp4tags-corruption.patch"
+       "${FILESDIR}/${P}-clang.patch"
 )
 
 src_prepare() {