From 5d411d5e70ecf04a07c67faa61c9dc4082c9b75d Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Sun, 6 Jul 2014 19:50:53 +0200 Subject: [PATCH] New package: id3lib-3.8.3 --- common/shlibs | 2 + srcpkgs/id3lib-devel | 1 + .../10-fix-compilation-with-cpp-headers.patch | 21 ++++++++++ srcpkgs/id3lib/patches/30-fix-utf16.patch | 38 +++++++++++++++++++ .../patches/50-remove-outdated-check.patch | 10 +++++ .../60-id3lib-missing-nullpointer-check.patch | 12 ++++++ .../patches/61-fix_vbr_stack_smash.patch | 19 ++++++++++ srcpkgs/id3lib/template | 30 +++++++++++++++ 8 files changed, 133 insertions(+) create mode 120000 srcpkgs/id3lib-devel create mode 100644 srcpkgs/id3lib/patches/10-fix-compilation-with-cpp-headers.patch create mode 100644 srcpkgs/id3lib/patches/30-fix-utf16.patch create mode 100644 srcpkgs/id3lib/patches/50-remove-outdated-check.patch create mode 100644 srcpkgs/id3lib/patches/60-id3lib-missing-nullpointer-check.patch create mode 100644 srcpkgs/id3lib/patches/61-fix_vbr_stack_smash.patch create mode 100644 srcpkgs/id3lib/template diff --git a/common/shlibs b/common/shlibs index 79c6f27144e..aee92dc9f07 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1666,3 +1666,5 @@ libxmlrpc_client.so.3 xmlrpc-c-1.25.28_1 libtelepathy-farstream.so.3 telepathy-farstream-0.6.0_6 libtidy-0.99.so.0 tidy-1.46_2 libnetpbm.so.11 libnetpbm-10.66.03_2 +libid3.so id3lib-3.8.3_1 +libid3-3.8.so.3 id3lib-3.8.3_1 diff --git a/srcpkgs/id3lib-devel b/srcpkgs/id3lib-devel new file mode 120000 index 00000000000..b45223f48f5 --- /dev/null +++ b/srcpkgs/id3lib-devel @@ -0,0 +1 @@ +id3lib \ No newline at end of file diff --git a/srcpkgs/id3lib/patches/10-fix-compilation-with-cpp-headers.patch b/srcpkgs/id3lib/patches/10-fix-compilation-with-cpp-headers.patch new file mode 100644 index 00000000000..01206eff4ba --- /dev/null +++ b/srcpkgs/id3lib/patches/10-fix-compilation-with-cpp-headers.patch @@ -0,0 +1,21 @@ +--- include/id3/id3lib_strings.h ++++ include/id3/id3lib_strings.h +@@ -30,6 +30,7 @@ + #define _ID3LIB_STRINGS_H_ + + #include ++#include + + #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000)) + namespace std +--- include/id3/writers.h ++++ include/id3/writers.h +@@ -30,7 +30,7 @@ + + #include "id3/writer.h" + #include "id3/id3lib_streams.h" +-//#include ++#include + + class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer + { diff --git a/srcpkgs/id3lib/patches/30-fix-utf16.patch b/srcpkgs/id3lib/patches/30-fix-utf16.patch new file mode 100644 index 00000000000..e484572f670 --- /dev/null +++ b/srcpkgs/id3lib/patches/30-fix-utf16.patch @@ -0,0 +1,38 @@ +Patch from 'Spoon' to fix issues with writing certain unicode characters +--- ChangeLog ++++ ChangeLog +@@ -1,3 +1,8 @@ ++2006-02-17 Jerome Couderc ++ ++ * Patch from Spoon to fix UTF-16 writing bug ++ http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979 ++ + 2003-03-02 Sunday 17:38 Thijmen Klok + + * THANKS (1.20): added more people +--- src/io_helpers.cpp ++++ src/io_helpers.cpp +@@ -363,11 +363,22 @@ + // Write the BOM: 0xFEFF + unicode_t BOM = 0xFEFF; + writer.writeChars((const unsigned char*) &BOM, 2); ++ // Patch from Spoon : 2004-08-25 14:17 ++ // http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979 ++ // Wrong code ++ //for (size_t i = 0; i < size; i += 2) ++ //{ ++ // unicode_t ch = (data[i] << 8) | data[i+1]; ++ // writer.writeChars((const unsigned char*) &ch, 2); ++ //} ++ // Right code ++ unsigned char *pdata = (unsigned char *) data.c_str(); + for (size_t i = 0; i < size; i += 2) + { +- unicode_t ch = (data[i] << 8) | data[i+1]; ++ unicode_t ch = (pdata[i] << 8) | pdata[i+1]; + writer.writeChars((const unsigned char*) &ch, 2); + } ++ // End patch + } + return writer.getCur() - beg; + } diff --git a/srcpkgs/id3lib/patches/50-remove-outdated-check.patch b/srcpkgs/id3lib/patches/50-remove-outdated-check.patch new file mode 100644 index 00000000000..ca85a656127 --- /dev/null +++ b/srcpkgs/id3lib/patches/50-remove-outdated-check.patch @@ -0,0 +1,10 @@ +--- configure.in ++++ configure.in +@@ -227,7 +227,6 @@ + ) + AC_CHECK_HEADERS( \ + string \ +- iomanip.h \ + ,,AC_MSG_ERROR([Missing a vital header file for id3lib]) + ) + diff --git a/srcpkgs/id3lib/patches/60-id3lib-missing-nullpointer-check.patch b/srcpkgs/id3lib/patches/60-id3lib-missing-nullpointer-check.patch new file mode 100644 index 00000000000..cdf93033476 --- /dev/null +++ b/srcpkgs/id3lib/patches/60-id3lib-missing-nullpointer-check.patch @@ -0,0 +1,12 @@ +This patch adds a check for a null pointer +--- src/header_tag.cpp ++++ src/header_tag.cpp +@@ -54,7 +54,7 @@ + { + size_t bytesUsed = ID3_TagHeader::SIZE; + +- if (_info->is_extended) ++ if (_info && _info->is_extended) + { + bytesUsed += _info->extended_bytes; + } diff --git a/srcpkgs/id3lib/patches/61-fix_vbr_stack_smash.patch b/srcpkgs/id3lib/patches/61-fix_vbr_stack_smash.patch new file mode 100644 index 00000000000..984a1f7324b --- /dev/null +++ b/srcpkgs/id3lib/patches/61-fix_vbr_stack_smash.patch @@ -0,0 +1,19 @@ +Description: Fix crashes when reading VBR MP3 file. +Bug-Ubuntu: https://launchpad.net/bugs/444466 +Origin: upstream, http://sourceforge.net/tracker/?func=detail&aid=937707&group_id=979&atid=300979 +Forwarded: yes +Author: Urs Fleisch + +Index: id3lib3.8.3-3.8.3/src/mp3_parse.cpp +=================================================================== +--- src/mp3_parse.cpp 2009-10-06 23:12:10.381250132 +0200 ++++ src/mp3_parse.cpp 2009-10-06 23:14:09.545252591 +0200 +@@ -465,7 +465,7 @@ + // from http://www.xingtech.com/developer/mp3/ + + const size_t VBR_HEADER_MIN_SIZE = 8; // "xing" + flags are fixed +- const size_t VBR_HEADER_MAX_SIZE = 116; // frames, bytes, toc and scale are optional ++ const size_t VBR_HEADER_MAX_SIZE = 120; // frames, bytes, toc and scale are optional + + if (mp3size >= vbr_header_offest + VBR_HEADER_MIN_SIZE) + { diff --git a/srcpkgs/id3lib/template b/srcpkgs/id3lib/template new file mode 100644 index 00000000000..c27ff4ca014 --- /dev/null +++ b/srcpkgs/id3lib/template @@ -0,0 +1,30 @@ +# Template file for 'id3lib' +pkgname=id3lib +version=3.8.3 +revision=1 +build_style=gnu-configure +hostmakedepends="libtool automake autoconf" +makedepends="zlib-devel" +depends="" +short_desc="Library for reading, writing, and manipulating ID3v1 and ID3v2 tags" +maintainer="Christian Neukirchen " +license="LGPL-3" +homepage="http://id3lib.sourceforge.net/" +distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname-$version.tar.gz" +checksum=2749cc3c0cd7280b299518b1ddf5a5bcfe2d1100614519b68702230e26c7d079 + +pre_configure() { + libtoolize -fc + aclocal + autoconf + automake --add-missing --copy +} + +id3lib-devel_package() { + depends="$makedepends ${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.a" + } +}