diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/build/boost.py | 5 | ||||
-rw-r--r-- | python/build/jack.py | 47 | ||||
-rw-r--r-- | python/build/libs.py | 23 |
3 files changed, 67 insertions, 8 deletions
diff --git a/python/build/boost.py b/python/build/boost.py index 26cdfae4f..8d33ba775 100644 --- a/python/build/boost.py +++ b/python/build/boost.py @@ -21,3 +21,8 @@ class BoostProject(Project): dest = os.path.join(includedir, 'boost') shutil.rmtree(dest, ignore_errors=True) shutil.copytree(os.path.join(src, 'boost'), dest) + + # touch the boost/version.hpp file to ensure it's newer than + # the downloaded Boost tarball, to avoid reinstalling Boost on + # every run + os.utime(os.path.join(toolchain.install_prefix, self.installed)) diff --git a/python/build/jack.py b/python/build/jack.py new file mode 100644 index 000000000..6e71e7f1d --- /dev/null +++ b/python/build/jack.py @@ -0,0 +1,47 @@ +import os, shutil +import re + +from .project import Project + +# This class installs just the public headers and a fake pkg-config +# file which defines the macro "DYNAMIC_JACK". This tells MPD's JACK +# output plugin to load the libjack64.dll dynamically using +# LoadLibrary(). This kludge avoids the runtime DLL dependency for +# users who don't use JACK, but still allows using the system JACK +# client library. +# +# The problem with JACK is that it uses an extremely fragile shared +# memory protocol to communicate with the daemon. One needs to use +# daemon and client library from the same build. That's why we don't +# build libjack statically here; it would probably not be compatible +# with the user's JACK daemon. + +class JackProject(Project): + def __init__(self, url, md5, installed, + **kwargs): + m = re.match(r'.*/v([\d.]+)\.tar\.gz$', url) + self.version = m.group(1) + Project.__init__(self, url, md5, installed, + name='jack2', version=self.version, + base='jack2-' + self.version, + **kwargs) + + def build(self, toolchain): + src = self.unpack(toolchain) + + includes = ['jack.h', 'ringbuffer.h', 'systemdeps.h', 'transport.h', 'types.h', 'weakmacros.h'] + includedir = os.path.join(toolchain.install_prefix, 'include', 'jack') + os.makedirs(includedir, exist_ok=True) + + for i in includes: + shutil.copyfile(os.path.join(src, 'common', 'jack', i), + os.path.join(includedir, i)) + + with open(os.path.join(toolchain.install_prefix, 'lib', 'pkgconfig', 'jack.pc'), 'w') as f: + print("prefix=" + toolchain.install_prefix, file=f) + print("", file=f) + print("Name: jack", file=f) + print("Description: dummy", file=f) + print("Version: " + self.version, file=f) + print("Libs: ", file=f) + print("Cflags: -DDYNAMIC_JACK", file=f) diff --git a/python/build/libs.py b/python/build/libs.py index e5277856c..d3e50ab09 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -9,6 +9,7 @@ from build.autotools import AutotoolsProject from build.ffmpeg import FfmpegProject from build.openssl import OpenSSLProject from build.boost import BoostProject +from build.jack import JackProject libmpdclient = MesonProject( 'https://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.19.tar.xz', @@ -149,8 +150,8 @@ gme = CmakeProject( ) ffmpeg = FfmpegProject( - 'http://ffmpeg.org/releases/ffmpeg-4.3.1.tar.xz', - 'ad009240d46e307b4e03a213a0f49c11b650e445b1f8be0dda2a9212b34d2ffb', + 'http://ffmpeg.org/releases/ffmpeg-4.4.tar.xz', + '06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909', 'lib/libavcodec.a', [ '--disable-shared', '--enable-static', @@ -378,14 +379,14 @@ ffmpeg = FfmpegProject( ) openssl = OpenSSLProject( - 'https://www.openssl.org/source/openssl-3.0.0-alpha10.tar.gz', - 'b1699acf2148db31f12edf5ebfdf12a92bfd3f0e60538d169710408a3cd3b138', + 'https://www.openssl.org/source/openssl-3.0.0-alpha16.tar.gz', + '08ce8244b59d75f40f91170dfcb012bf25309cdcb1fef9502e39d694f883d1d1', 'include/openssl/ossl_typ.h', ) curl = AutotoolsProject( - 'http://curl.haxx.se/download/curl-7.74.0.tar.xz', - '999d5f2c403cf6e25d58319fdd596611e455dd195208746bc6e6d197a77e878b', + 'https://curl.se/download/curl-7.76.1.tar.xz', + '64bb5288c39f0840c07d077e30d9052e1cbb9fa6c2dc52523824cc859e679145', 'lib/libcurl.a', [ '--disable-shared', '--enable-static', @@ -443,8 +444,14 @@ libnfs = AutotoolsProject( autoreconf=True, ) +jack = JackProject( + 'https://github.com/jackaudio/jack2/archive/v1.9.17.tar.gz', + '38f674bbc57852a8eb3d9faa1f96a0912d26f7d5df14c11005ad499c8ae352f2', + 'lib/pkgconfig/jack.pc', +) + boost = BoostProject( - 'https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.bz2', - '953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb', + 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2', + 'f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41', 'include/boost/version.hpp', ) |