aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile10
-rw-r--r--nx-X11/config/cf/Imake.tmpl3
-rw-r--r--nx-X11/config/cf/README1
-rw-r--r--nx-X11/programs/Xserver/Imakefile20
-rw-r--r--nx-X11/programs/Xserver/os/Imakefile8
-rw-r--r--nx-libs.spec24
6 files changed, 47 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index cb06a2840..8e3df819d 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,8 @@ XFONTLIB ?= $(shell pkg-config --modversion xfont2 1>/dev/null 2>/dev/null && ec
# Support older libXext versions.
XEXT_EXTRA_DEFINES ?= $(shell pkg-config --exists 'xextproto < 7.1.0' 1>/dev/null 2>/dev/null && echo "-DLEGACY_XEXT_PROTO")
+IMAKE_DEFINES ?=
+
NX_VERSION_MAJOR=$(shell ./version.sh 1)
NX_VERSION_MINOR=$(shell ./version.sh 2)
NX_VERSION_MICRO=$(shell ./version.sh 3)
@@ -99,7 +101,7 @@ version:
build-env: version
# prepare Makefiles and the nx-X11 symlinking magic
- ${MAKE} -C nx-X11 BuildIncludes FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)"
+ ${MAKE} -C nx-X11 BuildIncludes FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES)"
# set up environment for libNX_X11 build (X11 header files)
mkdir -p nx-X11/exports/include/nx-X11/
@@ -124,7 +126,7 @@ clean-env: version
[ -d exports/include/nx-X11/Xtrans ] && $(RM_DIR) exports/include/nx-X11/Xtrans/ || :
[ -d exports/include/nx-X11/ ] && $(RM_DIR) exports/include/nx-X11/ || :
- ${MAKE} -C nx-X11 CleanEnv FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)"
+ ${MAKE} -C nx-X11 CleanEnv FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES)"
build-lite:
cd nxcomp && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE}
@@ -148,8 +150,8 @@ build-full: build-env
# build nxagent fourth
./mesa-quilt push -a
- ${MAKE} -C nx-X11 BuildDependsOnly FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)"
- ${MAKE} -C nx-X11 World USRLIBDIR="$(USRLIBDIR)" SHLIBDIR="$(SHLIBDIR)" FONT_DEFINES="$(FONT_DEFINES)" XFONTLIB="$(XFONTLIB)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)"
+ ${MAKE} -C nx-X11 BuildDependsOnly FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES)"
+ ${MAKE} -C nx-X11 World USRLIBDIR="$(USRLIBDIR)" SHLIBDIR="$(SHLIBDIR)" FONT_DEFINES="$(FONT_DEFINES)" XFONTLIB="$(XFONTLIB)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES)"
# build nxproxy fifth
cd nxproxy && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE}
diff --git a/nx-X11/config/cf/Imake.tmpl b/nx-X11/config/cf/Imake.tmpl
index 86222d12a..d6ef779cb 100644
--- a/nx-X11/config/cf/Imake.tmpl
+++ b/nx-X11/config/cf/Imake.tmpl
@@ -563,6 +563,9 @@ X_BYTE_ORDER = ByteOrder
#ifndef HasLegacyXfont1
#define HasLegacyXfont1 NO
#endif
+#ifndef UseTIRPC
+#define UseTIRPC NO
+#endif
#ifndef GzipLibrary /* if OS config didn't define it, assume it's -lz */
#define GzipLibrary -lz
#endif
diff --git a/nx-X11/config/cf/README b/nx-X11/config/cf/README
index 59a08f45c..24ac7f52c 100644
--- a/nx-X11/config/cf/README
+++ b/nx-X11/config/cf/README
@@ -148,6 +148,7 @@ Imake.tmpl provides defaults for the following variables:
UnalignedReferencesAllowed boolean for unaligned copies ok
UsrLibDir directory in which to install libraries
YaccCmd command to run yacc
+ UseTIRPC force usage of libtirpc
X11.tmpl provides defaults for the following variables:
diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile
index 5d86a534d..64c4e2e7f 100644
--- a/nx-X11/programs/Xserver/Imakefile
+++ b/nx-X11/programs/Xserver/Imakefile
@@ -292,20 +292,28 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \
XPMLIB = -lXpm
XMLLIB = `pkg-config --libs libxml-2.0`
PIXMANLIB = `pkg-config --libs pixman-1`
-ZLIB = $$(pkg-config --exists 'zlib' >/dev/null 2>&1 && pkg-config --libs 'zlib' || echo "-lz")
+ZLIB = $$(pkg-config --exists 'zlib' >/dev/null 2>&1 && pkg-config --libs 'zlib' || printf '%s' '-lz')
PNGLIB = `pkg-config --libs libpng`
JPEGLIB = -ljpeg
+TIRPC_LIB =
+
+#if HasSecureRPC
+#if UseTIRPC
+TIRPC_LIB = $$(pkg-config --libs 'libtirpc')
+#endif
+#endif
+
NXAGENT = hw/nxagent/LibraryTargetName(nxagent)
NXCOMPEXT = hw/nxagent/compext/LibraryTargetName(compext)
NXAGENTLIBS = PreFbLibs $(NXAGENT) FbPostFbLibs $(NXCOMPEXT) $(NXAGENT) $(MI)
-NXAGENTSYSLIBS = $(LDPRELIBS) $(XLIB) $(SYSLIBS) $(XPMLIB) $(XMLLIB)
-NXCOMPEXTSYSLIBS = $(PIXMANLIB) $(ZLIB) $(PNGLIB) $(JPEGLIB)
+NXAGENTSYSLIBS = $(LDPRELIBS) $(XLIB) $(SYSLIBS) $(XPMLIB) $(XMLLIB) $(PIXMANLIB) $(TIRPC_LIB)
+NXCOMPEXTSYSLIBS = $(ZLIB) $(PNGLIB) $(JPEGLIB)
#if HasParallelMake
MakeMutex($(NXAGENTDIRS) $(NXCOMPEXT) $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXCOMPEXTSYSLIBS) $(NXAGENTSYSLIBS))
#endif
#if ForceServerRemake
-$(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS)
+$(NXAGENTOBJS) $(NXAGENTLIBS):: $(NXAGENTDIRS)
@if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi
#endif
#if NXLibraries
@@ -485,7 +493,7 @@ MakeMutex($(NXWINDIRS) $(NXWINOBJS) $(NXWINLIB) $(NXWINLIBS) $(NXWINSYSLIBS) $(N
#endif
#if ForceServerRemake
-$(NXWINOBJS) $(NXWINLIB) $(NXWINLIBS) $(NXWINSYSLIBS) $(NXWINNXLIBS):: $(NXWINDIRS)
+$(NXWINOBJS) $(NXWINLIB) $(NXWINLIBS):: $(NXWINDIRS)
@if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi
#endif
@@ -542,7 +550,7 @@ MakeMutex($(NXWINDIRS) $(NXWINOBJS) $(NXWINLIB) $(NXWINLIBS) $(NXWINSYSLIBS) $(N
#endif
#if ForceServerRemake
-$(NXWINOBJS) $(NXWINLIB) $(NXWINLIBS) $(NXWINSYSLIBS) $(NXWINNXLIBS):: $(NXWINDIRS)
+$(NXWINOBJS) $(NXWINLIB) $(NXWINLIBS):: $(NXWINDIRS)
@if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi
#endif
diff --git a/nx-X11/programs/Xserver/os/Imakefile b/nx-X11/programs/Xserver/os/Imakefile
index 7932e32cd..da39c57ba 100644
--- a/nx-X11/programs/Xserver/os/Imakefile
+++ b/nx-X11/programs/Xserver/os/Imakefile
@@ -75,10 +75,17 @@ XDMAUTHOBJS =
XDMAUTHSCRS =
#endif
+TIRPC_INCLUDES =
+
#if HasSecureRPC
RPCDEFS = -DSECURE_RPC
RPCOBJS = rpcauth.o
RPCSRCS = rpcauth.c
+
+#if UseTIRPC
+TIRPC_INCLUDES = $$(pkg-config --cflags-only-I 'libtirpc')
+#endif
+
#else
RPCDEFS =
RPCOBJS =
@@ -209,6 +216,7 @@ BOOTSTRAPCFLAGS =
-I$(TOP)/lib/Xau \
$(NX_INCLUDES) \
`pkg-config --cflags-only-I pixman-1` \
+ $(TIRPC_INCLUDES) \
$(NULL)
DEPEND_DEFINES = $(XDMCP_DEFINES) \
diff --git a/nx-libs.spec b/nx-libs.spec
index e918c6092..3298473cc 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
@@ -407,10 +407,16 @@ EOF
chmod a+x my_configure;
# The RPM macro for the linker flags does not exist on EPEL
%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro}
-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}"
+SHLIBGLOBALSFLAGS="%{__global_ldflags}"
+LOCAL_LDFLAGS="%{__global_ldflags}"
+CDEBUGFLAGS="%{?__global_cppflags} %{?__global_cflags} %{?optflags}"
+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 \
@@ -440,6 +446,9 @@ chmod 755 %{buildroot}%{_libdir}/lib*.so*
rm -r %{buildroot}%{_includedir}/GL
rm -r %{buildroot}%{_includedir}/nx-X11/extensions/XK*.h
rm -r %{buildroot}%{_includedir}/nx-X11/extensions/*Xv*.h
+rm -r %{buildroot}%{_includedir}/nx-X11/extensions/XRes*.h
+rm -r %{buildroot}%{_includedir}/nx-X11/extensions/XIproto.h
+rm -r %{buildroot}%{_includedir}/nx-X11/extensions/XI.h
rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans
#Remove our shared libraries' .la files before wrapping up the packages
@@ -553,9 +562,6 @@ rm %{buildroot}%{_libdir}/*.la
%{_includedir}/nx-X11/keysym.h
%{_includedir}/nx-X11/keysymdef.h
%{_includedir}/nx-X11/extensions/Xdbeproto.h
-%{_includedir}/nx-X11/extensions/XI.h
-%{_includedir}/nx-X11/extensions/XIproto.h
-%{_includedir}/nx-X11/extensions/XResproto.h
%{_includedir}/nx-X11/extensions/bigreqstr.h
%{_includedir}/nx-X11/extensions/composite.h
%{_includedir}/nx-X11/extensions/compositeproto.h