From befbf6bf13693f9a171da53a3fd124c8ae26c60f Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Sat, 22 Feb 2014 10:03:20 +0100
Subject: [PATCH] android/build.py: add libmad

---
 android/build.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/android/build.py b/android/build.py
index af7585e4e..6a9b89799 100755
--- a/android/build.py
+++ b/android/build.py
@@ -134,7 +134,7 @@ class Project:
         self.base = m.group(1)
 
         if name is None or version is None:
-            m = re.match(r'^([-\w]+)-(\d[\d.]*)$', self.base)
+            m = re.match(r'^([-\w]+)-(\d[\d.]*[a-z]?)$', self.base)
             if name is None: name = m.group(1)
             if version is None: version = m.group(2)
 
@@ -247,6 +247,14 @@ thirdparty_libs = [
         use_clang=True,
     ),
 
+    AutotoolsProject(
+        'ftp://ftp.mars.org/pub/mpeg/libmad-0.15.1b.tar.gz',
+        '1be543bc30c56fb6bea1d7bf6a64e66c',
+        'lib/libmad.a',
+        ['--disable-shared', '--enable-static'],
+        autogen=True,
+    ),
+
     AutotoolsProject(
         'http://curl.haxx.se/download/curl-7.35.0.tar.lzma',
         'ad7d63864414c61246450dc5e2248c7b',