[SCM] gerbera/master: Drop patches applied upstream

jcowgill at users.alioth.debian.org jcowgill at users.alioth.debian.org
Sat Sep 23 17:48:12 UTC 2017


The following commit has been merged in the master branch:
commit c11be643b65924ff6f471c07afad295c4c917ceb
Author: James Cowgill <jcowgill at debian.org>
Date:   Wed May 31 22:08:30 2017 +0100

    Drop patches applied upstream

diff --git a/debian/patches/0002_debug_mode_fix.patch b/debian/patches/0002_debug_mode_fix.patch
deleted file mode 100644
index 48ffc80..0000000
--- a/debian/patches/0002_debug_mode_fix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Fix issue where mediatomb would not start in debug mode as a user that
-doesn't have permissions in the working directory.
-==========================================================================
---- a/tombupnp/upnp/src/api/upnpdebug.c
-+++ b/tombupnp/upnp/src/api/upnpdebug.c
-@@ -62,10 +62,10 @@
- static FILE *InfoFileHnd = NULL;
- 
- //Name of the error file
--static const char *errFileName = "IUpnpErrFile.txt";
-+static const char *errFileName = NULL;
- 
- //Name of the info file
--static const char *infoFileName = "IUpnpInfoFile.txt";
-+static const char *infoFileName = NULL;
- 
- 
- 
-@@ -113,6 +113,8 @@
-     ithread_mutex_init( &GlobalDebugMutex, NULL );
- 
-     if( DEBUG_TARGET == 1 ) {
-+        errFileName = tempnam(NULL,NULL);
-+        infoFileName = tempnam(NULL,NULL);
-         if( ( ErrFileHnd = fopen( errFileName, "a" ) ) == NULL )
-             return -1;
-         if( ( InfoFileHnd = fopen( infoFileName, "a" ) ) == NULL )
diff --git a/debian/patches/0003_config_xml_comment.patch b/debian/patches/0003_config_xml_comment.patch
deleted file mode 100644
index 0bcc342..0000000
--- a/debian/patches/0003_config_xml_comment.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-Add comment about documentation for config.xml.
-Also add mappings for matroska. Also add mappings for ogg in like manner as
-audio files.
-==========================================================================
---- a/src/config_manager.cc
-+++ b/src/config_manager.cc
-@@ -426,6 +426,13 @@
-     config->setAttribute(_("xmlns"), _(XML_XMLNS) + CONFIG_XML_VERSION);
-     config->setAttribute(_("xmlns:xsi"), _(XML_XMLNS_XSI));
-     config->setAttribute(_("xsi:schemaLocation"), _(XML_XMLNS) + CONFIG_XML_VERSION + " " + XML_XMLNS + CONFIG_XML_VERSION + ".xsd");
-+
-+    Ref<Comment> docinfo(new Comment(_("\n\
-+     Read /usr/share/doc/mediatomb-common/README.gz section 6 for more\n\
-+     information on creating and using config.xml configration files.\n\
-+    "), true));
-+    config->appendChild(RefCast(docinfo, Node));
-+
-     Ref<Element> server(new Element(_("server")));
-    
-     Ref<Element> ui(new Element(_("ui")));
-@@ -614,6 +621,8 @@
-                                _(UPNP_DEFAULT_CLASS_VIDEO_ITEM)));
-     mtupnp->appendElementChild(map_from_to(_("image/*"), 
-                                _("object.item.imageItem")));
-+    mtupnp->appendElementChild(map_from_to(_("application/ogg"),
-+                               _(UPNP_DEFAULT_CLASS_MUSIC_TRACK)));
- 
-     mappings->appendElementChild(mtupnp);
- 
-@@ -650,6 +659,10 @@
-                                            _(CONTENT_TYPE_DVD)));
-     mtcontent->appendElementChild(treat_as(_("application/x-iso9660-image"),
-                                            _(CONTENT_TYPE_DVD)));
-+    mtcontent->appendElementChild(treat_as(_("video/x-matroska"),
-+                                           _(CONTENT_TYPE_MKV)));
-+    mtcontent->appendElementChild(treat_as(_("audio/x-matroska"),
-+                                           _(CONTENT_TYPE_MKA)));
- 
-     mappings->appendElementChild(mtcontent);
-     import->appendElementChild(mappings);
---- a/src/metadata_handler.h
-+++ b/src/metadata_handler.h
-@@ -60,6 +60,8 @@
- #define CONTENT_TYPE_MPEG       "mpeg"
- #define CONTENT_TYPE_DVD        "dvd"
- #define CONTENT_TYPE_QUICKTIME  "quicktime"
-+#define CONTENT_TYPE_MKV        "mkv"
-+#define CONTENT_TYPE_MKA        "mka"
- 
- #define OGG_THEORA              "t"
- 
diff --git a/debian/patches/0004_const_char_conversion.patch b/debian/patches/0004_const_char_conversion.patch
deleted file mode 100644
index e3b6a10..0000000
--- a/debian/patches/0004_const_char_conversion.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Fix (const char *) conversion to (char *).
-==========================================================================
---- a/src/tools.cc
-+++ b/src/tools.cc
-@@ -298,14 +298,14 @@
- 
- String hex_decode_string(String encoded)
- {
--    char *ptr = encoded.c_str();
-+    char *ptr = const_cast<char *>(encoded.c_str());
-     int len = encoded.length();
-     
-     Ref<StringBuffer> buf(new StringBuffer(len / 2));
-     for (int i = 0; i < len; i += 2)
-     {
--        const char *chi = strchr(HEX_CHARS, ptr[i]);
--        const char *clo = strchr(HEX_CHARS, ptr[i + 1]);
-+        const char *chi = strchr(const_cast<char *>(HEX_CHARS), ptr[i]);
-+        const char *clo = strchr(const_cast<char *>(HEX_CHARS), ptr[i + 1]);
-         int hi, lo;
-         
-         if (chi)
-@@ -382,7 +382,7 @@
- 
- String url_unescape(String str)
- {
--    char *data = str.c_str();
-+    char *data = const_cast<char *>(str.c_str());
-     int len = str.length();
-     Ref<StringBuffer> buf(new StringBuffer(len));
- 
-@@ -400,13 +400,13 @@
- 
-             const char *pos;
- 
--            pos = strchr(hex, chi);
-+            pos = strchr(const_cast<char *>(hex), chi);
-             if (!pos)
-                 hi = 0;
-             else
-                 hi = pos - hex;
- 
--            pos = strchr(hex, clo);
-+            pos = strchr(const_cast<char *>(hex), clo);
-             if (!pos)
-                 lo = 0;
-             else
diff --git a/debian/patches/0005_use_system_libuuid.patch b/debian/patches/0005_use_system_libuuid.patch
deleted file mode 100644
index 611b338..0000000
--- a/debian/patches/0005_use_system_libuuid.patch
+++ /dev/null
@@ -1,1763 +0,0 @@
-Description: Use libuuid from the system rather than local bundled code.
-Bug-Gentoo: http://bugs.gentoo.org/270830
-Forwarded: not-needed
-
---- a/build/Makefile.am
-+++ b/build/Makefile.am
-@@ -62,6 +62,7 @@
- mediatomb_LDADD = \
-     libmediatomb.a \
-     $(top_srcdir)/tombupnp/build/libtombupnp.a \
-+    -luuid \
-     $(LIBEXIF_LDFLAGS) \
-     $(ZLIB_LDFLAGS) \
-     $(EXPAT_LDFLAGS) \
---- a/build/libmediatomb_src
-+++ b/build/libmediatomb_src
-@@ -231,19 +231,6 @@
- ../src/url.h \
- ../src/url_request_handler.cc \
- ../src/url_request_handler.h \
--../src/uuid/clear.c \
--../src/uuid/compare.c \
--../src/uuid/copy.c \
--../src/uuid/gen_uuid.c \
--../src/uuid/isnull.c \
--../src/uuid/pack.c \
--../src/uuid/parse.c \
--../src/uuid/unpack.c \
--../src/uuid/unparse.c \
--../src/uuid/uuid.h \
--../src/uuid/uuidP.h \
--../src/uuid/uuid_time.c \
--../src/uuid/uuid_types.h \
- ../src/web/action.cc \
- ../src/web/add.cc \
- ../src/web/add_object.cc \
---- a/src/uuid/COPYING
-+++ /dev/null
-@@ -1,851 +0,0 @@
--This package, the EXT2 filesystem utilities, are made available under
--the GNU Public License.
--
--However, I request that if the version string in the file version.h
--contains the string "pre-", or "WIP" that this version of e2fsprogs be
--distributed in source form only.  Please feel free to give a copy of
--the e2fsck binary to help a friend recover his or her filesystem, as
--the need arises.  However, "pre" or "WIP" indicates that this release
--is under development, and available for ALPHA testing.  So for your
--protection as much as mine, I'd prefer that it not appear in a some
--distribution --- especially not a CD-ROM distribution!
--
--The most recent officially distributed version can be found at
--http://e2fsprogs.sourceforge.net.  If you need to make a distribution,
--that's the one you should use.  If there is some reason why you'd like
--a more recent version that is still in ALPHA testing for your
--distribution, please contact me (tytso at mit.edu), and we will very
--likely be able to work out something that will work for all concerned.
--The release schedules for this package are flexible, if you give me
--enough lead time.
--
--
--					Theodore Ts'o
--					15-Mar-2003
--
------------------------------------------------------------------------
--
--		    GNU GENERAL PUBLIC LICENSE
--		       Version 2, June 1991
--
-- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
--     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-- Everyone is permitted to copy and distribute verbatim copies
-- of this license document, but changing it is not allowed.
--
--			    Preamble
--
--  The licenses for most software are designed to take away your
--freedom to share and change it.  By contrast, the GNU General Public
--License is intended to guarantee your freedom to share and change free
--software--to make sure the software is free for all its users.  This
--General Public License applies to most of the Free Software
--Foundation's software and to any other program whose authors commit to
--using it.  (Some other Free Software Foundation software is covered by
--the GNU Library General Public License instead.)  You can apply it to
--your programs, too.
--
--  When we speak of free software, we are referring to freedom, not
--price.  Our General Public Licenses are designed to make sure that you
--have the freedom to distribute copies of free software (and charge for
--this service if you wish), that you receive source code or can get it
--if you want it, that you can change the software or use pieces of it
--in new free programs; and that you know you can do these things.
--
--  To protect your rights, we need to make restrictions that forbid
--anyone to deny you these rights or to ask you to surrender the rights.
--These restrictions translate to certain responsibilities for you if you
--distribute copies of the software, or if you modify it.
--
--  For example, if you distribute copies of such a program, whether
--gratis or for a fee, you must give the recipients all the rights that
--you have.  You must make sure that they, too, receive or can get the
--source code.  And you must show them these terms so they know their
--rights.
--
--  We protect your rights with two steps: (1) copyright the software, and
--(2) offer you this license which gives you legal permission to copy,
--distribute and/or modify the software.
--
--  Also, for each author's protection and ours, we want to make certain
--that everyone understands that there is no warranty for this free
--software.  If the software is modified by someone else and passed on, we
--want its recipients to know that what they have is not the original, so
--that any problems introduced by others will not reflect on the original
--authors' reputations.
--
--  Finally, any free program is threatened constantly by software
--patents.  We wish to avoid the danger that redistributors of a free
--program will individually obtain patent licenses, in effect making the
--program proprietary.  To prevent this, we have made it clear that any
--patent must be licensed for everyone's free use or not licensed at all.
--
--  The precise terms and conditions for copying, distribution and
--modification follow.
--

--		    GNU GENERAL PUBLIC LICENSE
--   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
--
--  0. This License applies to any program or other work which contains
--a notice placed by the copyright holder saying it may be distributed
--under the terms of this General Public License.  The "Program", below,
--refers to any such program or work, and a "work based on the Program"
--means either the Program or any derivative work under copyright law:
--that is to say, a work containing the Program or a portion of it,
--either verbatim or with modifications and/or translated into another
--language.  (Hereinafter, translation is included without limitation in
--the term "modification".)  Each licensee is addressed as "you".
--
--Activities other than copying, distribution and modification are not
--covered by this License; they are outside its scope.  The act of
--running the Program is not restricted, and the output from the Program
--is covered only if its contents constitute a work based on the
--Program (independent of having been made by running the Program).
--Whether that is true depends on what the Program does.
--
--  1. You may copy and distribute verbatim copies of the Program's
--source code as you receive it, in any medium, provided that you
--conspicuously and appropriately publish on each copy an appropriate
--copyright notice and disclaimer of warranty; keep intact all the
--notices that refer to this License and to the absence of any warranty;
--and give any other recipients of the Program a copy of this License
--along with the Program.
--
--You may charge a fee for the physical act of transferring a copy, and
--you may at your option offer warranty protection in exchange for a fee.
--
--  2. You may modify your copy or copies of the Program or any portion
--of it, thus forming a work based on the Program, and copy and
--distribute such modifications or work under the terms of Section 1
--above, provided that you also meet all of these conditions:
--
--    a) You must cause the modified files to carry prominent notices
--    stating that you changed the files and the date of any change.
--
--    b) You must cause any work that you distribute or publish, that in
--    whole or in part contains or is derived from the Program or any
--    part thereof, to be licensed as a whole at no charge to all third
--    parties under the terms of this License.
--
--    c) If the modified program normally reads commands interactively
--    when run, you must cause it, when started running for such
--    interactive use in the most ordinary way, to print or display an
--    announcement including an appropriate copyright notice and a
--    notice that there is no warranty (or else, saying that you provide
--    a warranty) and that users may redistribute the program under
--    these conditions, and telling the user how to view a copy of this
--    License.  (Exception: if the Program itself is interactive but
--    does not normally print such an announcement, your work based on
--    the Program is not required to print an announcement.)
--

