aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2018-03-09 09:11:06 +0100
committerMihai Moldovan <ionic@ionic.de>2018-03-15 12:45:37 +0100
commit9b1d00d308881d3b81785a08a22d952dd055177a (patch)
treef7d5e3fbc832dcc91694ea218cc8e428375bf188
parent0cd1392de2f5f0b1a2a8ae7701ac9ecd73ffaa2f (diff)
downloadnx-libs-9b1d00d308881d3b81785a08a22d952dd055177a.tar.gz
nx-libs-9b1d00d308881d3b81785a08a22d952dd055177a.tar.bz2
nx-libs-9b1d00d308881d3b81785a08a22d952dd055177a.zip
nx-libs.spec: force usage of libtirpc on Fedora > 27 and OpenSuSE Tumbleweed+ (soon to be Leap 15).
This utilizes IMAKE_DEFINES to pass down the value to UseTIRPC directly. Fixes: ArcticaProject/nx-libs#665
-rw-r--r--nx-libs.spec12
1 files changed, 9 insertions, 3 deletions
diff --git a/nx-libs.spec b/nx-libs.spec
index 107daad79..a380b836e 100644
--- a/nx-libs.spec
+++ b/nx-libs.spec
@@ -120,8 +120,8 @@ BuildRequires: xorg-x11-font-utils
BuildRequires: xorg-x11-proto-devel
BuildRequires: zlib-devel
-# RPC headers. Fedora 28+ phased them out of glibc, like upstream did.
-%if 0%{?fedora} > 27
+# RPC headers. Fedora 28+ and OpenSuSE Tumbleweed phased them out of glibc, like upstream did.
+%if 0%{?fedora} > 27 || 0%{?suse_version} > 1500
BuildRequires: libtirpc-devel
%endif
@@ -410,7 +410,13 @@ chmod a+x my_configure;
export SHLIBGLOBALSFLAGS="%{__global_ldflags}"
export LOCAL_LDFLAGS="%{__global_ldflags}"
export CDEBUGFLAGS="%{?__global_cppflags} %{?__global_cflags} %{?optflags}"
-make %{?_smp_mflags} CONFIGURE="$PWD/my_configure" PREFIX=%{_prefix} LIBDIR=%{_libdir} CDEBUGFLAGS="${CDEBUGFLAGS}" LOCAL_LDFLAGS="${LOCAL_LDFLAGS}" SHLIBGLOBALSFLAGS="${SHLIBGLOBALSFLAGS}"
+IMAKE_DEFINES=''
+FORCE_TIRPC='NO'
+%if 0%{?fedora} > 27 || 0%{?suse_version} > 1500
+FORCE_TIRPC='YES'
+%endif
+IMAKE_DEFINES="-DUseTIRPC=${FORCE_TIRPC}"
+make %{?_smp_mflags} CONFIGURE="$PWD/my_configure" PREFIX=%{_prefix} LIBDIR=%{_libdir} CDEBUGFLAGS="${CDEBUGFLAGS}" LOCAL_LDFLAGS="${LOCAL_LDFLAGS}" SHLIBGLOBALSFLAGS="${SHLIBGLOBALSFLAGS}" IMAKE_DEFINES="${IMAKE_DEFINES}"
%install
make install \