From c8d2da56c509d366493b667020bddd13538b772f Mon Sep 17 00:00:00 2001 From: secretfoxtail Date: Sat, 24 Aug 2024 10:32:44 -0600 Subject: Linden_Dollar_Alert tweak Just playing with gimp filters :3 --- .../textures/widgets/Linden_Dollar_Alert.png | Bin 66186 -> 68647 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/textures/widgets/Linden_Dollar_Alert.png b/indra/newview/skins/default/textures/widgets/Linden_Dollar_Alert.png index a1f21e8194..76e078100f 100644 Binary files a/indra/newview/skins/default/textures/widgets/Linden_Dollar_Alert.png and b/indra/newview/skins/default/textures/widgets/Linden_Dollar_Alert.png differ -- cgit v1.2.3 From 71e9f4c0e5fc29a8bb74bc313eed05190da7bf96 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 25 Aug 2024 13:39:43 +0800 Subject: Make Prebuilt.cmake reimplementation more generic Anticipate the possibility that an archive isn't suffixed with a 64. Parentheses need to be escaped by quotes (backslashing would work too), otherwise they would be parsed as part of CMake commands syntax. Regex subexpressions shouldn't contain regex themselves (only verbatim or preprocessed strings are used within the parentheses). --- indra/cmake/Prebuilt.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 793da3338f..012dea5a50 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -55,13 +55,13 @@ macro (use_prebuilt_binary _binary) endif (${system_name} MATCHES freebsd) execute_process(COMMAND xmllint --xpath - "//map/map/map/map/map/map/string[contains(text(),'${_binary}')][contains(text(),'${system_name}64')]/text()" autobuild.xml + "//map/map/map/map/map/map/string[contains(text(),'${_binary}')][contains(text(),'${system_name}')]/text()" autobuild.xml WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/.. OUTPUT_VARIABLE package_url OUTPUT_STRIP_TRAILING_WHITESPACE ) endif ("${package_url}" STREQUAL "") - string(REGEX REPLACE ^https://github.com/secondlife/3p-${_binary}/releases/download/v[0-9]+.*/ "" package_name ${package_url}) + string(REGEX REPLACE "^https://(megapahit.net/downloads|github.com/secondlife/3p-${_binary}/releases/download|automated-builds-secondlife-com.s3.amazonaws.com/ct2).*/" "" package_name ${package_url}) file(DOWNLOAD ${package_url} ${CMAKE_BINARY_DIR}/${package_name} -- cgit v1.2.3 From d07e9ecfaf9b68f8bb5e804ef0f2b5fb5a31f748 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 25 Aug 2024 13:47:53 +0800 Subject: use_prebuilt_binary(nanosvg) uses reimplementation also to minimise ViewerMisc.cmake diff from upstream. --- indra/cmake/ViewerMiscLibs.cmake | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) (limited to 'indra') diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index c3dcf1ddb2..93d57a7131 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -14,35 +14,10 @@ endif() if (NOT USESYSTEMLIBS) use_prebuilt_binary(slvoice) +endif (NOT USESYSTEMLIBS) +if ((${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu) OR DARWIN) OR NOT USESYSTEMLIBS) use_prebuilt_binary(nanosvg) -elseif (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu) OR DARWIN) - if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/nanosvg_installed OR NOT ${nanosvg_installed} EQUAL 0) - if (DARWIN) - if (NOT EXISTS ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-darwin64-580364.tar.bz2) - file(DOWNLOAD - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 - ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-darwin64-580364.tar.bz2 - ) - endif (NOT EXISTS ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-darwin64-580364.tar.bz2) - file(ARCHIVE_EXTRACT - INPUT ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-darwin64-580364.tar.bz2 - DESTINATION ${LIBS_PREBUILT_DIR} - ) - else (DARWIN) - if (NOT EXISTS ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-linux-580337.tar.bz2) - file(DOWNLOAD - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115397/993664/nanosvg-2022.09.27-linux-580337.tar.bz2 - ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-linux-580337.tar.bz2 - ) - endif (NOT EXISTS ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-linux-580337.tar.bz2) - file(ARCHIVE_EXTRACT - INPUT ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-linux-580337.tar.bz2 - DESTINATION ${LIBS_PREBUILT_DIR} - ) - endif (DARWIN) - file(WRITE ${PREBUILD_TRACKING_DIR}/nanosvg_installed "0") - endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/nanosvg_installed OR NOT ${nanosvg_installed} EQUAL 0) -endif (NOT USESYSTEMLIBS) +endif ((${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu) OR DARWIN) OR NOT USESYSTEMLIBS) use_prebuilt_binary(viewer-fonts) use_prebuilt_binary(emoji_shortcodes) -- cgit v1.2.3 From 178c62d39e779fbcaecf8cbb14522c28385957d0 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 25 Aug 2024 13:53:16 +0800 Subject: Darwin & Tumbleweed use prebuilt XMLRPC-EPI Refer to this commit if you need to recover the steps in compiling XMLRPC-EPI. The prebuilt binary for Darwin is distributed as universal, and will be thinned accordingly. It also makes use of autobuild.xml, but only partially (the sha1sum isn't used yet in the Prebuilt.cmake reimplementation). --- indra/cmake/XmlRpcEpi.cmake | 89 ++++++++------------------------------------- 1 file changed, 16 insertions(+), 73 deletions(-) (limited to 'indra') diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index 739648500c..756388957f 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -6,85 +6,28 @@ add_library( ll::xmlrpc-epi INTERFACE IMPORTED ) if (NOT USESYSTEMLIBS) use_system_binary( xmlrpc-epi ) +endif (NOT USESYSTEMLIBS) +if (${LINUX_DISTRO} MATCHES opensuse-tumbleweed OR DARWIN OR NOT USESYSTEMLIBS) use_prebuilt_binary(xmlrpc-epi) -elseif ((${LINUX_DISTRO} MATCHES opensuse-tumbleweed OR DARWIN) AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/xmlrpc-epi_installed OR NOT ${xmlrpc-epi_installed} EQUAL 0)) - if (NOT EXISTS ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2.tar.bz2) - file(DOWNLOAD - https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2.tar.bz2 - ) - endif (NOT EXISTS ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2.tar.bz2) - file(ARCHIVE_EXTRACT - INPUT ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2.tar.bz2 - DESTINATION ${CMAKE_BINARY_DIR} - ) - file( - COPY - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/base64.h - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/encodings.h - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/queue.h - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/simplestring.h - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xml_element.h - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xml_to_xmlrpc.h - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xmlrpc.h - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xmlrpc_introspection.h - DESTINATION ${LIBS_PREBUILT_DIR}/include/xmlrpc-epi - ) - file(REMOVE - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/config.sub - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/missing - ) - execute_process( - COMMAND autoreconf -is - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2 - ) - set(ENV{CPPFLAGS} -I${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src) if (DARWIN) - set(ENV{CFLAGS} "-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.15") - if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) - execute_process( - COMMAND sed -i '' -e "s/XMLRPC_VALUE find_named_value/__attribute__((always_inline)) XMLRPC_VALUE find_named_value/g" - xmlrpc_introspection.c - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src - ) - execute_process( - COMMAND sed -i '' -e "s/void describe_method/__attribute__((always_inline)) void describe_method/g" - xmlrpc_introspection.c - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src - ) - execute_process( - COMMAND ./configure --disable-static --host=aarch64-apple-darwin - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2 - ) - else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) - execute_process( - COMMAND ./configure --disable-static --host=${CMAKE_OSX_ARCHITECTURES}-apple-darwin - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2 - ) - endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) - unset(ENV{CFLAGS}) - else (DARWIN) execute_process( - COMMAND ./configure --disable-shared - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2 + COMMAND lipo -archs libxmlrpc-epi.0.dylib + WORKING_DIRECTORY ${LIBS_PREBUILT_DIR}/lib/release + OUTPUT_VARIABLE xmlrpc-epi_archs + OUTPUT_STRIP_TRAILING_WHITESPACE ) + if (NOT ${xmlrpc-epi_archs} EQUAL ${CMAKE_OSX_ARCHITECTURES}) + execute_process( + COMMAND lipo + libxmlrpc-epi.0.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libxmlrpc-epi.0.dylib + WORKING_DIRECTORY ${LIBS_PREBUILT_DIR}/lib/release + ) + endif (NOT ${xmlrpc-epi_archs} EQUAL ${CMAKE_OSX_ARCHITECTURES}) endif (DARWIN) - execute_process( - COMMAND make -j${MAKE_JOBS} - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2 - RESULT_VARIABLE xmlrpc-epi_installed - ) - unset(ENV{CPPFLAGS}) - file( - COPY - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/.libs/libxmlrpc-epi.dylib - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/.libs/libxmlrpc-epi.0.dylib - DESTINATION ${LIBS_PREBUILT_DIR}/lib/release - FOLLOW_SYMLINK_CHAIN - ) - file(WRITE ${PREBUILD_TRACKING_DIR}/xmlrpc-epi_installed "${xmlrpc-epi_installed}") -endif (NOT USESYSTEMLIBS) +endif (${LINUX_DISTRO} MATCHES opensuse-tumbleweed OR DARWIN OR NOT USESYSTEMLIBS) target_link_libraries(ll::xmlrpc-epi INTERFACE xmlrpc-epi ) if (NOT USESYSTEMLIBS) target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) -- cgit v1.2.3 From 633393b7947684d6bef55534a81577d25af64ab5 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 25 Aug 2024 14:30:22 +0800 Subject: Darwin prebuilt libcurl binary --- indra/cmake/CURL.cmake | 78 +++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 45 deletions(-) (limited to 'indra') 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) -- cgit v1.2.3 From bfcf0d1d2cd754018e922d70e2d8ab0e7c6cc395 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 25 Aug 2024 14:41:04 +0800 Subject: Fix macOS architecture comparison operator cause they're not like 0 valued ${_binary}_installed that it would run lipo -thin on already thinned binaries. --- indra/cmake/CURL.cmake | 4 ++-- indra/cmake/XmlRpcEpi.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index 26704e6934..08938ff3d8 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -16,7 +16,7 @@ use_prebuilt_binary(curl) OUTPUT_VARIABLE curl_archs OUTPUT_STRIP_TRAILING_WHITESPACE ) - if (NOT ${curl_archs} EQUAL ${CMAKE_OSX_ARCHITECTURES}) + if (NOT ${curl_archs} STREQUAL ${CMAKE_OSX_ARCHITECTURES}) execute_process( COMMAND lipo libcurl.a @@ -24,7 +24,7 @@ use_prebuilt_binary(curl) -output libcurl.a WORKING_DIRECTORY ${LIBS_PREBUILT_DIR}/lib/release ) - endif (NOT ${curl_archs} EQUAL ${CMAKE_OSX_ARCHITECTURES}) + endif (NOT ${curl_archs} STREQUAL ${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) diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index 756388957f..a008e06d62 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -17,7 +17,7 @@ use_prebuilt_binary(xmlrpc-epi) OUTPUT_VARIABLE xmlrpc-epi_archs OUTPUT_STRIP_TRAILING_WHITESPACE ) - if (NOT ${xmlrpc-epi_archs} EQUAL ${CMAKE_OSX_ARCHITECTURES}) + if (NOT ${xmlrpc-epi_archs} STREQUAL ${CMAKE_OSX_ARCHITECTURES}) execute_process( COMMAND lipo libxmlrpc-epi.0.dylib @@ -25,7 +25,7 @@ use_prebuilt_binary(xmlrpc-epi) -output libxmlrpc-epi.0.dylib WORKING_DIRECTORY ${LIBS_PREBUILT_DIR}/lib/release ) - endif (NOT ${xmlrpc-epi_archs} EQUAL ${CMAKE_OSX_ARCHITECTURES}) + endif (NOT ${xmlrpc-epi_archs} STREQUAL ${CMAKE_OSX_ARCHITECTURES}) endif (DARWIN) endif (${LINUX_DISTRO} MATCHES opensuse-tumbleweed OR DARWIN OR NOT USESYSTEMLIBS) target_link_libraries(ll::xmlrpc-epi INTERFACE xmlrpc-epi ) -- cgit v1.2.3 From 46724f7207638b540ddf45bee91b3c20cec87bc4 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 25 Aug 2024 14:59:55 +0800 Subject: Darwin prebuilt OpenSSL binary --- indra/cmake/OpenSSL.cmake | 55 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 17 deletions(-) (limited to 'indra') diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake index 4481b3460f..118ca84132 100644 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -7,8 +7,40 @@ add_library( ll::openssl INTERFACE IMPORTED ) if (NOT USESYSTEMLIBS) use_system_binary(openssl) endif (NOT USESYSTEMLIBS) -if (CMAKE_OSX_ARCHITECTURES MATCHES x86_64 OR LINUX OR NOT USESYSTEMLIBS) +if (DARWIN OR LINUX OR NOT USESYSTEMLIBS) use_prebuilt_binary(openssl) + if (DARWIN) + execute_process( + COMMAND lipo -archs libcrypto.a + WORKING_DIRECTORY ${LIBS_PREBUILT_DIR}/lib/release + OUTPUT_VARIABLE crypto_archs + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if (NOT ${crypto_archs} STREQUAL ${CMAKE_OSX_ARCHITECTURES}) + execute_process( + COMMAND lipo + libcrypto.a + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libcrypto.a + WORKING_DIRECTORY ${LIBS_PREBUILT_DIR}/lib/release + ) + endif (NOT ${crypto_archs} STREQUAL ${CMAKE_OSX_ARCHITECTURES}) + execute_process( + COMMAND lipo -archs libssl.a + WORKING_DIRECTORY ${LIBS_PREBUILT_DIR}/lib/release + OUTPUT_VARIABLE ssl_archs + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if (NOT ${ssl_archs} STREQUAL ${CMAKE_OSX_ARCHITECTURES}) + execute_process( + COMMAND lipo + libssl.a + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libssl.a + WORKING_DIRECTORY ${LIBS_PREBUILT_DIR}/lib/release + ) + endif (NOT ${ssl_archs} STREQUAL ${CMAKE_OSX_ARCHITECTURES}) + endif (DARWIN) elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openssl_installed OR NOT ${openssl_installed} EQUAL 0) if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55.tar.gz) file(DOWNLOAD @@ -20,26 +52,15 @@ elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRA INPUT ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55.tar.gz DESTINATION ${CMAKE_BINARY_DIR} ) - if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) - set(ENV{CFLAGS} "-mmacosx-version-min=11.0") - execute_process( - COMMAND ./Configure no-shared darwin64-arm64-cc - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl - ) - else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) - execute_process( - COMMAND ./config no-shared - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl - ) - endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + execute_process( + COMMAND ./config no-shared + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl + ) execute_process( COMMAND make -j${MAKE_JOBS} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl RESULT_VARIABLE openssl_installed ) - if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) - unset(ENV{CFLAGS}) - endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) file( COPY ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/aes.h @@ -155,7 +176,7 @@ elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRA DESTINATION ${LIBS_PREBUILT_DIR}/lib/release ) file(WRITE ${PREBUILD_TRACKING_DIR}/openssl_installed "${openssl_installed}") -endif (CMAKE_OSX_ARCHITECTURES MATCHES x86_64 OR LINUX OR NOT USESYSTEMLIBS) +endif (DARWIN OR LINUX OR NOT USESYSTEMLIBS) if (WINDOWS) target_link_libraries(ll::openssl INTERFACE libssl libcrypto) elseif (LINUX) -- cgit v1.2.3