commit: 420937fa0027ab7ac01f8a1c424247dda81c37c8
Author: Cristian Othón Martínez Vera <cfuga <AT> cfuga <DOT> mx>
AuthorDate: Mon Feb 10 15:17:51 2025 +0000
Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Sun Feb 16 20:09:05 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=420937fa
net-misc/nx: fix compilation with clang
Also fix ```VariableOrderWrong``` for the ```${S}``` variable
Link: https://github.com/ArcticaProject/nx-libs/issues/1044
Link: https://trac.macports.org/ticket/71014
Closes: https://bugs.gentoo.org/930440
Signed-off-by: Cristian Othón Martínez Vera <cfuga <AT> cfuga.mx>
Closes: https://github.com/gentoo/gentoo/pull/40516
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>
net-misc/nx/files/nx-3.5.99.26-clang-bind.patch | 17 +++++++++++++++++
net-misc/nx/nx-3.5.99.26.ebuild | 5 +++--
net-misc/nx/nx-3.5.99.27.ebuild | 5 +++--
3 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/net-misc/nx/files/nx-3.5.99.26-clang-bind.patch
b/net-misc/nx/files/nx-3.5.99.26-clang-bind.patch
new file mode 100644
index 000000000000..112268b33b75
--- /dev/null
+++ b/net-misc/nx/files/nx-3.5.99.26-clang-bind.patch
@@ -0,0 +1,17 @@
+Fix:
+
+Loop.cpp:4224:34: error: invalid operands to binary expression ('__bind<int &,
sockaddr *&, unsigned int &>' and 'int')
+
+https://github.com/ArcticaProject/nx-libs/issues/1044
+https://bugs.gentoo.org/930440
+--- a/nxcomp/src/Loop.cpp
++++ b/nxcomp/src/Loop.cpp
+@@ -4221,7 +4221,7 @@
+ goto SetupSocketError;
+ }
+
+- if (bind(newFD, addr, addrlen) == -1)
++ if (::bind(newFD, addr, addrlen) == -1)
+ {
+ nxfatal << "Loop: PANIC! Call to bind failed for " << label
+ << ". Error is " << EGET()
diff --git a/net-misc/nx/nx-3.5.99.26.ebuild b/net-misc/nx/nx-3.5.99.26.ebuild
index 437f6f51c202..255ff13f8658 100644
--- a/net-misc/nx/nx-3.5.99.26.ebuild
+++ b/net-misc/nx/nx-3.5.99.26.ebuild
@@ -7,6 +7,7 @@ inherit autotools flag-o-matic toolchain-funcs
DESCRIPTION="NX compression technology core libraries"
HOMEPAGE="https://github.com/ArcticaProject/nx-libs"
SRC_URI="https://github.com/ArcticaProject/nx-libs/archive/${PV}.tar.gz ->
nx-libs-${PV}.tar.gz"
+S="${WORKDIR}/nx-libs-${PV}"
LICENSE="GPL-2"
SLOT="0"
@@ -41,8 +42,6 @@ BDEPEND="virtual/pkgconfig
RDEPEND+=" selinux? ( sec-policy/selinux-nx )"
-S="${WORKDIR}/nx-libs-${PV}"
-
PATCHES=(
# https://github.com/ArcticaProject/nx-libs/pull/1012
"${FILESDIR}/${PN}-3.5.99.26-binutils-2.36.patch"
@@ -53,6 +52,8 @@ PATCHES=(
# https://github.com/ArcticaProject/nx-libs/pull/1087
"${FILESDIR}/${PN}-3.5.99.26-gcc14-32bit.patch"
"${FILESDIR}/${PN}-3.5.99.26-gcc14-access.patch"
+ # https://github.com/ArcticaProject/nx-libs/issues/1044
+ "${FILESDIR}/${PN}-3.5.99.26-clang-bind.patch"
)
src_prepare() {
diff --git a/net-misc/nx/nx-3.5.99.27.ebuild b/net-misc/nx/nx-3.5.99.27.ebuild
index 9df06029d9a7..d4ef7e951c9a 100644
--- a/net-misc/nx/nx-3.5.99.27.ebuild
+++ b/net-misc/nx/nx-3.5.99.27.ebuild
@@ -8,6 +8,7 @@ DESCRIPTION="NX compression technology core libraries"
HOMEPAGE="https://github.com/ArcticaProject/nx-libs"
SRC_URI="https://github.com/ArcticaProject/nx-libs/archive/${PV}.tar.gz ->
nx-libs-${PV}.tar.gz"
+S="${WORKDIR}/nx-libs-${PV}"
LICENSE="GPL-2"
SLOT="0"
@@ -39,14 +40,14 @@ BDEPEND="virtual/pkgconfig
x11-misc/gccmakedep
x11-misc/imake"
-S="${WORKDIR}/nx-libs-${PV}"
-
PATCHES=(
"${FILESDIR}/${PN}-3.5.99.26-musl.patch"
"${FILESDIR}/${PN}-3.5.99.27-which.patch"
# https://github.com/ArcticaProject/nx-libs/pull/1087
"${FILESDIR}/${PN}-3.5.99.26-gcc14-32bit.patch"
"${FILESDIR}/${PN}-3.5.99.26-gcc14-access.patch"
+ # https://github.com/ArcticaProject/nx-libs/issues/1044
+ "${FILESDIR}/${PN}-3.5.99.26-clang-bind.patch"
)
src_prepare() {