Gentoo Archives: gentoo-commits

From: "Samuli Suominen (ssuominen)" <ssuominen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-sound/kid3/files: kid3-1.2-new_libmp4v2.patch
Date: Sun, 12 Jul 2009 22:42:02
Message-Id: E1MQ7k7-0006jO-0D@stork.gentoo.org
1 ssuominen 09/07/12 22:41:59
2
3 Added: kid3-1.2-new_libmp4v2.patch
4 Log:
5 Detect and compile with libmp4v2 >= 1.9.0.
6 (Portage version: 2.2_rc33/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 media-sound/kid3/files/kid3-1.2-new_libmp4v2.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/kid3/files/kid3-1.2-new_libmp4v2.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/kid3/files/kid3-1.2-new_libmp4v2.patch?rev=1.1&content-type=text/plain
13
14 Index: kid3-1.2-new_libmp4v2.patch
15 ===================================================================
16 FIXME. Detect and build with MP4V2 1.9.0. Uncompatible with old version,
17 since the headers checking should be done based on version.
18
19 diff -ur kid3-1.2.orig/CMakeLists.txt kid3-1.2/CMakeLists.txt
20 --- kid3-1.2.orig/CMakeLists.txt 2008-03-12 22:24:35.000000000 +0200
21 +++ kid3-1.2/CMakeLists.txt 2009-07-13 01:38:25.000000000 +0300
22 @@ -45,7 +45,7 @@
23 ### Check for mp4v2
24 set(MP4V2_LIBRARIES)
25 if(WITH_MP4V2)
26 - find_path(MP4V2_INCLUDE_DIR mp4.h
27 + find_path(MP4V2_INCLUDE_DIR mp4v2/mp4v2.h
28 /usr/include/
29 /usr/local/include/
30 )
31 @@ -63,7 +63,7 @@
32
33 set(_CMAKE_REQUIRED_LIBRARIES_TMP ${CMAKE_REQUIRED_LIBRARIES})
34 set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${MP4V2_LIBRARIES})
35 - CHECK_CXX_SOURCE_COMPILES("#include <mp4.h>\nint main() {\n MP4FileHandle hFile;\n u_int32_t index;\n char* ppName;\n u_int8_t* ppValue;\n u_int32_t pValueSize;\n MP4GetMetadataByIndex(hFile, index, &ppName, &ppValue, &pValueSize);\n return 0;\n}\n" HAVE_MP4V2_MP4GETMETADATABYINDEX_CHARPP_ARG)
36 + CHECK_CXX_SOURCE_COMPILES("#include <mp4v2/mp4v2.h>\n#include <sys/types.h>\nint main() {\n MP4FileHandle hFile;\n u_int32_t index;\n char* ppName;\n u_int8_t* ppValue;\n u_int32_t pValueSize;\n MP4GetMetadataByIndex(hFile, index, &ppName, &ppValue, &pValueSize);\n return 0;\n}\n" HAVE_MP4V2_MP4GETMETADATABYINDEX_CHARPP_ARG)
37 set(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_TMP})
38
39 else (MP4V2_INCLUDE_DIR AND MP4V2_LIBRARIES)
40 diff -ur kid3-1.2.orig/configure.in.in kid3-1.2/configure.in.in
41 --- kid3-1.2.orig/configure.in.in 2009-04-02 20:44:10.000000000 +0300
42 +++ kid3-1.2/configure.in.in 2009-07-13 00:57:38.000000000 +0300
43 @@ -62,7 +62,7 @@
44 ac_cppflags_save=$CPPFLAGS
45 CPPFLAGS="$CPPFLAGS -I."
46 AC_CHECK_HEADERS(systems.h)
47 - AC_CHECK_HEADERS([mp4.h], [have_mp4_h=yes], [],
48 + AC_CHECK_HEADERS([mp4v2/mp4v2.h], [have_mp4_h=yes], [],
49 [#ifdef HAVE_SYSTEMS_H
50 # include <systems.h>
51 #endif
52 @@ -99,7 +99,7 @@
53 AC_LANG_SAVE
54 AC_LANG_CPLUSPLUS
55 cat > conftest.$ac_ext <<EOF
56 -#include <mp4.h>
57 +#include <mp4v2/mp4v2.h>
58 int main() {
59 MP4FileHandle hFile;
60 u_int32_t index;
61 diff -ur kid3-1.2.orig/doc/en/index.docbook kid3-1.2/doc/en/index.docbook
62 --- kid3-1.2.orig/doc/en/index.docbook 2009-04-26 19:52:47.000000000 +0300
63 +++ kid3-1.2/doc/en/index.docbook 2009-07-13 00:59:34.000000000 +0300
64 @@ -1463,7 +1463,7 @@
65 files. These three formats are also supported by
66 <ulink url="http://developer.kde.org/~wheeler/taglib.html">TagLib</ulink>,
67 which can also handle MPC, MP2, Speex, TrueAudio and WavPack files.
68 -<ulink url="http://mpeg4ip.sourceforge.net">mp4v2</ulink> is required for
69 +<ulink url="http://code.google.com/p/mp4v2">mp4v2</ulink> is required for
70 MP4 files.
71 For MusicBrainz support,
72 <ulink url="http://musicbrainz.org/doc/libtunepimp">libtunepimp</ulink>
73 diff -ur kid3-1.2.orig/kid3/m4afile.cpp kid3-1.2/kid3/m4afile.cpp
74 --- kid3-1.2.orig/kid3/m4afile.cpp 2008-12-22 11:57:24.000000000 +0200
75 +++ kid3-1.2/kid3/m4afile.cpp 2009-07-13 01:36:31.000000000 +0300
76 @@ -42,10 +42,16 @@
77 #include <utime.h>
78 #endif
79 #include <stdio.h>
80 -#include <mp4.h>
81 +#include <mp4v2/mp4v2.h>
82 #include <cstdlib>
83 #include <cstring>
84
85 +/** FIXME. Define MP4V2 project version to MPEG4IP project version. */
86 +#if defined MP4V2_PROJECT_version_major && MP4V2_PROJECT_version_minor
87 +#define MPEG4IP_MAJOR_VERSION 0x1
88 +#define MPEG4IP_MINOR_VERSION 0x9
89 +#endif
90 +
91 /** MPEG4IP version as 16-bit hex number with major and minor version. */
92 #if defined MPEG4IP_MAJOR_VERSION && defined MPEG4IP_MINOR_VERSION
93 #define MPEG4IP_MAJOR_MINOR_VERSION ((MPEG4IP_MAJOR_VERSION << 8) | MPEG4IP_MINOR_VERSION)