Files
.github
android
build
doc
python
build
autotools.py
boost.py
cmake.py
dirs.py
download.py
ffmpeg.py
jack.py
libs.py
makeproject.py
meson.py
openssl.py
project.py
quilt.py
tar.py
verify.py
zlib.py
src
subprojects
systemd
test
win32
.clang-format
.gitignore
.travis.yml
AUTHORS
COPYING
NEWS
README.md
meson.build
meson_options.txt
mpd.svg
valgrind.suppressions
mpd/python/build/zlib.py
Max Kellermann 6f278977e9 build/python/project: add build(), calls _build()
Prepare to add some code around the _build() call.
2021-09-20 22:54:02 +02:00

23 lines
792 B
Python

import os.path, subprocess
from build.project import Project
class ZlibProject(Project):
def __init__(self, url, md5, installed,
**kwargs):
Project.__init__(self, url, md5, installed, **kwargs)
def _build(self, toolchain):
src = self.unpack(toolchain, out_of_tree=False)
subprocess.check_call(['/usr/bin/make', '--quiet',
'-f', 'win32/Makefile.gcc',
'PREFIX=' + toolchain.arch + '-',
'-j12',
'install',
'INCLUDE_PATH='+ os.path.join(toolchain.install_prefix, 'include'),
'LIBRARY_PATH=' + os.path.join(toolchain.install_prefix, 'lib'),
'BINARY_PATH=' + os.path.join(toolchain.install_prefix, 'bin'),
],
cwd=src, env=toolchain.env)