mesonbuild wrap

问题:编译mediasoup 下载warp中url失败

在编译mediasoup的时候, 需要下载一些第三方库, 比如openssl sctp 等, 由于网路原因, 这些可能会下载失败, 导致失败.

mediasoup 使用meson构建编译, 引用第三库是用mesonbuild 的wrap方式
原有的wrapfile 使用url 下载文件

[wrap-file]
directory = openssl-1.1.1l
source_url = https://www.openssl.org/source/openssl-1.1.1l.tar.gz
source_filename = openssl-1.1.1l.tar.gz
source_hash = 0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
patch_filename = openssl_1.1.1l-2_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/openssl_1.1.1l-2/get_patch
patch_hash = 852521fb016fa2deee8ebf9ffeeee0292c6de86a03c775cf72ac04e86f9f177e

[provide]
libcrypto = libcrypto_dep
libssl = libssl_dep
openssl = openssl_dep

修改后:

[wrap-file]
directory = openssl-1.1.1l
#source_url = https://www.openssl.org/source/openssl-1.1.1l.tar.gz
source_filename = /opt/soft/mediasoup-demo/server/node_modules/mediasoup/worker/subprojects/packagefiles/openssl-1.1.1l.tar.gz
source_hash = 0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
patch_filename = /opt/soft/mediasoup-demo/server/node_modules/mediasoup/worker/subprojects/packagefiles/openssl_1.1.1l-2_patch.zip
#patch_url = https://wrapdb.mesonbuild.com/v2/openssl_1.1.1l-2/get_patch
patch_hash = 852521fb016fa2deee8ebf9ffeeee0292c6de86a03c775cf72ac04e86f9f177e

[provide]
libcrypto = libcrypto_dep
libssl = libssl_dep
openssl = openssl_dep

将 source url 和 patch url 屏蔽掉, 使用source_name 和 patch_filename 使用本地地址替换.
这个地址必须在packagefiles 文件夹中, 否则不生效

mesonbuild官方链接

上一篇:Sublime 自动根据窗口宽度换行 / 更改默认 Word Wrap Width


下一篇:【转载】C#使用Random类来生成指定范围内的随机数