From 2c8e0aec27e5b9f6df1c410481a875f5219e22f6 Mon Sep 17 00:00:00 2001 From: iXô Date: Thu, 21 Jul 2011 20:45:23 +0200 Subject: libid3tag: add patches to correct memory leaks libid3tag has some serious memory leaks which are unlikely to be corrected upstream, since the original project hasn't updated since 2004. These Gentoo patches resolve the issues. Closes #6517. Signed-off-by: Misty De Meo --- Library/Formula/libid3tag.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'Library/Formula') diff --git a/Library/Formula/libid3tag.rb b/Library/Formula/libid3tag.rb index 79423b339..07c34b651 100644 --- a/Library/Formula/libid3tag.rb +++ b/Library/Formula/libid3tag.rb @@ -26,6 +26,28 @@ Cflags: -I${includedir} Formula.factory('mad').homepage end + # Fixes serious memory leaks; see https://bugs.launchpad.net/mixxx/+bug/403586 + def patches + base = "http://mirror.ovh.net/gentoo-portage/media-libs/libid3tag/files/0.15.1b/" + # patch for utf-16 (memory leaks) + { :p1 => ["libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch", + "libid3tag-0.15.1b-unknown-encoding.patch", + "libid3tag-0.15.1b-compat.patch", + "libid3tag-0.15.1b-file-write.patch", + ].map { |file_name| "#{base}/#{file_name}" }, + + # typedef for 64-bit long + buffer overflow + :p0 => ["libid3tag-0.15.1b-64bit-long.patch", + "libid3tag-0.15.1b-fix_overflow.patch", + "libid3tag-0.15.1b-tag.patch", + ].map { |file_name| "#{base}/#{file_name}" }, + + # corrects "a cappella" typo + :p2 => ["libid3tag-0.15.1b-a_capella.patch", + ].map { |file_name| "#{base}/#{file_name}" } + } + end + def install system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" system "make install" -- cgit v1.2.3