Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix building prismlauncher on aarch64 with newer tomlplusplus version #30

Merged
merged 2 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions anda/games/prismlauncher-nightly/fix-disable-FLOAT16-in-toml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From c1763cc4b0871230a86e58aad07aacaf7b19182c Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu <[email protected]>
Date: Tue, 15 Nov 2022 21:23:20 +0100
Subject: [PATCH] fix: disable FLOAT16 in toml++

Signed-off-by: Sefa Eyeoglu <[email protected]>
---
CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0db05f98..8fc0d326 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,6 +70,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00")

+# Fix aarch64 build for toml++
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTOML_ENABLE_FLOAT16=0")
+
# set CXXFLAGS for build targets
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -D_FORTIFY_SOURCE=2 ${CMAKE_CXX_FLAGS_RELEASE}")

--
2.38.1

3 changes: 2 additions & 1 deletion anda/games/prismlauncher-nightly/prismlauncher-nightly.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%global filesystem_commit cd6805e94dd5d6346be1b75a54cdc27787319dd2
%global libnbtplusplus_commit 2203af7eeb48c45398139b583615134efd8d407f
%global quazip_commit 6117161af08e366c37499895b00ef62f93adc345
%global tomlplusplus_commit 4b166b69f28e70a416a1a04a98f365d2aeb90de8
%global tomlplusplus_commit 0a90913abf9390b9e08ab6d3b40ac11634553f38

%global commit_date %(date '+%Y%m%d')
%global git_rel .%{commit_date}.%{shortcommit}
Expand Down Expand Up @@ -65,6 +65,7 @@ Source1: https://github.com/PrismLauncher/libnbtplusplus/archive/%{libnbt
Source2: https://github.com/stachenov/quazip/archive/%{quazip_commit}/quazip-%{quazip_commit}.tar.gz
Source3: https://github.com/marzer/tomlplusplus/archive/%{tomlplusplus_commit}/tomlplusplus-%{tomlplusplus_commit}.tar.gz
Source4: https://github.com/gulrak/filesystem/archive/%{filesystem_commit}/filesystem-%{filesystem_commit}.tar.gz
Patch0: fix-disable-FLOAT16-in-toml.patch

BuildRequires: cmake >= 3.15
BuildRequires: extra-cmake-modules
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From c1763cc4b0871230a86e58aad07aacaf7b19182c Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu <[email protected]>
Date: Tue, 15 Nov 2022 21:23:20 +0100
Subject: [PATCH] fix: disable FLOAT16 in toml++

Signed-off-by: Sefa Eyeoglu <[email protected]>
---
CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0db05f98..8fc0d326 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,6 +70,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00")

+# Fix aarch64 build for toml++
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTOML_ENABLE_FLOAT16=0")
+
# set CXXFLAGS for build targets
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -D_FORTIFY_SOURCE=2 ${CMAKE_CXX_FLAGS_RELEASE}")

--
2.38.1

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%global filesystem_commit cd6805e94dd5d6346be1b75a54cdc27787319dd2
%global libnbtplusplus_commit 2203af7eeb48c45398139b583615134efd8d407f
%global quazip_commit 6117161af08e366c37499895b00ef62f93adc345
%global tomlplusplus_commit 4b166b69f28e70a416a1a04a98f365d2aeb90de8
%global tomlplusplus_commit 0a90913abf9390b9e08ab6d3b40ac11634553f38

%global commit_date %(date '+%Y%m%d')
%global git_rel .%{commit_date}.%{shortcommit}
Expand Down Expand Up @@ -65,6 +65,7 @@ Source1: https://github.com/PrismLauncher/libnbtplusplus/archive/%{libnbt
Source2: https://github.com/stachenov/quazip/archive/%{quazip_commit}/quazip-%{quazip_commit}.tar.gz
Source3: https://github.com/marzer/tomlplusplus/archive/%{tomlplusplus_commit}/tomlplusplus-%{tomlplusplus_commit}.tar.gz
Source4: https://github.com/gulrak/filesystem/archive/%{filesystem_commit}/filesystem-%{filesystem_commit}.tar.gz
Patch0: fix-disable-FLOAT16-in-toml.patch

BuildRequires: cmake >= 3.15
BuildRequires: extra-cmake-modules
Expand Down
27 changes: 27 additions & 0 deletions anda/games/prismlauncher-qt5/fix-disable-FLOAT16-in-toml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From c1763cc4b0871230a86e58aad07aacaf7b19182c Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu <[email protected]>
Date: Tue, 15 Nov 2022 21:23:20 +0100
Subject: [PATCH] fix: disable FLOAT16 in toml++

Signed-off-by: Sefa Eyeoglu <[email protected]>
---
CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0db05f98..8fc0d326 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,6 +70,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00")

+# Fix aarch64 build for toml++
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTOML_ENABLE_FLOAT16=0")
+
# set CXXFLAGS for build targets
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -D_FORTIFY_SOURCE=2 ${CMAKE_CXX_FLAGS_RELEASE}")