--These requirements apply to the modified work as a whole.  If
--identifiable sections of that work are not derived from the Program,
--and can be reasonably considered independent and separate works in
--themselves, then this License, and its terms, do not apply to those
--sections when you distribute them as separate works.  But when you
--distribute the same sections as part of a whole which is a work based
--on the Program, the distribution of the whole must be on the terms of
--this License, whose permissions for other licensees extend to the
--entire whole, and thus to each and every part regardless of who wrote it.
--
--Thus, it is not the intent of this section to claim rights or contest
--your rights to work written entirely by you; rather, the intent is to
--exercise the right to control the distribution of derivative or
--collective works based on the Program.
--
--In addition, mere aggregation of another work not based on the Program
--with the Program (or with a work based on the Program) on a volume of
--a storage or distribution medium does not bring the other work under
--the scope of this License.
--
--  3. You may copy and distribute the Program (or a work based on it,
--under Section 2) in object code or executable form under the terms of
--Sections 1 and 2 above provided that you also do one of the following:
--
--    a) Accompany it with the complete corresponding machine-readable
--    source code, which must be distributed under the terms of Sections
--    1 and 2 above on a medium customarily used for software interchange; or,
--
--    b) Accompany it with a written offer, valid for at least three
--    years, to give any third party, for a charge no more than your
--    cost of physically performing source distribution, a complete
--    machine-readable copy of the corresponding source code, to be
--    distributed under the terms of Sections 1 and 2 above on a medium
--    customarily used for software interchange; or,
--
--    c) Accompany it with the information you received as to the offer
--    to distribute corresponding source code.  (This alternative is
--    allowed only for noncommercial distribution and only if you
--    received the program in object code or executable form with such
--    an offer, in accord with Subsection b above.)
--
--The source code for a work means the preferred form of the work for
--making modifications to it.  For an executable work, complete source
--code means all the source code for all modules it contains, plus any
--associated interface definition files, plus the scripts used to
--control compilation and installation of the executable.  However, as a
--special exception, the source code distributed need not include
--anything that is normally distributed (in either source or binary
--form) with the major components (compiler, kernel, and so on) of the
--operating system on which the executable runs, unless that component
--itself accompanies the executable.
--
--If distribution of executable or object code is made by offering
--access to copy from a designated place, then offering equivalent
--access to copy the source code from the same place counts as
--distribution of the source code, even though third parties are not
--compelled to copy the source along with the object code.
--

--  4. You may not copy, modify, sublicense, or distribute the Program
--except as expressly provided under this License.  Any attempt
--otherwise to copy, modify, sublicense or distribute the Program is
--void, and will automatically terminate your rights under this License.
--However, parties who have received copies, or rights, from you under
--this License will not have their licenses terminated so long as such
--parties remain in full compliance.
--
--  5. You are not required to accept this License, since you have not
--signed it.  However, nothing else grants you permission to modify or
--distribute the Program or its derivative works.  These actions are
--prohibited by law if you do not accept this License.  Therefore, by
--modifying or distributing the Program (or any work based on the
--Program), you indicate your acceptance of this License to do so, and
--all its terms and conditions for copying, distributing or modifying
--the Program or works based on it.
--
--  6. Each time you redistribute the Program (or any work based on the
--Program), the recipient automatically receives a license from the
--original licensor to copy, distribute or modify the Program subject to
--these terms and conditions.  You may not impose any further
--restrictions on the recipients' exercise of the rights granted herein.
--You are not responsible for enforcing compliance by third parties to
--this License.
--
--  7. If, as a consequence of a court judgment or allegation of patent
--infringement or for any other reason (not limited to patent issues),
--conditions are imposed on you (whether by court order, agreement or
--otherwise) that contradict the conditions of this License, they do not
--excuse you from the conditions of this License.  If you cannot
--distribute so as to satisfy simultaneously your obligations under this
--License and any other pertinent obligations, then as a consequence you
--may not distribute the Program at all.  For example, if a patent
--license would not permit royalty-free redistribution of the Program by
--all those who receive copies directly or indirectly through you, then
--the only way you could satisfy both it and this License would be to
--refrain entirely from distribution of the Program.
--
--If any portion of this section is held invalid or unenforceable under
--any particular circumstance, the balance of the section is intended to
--apply and the section as a whole is intended to apply in other
--circumstances.
--
--It is not the purpose of this section to induce you to infringe any
--patents or other property right claims or to contest validity of any
--such claims; this section has the sole purpose of protecting the
--integrity of the free software distribution system, which is
--implemented by public license practices.  Many people have made
--generous contributions to the wide range of software distributed
--through that system in reliance on consistent application of that
--system; it is up to the author/donor to decide if he or she is willing
--to distribute software through any other system and a licensee cannot
--impose that choice.
--
--This section is intended to make thoroughly clear what is believed to
--be a consequence of the rest of this License.
--

--  8. If the distribution and/or use of the Program is restricted in
--certain countries either by patents or by copyrighted interfaces, the
--original copyright holder who places the Program under this License
--may add an explicit geographical distribution limitation excluding
--those countries, so that distribution is permitted only in or among
--countries not thus excluded.  In such case, this License incorporates
--the limitation as if written in the body of this License.
--
--  9. The Free Software Foundation may publish revised and/or new versions
--of the General Public License from time to time.  Such new versions will
--be similar in spirit to the present version, but may differ in detail to
--address new problems or concerns.
--
--Each version is given a distinguishing version number.  If the Program
--specifies a version number of this License which applies to it and "any
--later version", you have the option of following the terms and conditions
--either of that version or of any later version published by the Free
--Software Foundation.  If the Program does not specify a version number of
--this License, you may choose any version ever published by the Free Software
--Foundation.
--
--  10. If you wish to incorporate parts of the Program into other free
--programs whose distribution conditions are different, write to the author
--to ask for permission.  For software which is copyrighted by the Free
--Software Foundation, write to the Free Software Foundation; we sometimes
--make exceptions for this.  Our decision will be guided by the two goals
--of preserving the free status of all derivatives of our free software and
--of promoting the sharing and reuse of software generally.
--
--			    NO WARRANTY
--
--  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
--FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
--OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
--PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
--OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
--MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
--TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
--PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
--REPAIR OR CORRECTION.
--
--  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
--WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
--REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
--INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
--OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
--TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
--YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
--PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
--POSSIBILITY OF SUCH DAMAGES.
--
--		     END OF TERMS AND CONDITIONS
--

