diff options
-rw-r--r-- | autobuild.xml | 2 | ||||
-rw-r--r-- | indra/cmake/CURL.cmake | 78 |
2 files changed, 34 insertions, 46 deletions
diff --git a/autobuild.xml b/autobuild.xml index c076c9bdee..b9abfa2626 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -364,7 +364,7 @@ <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-curl/releases/download/v7.54.1-5a4a82d/curl-7.54.1-5a4a82d-darwin64-5a4a82d.tar.zst</string> + <string>https://megapahit.net/downloads/curl-7.54.1-10342910827-darwin64-10342910827.tar.zst</string> </map> <key>name</key> <string>darwin64</string> diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index 60b74d3727..26704e6934 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -7,8 +7,25 @@ add_library( ll::libcurl INTERFACE IMPORTED ) if (NOT USESYSTEMLIBS) use_system_binary(libcurl) endif (NOT USESYSTEMLIBS) -if (LINUX OR NOT USESYSTEMLIBS) +if (DARWIN OR LINUX OR NOT USESYSTEMLIBS) use_prebuilt_binary(curl) + if (DARWIN) + execute_process( + COMMAND lipo -archs libcurl.a + WORKING_DIRECTORY ${LIBS_PREBUILT_DIR}/lib/release + OUTPUT_VARIABLE curl_archs + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if (NOT ${curl_archs} EQUAL ${CMAKE_OSX_ARCHITECTURES}) + execute_process( + COMMAND lipo + libcurl.a + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libcurl.a + WORKING_DIRECTORY ${LIBS_PREBUILT_DIR}/lib/release + ) + endif (NOT ${curl_archs} EQUAL ${CMAKE_OSX_ARCHITECTURES}) + endif (DARWIN) elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/curl_installed OR NOT ${curl_installed} EQUAL 0) if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1.tar.gz) file(DOWNLOAD @@ -41,35 +58,15 @@ elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRA DESTINATION ${LIBS_PREBUILT_DIR}/lib ) message("We need to temporarily have OpenSSL3 header directory and libraries renamed just until the libcurl building process with OpenSSL1.1 now is finished.") - if (DARWIN) - set(ENV{CFLAGS} "-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.15 -std=c90") - execute_process(COMMAND sudo mv /opt/local/include/openssl /opt/local/include/openssl3) - execute_process(COMMAND sudo mv /opt/local/lib/libcrypto.a /opt/local/lib/libcrypto.a.3) - execute_process(COMMAND sudo mv /opt/local/lib/libcrypto.dylib /opt/local/lib/libcrypto.dylib.3) - execute_process(COMMAND sudo mv /opt/local/lib/libssl.a /opt/local/lib/libssl.a.3) - execute_process(COMMAND sudo mv /opt/local/lib/libssl.dylib /opt/local/lib/libssl.dylib.3) - if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) - execute_process( - COMMAND ./configure --host=aarch64-apple-darwin --disable-alt-svc --disable-dict --disable-doh --disable-file --disable-gopher --disable-headers-api --disable-hsts --disable-imap --disable-ldap --disable-ldaps --disable-libcurl-option --disable-manual --disable-mqtt --disable-ntlm --disable-ntlm-wb --disable-pop3 --disable-rtsp --disable-shared --disable-smb --disable-smtp --disable-sspi --disable-telnet --disable-tftp --disable-tls-srp --disable-unix-sockets --disable-verbose --disable-versioned-symbols --enable-threaded-resolver --with-ssl=${LIBS_PREBUILT_DIR} --without-libidn2 --without-libpsl --without-libssh2 - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl - ) - else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) - execute_process( - COMMAND ./configure --host=${CMAKE_OSX_ARCHITECTURES}-apple-darwin --disable-alt-svc --disable-dict --disable-doh --disable-file --disable-gopher --disable-headers-api --disable-hsts --disable-imap --disable-ldap --disable-ldaps --disable-libcurl-option --disable-manual --disable-mqtt --disable-ntlm --disable-ntlm-wb --disable-pop3 --disable-rtsp --disable-shared --disable-smb --disable-smtp --disable-sspi --disable-telnet --disable-tftp --disable-tls-srp --disable-unix-sockets --disable-verbose --disable-versioned-symbols --enable-threaded-resolver --with-ssl=${LIBS_PREBUILT_DIR} --without-libidn2 --without-libpsl --without-libssh2 - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl - ) - endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) - else (DARWIN) - execute_process(COMMAND sudo mv /usr/include/openssl /usr/include/openssl3) - execute_process(COMMAND sudo mv /usr/lib/libcrypto.a /usr/lib/libcrypto.a.3) - execute_process(COMMAND sudo mv /usr/lib/libcrypto.so /usr/lib/libcrypto.so.3) - execute_process(COMMAND sudo mv /usr/lib/libssl.a /usr/lib/libssl.a.3) - execute_process(COMMAND sudo mv /usr/lib/libssl.so /usr/lib/libssl.so.3) - execute_process( - COMMAND ./configure --disable-alt-svc --disable-dict --disable-doh --disable-file --disable-gopher --disable-headers-api --disable-hsts --disable-imap --disable-ldap --disable-ldaps --disable-libcurl-option --disable-manual --disable-mqtt --disable-ntlm --disable-ntlm-wb --disable-pop3 --disable-rtsp --disable-shared --disable-smb --disable-smtp --disable-sspi --disable-telnet --disable-tftp --disable-tls-srp --disable-unix-sockets --disable-verbose --disable-versioned-symbols --enable-threaded-resolver --with-ssl=${LIBS_PREBUILT_DIR} --without-libidn2 --without-libpsl --without-libssh2 - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl - ) - endif (DARWIN) + execute_process(COMMAND sudo mv /usr/include/openssl /usr/include/openssl3) + execute_process(COMMAND sudo mv /usr/lib/libcrypto.a /usr/lib/libcrypto.a.3) + execute_process(COMMAND sudo mv /usr/lib/libcrypto.so /usr/lib/libcrypto.so.3) + execute_process(COMMAND sudo mv /usr/lib/libssl.a /usr/lib/libssl.a.3) + execute_process(COMMAND sudo mv /usr/lib/libssl.so /usr/lib/libssl.so.3) + execute_process( + COMMAND ./configure --disable-alt-svc --disable-dict --disable-doh --disable-file --disable-gopher --disable-headers-api --disable-hsts --disable-imap --disable-ldap --disable-ldaps --disable-libcurl-option --disable-manual --disable-mqtt --disable-ntlm --disable-ntlm-wb --disable-pop3 --disable-rtsp --disable-shared --disable-smb --disable-smtp --disable-sspi --disable-telnet --disable-tftp --disable-tls-srp --disable-unix-sockets --disable-verbose --disable-versioned-symbols --enable-threaded-resolver --with-ssl=${LIBS_PREBUILT_DIR} --without-libidn2 --without-libpsl --without-libssh2 + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl + ) execute_process( COMMAND make -j${MAKE_JOBS} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl @@ -79,27 +76,18 @@ elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRA COPY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl/lib/.libs/libcurl.a DESTINATION ${LIBS_PREBUILT_DIR}/lib/release ) - if (DARWIN) - unset(ENV{CFLAGS}) - execute_process(COMMAND sudo mv /opt/local/include/openssl3 /opt/local/include/openssl) - execute_process(COMMAND sudo mv /opt/local/lib/libcrypto.a.3 /opt/local/lib/libcrypto.a) - execute_process(COMMAND sudo mv /opt/local/lib/libcrypto.dylib.3 /opt/local/lib/libcrypto.dylib) - execute_process(COMMAND sudo mv /opt/local/lib/libssl.a.3 /opt/local/lib/libssl.a) - execute_process(COMMAND sudo mv /opt/local/lib/libssl.dylib.3 /opt/local/lib/libssl.dylib) - else (DARWIN) - execute_process(COMMAND sudo mv /usr/include/openssl3 /usr/include/openssl) - execute_process(COMMAND sudo mv /usr/lib/libcrypto.a.3 /usr/lib/libcrypto.a) - execute_process(COMMAND sudo mv /usr/lib/libcrypto.so.3 /usr/lib/libcrypto.so) - execute_process(COMMAND sudo mv /usr/lib/libssl.a.3 /usr/lib/libssl.a) - execute_process(COMMAND sudo mv /usr/lib/libssl.so.3 /usr/lib/libssl.so) - endif (DARWIN) + execute_process(COMMAND sudo mv /usr/include/openssl3 /usr/include/openssl) + execute_process(COMMAND sudo mv /usr/lib/libcrypto.a.3 /usr/lib/libcrypto.a) + execute_process(COMMAND sudo mv /usr/lib/libcrypto.so.3 /usr/lib/libcrypto.so) + execute_process(COMMAND sudo mv /usr/lib/libssl.a.3 /usr/lib/libssl.a) + execute_process(COMMAND sudo mv /usr/lib/libssl.so.3 /usr/lib/libssl.so) message("OpenSSL3 header directory and library names have been restored.") file(REMOVE ${LIBS_PREBUILT_DIR}/lib/libcrypto.a ${LIBS_PREBUILT_DIR}/lib/libssl.a ) file(WRITE ${PREBUILD_TRACKING_DIR}/curl_installed "${curl_installed}") -endif (LINUX OR NOT USESYSTEMLIBS) +endif (DARWIN OR LINUX OR NOT USESYSTEMLIBS) if (WINDOWS) target_link_libraries(ll::libcurl INTERFACE libcurl.lib) else (WINDOWS) |