diff options
author | Max Kellermann <max@duempel.org> | 2014-06-21 11:04:03 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-06-21 12:06:58 +0200 |
commit | 1d626cb6accaefe3e274eaf2cbd4c87afef1c528 (patch) | |
tree | 94838873ba8407252f3deba594cc59df43668f46 /android/build.py | |
parent | 580346f4a71d3bb6dc9bbd1150b09ac51d35b562 (diff) |
android/build.py: add Boost
Diffstat (limited to 'android/build.py')
-rwxr-xr-x | android/build.py | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/android/build.py b/android/build.py index 0fd5635df..db475b43d 100755 --- a/android/build.py +++ b/android/build.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -import os.path +import os, os.path import sys, shutil, subprocess import urllib.request import hashlib @@ -262,6 +262,33 @@ class FfmpegProject(Project): subprocess.check_call(['/usr/bin/make', '--quiet', '-j12'], cwd=build) subprocess.check_call(['/usr/bin/make', '--quiet', 'install'], cwd=build) +class BoostProject(Project): + def __init__(self, url, md5, installed, + **kwargs): + m = re.match(r'.*/boost_(\d+)_(\d+)_(\d+)\.tar\.bz2$', url) + version = "%s.%s.%s" % (m.group(1), m.group(2), m.group(3)) + Project.__init__(self, url, md5, installed, + name='boost', version=version, + **kwargs) + + def build(self): + src = self.unpack() + + # install the headers manually; don't build any library + # (because right now, we only use header-only libraries) + includedir = os.path.join(root_path, 'include') + for dirpath, dirnames, filenames in os.walk(os.path.join(src, 'boost')): + relpath = dirpath[len(src)+1:] + destdir = os.path.join(includedir, relpath) + try: + os.mkdir(destdir) + except: + pass + for name in filenames: + if name[-4:] == '.hpp': + shutil.copyfile(os.path.join(dirpath, name), + os.path.join(destdir, name)) + # a list of third-party libraries to be used by MPD on Android thirdparty_libs = [ AutotoolsProject( @@ -359,6 +386,12 @@ thirdparty_libs = [ ], use_clang=True, ), + + BoostProject( + 'http://netcologne.dl.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2', + 'd6eef4b4cacb2183f2bf265a5a03a354', + 'include/boost/version.hpp', + ), ] # build the third-party libraries |