diff options
author | Xin Yang <yangmame@icloud.com> | 2022-11-03 22:46:29 +0800 |
---|---|---|
committer | Yixun Lan <dlan@gentoo.org> | 2022-11-05 15:34:05 +0800 |
commit | 96be9583e4381a453a64c5f599cab9fa6444caf3 (patch) | |
tree | ecf85e1d075fa996e284e2750b7295d99f0fbc58 /net-misc/nx | |
parent | www-client/firefox-bin: drop 106.0.4 (diff) | |
download | gentoo-96be9583e4381a453a64c5f599cab9fa6444caf3.tar.gz gentoo-96be9583e4381a453a64c5f599cab9fa6444caf3.tar.bz2 gentoo-96be9583e4381a453a64c5f599cab9fa6444caf3.zip |
net-misc/nx: support riscv64 only for now
RISC-V only support little endian as standard,
this patch only adjust settings for riscv64,
so it should be pretty much safe to merge in.
Also patch already merged by upstream, see more info [1]
[1] https://github.com/ArcticaProject/nx-libs/pull/1023
Closes: https://bugs.gentoo.org/879343
Signed-off-by: Xin Yang <yangmame@icloud.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'net-misc/nx')
-rw-r--r-- | net-misc/nx/files/nx-3.5.99.26-riscv64-support.patch | 64 | ||||
-rw-r--r-- | net-misc/nx/nx-3.5.99.26.ebuild | 2 |
2 files changed, 66 insertions, 0 deletions
diff --git a/net-misc/nx/files/nx-3.5.99.26-riscv64-support.patch b/net-misc/nx/files/nx-3.5.99.26-riscv64-support.patch new file mode 100644 index 000000000000..79ef8b9b5f18 --- /dev/null +++ b/net-misc/nx/files/nx-3.5.99.26-riscv64-support.patch @@ -0,0 +1,64 @@ +From 460562852eb4b1e14d2eeb81d2b96ea5de6ef683 Mon Sep 17 00:00:00 2001 +From: Alexandre Ghiti <alexandre.ghiti@canonical.com> +Date: Fri, 10 Sep 2021 08:51:53 +0200 +Subject: [PATCH] nx-X11: Add support for riscv64 architecture + +Signed-off-by: Xin Yang <yangmame@icloud.com> +--- + nx-X11/config/cf/Imake.cf | 5 +++++ + nx-X11/config/cf/Imake.tmpl | 2 ++ + nx-X11/config/cf/linux.cf | 9 +++++++++ + 3 files changed, 16 insertions(+) + +diff --git a/nx-X11/config/cf/Imake.cf b/nx-X11/config/cf/Imake.cf +index 9d683b85..612bc4e3 100644 +--- a/nx-X11/config/cf/Imake.cf ++++ b/nx-X11/config/cf/Imake.cf +@@ -878,6 +878,11 @@ XCOMM Keep cpp from replacing path elements containing i486/i586/i686 + # undef __powerpc64__ + # undef tmp_set_big_endian + # endif ++# ifdef __riscv ++# if __riscv_xlen == 64 ++# define Riscv64Architecture ++# endif ++# endif + # ifdef sparc + # define SparcArchitecture + # undef sparc +diff --git a/nx-X11/config/cf/Imake.tmpl b/nx-X11/config/cf/Imake.tmpl +index de1fca93..266be8c5 100644 +--- a/nx-X11/config/cf/Imake.tmpl ++++ b/nx-X11/config/cf/Imake.tmpl +@@ -509,6 +509,8 @@ XCOMM the platform-specific parameters - edit site.def to change + #define ByteOrder X_BIG_ENDIAN + #elif defined(Ppc64LeArchitecture) + #define ByteOrder X_LITTLE_ENDIAN ++#elif defined(Riscv64Architecture) ++#define ByteOrder X_LITTLE_ENDIAN + #elif defined(HPArchitecture) + #define ByteOrder X_BIG_ENDIAN + #elif defined(SuperHArchitecture) +diff --git a/nx-X11/config/cf/linux.cf b/nx-X11/config/cf/linux.cf +index c3e9eaaf..6851be55 100644 +--- a/nx-X11/config/cf/linux.cf ++++ b/nx-X11/config/cf/linux.cf +@@ -783,6 +783,15 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) + # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines + #endif /* PpcArchitecture */ + ++#ifdef Riscv64Architecture ++# ifndef OptimizedCDebugFlags ++# define OptimizedCDebugFlags -O3 ++# endif ++# define LinuxMachineDefines -D__riscv64__ ++# define ServerOSDefines XFree86ServerOSDefines ++# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 ++#endif /* Riscv64Achitecture */ ++ + #ifdef s390Architecture + # ifndef OptimizedCDebugFlags + # define OptimizedCDebugFlags -O2 -fomit-frame-pointer GccAliasingArgs +-- +2.38.1 + diff --git a/net-misc/nx/nx-3.5.99.26.ebuild b/net-misc/nx/nx-3.5.99.26.ebuild index 7ac98b56e98d..1f7237d32c4b 100644 --- a/net-misc/nx/nx-3.5.99.26.ebuild +++ b/net-misc/nx/nx-3.5.99.26.ebuild @@ -45,6 +45,8 @@ S="${WORKDIR}/nx-libs-${PV}" PATCHES=( # https://github.com/ArcticaProject/nx-libs/pull/1012 "${FILESDIR}/${PN}-3.5.99.26-binutils-2.36.patch" + # https://github.com/ArcticaProject/nx-libs/pull/1023 + "${FILESDIR}/${PN}-3.5.99.26-riscv64-support.patch" ) src_prepare() { |