subprojects: add curl
This commit is contained in:
parent
55ca3709ef
commit
dfef30a737
|
@ -38,7 +38,6 @@ thirdparty_libs = [
|
|||
gme,
|
||||
ffmpeg,
|
||||
openssl,
|
||||
curl,
|
||||
libnfs,
|
||||
]
|
||||
|
||||
|
|
30
meson.build
30
meson.build
|
@ -12,6 +12,7 @@ project(
|
|||
|
||||
# If we build those libraries as Meson subproject, they shall be
|
||||
# linked statically into the MPD executable.
|
||||
'curl:default_library=static',
|
||||
'expat:default_library=static',
|
||||
'flac:default_library=static',
|
||||
'fmt:default_library=static',
|
||||
|
@ -23,6 +24,8 @@ project(
|
|||
'vorbis:default_library=static',
|
||||
|
||||
# Not interested in compiler warnings from subprojects.
|
||||
'curl:werror=false',
|
||||
'curl:warning_level=0',
|
||||
'expat:werror=false',
|
||||
'expat:warning_level=0',
|
||||
'flac:werror=false',
|
||||
|
@ -38,6 +41,33 @@ project(
|
|||
'vorbis:warning_level=0',
|
||||
|
||||
# Disable subprojects features we don't need
|
||||
'curl:tool=disabled',
|
||||
'curl:tests=disabled',
|
||||
'curl:unittests=disabled',
|
||||
'curl:brotli=disabled',
|
||||
'curl:cookies=disabled',
|
||||
'curl:progress-meter=disabled',
|
||||
'curl:zstd=disabled',
|
||||
'curl:kerberos-auth=disabled',
|
||||
'curl:negotiate-auth=disabled',
|
||||
'curl:gss-api=disabled',
|
||||
'curl:ntlm=disabled',
|
||||
'curl:ssh=disabled',
|
||||
'curl:dict=disabled',
|
||||
'curl:file=disabled',
|
||||
'curl:ftp=disabled',
|
||||
'curl:gopher=disabled',
|
||||
'curl:imap=disabled',
|
||||
'curl:ldap=disabled',
|
||||
'curl:ldaps=disabled',
|
||||
'curl:mqtt=disabled',
|
||||
'curl:pop3=disabled',
|
||||
'curl:rtmp=disabled',
|
||||
'curl:rtsp=disabled',
|
||||
'curl:smb=disabled',
|
||||
'curl:smtp=disabled',
|
||||
'curl:telnet=disabled',
|
||||
'curl:tftp=disabled',
|
||||
'opus:docs=disabled',
|
||||
'opus:extra-programs=disabled',
|
||||
'opus:tests=disabled',
|
||||
|
|
|
@ -578,41 +578,6 @@ openssl = OpenSSLProject(
|
|||
'include/openssl/ossl_typ.h',
|
||||
)
|
||||
|
||||
curl = CmakeProject(
|
||||
('https://curl.se/download/curl-8.4.0.tar.xz',
|
||||
'https://github.com/curl/curl/releases/download/curl-8_4_0/curl-8.4.0.tar.xz'),
|
||||
'16c62a9c4af0f703d28bda6d7bbf37ba47055ad3414d70dec63e2e6336f2a82d',
|
||||
'lib/libcurl.a',
|
||||
[
|
||||
'-DBUILD_CURL_EXE=OFF',
|
||||
'-DBUILD_SHARED_LIBS=OFF',
|
||||
'-DCURL_DISABLE_LDAP=ON',
|
||||
'-DCURL_DISABLE_TELNET=ON',
|
||||
'-DCURL_DISABLE_DICT=ON',
|
||||
'-DCURL_DISABLE_FILE=ON',
|
||||
'-DCURL_DISABLE_FTP=ON',
|
||||
'-DCURL_DISABLE_TFTP=ON',
|
||||
'-DCURL_DISABLE_LDAPS=ON',
|
||||
'-DCURL_DISABLE_RTSP=ON',
|
||||
'-DCURL_DISABLE_PROXY=ON',
|
||||
'-DCURL_DISABLE_POP3=ON',
|
||||
'-DCURL_DISABLE_IMAP=ON',
|
||||
'-DCURL_DISABLE_SMTP=ON',
|
||||
'-DCURL_DISABLE_GOPHER=ON',
|
||||
'-DCURL_DISABLE_COOKIES=ON',
|
||||
'-DCURL_DISABLE_CRYPTO_AUTH=ON',
|
||||
'-DCURL_DISABLE_ALTSVC=ON',
|
||||
'-DCMAKE_USE_LIBSSH2=OFF',
|
||||
'-DCURL_WINDOWS_SSPI=OFF',
|
||||
'-DCURL_DISABLE_NTLM=ON',
|
||||
'-DBUILD_TESTING=OFF',
|
||||
],
|
||||
windows_configure_args=[
|
||||
'-DCURL_USE_SCHANNEL=ON',
|
||||
],
|
||||
patches='src/lib/curl/patches',
|
||||
)
|
||||
|
||||
libnfs = AutotoolsProject(
|
||||
'https://github.com/sahlberg/libnfs/archive/libnfs-5.0.2.tar.gz',
|
||||
'637e56643b19da9fba98f06847788c4dad308b723156a64748041035dcdf9bd3',
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
Index: curl-7.84.0/CMakeLists.txt
|
||||
===================================================================
|
||||
--- curl-7.84.0.orig/CMakeLists.txt
|
||||
+++ curl-7.84.0/CMakeLists.txt
|
||||
@@ -1536,7 +1536,7 @@ set(includedir "\${prefix}/
|
||||
set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
set(LIBCURL_LIBS "")
|
||||
set(libdir "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
-foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS})
|
||||
+foreach(_lib ${CURL_LIBS})
|
||||
if(TARGET "${_lib}")
|
||||
set(_libname "${_lib}")
|
||||
get_target_property(_imported "${_libname}" IMPORTED)
|
|
@ -1,20 +0,0 @@
|
|||
Index: curl-7.84.0/lib/url.c
|
||||
===================================================================
|
||||
--- curl-7.84.0.orig/lib/url.c
|
||||
+++ curl-7.84.0/lib/url.c
|
||||
@@ -3003,6 +3003,7 @@ static CURLcode override_login(struct Cu
|
||||
|
||||
#ifndef CURL_DISABLE_NETRC
|
||||
conn->bits.netrc = FALSE;
|
||||
+#ifndef __BIONIC__
|
||||
if(data->set.use_netrc && !data->set.str[STRING_USERNAME]) {
|
||||
bool netrc_user_changed = FALSE;
|
||||
bool netrc_passwd_changed = FALSE;
|
||||
@@ -3079,6 +3080,7 @@ static CURLcode override_login(struct Cu
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
return CURLE_OK;
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
no_CMAKE_C_IMPLICIT_LINK_LIBRARIES.patch
|
||||
no_netrc.patch
|
|
@ -1,5 +1,6 @@
|
|||
/packagecache/
|
||||
|
||||
/curl-*/
|
||||
/expat-*/
|
||||
/flac-*/
|
||||
/fmt-*/
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
[wrap-file]
|
||||
directory = curl-8.5.0
|
||||
source_url = https://github.com/curl/curl/releases/download/curl-8_5_0/curl-8.5.0.tar.xz
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/curl_8.5.0-1/curl-8.5.0.tar.xz
|
||||
source_filename = curl-8.5.0.tar.xz
|
||||
source_hash = 42ab8db9e20d8290a3b633e7fbb3cec15db34df65fd1015ef8ac1e4723750eeb
|
||||
patch_filename = curl_8.5.0-1_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/curl_8.5.0-1/get_patch
|
||||
patch_hash = cd7b3a1944a7a0e2004a04c8901e3a3dabf87fed939db824bcd4b831acd808a9
|
||||
wrapdb_version = 8.5.0-1
|
||||
|
||||
[provide]
|
||||
dependency_names = libcurl
|
|
@ -47,7 +47,6 @@ thirdparty_libs = [
|
|||
wildmidi,
|
||||
gme,
|
||||
ffmpeg,
|
||||
curl,
|
||||
libnfs,
|
||||
libsamplerate,
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue