diff --git a/.ci/ps4/build.sh b/.ci/ps4/build.sh index ae0ffd3aef..d4294a5065 100755 --- a/.ci/ps4/build.sh +++ b/.ci/ps4/build.sh @@ -48,19 +48,15 @@ export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" $@) -DENABLE_LIBUSB=OFF \ -DENABLE_UPDATE_CHECKER=OFF \ -DENABLE_QT=OFF \ - -DENABLE_OPENSSL=OFF \ + -DENABLE_OPENGL=OFF \ -DENABLE_WEB_SERVICE=OFF \ -DUSE_DISCORD_PRESENCE=OFF \ -DCPMUTIL_FORCE_BUNDLED=ON \ - -DOPENSSL_ROOT_DIR="$OO_PS4_TOOLCHAIN" \ - -DOPENSSL_SSL_LIBRARY="$OO_PS4_TOOLCHAIN/lib/libssl.a" \ - -DOPENSSL_CRYPTO_LIBRARY="$OO_PS4_TOOLCHAIN/lib/libcrypto.a" \ - -DOPENSSL_INCLUDE_DIR="$OO_PS4_TOOLCHAIN/include/openssl" \ -DYUZU_USE_EXTERNAL_FFMPEG=ON \ -DYUZU_USE_CPM=ON \ -DDYNARMIC_ENABLE_NO_EXECUTE_SUPPORT=OFF \ - -DDYNARMIC_TESTS=OFF \ - -DYUZU_TESTS=OFF \ + -DDYNARMIC_TESTS=ON \ + -DYUZU_TESTS=ON \ -DYUZU_USE_EXTERNAL_SDL2=ON \ "${EXTRA_CMAKE_FLAGS[@]}" || exit diff --git a/.patch/ffmpeg/0001-sysctl-openorbis.patch b/.patch/ffmpeg/0001-sysctl-openorbis.patch new file mode 100644 index 0000000000..e2b63264a3 --- /dev/null +++ b/.patch/ffmpeg/0001-sysctl-openorbis.patch @@ -0,0 +1,15 @@ +diff --git a/libavutil/cpu.c b/libavutil/cpu.c +index 03e2720..874258f 100644 +--- a/libavutil/cpu.c ++++ b/libavutil/cpu.c +@@ -43,8 +43,10 @@ + #include + #endif + #include ++#ifndef __OPENORBIS__ + #include + #endif ++#endif + #if HAVE_UNISTD_H + #include + #endif diff --git a/.patch/openssl/0002-fix-gnu-openorbis.patch b/.patch/openssl/0002-fix-gnu-openorbis.patch new file mode 100644 index 0000000000..bd7f3b52e9 --- /dev/null +++ b/.patch/openssl/0002-fix-gnu-openorbis.patch @@ -0,0 +1,13 @@ +diff --git a/crypto/o_str.c b/crypto/o_str.c +index 8aadff5..ba427c9 100644 +--- a/crypto/o_str.c ++++ b/crypto/o_str.c +@@ -385,7 +385,7 @@ int openssl_strerror_r(int errnum, char *buf, size_t buflen) + * It can return a pointer to some (immutable) static string in which case + * buf is left unused. + */ +- err = strerror_r(errnum, buf, buflen); ++ err = (char *)strerror_r(errnum, buf, buflen); + if (err == NULL || buflen == 0) + return 0; + /* diff --git a/cpmfile.json b/cpmfile.json index b8b1644543..135377f50a 100644 --- a/cpmfile.json +++ b/cpmfile.json @@ -32,7 +32,8 @@ "git_version": "3.6.2", "tag": "openssl-%VERSION%", "patches": [ - "0001-add-bundled-cert.patch" + "0001-add-bundled-cert.patch", + "0002-fix-gnu-openorbis.patch" ] }, "boost": { diff --git a/externals/cpmfile.json b/externals/cpmfile.json index 16095fd971..d8c9652438 100644 --- a/externals/cpmfile.json +++ b/externals/cpmfile.json @@ -212,7 +212,10 @@ "repo": "FFmpeg/FFmpeg", "sha": "c7b5f1537d", "hash": "ed177621176b3961bdcaa339187d3a7688c1c8b060b79c4bb0257cbc67ad7021ae5d5adca5303b45625abbbe3d9aafdd87ce777b8690ac295290d744c875489a", - "bundled": true + "bundled": true, + "patches": [ + "0001-sysctl-openorbis.patch" + ] }, "ffmpeg-ci": { "ci": true, diff --git a/externals/ps4sup/emutls.c b/externals/ps4sup/emutls.c index 3b0a0cc909..17a7c440d1 100644 --- a/externals/ps4sup/emutls.c +++ b/externals/ps4sup/emutls.c @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + /* ===---------- emutls.c - Implements __emutls_get_address ---------------=== * * The LLVM Compiler Infrastructure diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index b462107bcd..e80f1ab7c5 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -230,12 +230,13 @@ if(CXX_CLANG) $<$,15>:CANNOT_EXPLICITLY_INSTANTIATE>) endif() +# Has to be BEFORE httplib +target_link_libraries(common PUBLIC OpenSSL::SSL) if (BOOST_NO_HEADERS) target_link_libraries(common PUBLIC Boost::algorithm Boost::heap Boost::icl Boost::pool) else() target_link_libraries(common PUBLIC Boost::headers) endif() - target_link_libraries(common PUBLIC Boost::filesystem Boost::context httplib::httplib nlohmann_json::nlohmann_json) if (lz4_ADDED) diff --git a/src/common/net/net.cpp b/src/common/net/net.cpp index ec627177a2..b6b2862aae 100644 --- a/src/common/net/net.cpp +++ b/src/common/net/net.cpp @@ -212,7 +212,7 @@ std::optional MakeRequest(const std::string& url, const std::string client->set_read_timeout(timeout_seconds); client->set_write_timeout(timeout_seconds); -#ifdef YUZU_BUNDLED_OPENSSL +#if defined(YUZU_BUNDLED_OPENSSL) && !defined(__OPENORBIS__) client->load_ca_cert_store(kCert, sizeof(kCert)); #endif diff --git a/src/yuzu/updater/update_dialog.cpp b/src/yuzu/updater/update_dialog.cpp index c2c0556e9c..ba732e6ac9 100644 --- a/src/yuzu/updater/update_dialog.cpp +++ b/src/yuzu/updater/update_dialog.cpp @@ -98,7 +98,7 @@ void UpdateDialog::Download() { client->set_read_timeout(timeout_seconds); client->set_write_timeout(timeout_seconds); -#ifdef YUZU_BUNDLED_OPENSSL +#if defined(YUZU_BUNDLED_OPENSSL) && !defined(__OPENORBIS__) client->load_ca_cert_store(kCert, sizeof(kCert)); #endif