--	    How to Apply These Terms to Your New Programs
--
--  If you develop a new program, and you want it to be of the greatest
--possible use to the public, the best way to achieve this is to make it
--free software which everyone can redistribute and change under these terms.
--
--  To do so, attach the following notices to the program.  It is safest
--to attach them to the start of each source file to most effectively
--convey the exclusion of warranty; and each file should have at least
--the "copyright" line and a pointer to where the full notice is found.
--
--    <one line to give the program's name and a brief idea of what it does.>
--    Copyright (C) <year>  <name of author>
--
--    This program is free software; you can redistribute it and/or modify
--    it under the terms of the GNU General Public License as published by
--    the Free Software Foundation; either version 2 of the License, or
--    (at your option) any later version.
--
--    This program is distributed in the hope that it will be useful,
--    but WITHOUT ANY WARRANTY; without even the implied warranty of
--    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--    GNU General Public License for more details.
--
--    You should have received a copy of the GNU General Public License
--    along with this program; if not, write to the Free Software
--    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--
--
--Also add information on how to contact you by electronic and paper mail.
--
--If the program is interactive, make it output a short notice like this
--when it starts in an interactive mode:
--
--    Gnomovision version 69, Copyright (C) year  name of author
--    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
--    This is free software, and you are welcome to redistribute it
--    under certain conditions; type `show c' for details.
--
--The hypothetical commands `show w' and `show c' should show the appropriate
--parts of the General Public License.  Of course, the commands you use may
--be called something other than `show w' and `show c'; they could even be
--mouse-clicks or menu items--whatever suits your program.
--
--You should also get your employer (if you work as a programmer) or your
--school, if any, to sign a "copyright disclaimer" for the program, if
--necessary.  Here is a sample; alter the names:
--
--  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
--  `Gnomovision' (which makes passes at compilers) written by James Hacker.
--
--  <signature of Ty Coon>, 1 April 1989
--  Ty Coon, President of Vice
--
--This General Public License does not permit incorporating your program into
--proprietary programs.  If your program is a subroutine library, you may
--consider it more useful to permit linking proprietary applications with the
--library.  If this is what you want to do, use the GNU Library General
--Public License instead of this License.
--
------------------------------------------------------------------------
--
--		  GNU LIBRARY GENERAL PUBLIC LICENSE
--		       Version 2, June 1991
--
-- Copyright (C) 1991 Free Software Foundation, Inc.
--    		    59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-- Everyone is permitted to copy and distribute verbatim copies
-- of this license document, but changing it is not allowed.
--
--[This is the first released version of the library GPL.  It is
-- numbered 2 because it goes with version 2 of the ordinary GPL.]
--
--			    Preamble
--
--  The licenses for most software are designed to take away your
--freedom to share and change it.  By contrast, the GNU General Public
--Licenses are intended to guarantee your freedom to share and change
--free software--to make sure the software is free for all its users.
--
--  This license, the Library General Public License, applies to some
--specially designated Free Software Foundation software, and to any
--other libraries whose authors decide to use it.  You can use it for
--your libraries, too.
--
--  When we speak of free software, we are referring to freedom, not
--price.  Our General Public Licenses are designed to make sure that you
--have the freedom to distribute copies of free software (and charge for
--this service if you wish), that you receive source code or can get it
--if you want it, that you can change the software or use pieces of it
--in new free programs; and that you know you can do these things.
--
--  To protect your rights, we need to make restrictions that forbid
--anyone to deny you these rights or to ask you to surrender the rights.
--These restrictions translate to certain responsibilities for you if
--you distribute copies of the library, or if you modify it.
--
--  For example, if you distribute copies of the library, whether gratis
--or for a fee, you must give the recipients all the rights that we gave
--you.  You must make sure that they, too, receive or can get the source
--code.  If you link a program with the library, you must provide
--complete object files to the recipients so that they can relink them
--with the library, after making changes to the library and recompiling
--it.  And you must show them these terms so they know their rights.
--
--  Our method of protecting your rights has two steps: (1) copyright
--the library, and (2) offer you this license which gives you legal
--permission to copy, distribute and/or modify the library.
--
--  Also, for each distributor's protection, we want to make certain
--that everyone understands that there is no warranty for this free
--library.  If the library is modified by someone else and passed on, we
--want its recipients to know that what they have is not the original
--version, so that any problems introduced by others will not reflect on
--the original authors' reputations.
--

--  Finally, any free program is threatened constantly by software
--patents.  We wish to avoid the danger that companies distributing free
--software will individually obtain patent licenses, thus in effect
--transforming the program into proprietary software.  To prevent this,
--we have made it clear that any patent must be licensed for everyone's
--free use or not licensed at all.
--
--  Most GNU software, including some libraries, is covered by the ordinary
--GNU General Public License, which was designed for utility programs.  This
--license, the GNU Library General Public License, applies to certain
--designated libraries.  This license is quite different from the ordinary
--one; be sure to read it in full, and don't assume that anything in it is
--the same as in the ordinary license.
--
--  The reason we have a separate public license for some libraries is that
--they blur the distinction we usually make between modifying or adding to a
--program and simply using it.  Linking a program with a library, without
--changing the library, is in some sense simply using the library, and is
--analogous to running a utility program or application program.  However, in
--a textual and legal sense, the linked executable is a combined work, a
--derivative of the original library, and the ordinary General Public License
--treats it as such.
--
--  Because of this blurred distinction, using the ordinary General
--Public License for libraries did not effectively promote software
--sharing, because most developers did not use the libraries.  We
--concluded that weaker conditions might promote sharing better.
--
--  However, unrestricted linking of non-free programs would deprive the
--users of those programs of all benefit from the free status of the
--libraries themselves.  This Library General Public License is intended to
--permit developers of non-free programs to use free libraries, while
--preserving your freedom as a user of such programs to change the free
--libraries that are incorporated in them.  (We have not seen how to achieve
--this as regards changes in header files, but we have achieved it as regards
--changes in the actual functions of the Library.)  The hope is that this
--will lead to faster development of free libraries.
--
--  The precise terms and conditions for copying, distribution and
--modification follow.  Pay close attention to the difference between a
--"work based on the library" and a "work that uses the library".  The
--former contains code derived from the library, while the latter only
--works together with the library.
--
--  Note that it is possible for a library to be covered by the ordinary
--General Public License rather than by this special one.
--

--		  GNU LIBRARY GENERAL PUBLIC LICENSE
--   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
--
--  0. This License Agreement applies to any software library which
--contains a notice placed by the copyright holder or other authorized
--party saying it may be distributed under the terms of this Library
--General Public License (also called "this License").  Each licensee is
--addressed as "you".
--
--  A "library" means a collection of software functions and/or data
--prepared so as to be conveniently linked with application programs
--(which use some of those functions and data) to form executables.
--
--  The "Library", below, refers to any such software library or work
--which has been distributed under these terms.  A "work based on the
--Library" means either the Library or any derivative work under
--copyright law: that is to say, a work containing the Library or a
--portion of it, either verbatim or with modifications and/or translated
--straightforwardly into another language.  (Hereinafter, translation is
--included without limitation in the term "modification".)
--
--  "Source code" for a work means the preferred form of the work for
--making modifications to it.  For a library, complete source code means
--all the source code for all modules it contains, plus any associated
--interface definition files, plus the scripts used to control compilation
--and installation of the library.
--
--  Activities other than copying, distribution and modification are not
--covered by this License; they are outside its scope.  The act of
--running a program using the Library is not restricted, and output from
--such a program is covered only if its contents constitute a work based
--on the Library (independent of the use of the Library in a tool for
--writing it).  Whether that is true depends on what the Library does
--and what the program that uses the Library does.
--  
--  1. You may copy and distribute verbatim copies of the Library's
--complete source code as you receive it, in any medium, provided that
--you conspicuously and appropriately publish on each copy an
--appropriate copyright notice and disclaimer of warranty; keep intact
--all the notices that refer to this License and to the absence of any
--warranty; and distribute a copy of this License along with the
--Library.
--
--  You may charge a fee for the physical act of transferring a copy,
--and you may at your option offer warranty protection in exchange for a
--fee.
--

--  2. You may modify your copy or copies of the Library or any portion
--of it, thus forming a work based on the Library, and copy and
--distribute such modifications or work under the terms of Section 1
--above, provided that you also meet all of these conditions:
--
--    a) The modified work must itself be a software library.
--
--    b) You must cause the files modified to carry prominent notices
--    stating that you changed the files and the date of any change.
--
--    c) You must cause the whole of the work to be licensed at no
--    charge to all third parties under the terms of this License.
--
--    d) If a facility in the modified Library refers to a function or a
--    table of data to be supplied by an application program that uses
--    the facility, other than as an argument passed when the facility
--    is invoked, then you must make a good faith effort to ensure that,
--    in the event an application does not supply such function or
--    table, the facility still operates, and performs whatever part of
--    its purpose remains meaningful.
--
--    (For example, a function in a library to compute square roots has
--    a purpose that is entirely well-defined independent of the
--    application.  Therefore, Subsection 2d requires that any
--    application-supplied function or table used by this function must
--    be optional: if the application does not supply it, the square
--    root function must still compute square roots.)
--
--These requirements apply to the modified work as a whole.  If
--identifiable sections of that work are not derived from the Library,
--and can be reasonably considered independent and separate works in
--themselves, then this License, and its terms, do not apply to those
--sections when you distribute them as separate works.  But when you
--distribute the same sections as part of a whole which is a work based
--on the Library, the distribution of the whole must be on the terms of
--this License, whose permissions for other licensees extend to the
--entire whole, and thus to each and every part regardless of who wrote
--it.
--
--Thus, it is not the intent of this section to claim rights or contest
--your rights to work written entirely by you; rather, the intent is to
--exercise the right to control the distribution of derivative or
--collective works based on the Library.
--
--In addition, mere aggregation of another work not based on the Library
--with the Library (or with a work based on the Library) on a volume of
--a storage or distribution medium does not bring the other work under
--the scope of this License.
--
--  3. You may opt to apply the terms of the ordinary GNU General Public
--License instead of this License to a given copy of the Library.  To do
--this, you must alter all the notices that refer to this License, so
--that they refer to the ordinary GNU General Public License, version 2,
--instead of to this License.  (If a newer version than version 2 of the
--ordinary GNU General Public License has appeared, then you can specify
--that version instead if you wish.)  Do not make any other change in
--these notices.
--

--  Once this change is made in a given copy, it is irreversible for
--that copy, so the ordinary GNU General Public License applies to all
--subsequent copies and derivative works made from that copy.
--
--  This option is useful when you wish to copy part of the code of
--the Library into a program that is not a library.
--
--  4. You may copy and distribute the Library (or a portion or
--derivative of it, under Section 2) in object code or executable form
--under the terms of Sections 1 and 2 above provided that you accompany
--it with the complete corresponding machine-readable source code, which
--must be distributed under the terms of Sections 1 and 2 above on a
--medium customarily used for software interchange.
--
--  If distribution of object code is made by offering access to copy
--from a designated place, then offering equivalent access to copy the
--source code from the same place satisfies the requirement to
--distribute the source code, even though third parties are not
--compelled to copy the source along with the object code.
--
--  5. A program that contains no derivative of any portion of the
--Library, but is designed to work with the Library by being compiled or
--linked with it, is called a "work that uses the Library".  Such a
--work, in isolation, is not a derivative work of the Library, and
--therefore falls outside the scope of this License.
--
--  However, linking a "work that uses the Library" with the Library
--creates an executable that is a derivative of the Library (because it
--contains portions of the Library), rather than a "work that uses the
--library".  The executable is therefore covered by this License.
--Section 6 states terms for distribution of such executables.
--
--  When a "work that uses the Library" uses material from a header file
--that is part of the Library, the object code for the work may be a
--derivative work of the Library even though the source code is not.
--Whether this is true is especially significant if the work can be
--linked without the Library, or if the work is itself a library.  The
--threshold for this to be true is not precisely defined by law.
--
--  If such an object file uses only numerical parameters, data
--structure layouts and accessors, and small macros and small inline
--functions (ten lines or less in length), then the use of the object
--file is unrestricted, regardless of whether it is legally a derivative
--work.  (Executables containing this object code plus portions of the
--Library will still fall under Section 6.)
--
--  Otherwise, if the work is a derivative of the Library, you may
--distribute the object code for the work under the terms of Section 6.
--Any executables containing that work also fall under Section 6,
--whether or not they are linked directly with the Library itself.
--

--  6. As an exception to the Sections above, you may also compile or
--link a "work that uses the Library" with the Library to produce a
--work containing portions of the Library, and distribute that work
--under terms of your choice, provided that the terms permit
--modification of the work for the customer's own use and reverse
--engineering for debugging such modifications.
--
--  You must give prominent notice with each copy of the work that the
--Library is used in it and that the Library and its use are covered by
--this License.  You must supply a copy of this License.  If the work
--during execution displays copyright notices, you must include the
--copyright notice for the Library among them, as well as a reference
--directing the user to the copy of this License.  Also, you must do one
--of these things:
--
--    a) Accompany the work with the complete corresponding
--    machine-readable source code for the Library including whatever
--    changes were used in the work (which must be distributed under
--    Sections 1 and 2 above); and, if the work is an executable linked
--    with the Library, with the complete machine-readable "work that
--    uses the Library", as object code and/or source code, so that the
--    user can modify the Library and then relink to produce a modified
--    executable containing the modified Library.  (It is understood
--    that the user who changes the contents of definitions files in the
--    Library will not necessarily be able to recompile the application
--    to use the modified definitions.)
--
--    b) Accompany the work with a written offer, valid for at
--    least three years, to give the same user the materials
--    specified in Subsection 6a, above, for a charge no more
--    than the cost of performing this distribution.
--
--    c) If distribution of the work is made by offering access to copy
--    from a designated place, offer equivalent access to copy the above
--    specified materials from the same place.
--
--    d) Verify that the user has already received a copy of these
--    materials or that you have already sent this user a copy.
--
--  For an executable, the required form of the "work that uses the
--Library" must include any data and utility programs needed for
--reproducing the executable from it.  However, as a special exception,
--the source code distributed need not include anything that is normally
--distributed (in either source or binary form) with the major
--components (compiler, kernel, and so on) of the operating system on
--which the executable runs, unless that component itself accompanies
--the executable.
--
--  It may happen that this requirement contradicts the license
--restrictions of other proprietary libraries that do not normally
--accompany the operating system.  Such a contradiction means you cannot
--use both them and the Library together in an executable that you
--distribute.
--

--  7. You may place library facilities that are a work based on the
--Library side-by-side in a single library together with other library
--facilities not covered by this License, and distribute such a combined
--library, provided that the separate distribution of the work based on
--the Library and of the other library facilities is otherwise
--permitted, and provided that you do these two things:
--
--    a) Accompany the combined library with a copy of the same work
--    based on the Library, uncombined with any other library
--    facilities.  This must be distributed under the terms of the
--    Sections above.
--
--    b) Give prominent notice with the combined library of the fact
--    that part of it is a work based on the Library, and explaining
--    where to find the accompanying uncombined form of the same work.
--
--  8. You may not copy, modify, sublicense, link with, or distribute
--the Library except as expressly provided under this License.  Any
--attempt otherwise to copy, modify, sublicense, link with, or
--distribute the Library is void, and will automatically terminate your
--rights under this License.  However, parties who have received copies,
--or rights, from you under this License will not have their licenses
--terminated so long as such parties remain in full compliance.
--
--  9. You are not required to accept this License, since you have not
--signed it.  However, nothing else grants you permission to modify or
--distribute the Library or its derivative works.  These actions are
--prohibited by law if you do not accept this License.  Therefore, by
--modifying or distributing the Library (or any work based on the
--Library), you indicate your acceptance of this License to do so, and
--all its terms and conditions for copying, distributing or modifying
--the Library or works based on it.
--
--  10. Each time you redistribute the Library (or any work based on the
--Library), the recipient automatically receives a license from the
--original licensor to copy, distribute, link with or modify the Library
--subject to these terms and conditions.  You may not impose any further
--restrictions on the recipients' exercise of the rights granted herein.
--You are not responsible for enforcing compliance by third parties to
--this License.
--

--  11. If, as a consequence of a court judgment or allegation of patent
--infringement or for any other reason (not limited to patent issues),
--conditions are imposed on you (whether by court order, agreement or
--otherwise) that contradict the conditions of this License, they do not
--excuse you from the conditions of this License.  If you cannot
--distribute so as to satisfy simultaneously your obligations under this
--License and any other pertinent obligations, then as a consequence you
--may not distribute the Library at all.  For example, if a patent
--license would not permit royalty-free redistribution of the Library by
--all those who receive copies directly or indirectly through you, then
--the only way you could satisfy both it and this License would be to
--refrain entirely from distribution of the Library.
--
--If any portion of this section is held invalid or unenforceable under any
--particular circumstance, the balance of the section is intended to apply,
--and the section as a whole is intended to apply in other circumstances.
--
--It is not the purpose of this section to induce you to infringe any
--patents or other property right claims or to contest validity of any
--such claims; this section has the sole purpose of protecting the
--integrity of the free software distribution system which is
--implemented by public license practices.  Many people have made
--generous contributions to the wide range of software distributed
--through that system in reliance on consistent application of that
--system; it is up to the author/donor to decide if he or she is willing
--to distribute software through any other system and a licensee cannot
--impose that choice.
--
--This section is intended to make thoroughly clear what is believed to
--be a consequence of the rest of this License.
--
--  12. If the distribution and/or use of the Library is restricted in
--certain countries either by patents or by copyrighted interfaces, the
--original copyright holder who places the Library under this License may add
--an explicit geographical distribution limitation excluding those countries,
--so that distribution is permitted only in or among countries not thus
--excluded.  In such case, this License incorporates the limitation as if
--written in the body of this License.
--
--  13. The Free Software Foundation may publish revised and/or new
--versions of the Library General Public License from time to time.
--Such new versions will be similar in spirit to the present version,
--but may differ in detail to address new problems or concerns.
--
--Each version is given a distinguishing version number.  If the Library
--specifies a version number of this License which applies to it and
--"any later version", you have the option of following the terms and
--conditions either of that version or of any later version published by
--the Free Software Foundation.  If the Library does not specify a
--license version number, you may choose any version ever published by
--the Free Software Foundation.
--

--  14. If you wish to incorporate parts of the Library into other free
--programs whose distribution conditions are incompatible with these,
--write to the author to ask for permission.  For software which is
--copyrighted by the Free Software Foundation, write to the Free
--Software Foundation; we sometimes make exceptions for this.  Our
--decision will be guided by the two goals of preserving the free status
--of all derivatives of our free software and of promoting the sharing
--and reuse of software generally.
--
--			    NO WARRANTY
--
--  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
--WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
--EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
--OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
--KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
--IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
--PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
--LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
--THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
--
--  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
--WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
--AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
--FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
--CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
--LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
--RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
--FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
--SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
--DAMAGES.
--
--		     END OF TERMS AND CONDITIONS
--

--           How to Apply These Terms to Your New Libraries
--
--  If you develop a new library, and you want it to be of the greatest
--possible use to the public, we recommend making it free software that
--everyone can redistribute and change.  You can do so by permitting
--redistribution under these terms (or, alternatively, under the terms of the
--ordinary General Public License).
--
--  To apply these terms, attach the following notices to the library.  It is
--safest to attach them to the start of each source file to most effectively
--convey the exclusion of warranty; and each file should have at least the
--"copyright" line and a pointer to where the full notice is found.
--
--    <one line to give the library's name and a brief idea of what it does.>
--    Copyright (C) <year>  <name of author>
--
--    This library is free software; you can redistribute it and/or
--    modify it under the terms of the GNU Library General Public
--    License as published by the Free Software Foundation; either
--    version 2 of the License, or (at your option) any later version.
--
--    This library is distributed in the hope that it will be useful,
--    but WITHOUT ANY WARRANTY; without even the implied warranty of
--    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
--    Library General Public License for more details.
--
--    You should have received a copy of the GNU Library General Public
--    License along with this library; if not, write to the Free Software
--    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--
--Also add information on how to contact you by electronic and paper mail.
--
--You should also get your employer (if you work as a programmer) or your
--school, if any, to sign a "copyright disclaimer" for the library, if
--necessary.  Here is a sample; alter the names:
--
--  Yoyodyne, Inc., hereby disclaims all copyright interest in the
--  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
--
--  <signature of Ty Coon>, 1 April 1990
--  Ty Coon, President of Vice
--
--That's all there is to it!
---- a/src/uuid/clear.c
-+++ /dev/null
-@@ -1,19 +0,0 @@
--/*
-- * clear.c -- Clear a UUID
-- * 
-- * Copyright (C) 1996, 1997 Theodore Ts'o.
-- *
-- * %Begin-Header%
-- * This file may be redistributed under the terms of the GNU 
-- * Library General Public License.
-- * %End-Header%
-- */
--
--#include "string.h"
--
--#include "uuidP.h"
--
--void uuid_clear(uuid_t uu)
--{
--	memset(uu, 0, 16);
--}
---- a/src/uuid/compare.c
-+++ /dev/null
-@@ -1,31 +0,0 @@
--/*
-- * compare.c --- compare whether or not two UUID's are the same
-- *
-- * Returns 0 if the two UUID's are different, and 1 if they are the same.
-- * 
-- * Copyright (C) 1996, 1997 Theodore Ts'o.
-- *
-- * %Begin-Header%
-- * This file may be redistributed under the terms of the GNU 
-- * Library General Public License.
-- * %End-Header%
-- */
--
--#include "uuidP.h"
--#include <string.h>
--
--#define UUCMP(u1,u2) if (u1 != u2) return((u1 < u2) ? -1 : 1);
--
--int uuid_compare(const uuid_t uu1, const uuid_t uu2)
--{
--	struct uuid	uuid1, uuid2;
--
--	uuid_unpack2(uu1, &uuid1);
--	uuid_unpack2(uu2, &uuid2);
--
--	UUCMP(uuid1.time_low, uuid2.time_low);
--	UUCMP(uuid1.time_mid, uuid2.time_mid);
--	UUCMP(uuid1.time_hi_and_version, uuid2.time_hi_and_version);
--	UUCMP(uuid1.clock_seq, uuid2.clock_seq);
--	return memcmp(uuid1.node, uuid2.node, 6);
--}
---- a/src/uuid/copy.c
-+++ /dev/null
-@@ -1,22 +0,0 @@
--/*
-- * copy.c --- copy UUIDs
-- * 
-- * Copyright (C) 1996, 1997 Theodore Ts'o.
-- *
-- * %Begin-Header%
-- * This file may be redistributed under the terms of the GNU 
-- * Library General Public License.
-- * %End-Header%
-- */
--
--#include "uuidP.h"
--
--void uuid_copy(uuid_t dst, const uuid_t src)
--{
--	unsigned char		*cp1;
--	const unsigned char	*cp2;
--	int			i;
--
--	for (i=0, cp1 = dst, cp2 = src; i < 16; i++)
--		*cp1++ = *cp2++;
--}
---- a/src/uuid/gen_uuid.c
-+++ /dev/null
-@@ -1,283 +0,0 @@
--/*
-- * gen_uuid.c --- generate a DCE-compatible uuid
-- *
-- * Copyright (C) 1996, 1997, 1998, 1999 Theodore Ts'o.
-- *
-- * %Begin-Header%
-- * This file may be redistributed under the terms of the GNU 
-- * Library General Public License.
-- * %End-Header%
-- */
--
--/*
-- * Force inclusion of SVID stuff since we need it if we're compiling in
-- * gcc-wall wall mode
-- */
--#define _SVID_SOURCE
--
--#include "autoconfig.h"
--
--#ifdef HAVE_UNISTD_H
--#include <unistd.h>
--#endif
--#ifdef HAVE_STDLIB_H
--#include <stdlib.h>
--#endif
--#include <string.h>
--#include <fcntl.h>
--#include <errno.h>
--#include <sys/types.h>
--#include <sys/time.h>
--#include <sys/stat.h>
--#include <sys/file.h>
--#ifdef HAVE_SYS_IOCTL_H
--#include <sys/ioctl.h>
--#endif
--#ifdef HAVE_SYS_SOCKET_H
--#include <sys/socket.h>
--#endif
--#ifdef HAVE_SYS_SOCKIO_H
--#include <sys/sockio.h>
--#endif
--#ifdef HAVE_NET_IF_H
--#include <net/if.h>
--#endif
--#ifdef HAVE_NETINET_IN_H
--#include <netinet/in.h>
--#endif
--
--#include "uuidP.h"
--
--#ifdef HAVE_SRANDOM
--#define srand(x) 	srandom(x)
--#define rand() 		random()
--#endif
--
--static int get_random_fd(void)
--{
--	struct timeval	tv;
--	static int	fd = -2;
--	int		i;
--
--	if (fd == -2) {
--		gettimeofday(&tv, 0);
--		fd = open("/dev/urandom", O_RDONLY);
--		if (fd == -1)
--			fd = open("/dev/random", O_RDONLY);
--			//fd = open("/dev/random", O_RDONLY | O_NONBLOCK);
--		srand((getpid() << 16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec);
--	}
--	/* Crank the random number generator a few times */
--	gettimeofday(&tv, 0);
--	for (i = (tv.tv_sec ^ tv.tv_usec) & 0x1F; i > 0; i--)
--		rand();
--	return fd;
--}
--
--
--/*
-- * Generate a series of random bytes.  Use /dev/urandom if possible,
-- * and if not, use srandom/random.
-- */
--static void get_random_bytes(void *buf, int nbytes)
--{
--	int i, n = nbytes, fd = get_random_fd();
--	int lose_counter = 0;
--	unsigned char *cp = (unsigned char *) buf;
--
--	if (fd >= 0) {
--		while (n > 0) {
--			i = read(fd, cp, n);
--			if (i <= 0) {
--				if (lose_counter++ > 16)
--					break;
--				continue;
--			}
--			n -= i;
--			cp += i;
--			lose_counter = 0;
--		}
--	}
--	
--	/*
--	 * We do this all the time, but this is the only source of
--	 * randomness if /dev/random/urandom is out to lunch.
--	 */
--	for (cp = buf, i = 0; i < nbytes; i++)
--		*cp++ ^= (rand() >> 7) & 0xFF;
--	return;
--}
--
--/*
-- * Get the ethernet hardware address, if we can find it...
-- */
--static int get_node_id(unsigned char *node_id)
--{
--#ifdef HAVE_NET_IF_H
--	int 		sd;
--	struct ifreq 	ifr, *ifrp;
--	struct ifconf 	ifc;
--	char buf[1024];
--	int		n, i;
--	unsigned char 	*a;
--	
--/*
-- * BSD 4.4 defines the size of an ifreq to be
-- * max(sizeof(ifreq), sizeof(ifreq.ifr_name)+ifreq.ifr_addr.sa_len
-- * However, under earlier systems, sa_len isn't present, so the size is 
-- * just sizeof(struct ifreq)
-- */
--#ifdef HAVE_SA_LEN
--#ifndef max
--#define max(a,b) ((a) > (b) ? (a) : (b))
--#endif
--#define ifreq_size(i) max(sizeof(struct ifreq),\
--     sizeof((i).ifr_name)+(i).ifr_addr.sa_len)
--#else
--#define ifreq_size(i) sizeof(struct ifreq)
--#endif /* HAVE_SA_LEN*/
--
--	sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
--	if (sd < 0) {
--		return -1;
--	}
--	memset(buf, 0, sizeof(buf));
--	ifc.ifc_len = sizeof(buf);
--	ifc.ifc_buf = buf;
--	if (ioctl (sd, SIOCGIFCONF, (char *)&ifc) < 0) {
--		close(sd);
--		return -1;
--	}
--	n = ifc.ifc_len;
--	for (i = 0; i < n; i+= ifreq_size(*ifr) ) {
--		ifrp = (struct ifreq *)((char *) ifc.ifc_buf+i);
--		strncpy(ifr.ifr_name, ifrp->ifr_name, IFNAMSIZ);
--#ifdef SIOCGIFHWADDR
--		if (ioctl(sd, SIOCGIFHWADDR, &ifr) < 0)
--			continue;
--		a = (unsigned char *) &ifr.ifr_hwaddr.sa_data;
--#else
--#ifdef SIOCGENADDR
--		if (ioctl(sd, SIOCGENADDR, &ifr) < 0)
--			continue;
--		a = (unsigned char *) ifr.ifr_enaddr;
--#else
--		/*
--		 * XXX we don't have a way of getting the hardware
--		 * address
--		 */
--		close(sd);
--		return 0;
--#endif /* SIOCGENADDR */
--#endif /* SIOCGIFHWADDR */
--		if (!a[0] && !a[1] && !a[2] && !a[3] && !a[4] && !a[5])
--			continue;
--		if (node_id) {
--			memcpy(node_id, a, 6);
--			close(sd);
--			return 1;
--		}
--	}
--	close(sd);
--#endif
--	return 0;
--}
--
--/* Assume that the gettimeofday() has microsecond granularity */
--#define MAX_ADJUSTMENT 10
--
--static int get_clock(__u32 *clock_high, __u32 *clock_low, __u16 *ret_clock_seq)
--{
--	static int			adjustment = 0;
--	static struct timeval		last = {0, 0};
--	static __u16			clock_seq;
--	struct timeval 			tv;
--	unsigned long long		clock_reg;
--	
--try_again:
--	gettimeofday(&tv, 0);
--	if ((last.tv_sec == 0) && (last.tv_usec == 0)) {
--		get_random_bytes(&clock_seq, sizeof(clock_seq));
--		clock_seq &= 0x1FFF;
--		last = tv;
--		last.tv_sec--;
--	}
--	if ((tv.tv_sec < last.tv_sec) ||
--	    ((tv.tv_sec == last.tv_sec) &&
--	     (tv.tv_usec < last.tv_usec))) {
--		clock_seq = (clock_seq+1) & 0x1FFF;
--		adjustment = 0;
--		last = tv;
--	} else if ((tv.tv_sec == last.tv_sec) &&
--	    (tv.tv_usec == last.tv_usec)) {
--		if (adjustment >= MAX_ADJUSTMENT)
--			goto try_again;
--		adjustment++;
--	} else {
--		adjustment = 0;
--		last = tv;
--	}
--		
--	clock_reg = tv.tv_usec*10 + adjustment;
--	clock_reg += ((unsigned long long) tv.tv_sec)*10000000;
--	clock_reg += (((unsigned long long) 0x01B21DD2) << 32) + 0x13814000;
--
--	*clock_high = clock_reg >> 32;
--	*clock_low = clock_reg;
--	*ret_clock_seq = clock_seq;
--	return 0;
--}
--
--void uuid_generate_time(uuid_t out)
--{
--	static unsigned char node_id[6];
--	static int has_init = 0;
--	struct uuid uu;
--	__u32	clock_mid;
--
--	if (!has_init) {
--		if (get_node_id(node_id) <= 0) {
--			get_random_bytes(node_id, 6);
--			/*
--			 * Set multicast bit, to prevent conflicts
--			 * with IEEE 802 addresses obtained from
--			 * network cards
--			 */
--			node_id[0] |= 0x01;
--		}
--		has_init = 1;
--	}
--	get_clock(&clock_mid, &uu.time_low, &uu.clock_seq);
--	uu.clock_seq |= 0x8000;
--	uu.time_mid = (__u16) clock_mid;
--	uu.time_hi_and_version = (clock_mid >> 16) | 0x1000;
--	memcpy(uu.node, node_id, 6);
--	uuid_pack2(&uu, out);
--}
--
--void uuid_generate_random(uuid_t out)
--{
--	uuid_t	buf;
--	struct uuid uu;
--
--	get_random_bytes(buf, sizeof(buf));
--	uuid_unpack2(buf, &uu);
--
--	uu.clock_seq = (uu.clock_seq & 0x3FFF) | 0x8000;
--	uu.time_hi_and_version = (uu.time_hi_and_version & 0x0FFF) | 0x4000;
--	uuid_pack2(&uu, out);
--}
--
--/*
-- * This is the generic front-end to uuid_generate_random and
-- * uuid_generate_time.  It uses uuid_generate_random only if
-- * /dev/urandom is available, since otherwise we won't have
-- * high-quality randomness.
-- */
--void uuid_generate(uuid_t out)
--{
--	if (get_random_fd() >= 0)
--		uuid_generate_random(out);
--	else
--		uuid_generate_time(out);
--}
---- a/src/uuid/isnull.c
-+++ /dev/null
-@@ -1,24 +0,0 @@
--/*
-- * isnull.c --- Check whether or not the UUID is null
-- * 
-- * Copyright (C) 1996, 1997 Theodore Ts'o.
-- *
-- * %Begin-Header%
-- * This file may be redistributed under the terms of the GNU 
-- * Library General Public License.
-- * %End-Header%
-- */
--
--#include "uuidP.h"
--
--/* Returns 1 if the uuid is the NULL uuid */
--int uuid_is_null(const uuid_t uu)
--{
--	const unsigned char 	*cp;
--	int			i;
--
--	for (i=0, cp = uu; i < 16; i++)
--		if (*cp++)
--			return 0;
--	return 1;
--}
---- a/src/uuid/pack.c
-+++ /dev/null
-@@ -1,45 +0,0 @@
--/*
-- * Internal routine for packing UUID's
-- * 
-- * Copyright (C) 1996, 1997 Theodore Ts'o.
-- *
-- * %Begin-Header%
-- * This file may be redistributed under the terms of the GNU 
-- * Library General Public License.
-- * %End-Header%
-- */
--
--#include <string.h>
--#include "uuidP.h"
--
--void uuid_pack2(const struct uuid *uu, uuid_t ptr)
--{
--	__u32	tmp;
--	unsigned char	*out = ptr;
--
--	tmp = uu->time_low;
--	out[3] = (unsigned char) tmp;
--	tmp >>= 8;
--	out[2] = (unsigned char) tmp;
--	tmp >>= 8;
--	out[1] = (unsigned char) tmp;
--	tmp >>= 8;
--	out[0] = (unsigned char) tmp;
--	
--	tmp = uu->time_mid;
--	out[5] = (unsigned char) tmp;
--	tmp >>= 8;
--	out[4] = (unsigned char) tmp;
--
--	tmp = uu->time_hi_and_version;
--	out[7] = (unsigned char) tmp;
--	tmp >>= 8;
--	out[6] = (unsigned char) tmp;
--
--	tmp = uu->clock_seq;
--	out[9] = (unsigned char) tmp;
--	tmp >>= 8;
--	out[8] = (unsigned char) tmp;
--
--	memcpy(out+10, uu->node, 6);
--}
---- a/src/uuid/parse.c
-+++ /dev/null
-@@ -1,56 +0,0 @@
--/*
-- * parse.c --- UUID parsing
-- * 
-- * Copyright (C) 1996, 1997 Theodore Ts'o.
-- *
-- * %Begin-Header%
-- * This file may be redistributed under the terms of the GNU 
-- * Library General Public License.
-- * %End-Header%
-- */
--
--#include <stdlib.h>
--#include <stdio.h>
--#include <ctype.h>
--#include <string.h>
--
--#include "uuidP.h"
--
--int uuid_parse(const char *in, uuid_t uu)
--{
--	struct uuid	uuid;
--	int 		i;
--	const char	*cp;
--	char		buf[3];
--
--	if (strlen(in) != 36)
--		return -1;
--	for (i=0, cp = in; i <= 36; i++,cp++) {
--		if ((i == 8) || (i == 13) || (i == 18) ||
--		    (i == 23)) {
--			if (*cp == '-')
--				continue;
--			else
--				return -1;
--		}
--		if (i== 36)
--			if (*cp == 0)
--				continue;
--		if (!isxdigit(*cp))
--			return -1;
--	}
--	uuid.time_low = strtoul(in, NULL, 16);
--	uuid.time_mid = strtoul(in+9, NULL, 16);
--	uuid.time_hi_and_version = strtoul(in+14, NULL, 16);
--	uuid.clock_seq = strtoul(in+19, NULL, 16);
--	cp = in+24;
--	buf[2] = 0;
--	for (i=0; i < 6; i++) {
--		buf[0] = *cp++;
--		buf[1] = *cp++;
--		uuid.node[i] = strtoul(buf, NULL, 16);
--	}
--	
--	uuid_pack2(&uuid, uu);
--	return 0;
--}
---- a/src/uuid/unpack.c
-+++ /dev/null
-@@ -1,39 +0,0 @@
--/*
-- * Internal routine for unpacking UUID
-- * 
-- * Copyright (C) 1996, 1997 Theodore Ts'o.
-- *
-- * %Begin-Header%
-- * This file may be redistributed under the terms of the GNU 
-- * Library General Public License.
-- * %End-Header%
-- */
--
--#include <string.h>
--#include "uuidP.h"
--
--void uuid_unpack2(const uuid_t in, struct uuid *uu)
--{
--	const __u8	*ptr = in;
--	__u32		tmp;
--
--	tmp = *ptr++;
--	tmp = (tmp << 8) | *ptr++;
--	tmp = (tmp << 8) | *ptr++;
--	tmp = (tmp << 8) | *ptr++;
--	uu->time_low = tmp;
--
--	tmp = *ptr++;
--	tmp = (tmp << 8) | *ptr++;
--	uu->time_mid = tmp;
--	
--	tmp = *ptr++;
--	tmp = (tmp << 8) | *ptr++;
--	uu->time_hi_and_version = tmp;
--
--	tmp = *ptr++;
--	tmp = (tmp << 8) | *ptr++;
--	uu->clock_seq = tmp;
--
--	memcpy(uu->node, ptr, 6);
--}
---- a/src/uuid/unparse.c
-+++ /dev/null
-@@ -1,27 +0,0 @@
--/*
-- * unparse.c -- convert a UUID to string
-- * 
-- * Copyright (C) 1996, 1997 Theodore Ts'o.
-- *
-- * %Begin-Header%
-- * This file may be redistributed under the terms of the GNU 
-- * Library General Public License.
-- * %End-Header%
-- */
--
--#include <stdio.h>
--
--#include "uuidP.h"
--
--void uuid_unparse(const uuid_t uu, char *out)
--{
--	struct uuid uuid;
--
--	uuid_unpack2(uu, &uuid);
--	sprintf(out,
--		"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
--		uuid.time_low, uuid.time_mid, uuid.time_hi_and_version,
--		uuid.clock_seq >> 8, uuid.clock_seq & 0xFF,
--		uuid.node[0], uuid.node[1], uuid.node[2],
--		uuid.node[3], uuid.node[4], uuid.node[5]);
--}
---- a/src/uuid/uuid.h
-+++ /dev/null
-@@ -1,63 +0,0 @@
--/*
-- * Public include file for the UUID library
-- * 
-- * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
-- *
-- * %Begin-Header%
-- * This file may be redistributed under the terms of the GNU 
-- * Library General Public License.
-- * %End-Header%
-- */
--
--#ifndef _UUID_UUID_H
--#define _UUID_UUID_H
--
--#include <sys/types.h>
--#include <sys/time.h>
--#include <time.h>
--
--typedef unsigned char uuid_t[16];
--
--/* UUID Variant definitions */
--#define UUID_VARIANT_NCS 	0
--#define UUID_VARIANT_DCE 	1
--#define UUID_VARIANT_MICROSOFT	2
--#define UUID_VARIANT_OTHER	3
--
--#ifdef __cplusplus
--extern "C" {
--#endif
--
--/* clear.c */
--void uuid_clear(uuid_t uu);
--
--/* compare.c */
--int uuid_compare(const uuid_t uu1, const uuid_t uu2);
--
--/* copy.c */
--void uuid_copy(uuid_t dst, const uuid_t src);
--
--/* gen_uuid.c */
--void uuid_generate(uuid_t out);
--void uuid_generate_random(uuid_t out);
--void uuid_generate_time(uuid_t out);
--
--/* isnull.c */
--int uuid_is_null(const uuid_t uu);
--
--/* parse.c */
--int uuid_parse(const char *in, uuid_t uu);
--
--/* unparse.c */
--void uuid_unparse(const uuid_t uu, char *out);
--
--/* uuid_time.c */
--time_t uuid_time(const uuid_t uu, struct timeval *ret_tv);
--int uuid_type(const uuid_t uu);
--int uuid_variant(const uuid_t uu);
--
--#ifdef __cplusplus
--}
--#endif
--
--#endif /* _UUID_UUID_H */
---- a/src/uuid/uuidP.h
-+++ /dev/null
-@@ -1,36 +0,0 @@
--/*
-- * uuid.h -- private header file for uuids
-- * 
-- * Copyright (C) 1996, 1997 Theodore Ts'o.
-- *
-- * %Begin-Header%
-- * This file may be redistributed under the terms of the GNU 
-- * Library General Public License.
-- * %End-Header%
-- */
--
--#include <sys/types.h>
--#include "uuid_types.h"
--
--#include "uuid.h"
--
--/*
-- * Offset between 15-Oct-1582 and 1-Jan-70
-- */
--#define TIME_OFFSET_HIGH 0x01B21DD2
--#define TIME_OFFSET_LOW  0x13814000
--
--struct uuid {
--	__u32	time_low;
--	__u16	time_mid;
--	__u16	time_hi_and_version;
--	__u16	clock_seq;
--	__u8	node[6];
--};
--
--
--/*
-- * prototypes
-- */
--void uuid_pack2(const struct uuid *uu, uuid_t ptr);
--void uuid_unpack2(const uuid_t in, struct uuid *uu);
---- a/src/uuid/uuid_time.c
-+++ /dev/null
-@@ -1,138 +0,0 @@
--/*
-- * uuid_time.c --- Interpret the time field from a uuid.  This program
-- * 	violates the UUID abstraction barrier by reaching into the guts
-- *	of a UUID and interpreting it.
-- * 
-- * Copyright (C) 1998, 1999 Theodore Ts'o.
-- *
-- * %Begin-Header%
-- * This file may be redistributed under the terms of the GNU 
-- * Library General Public License.
-- * %End-Header%
-- */
--
--#include <stdio.h>
--#include <unistd.h>
--#include <stdlib.h>
--#include <sys/types.h>
--#include <sys/time.h>
--#include <time.h>
--
--#include "uuidP.h"
--
--time_t uuid_time(const uuid_t uu, struct timeval *ret_tv)
--{
--	struct uuid		uuid;
--	__u32			high;
--	struct timeval		tv;
--	unsigned long long	clock_reg;
--
--	uuid_unpack2(uu, &uuid);
--	
--	high = uuid.time_mid | ((uuid.time_hi_and_version & 0xFFF) << 16);
--	clock_reg = uuid.time_low | ((unsigned long long) high << 32);
--
--	clock_reg -= (((unsigned long long) 0x01B21DD2) << 32) + 0x13814000;
--	tv.tv_sec = clock_reg / 10000000;
--	tv.tv_usec = (clock_reg % 10000000) / 10;
--
--	if (ret_tv)
--		*ret_tv = tv;
--
--	return tv.tv_sec;
--}
--
--int uuid_type(const uuid_t uu)
--{
--	struct uuid		uuid;
--
--	uuid_unpack2(uu, &uuid);	
--	return ((uuid.time_hi_and_version >> 12) & 0xF);
--}
--
--int uuid_variant(const uuid_t uu)
--{
--	struct uuid		uuid;
--	int			var;
--
--	uuid_unpack2(uu, &uuid);	
--	var = uuid.clock_seq;
--
--	if ((var & 0x8000) == 0)
--		return UUID_VARIANT_NCS;
--	if ((var & 0x4000) == 0)
--		return UUID_VARIANT_DCE;
--	if ((var & 0x2000) == 0)
--		return UUID_VARIANT_MICROSOFT;
--	return UUID_VARIANT_OTHER;
--}
--
--#ifdef DEBUG
--static const char *variant_string(int variant)
--{
--	switch (variant) {
--	case UUID_VARIANT_NCS:
--		return "NCS";
--	case UUID_VARIANT_DCE:
--		return "DCE";
--	case UUID_VARIANT_MICROSOFT:
--		return "Microsoft";
--	default:
--		return "Other";
--	}
--}
--
--	
--int
--main(int argc, char **argv)
--{
--	uuid_t		buf;
--	time_t		time_reg;
--	struct timeval	tv;
--	int		type, variant;
--
--	if (argc != 2) {
--		fprintf(stderr, "Usage: %s uuid\n", argv[0]);
--		exit(1);
--	}
--	if (uuid_parse(argv[1], buf)) {
--		fprintf(stderr, "Invalid UUID: %s\n", argv[1]);
--		exit(1);
--	}
--	variant = uuid_variant(buf);
--	type = uuid_type(buf);
--	time_reg = uuid_time(buf, &tv);
--
--	printf("UUID variant is %d (%s)\n", variant, variant_string(variant));
--	if (variant != UUID_VARIANT_DCE) {
--		printf("Warning: This program only knows how to interpret "
--		       "DCE UUIDs.\n\tThe rest of the output is likely "
--		       "to be incorrect!!\n");
--	}
--	printf("UUID type is %d", type);
--	switch (type) {
--	case 1:
--		printf(" (time based)\n");
--		break;
--	case 2:
--		printf(" (DCE)\n");
--		break;
--	case 3:
--		printf(" (name-based)\n");
--		break;
--	case 4:
--		printf(" (random)\n");
--		break;
--	default:
--		printf("\n");
--	}
--	if (type != 1) {
--		printf("Warning: not a time-based UUID, so UUID time "
--		       "decoding will likely not work!\n");
--	}
--	printf("UUID time is: (%ld, %ld): %s\n", tv.tv_sec, tv.tv_usec,
--	       ctime(&time_reg));
--	
--	return 0;
--}
--#endif
---- a/src/uuid/uuid_types.h
-+++ /dev/null
-@@ -1,51 +0,0 @@
--/* 
-- * If linux/types.h is already been included, assume it has defined
-- * everything we need.  (cross fingers)  Other header files may have 
-- * also defined the types that we need.
-- */
--#if (!defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \
--	!defined(_UUID_TYPES) && !defined(_EXT2_TYPES_H))
--#define _UUID_TYPES_H
--
--typedef unsigned char __u8;
--typedef signed char __s8;
--
--#if (4 == 8)
--typedef int		__s64;
--typedef unsigned int	__u64;
--#elif (4 == 8)
--typedef long		__s64;
--typedef unsigned long	__u64;
--#elif (8 == 8)
--#if defined(__GNUC__)
--typedef __signed__ long long 	__s64;
--#else
--typedef signed long long 	__s64;
--#endif
--typedef unsigned long long	__u64;
--#endif
--
--#if (4 == 2)
--typedef	int		__s16;
--typedef	unsigned int	__u16;
--#elif (2 == 2)
--typedef	short		__s16;
--typedef	unsigned short	__u16;
--#else
--  ?==error: undefined 16 bit type
--#endif
--
--#if (4 == 4)
--typedef	int		__s32;
--typedef	unsigned int	__u32;
--#elif (4 == 4)
--typedef	long		__s32;
--typedef	unsigned long	__u32;
--#elif (2 == 4)
--typedef	short		__s32;
--typedef	unsigned short	__u32;
--#else
-- ?== error: undefined 32 bit type
--#endif
--
--#endif /* _*_TYPES_H */
diff --git a/debian/patches/0006a_fix_libmp4v2_build.patch b/debian/patches/0006a_fix_libmp4v2_build.patch
deleted file mode 100644
index 71be00a..0000000
--- a/debian/patches/0006a_fix_libmp4v2_build.patch
+++ /dev/null
@@ -1,190 +0,0 @@
-Description: Fix build against libmp4v2.
-Author: Peter Asplund
-Forwarded: yes, http://sourceforge.net/p/mediatomb/patches/35/
-Bug-Debian: http://bugs.debian.org/677958
-
---- a/src/metadata/libmp4v2_handler.cc
-+++ b/src/metadata/libmp4v2_handler.cc
-@@ -65,29 +65,28 @@
- static void addMetaField(metadata_fields_t field, MP4FileHandle mp4, Ref<CdsItem> item)
- {
-     String value;
--    char*  mp4_retval = NULL;
--    u_int16_t track;
--    u_int16_t total_tracks;
-- 
-     Ref<StringConverter> sc = StringConverter::i2i();
-     
-+    const MP4Tags* new_tags = MP4TagsAlloc();
-+
-+    if (!MP4TagsFetch(new_tags, mp4))
-+        return;
-+
-     switch (field)
-     {
-         case M_TITLE:
--            MP4GetMetadataName(mp4, &mp4_retval);
-+            value = new_tags->name;
-             break;
-         case M_ARTIST:
--            MP4GetMetadataArtist(mp4, &mp4_retval);
-+            value = new_tags->artist;
-             break;
-         case M_ALBUM:
--            MP4GetMetadataAlbum(mp4, &mp4_retval);
-+            value = new_tags->album;
-             break;
-         case M_DATE:
--            MP4GetMetadataYear(mp4, &mp4_retval);
--            if (mp4_retval)
-+            value = new_tags->releaseDate;
-+            if (value.length() > 0)
-             {
--                value = mp4_retval;
--                free(mp4_retval);
-                 if (string_ok(value))
-                     value = value + "-01-01";
-                 else
-@@ -95,34 +94,31 @@
-             }
-             break;
-         case M_GENRE:
--            MP4GetMetadataGenre(mp4, &mp4_retval);
-+            value = new_tags->genre;
-             break;
-         case M_DESCRIPTION:
--            MP4GetMetadataComment(mp4, &mp4_retval);
-+            value = new_tags->comments;
-             break;
-         case M_TRACKNUMBER:
--            MP4GetMetadataTrack(mp4, &track, &total_tracks);
--            if (track > 0)
-+            if (new_tags->track)
-             {
--                value = String::from(track);
--                item->setTrackNumber((int)track);
-+                value = String::from(new_tags->track->index);
-+                item->setTrackNumber((int)new_tags->track->index);
-             }
-             else
-+			{
-+			    MP4TagsFree( new_tags );
-                 return;
-+            }
-             break;
-         default:
-+			MP4TagsFree( new_tags );
-             return;
-     }
- 
--    if ((field != M_DATE) && (field != M_TRACKNUMBER) && 
--        (mp4_retval))
--    {
--        value = mp4_retval;
--        free(mp4_retval);
--    }
--    
-+	MP4TagsFree( new_tags );
-     value = trim_string(value);
--    
-+
-     if (string_ok(value))
-     {
-         item->setMetadata(MT_KEYS[field].upnp, sc->convert(value));
-@@ -190,14 +186,19 @@
-         }
- 
- #if defined(HAVE_MAGIC)
--        u_int8_t *art_data;
--        u_int32_t art_data_len;
-+        void *art_data = 0;
-+        u_int32_t art_data_len = 0;
-         String art_mimetype;
-+
-+        const MP4Tags* new_tags = MP4TagsAlloc();
-+        MP4TagsFetch(new_tags, mp4);
-+        if (new_tags->artworkCount)
-+        {
-+            art_data = new_tags->artwork->data;
-+            art_data_len = new_tags->artwork->size;
-+        }
- #ifdef HAVE_MP4_GET_METADATA_COVER_ART_COUNT
--        if (MP4GetMetadataCoverArtCount(mp4) && 
--            MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len))
--#else
--            MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len);
-+        if (new_tags->artworkCount && art_data_len > 0) 
- #endif
-         {
-             if (art_data)
-@@ -211,11 +212,10 @@
-                 }
-                 catch (Exception ex)
-                 {
--                    free(art_data);
-+                    MP4TagsFree(new_tags);
-                     throw ex;
-                 }
- 
--                free(art_data);
-                 if (art_mimetype != _(MIMETYPE_DEFAULT))
-                 {
-                     Ref<CdsResource> resource(new CdsResource(CH_MP4));
-@@ -225,6 +225,7 @@
-                 }
-             }
-         }
-+        MP4TagsFree(new_tags);
- #endif
-         MP4Close(mp4);
-     }
-@@ -249,26 +250,35 @@
- 
-     if (ctype != ID3_ALBUM_ART)
-         throw _Exception(_("LibMP4V2Handler: got unknown content type: ") + ctype);
-+
-+    const MP4Tags* new_tags = MP4TagsAlloc();
-+    if (MP4TagsFetch(new_tags, mp4))
-+    {
- #ifdef HAVE_MP4_GET_METADATA_COVER_ART_COUNT
--    if (!MP4GetMetadataCoverArtCount(mp4))
--        throw _Exception(_("LibMP4V2Handler: resource has no album art information"));
-+        if (!new_tags->artworkCount)
-+            throw _Exception(_("LibMP4V2Handler: resource has no album art information"));
- #endif
--    u_int8_t *art_data;
--    u_int32_t art_data_len;
--    if (MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len))
--    {
--        if (art_data)
-+        void *art_data = 0;
-+        u_int32_t art_data_len;
-+
-+        const MP4TagArtwork* art = new_tags->artwork;
-+        art_data = art->data;
-+        art_data_len = art->size;
-+        if (art)
-         {
--            *data_size = (off_t)art_data_len;
--            Ref<IOHandler> h(new MemIOHandler((void *)art_data, art_data_len));
--            free(art_data);
--            return h;
-+            if (art_data)
-+            {
-+                *data_size = (off_t)art_data_len;
-+                Ref<IOHandler> h(new MemIOHandler(art_data, art_data_len));
-+                MP4TagsFree(new_tags);
-+                return h;
-+            }
-         }
-+        MP4TagsFree(new_tags);
-     }
--        
-     throw _Exception(_("LibMP4V2Handler: could not serve album art "
--                           "for file") + item->getLocation() + 
--                           " - embedded image not found");
-+            "for file") + item->getLocation() + 
-+        " - embedded image not found");
- }
- 
- #endif // HAVE_LIBMP4V2
diff --git a/debian/patches/0006b_libmp4v2_configure.patch b/debian/patches/0006b_libmp4v2_configure.patch
deleted file mode 100644
index ff3fc0d..0000000
--- a/debian/patches/0006b_libmp4v2_configure.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-Description: Revert "Extra configure check for libmp4v2 compatibili ty"
- This reverts upstream commit bed8f03202336fc7863ec6a39e130473f59061c6.
- "We do not support the newer libmpv2 version yet, so don't error out when
-    compiling, catch it in configure."
- .
- Patch 0006a_fix_libmp4v2_build.patch adds supports for newer libmp4v2 and this
- commit just adds an error.
-Author: Miguel A. Colón Vélez <debian.micove at gmail.com>
-Forwarded: not-needed
-Last-Update: 2014-11-30
-
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -533,8 +533,7 @@
-         AC_MSG_ERROR([unable to configure $1 support])
-     fi
- 
--    if ((test "x$mt_[]translit($1, `/.-', `___')_status" = xyes) &&
--        (test "x$9" != "xundef")); then
-+    if test "x$mt_[]translit($1, `/.-', `___')_status" = xyes; then
-         AC_DEFINE(translit(HAVE_$1, `a-z/.-', `A-Z___'), [1], [$1 library presence])
-     fi
-     
---- a/configure.ac
-+++ b/configure.ac
-@@ -1428,7 +1428,7 @@
- 
- MT_CHECK_OPTIONAL_PACKAGE([libmp4v2], [disable],
-                  [libmp4v2 support for mp4 metadata extraction],
--                 [$MP4_HEADER], [mp4v2], [MP4Read], [], [], [undef]) 
-+                 [$MP4_HEADER], [mp4v2], [MP4Read]) 
- 
- if test "x$LIBMP4V2_STATUS" = xyes; then
-    CFLAGS="$CFLAGS $LIBMP4V2_CFLAGS"
-@@ -1437,37 +1437,6 @@
-    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(
-@@ -1506,10 +1475,7 @@
-             AC_MSG_RESULT([no])
-         ])
- 
--    AC_LANG_RESTORE
--    LDFLAGS="$LDFLAGS_SAVE"
--    CFLAGS="$CFLAGS_SAVE"
--    CXXFLAGS="$CXXFLAGS_SAVE"
-+   AC_LANG_RESTORE
- fi
- 
- ########## INOTIFY TOOLS
diff --git a/debian/patches/0007_fix_ffmpeg_metadata.patch b/debian/patches/0007_fix_ffmpeg_metadata.patch
deleted file mode 100644
index 1a12dca..0000000
--- a/debian/patches/0007_fix_ffmpeg_metadata.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-Description: properly parse the bitrate in bytes/second and the number of
- audio channels (not audio streams)
-Author: Marc Deslauriers <marc.deslauriers at canonical.com>
-Forwarded: yes, http://sourceforge.net/support/tracker.php?aid=3424145
-Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/mediatomb/+bug/875098
-
---- a/src/metadata/ffmpeg_handler.cc
-+++ b/src/metadata/ffmpeg_handler.cc
-@@ -175,9 +175,11 @@
- 	// bitrate
-     if (pFormatCtx->bit_rate > 0)  
-     {
-+        // ffmpeg's bit_rate is in bits/sec, upnp wants it in bytes/sec
-+        // See http://www.upnp.org/schemas/av/didl-lite-v3.xsd
-         log_debug("Added overall bitrate: %d kb/s\n", 
--                  pFormatCtx->bit_rate/1000);
--        item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_BITRATE), String::from(pFormatCtx->bit_rate/1000));
-+                  pFormatCtx->bit_rate/8);
-+        item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_BITRATE), String::from(pFormatCtx->bit_rate/8));
-     }
- 
- 	// video resolution, audio sampling rate, nr of audio channels
-@@ -216,30 +218,27 @@
-                 *x = st->codec->width;
-                 *y = st->codec->height;
- 			}
--		} 
--		if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO) 
-+		}
-+		if((st != NULL) && (audioset == false) && (st->codec->codec_type == AVMEDIA_TYPE_AUDIO))
-         {
--			// Increase number of audiochannels
--			audioch++;
--			// Get the sample rate
--			if ((audioset == false) && (st->codec->sample_rate > 0)) 
-+			// find the first stream that has a valid sample rate
-+			if (st->codec->sample_rate > 0)
-             {
- 				samplefreq = st->codec->sample_rate;
--			    if (samplefreq > 0) 
--                {
--		    	    log_debug("Added sample frequency: %d Hz\n", samplefreq);
--		        	item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_SAMPLEFREQUENCY), String::from(samplefreq));
--					audioset = true;
--    			}
-+	    	    log_debug("Added sample frequency: %d Hz\n", samplefreq);
-+	        	item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_SAMPLEFREQUENCY), String::from(samplefreq));
-+				audioset = true;
-+
-+				audioch = st->codec->channels;
-+			    if (audioch > 0) 
-+			    {
-+			        log_debug("Added number of audio channels: %d\n", audioch);
-+			        item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_NRAUDIOCHANNELS), String::from(audioch));
-+			    }
- 			}
- 		}
- 	}
- 
--    if (audioch > 0) 
--    {
--        log_debug("Added number of audio channels: %d\n", audioch);
--        item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_NRAUDIOCHANNELS), String::from(audioch));
--    }
- } // addFfmpegResourceFields
- 
- /*double time_to_double(struct timeval time) {
diff --git a/debian/patches/series b/debian/patches/series
index 9ce3160..cff7489 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,9 +1,2 @@
 0001_fix_spelling_errors.patch
-0002_debug_mode_fix.patch
-0003_config_xml_comment.patch
-0004_const_char_conversion.patch
-0005_use_system_libuuid.patch
-0006a_fix_libmp4v2_build.patch
-0006b_libmp4v2_configure.patch
-0007_fix_ffmpeg_metadata.patch
 0008_symlinks.patch

-- 
gerbera packaging



More information about the pkg-multimedia-commits mailing list