--
2.38.1

12 changes: 11 additions & 1 deletion anda/games/prismlauncher-qt5/prismlauncher-qt5.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
%global fancy_name PrismLauncher
%global real_name prismlauncher
%global repo https://github.com/%{fancy_name}/%{fancy_name}
%global tomlplusplus_commit 0a90913abf9390b9e08ab6d3b40ac11634553f38
%bcond_with qt6

# Change this variables if you want to use custom keys
Expand Down Expand Up @@ -40,7 +41,7 @@ Name: prismlauncher
Name: prismlauncher-qt5
%endif
Version: 5.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Minecraft launcher with ability to manage multiple instances
License: GPL-3.0-only
%if 0%{?suse_version}
Expand All @@ -50,6 +51,8 @@ Group: Amusements/Games
%endif
URL: https://prismlauncher.org/
Source0: %{repo}/releases/download/%{version}/%{fancy_name}-%{version}.tar.gz
Source1: https://github.com/marzer/tomlplusplus/archive/%{tomlplusplus_commit}/tomlplusplus-%{tomlplusplus_commit}.tar.gz
Patch0: fix-disable-FLOAT16-in-toml.patch

BuildRequires: cmake >= 3.15
BuildRequires: extra-cmake-modules
Expand Down Expand Up @@ -117,6 +120,10 @@ multiple installations of Minecraft at once (Fork of MultiMC)
%prep
%autosetup -n %{fancy_name}-%{version}

tar -xzf %{SOURCE1} -C libraries
rm -rf libraries/tomlplusplus/*
mv -f libraries/tomlplusplus-%{tomlplusplus_commit}/* libraries/tomlplusplus

# Do not set RPATH
sed -i "s|\$ORIGIN/||" CMakeLists.txt

Expand Down Expand Up @@ -159,6 +166,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.prismlauncher.Pri


%changelog
* Tue Nov 15 2022 seth <getchoo at tuta dot io> - 5.2-2
- use newer version of toml++

* Tue Nov 15 2022 root - 5.2-1
- new version

Expand Down
27 changes: 27 additions & 0 deletions anda/games/prismlauncher/fix-disable-FLOAT16-in-toml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From c1763cc4b0871230a86e58aad07aacaf7b19182c Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu <[email protected]>
Date: Tue, 15 Nov 2022 21:23:20 +0100
Subject: [PATCH] fix: disable FLOAT16 in toml++

Signed-off-by: Sefa Eyeoglu <[email protected]>
---
CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0db05f98..8fc0d326 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,6 +70,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00")

+# Fix aarch64 build for toml++
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTOML_ENABLE_FLOAT16=0")
+
# set CXXFLAGS for build targets
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -D_FORTIFY_SOURCE=2 ${CMAKE_CXX_FLAGS_RELEASE}")

--
2.38.1

12 changes: 11 additions & 1 deletion anda/games/prismlauncher/prismlauncher.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
%global fancy_name PrismLauncher
%global real_name prismlauncher
%global repo https://github.com/%{fancy_name}/%{fancy_name}
%global tomlplusplus_commit 0a90913abf9390b9e08ab6d3b40ac11634553f38
%bcond_without qt6

# Change this variables if you want to use custom keys
Expand Down Expand Up @@ -40,7 +41,7 @@ Name: prismlauncher
Name: prismlauncher-qt5
%endif
Version: 5.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Minecraft launcher with ability to manage multiple instances
License: GPL-3.0-only
%if 0%{?suse_version}
Expand All @@ -50,6 +51,8 @@ Group: Amusements/Games
%endif
URL: https://prismlauncher.org/
Source0: %{repo}/releases/download/%{version}/%{fancy_name}-%{version}.tar.gz
Source1: https://github.com/marzer/tomlplusplus/archive/%{tomlplusplus_commit}/tomlplusplus-%{tomlplusplus_commit}.tar.gz
Patch0: fix-disable-FLOAT16-in-toml.patch

BuildRequires: cmake >= 3.15
BuildRequires: extra-cmake-modules
Expand Down Expand Up @@ -117,6 +120,10 @@ multiple installations of Minecraft at once (Fork of MultiMC)
%prep
%autosetup -n %{fancy_name}-%{version}

tar -xzf %{SOURCE1} -C libraries
rm -rf libraries/tomlplusplus/*
mv -f libraries/tomlplusplus-%{tomlplusplus_commit}/* libraries/tomlplusplus

# Do not set RPATH
sed -i "s|\$ORIGIN/||" CMakeLists.txt

Expand Down Expand Up @@ -159,6 +166,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.prismlauncher.Pri


%changelog
* Tue Nov 15 2022 seth <getchoo at tuta dot io> - 5.2-2
- use newer version of toml++

* Tue Nov 15 2022 root - 5.2-1
- new version

Expand Down