Skip to content

Commit

Permalink
libid3tag: use checksummed patches
Browse files Browse the repository at this point in the history
  • Loading branch information
jacknagel committed Mar 17, 2014
1 parent fe28046 commit d70e651
Showing 1 changed file with 29 additions and 20 deletions.
49 changes: 29 additions & 20 deletions Formula/libid3tag.rb
Expand Up @@ -12,26 +12,35 @@ class Libid3tag < Formula
sha1 "e77397115b59362892efc13fed00e1e8ba06097e" => :lion
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}" }
}
# patch for utf-16 (memory leaks), see https://bugs.launchpad.net/mixxx/+bug/403586
{
"utf16.patchlibid3tag-0.15.1b-utf16" => "daf621e8123530fdab5193099031074666fc7330",
"unknown-encoding" => "093def535edb3d2f5be6b173eedf0f93a1c0314c",
"compat" => "8c179b10bf49385e4334aab141e4cf270cb02182",
"file-write" => "b7baae1c87f90aac64a4d17725b2eaad521e42af",
}.each do |name, sha|
patch do
url "http://mirror.ovh.net/gentoo-portage/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-#{name}.patch"
sha1 sha
end
end

# typedef for 64-bit long + buffer overflow
{
"64bit-long" => "f9778590811a050384b9bf8827345b61999f0da3",
"fix_overflow" => "ed80bc74bd81caa225952f72a1a28d54300e43e3",
"tag" => "b7ef9a41a31a37b8bb6d8e064b0c0ba618d3fa03",
}.each do |name, sha|
patch :p0 do
url "http://mirror.ovh.net/gentoo-portage/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-#{name}.patch"
sha1 sha
end
end

# corrects "a cappella" typo
patch :p2 do
url "http://mirror.ovh.net/gentoo-portage/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-a_capella.patch"
sha1 "f4c4a728e7e36b6396c5b4d5841728b89e6f2fe7"
end

def install
Expand Down

0 comments on commit d70e651

Please sign in to comment.