From 2fd310330c299f23b2b79eaf0ec8af1515300835 Mon Sep 17 00:00:00 2001 From: seth Date: Nov 27 2024 23:47:51 +0000 Subject: Use built-in java manager on f42 and above Mainly due to https://fedoraproject.org/wiki/Changes/ThirdPartyLegacyJdks This also switches the JDK package used for building to one from the Adoptium repositories, as the launcher still requires `javac` with Java 7 bytecode support --- diff --git a/prismlauncher.spec b/prismlauncher.spec index d4cb522..ff7d710 100644 --- a/prismlauncher.spec +++ b/prismlauncher.spec @@ -36,7 +36,16 @@ URL: https://prismlauncher.org/ BuildRequires: cmake >= 3.15 BuildRequires: extra-cmake-modules BuildRequires: gcc-c++ +# JDKs less than the most recent release & LTS are no longer in the default +# Fedora repositories +# Make sure you have Adoptium's repositories enabled +# https://fedoraproject.org/wiki/Changes/ThirdPartyLegacyJdks +# https://adoptium.net/installation/linux/#_centosrhelfedora_instructions +%if 0%{?fedora} > 41 +BuildRequires: temurin-17-jdk +%else BuildRequires: java-17-openjdk-devel +%endif BuildRequires: libappstream-glib BuildRequires: cmake(Qt%{qt_version}Concurrent) >= %{min_qt_version} @@ -69,8 +78,11 @@ Requires: qt%{qt_version}-qtsvg Requires: javapackages-filesystem Recommends: java-21-openjdk +# See note above +%if 0%{?fedora} && 0%{?fedora} < 42 Recommends: java-17-openjdk Suggests: java-1.8.0-openjdk +%endif # xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128 Recommends: xrandr @@ -97,6 +109,9 @@ rm -rf libraries/{extra-cmake-modules,filesystem,zlib} %cmake \ -DLauncher_QT_VERSION_MAJOR="%{qt_version}" \ -DLauncher_BUILD_PLATFORM="%{build_platform}" \ + %if 0%{?fedora} > 41 + -DLauncher_ENABLE_JAVA_DOWNLOADER=ON \ + %endif %if "%{msa_id}" != "default" -DLauncher_MSA_CLIENT_ID="%{msa_id}" \ %endif