diff options
author | Max Kellermann <max@duempel.org> | 2014-03-01 23:29:09 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-03-02 00:22:05 +0100 |
commit | 477877406a09eef1f71cea834bd62ea5610bc61f (patch) | |
tree | f841cb5deeb9f13c97da5729b2849e58903e7af8 /android | |
parent | 2bf2f34b1211bfde95ef4ada77147a8b65830084 (diff) | |
download | mpd-477877406a09eef1f71cea834bd62ea5610bc61f.tar.gz mpd-477877406a09eef1f71cea834bd62ea5610bc61f.tar.xz mpd-477877406a09eef1f71cea834bd62ea5610bc61f.zip |
android/build.py: enable ffmpeg
Diffstat (limited to '')
-rwxr-xr-x | android/build.py | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/android/build.py b/android/build.py index 31529dddc..59f433068 100755 --- a/android/build.py +++ b/android/build.py @@ -229,6 +229,40 @@ class AutotoolsProject(Project): subprocess.check_call(['/usr/bin/make', '--quiet', '-j12'], cwd=build) subprocess.check_call(['/usr/bin/make', '--quiet', 'install'], cwd=build) +class FfmpegProject(Project): + def __init__(self, url, md5, installed, configure_args=[], + autogen=False, + cppflags='', + **kwargs): + Project.__init__(self, url, md5, installed, **kwargs) + self.configure_args = configure_args + self.cppflags = cppflags + + def build(self): + src = self.unpack() + build = self.make_build_path() + + select_toolchain(use_cxx=self.use_cxx, use_clang=self.use_clang) + configure = [ + os.path.join(src, 'configure'), + '--cc=' + cc, + '--cxx=' + cxx, + '--extra-cflags=' + cflags + ' ' + cppflags + ' ' + self.cppflags, + '--extra-cxxflags=' + cxxflags + ' ' + cppflags + ' ' + self.cppflags, + '--extra-ldflags=' + ldflags, + '--extra-libs=' + libs, + '--ar=' + ar, + '--enable-cross-compile', + '--target-os=linux', + '--arch=' + ndk_arch, + '--cpu=cortex-a8', + '--prefix=' + root_path, + ] + self.configure_args + + subprocess.check_call(configure, cwd=build) + subprocess.check_call(['/usr/bin/make', '--quiet', '-j12'], cwd=build) + subprocess.check_call(['/usr/bin/make', '--quiet', 'install'], cwd=build) + # a list of third-party libraries to be used by MPD on Android thirdparty_libs = [ AutotoolsProject( @@ -280,6 +314,30 @@ thirdparty_libs = [ autogen=True, ), + FfmpegProject( + 'http://www.ffmpeg.org/releases/ffmpeg-2.1.4.tar.bz2', + 'dedc28003a77c69432c42ab16e5f6982', + 'lib/libavcodec.a', + [ + '--disable-shared', '--enable-static', + '--enable-gpl', + '--enable-small', + '--disable-runtime-cpudetect', + '--disable-programs', + '--disable-doc', + '--disable-avdevice', + '--disable-swresample', + '--disable-swscale', + '--disable-postproc', + '--disable-avfilter', + '--disable-network', + '--disable-encoders', + '--disable-protocols', + '--disable-outdevs', + '--disable-filters', + ], + ), + AutotoolsProject( 'http://curl.haxx.se/download/curl-7.35.0.tar.lzma', 'ad7d63864414c61246450dc5e2248c7b', |