Commit c4a8556c authored by Jan Engelhardt's avatar Jan Engelhardt Committed by Mike Gabriel

Unique Library Names Patch (600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch).

We really want to make use of rpm's automatic dependency finding. Binaries are scanned for DT_NEEDED entries, the latter of which are then used for populating the "Requires"-type deps. The "nxagent" binary for example would require libX11.so.6. That incurs problems: 1. A package manager told to install nxagent could select xorg-x11 rather than nx-libs, even though nxagent depends on the NX version. 2. A package manager told to install $some_program could select nx-libs rather than xorg-x11 (since both provide libX11.so.6), but, since the NX library is in an obscure directory, running $some_program would fail as libX11.so.6 is not found. To solve this, give the NX libraries unique names different from the Xorg ones.
parent d4d3fe0e
#401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch
600_nx-X11+nxcompext+nxcompshad_unique-libnames.full.patch
601_nx-X11_build-option-changes-to-not-use-bundled-libraries.full.patch
602_nx-X11_initgroups.full.patch
603_nx-X11_compilation_warnings.full.patch
......
......@@ -2124,9 +2124,9 @@ LintLibReferences(varname,libname,libsource)
*/
#ifndef ProjectUnsharedFontLibReferences
#define ProjectUnsharedFontLibReferences() @@\
DEPFONTLIB = _UseCat($(USRLIBDIR)/,XBuildLibDir/,LibraryTargetName(Xfont)) @@\
FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lXfont @@\
LintLibReferences(XFONT,Xfont,$(FONTLIBSRC))
DEPFONTLIB = _UseCat($(USRLIBDIR)/,XBuildLibDir/,LibraryTargetName(NX_Xfont)) @@\
FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lNX_Xfont @@\
LintLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC))
#endif
/*
......@@ -2142,9 +2142,9 @@ LintLibReferences(XFONT,Xfont,$(FONTLIBSRC))
#ifndef SharedFontLibReferences
#define SharedFontLibReferences() @@\
SOFONTREV = SharedFontRev @@\
DEPFONTLIB = SharedLibDependencies(Xfont,$(FONTLIBSRC),SOFONTREV) @@\
FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lXfont @@\
LintLibReferences(XFONT,Xfont,$(FONTLIBSRC))
DEPFONTLIB = SharedLibDependencies(NX_Xfont,$(FONTLIBSRC),SOFONTREV) @@\
FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lNX_Xfont @@\
LintLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC))
#endif
/*
......
......@@ -389,7 +389,7 @@ JUMP_LDLIBS_libc = `$(CC) --print-libgcc-file-name` -lc
XCOMM libX11.so (X11, SM, ICE)
JUMP_ROOT_X11 = $(XLIBSRC)
JUMP_IS_HOST_X11 = YES
JUMP_STUBLIBS_X11 = libX11.sa libSM.sa libICE.sa
JUMP_STUBLIBS_X11 = libNX_X11.sa libNX_SM.sa libNX_ICE.sa
JUMP_SIBDIRS_X11 = $(JUMP_ROOT_SM) $(JUMP_ROOT_ICE)
JUMP_DIR_X11 = $(JUMP_ROOT_X11)/shared
JUMP_DEFS_X11 = $(XDMAUTHDEFS) $(XKB_DEFINES)
......@@ -400,9 +400,9 @@ JUMP_EXPORT_X11 = $(JUMP_DIR_X11)/jump.vars
JUMP_ADDRESS_X11 = 0x60200000
JUMP_JUMPTABLESIZE_X11 = 0x4000
JUMP_GOTSIZE_X11 = 4096
JUMP_STUBNAMES_X11 = libX11 libSM libICE
JUMP_STUBNAMES_X11 = libNX_X11 libNX_SM libNX_ICE
JUMP_STUBS_IMPORT_X11 = $(LIBC_SA)
JUMP_SIBARS_X11 = jump/libSM.a~ jump/libICE.a~
JUMP_SIBARS_X11 = jump/libNX_SM.a~ jump/libNX_ICE.a~
JUMP_LDLIBS_X11 = $(JUMP_SIBARS_X11) $(JUMP_LDLIBS_libc)
XCOMM libSM (part of libX11.so)
......@@ -435,9 +435,9 @@ JUMP_JUMPTABLESIZE_Xt = 0x4000
JUMP_GOTSIZE_Xt = 4096
JUMP_STUBNAMES_Xt = libXt libXmu libXext libXi libXtst libXp
JUMP_STUBS_IMPORT_Xt = $(JUMP_STUBS_IMPORT_X11)
JUMP_SIBARS_Xt = jump/libXmu.a~ jump/libXext.a~ jump/libXi.a~ jump/libXtst.a~ jump/libXp.a~
JUMP_LDLIBS_Xt = $(JUMP_SIBARS_Xt) $(JUMP_ROOT_ICE)/libICE.sa \
$(JUMP_ROOT_SM)/libSM.sa $(JUMP_ROOT_X11)/libX11.sa $(JUMP_LDLIBS_libc)
JUMP_SIBARS_Xt = jump/libNX_Xmu.a~ jump/libNX_Xext.a~ jump/libNX_Xi.a~ jump/libNX_Xtst.a~ jump/libNX_Xp.a~
JUMP_LDLIBS_Xt = $(JUMP_SIBARS_Xt) $(JUMP_ROOT_ICE)/libNX_ICE.sa \
$(JUMP_ROOT_SM)/libNX_SM.sa $(JUMP_ROOT_X11)/libNX_X11.sa $(JUMP_LDLIBS_libc)
XCOMM libXmu (part of libXt.so)
JUMP_ROOT_Xmu = $(XMUSRC)
......@@ -485,8 +485,8 @@ JUMP_JUMPTABLESIZE_Xaw = 0x4000
JUMP_GOTSIZE_Xaw = 4096
JUMP_STUBNAMES_Xaw = libXaw
JUMP_STUBS_IMPORT_Xaw = $(JUMP_STUBS_IMPORT_X11)
JUMP_LDLIBS_Xaw = $(JUMP_ROOT_Xt)/libXt.sa $(JUMP_ROOT_Xt)/libXmu.sa \
$(JUMP_ROOT_Xt)/libXext.sa $(JUMP_ROOT_X11)/libX11.sa \
JUMP_LDLIBS_Xaw = $(JUMP_ROOT_Xt)/libNX_Xt.sa $(JUMP_ROOT_Xt)/libNX_Xmu.sa \
$(JUMP_ROOT_Xt)/libNX_Xext.sa $(JUMP_ROOT_X11)/libNX_X11.sa \
$(JUMP_LDLIBS_libc)
# endif /* !UseInstalled */
......
......@@ -9,7 +9,7 @@ XCOMM $XFree86: xc/config/cf/lnxLib.tmpl,v 3.19 2003/10/15 22:47:48 herrb Exp $
#ifndef FixupLibReferences
#define FixupLibReferences() @@\
XMULIBONLY = -lXmu @@\
XMULIBONLY = -lNX_Xmu @@\
XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
#endif
......@@ -66,7 +66,7 @@ XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
#ifndef FixupLibReferences
#define FixupLibReferences() @@\
XMULIB = -lXmu $(XLIB)
XMULIB = -lNX_Xmu $(XLIB)
#endif
#endif /* UseElfFormat */
......
......@@ -82,7 +82,7 @@ NX_XCOMPEXTCONFIGTARGET = $(NX_XCOMPEXTLIBDIR)/config.status
#define DoExtraLib SharedLibX11
#define DoDebugLib DebugLibX11
#define DoProfileLib ProfileLibX11
#define LibName X11
#define LibName NX_X11
#define SoRev SOXLIBREV
#define HugeLibrary YES
#define IncSubdir X11
......
......@@ -4,7 +4,7 @@ XCOMM $XFree86: xc/lib/XRes/Imakefile,v 1.3 2003/10/13 21:19:28 herrb Exp $
#define DoSharedLib SharedLibXRes
#define DoDebugLib DebugLibXRes
#define DoProfileLib ProfileLibXRes
#define LibName XRes
#define LibName NX_XRes
#define SoRev SOXRESREV
#define LibHeaders NO
......
......@@ -10,7 +10,7 @@ XCOMM $XFree86: xc/lib/Xau/Imakefile,v 3.5 1999/04/17 09:08:11 dawes Exp $
#define DoExtraLib SharedLibXau
#define DoDebugLib DebugLibXau
#define DoProfileLib ProfileLibXau
#define LibName Xau
#define LibName NX_Xau
#define SoRev SOXAUTHREV
#define IncSubdir X11
......
......@@ -14,7 +14,7 @@ SOXCOMPOSITEREV=1.0.0
#define DoDebugLib DebugLibXcomposite
#define DoProfileLib ProfileLibXcomposite
#define LibName Xcomposite
#define LibName NX_Xcomposite
#define SoRev SOXCOMPOSITEREV
#define IncSubdir X11
#define IncSubSubdir extensions
......
......@@ -7,4 +7,4 @@ Name: Xcomposite
Description: X Composite Library
Version: @VERSION@
Cflags: -I${includedir} @XCOMPOSITE_CFLAGS@ @X_CFLAGS@
Libs: -L${libdir} -lXcomposite @XCOMPOSITE_LIBS@ @X_LIBS@
Libs: -L${libdir} -lNX_Xcomposite @XCOMPOSITE_LIBS@ @X_LIBS@
......@@ -15,7 +15,7 @@ SOXCURSORREV=1.0.2
#define DoDebugLib DebugLibXcursor
#define DoProfileLib ProfileLibXcursor
#define LibName Xcursor
#define LibName NX_Xcursor
#define SoRev SOXCURSORREV
#define IncSubdir X11
#define IncSubSubdir Xcursor
......
......@@ -12,4 +12,4 @@ Description: X Cursor Library
Version: @VERSION@
Requires: xrender
Cflags: -I${includedir} ${xrendercflags} ${xcflags}
Libs: -L${libdir} -lXcursor ${xrenderlibs} ${xlibs}
Libs: -L${libdir} -lNX_Xcursor ${xrenderlibs} ${xlibs}
......@@ -14,7 +14,7 @@ SOXDAMAGEREV=1.0.1
#define DoDebugLib DebugLibXdamage
#define DoProfileLib ProfileLibXdamage
#define LibName Xdamage
#define LibName NX_Xdamage
#define SoRev SOXDAMAGEREV
#define IncSubdir X11
#define IncSubSubdir extensions
......
......@@ -7,4 +7,4 @@ Name: Xdamage
Description: X Damage Library
Version: @VERSION@
Cflags: -I${includedir} @XDAMAGE_CFLAGS@ @X_CFLAGS@
Libs: -L${libdir} -lXdamage @XDAMAGE_LIBS@ @X_LIBS@
Libs: -L${libdir} -lNX_Xdamage @XDAMAGE_LIBS@ @X_LIBS@
......@@ -10,7 +10,7 @@ XCOMM $XFree86: xc/lib/Xdmcp/Imakefile,v 3.4 1999/04/17 09:08:12 dawes Exp $
#define DoExtraLib SharedLibXdmcp
#define DoDebugLib DebugLibXdmcp
#define DoProfileLib ProfileLibXdmcp
#define LibName Xdmcp
#define LibName NX_Xdmcp
#define SoRev SOXDMCPREV
#define IncSubdir X11
......
......@@ -10,7 +10,7 @@ XCOMM $XFree86: xc/lib/Xext/Imakefile,v 1.12 2002/10/16 00:37:27 dawes Exp $
#define DoExtraLib SharedLibXext
#define DoDebugLib DebugLibXext
#define DoProfileLib ProfileLibXext
#define LibName Xext
#define LibName NX_Xext
#define SoRev SOXEXTREV
#define LibHeaders NO
......
......@@ -14,7 +14,7 @@ SOXFIXESREV=3.0.0
#define DoDebugLib DebugLibXfixes
#define DoProfileLib ProfileLibXfixes
#define LibName Xfixes
#define LibName NX_Xfixes
#define SoRev SOXFIXESREV
#define IncSubdir X11
#define IncSubSubdir extensions
......
......@@ -7,4 +7,4 @@ Name: Xfixes
Description: X Fixes Library
Version: @VERSION@
Cflags: -I${includedir} @X_CFLAGS@
Libs: -L${libdir} -lXfixes @X_LIBS@
Libs: -L${libdir} -lNX_Xfixes @X_LIBS@
......@@ -4,7 +4,7 @@ XCOMM $XFree86: xc/lib/Xinerama/Imakefile,v 1.4 2002/10/16 00:37:31 dawes Exp $
#define DoSharedLib SharedLibXinerama
#define DoDebugLib DebugLibXinerama
#define DoProfileLib ProfileLibXinerama
#define LibName Xinerama
#define LibName NX_Xinerama
#define SoRev SOXINERAMAREV
#define LibHeaders NO
......
......@@ -12,7 +12,7 @@ XCOMM $XFree86: xc/lib/Xpm/Imakefile,v 1.1 1999/01/11 14:40:02 dawes Exp $
#define DoDebugLib DebugLibXpm
#define DoProfileLib ProfileLibXpm
#define HasSharedData NO
#define LibName Xpm
#define LibName NX_Xpm
#define SoRev SOXPMREV
#define IncSubdir X11
......
......@@ -5,7 +5,7 @@ XCOMM $XdotOrg: xc/lib/Xrandr/Imakefile,v 1.5 2005/10/24 23:30:21 alanc Exp $
#define DoSharedLib SharedLibXrandr
#define DoDebugLib DebugLibXrandr
#define DoProfileLib ProfileLibXrandr
#define LibName Xrandr
#define LibName NX_Xrandr
#define SoRev SOXRANDRREV
#define IncSubdir X11
#define IncSubSubdir extensions
......
......@@ -74,7 +74,7 @@ clean::
#define DoSharedLib SharedLibXrender
#define DoDebugLib DebugLibXrender
#define DoProfileLib ProfileLibXrender
#define LibName Xrender
#define LibName NX_Xrender
#define SoRev SOXRENDERREV
#ifdef XBuildIncDir
......
......@@ -8,4 +8,4 @@ Description: X Render Library
Version: @VERSION@
Requires: @X_REQUIRES@
Cflags: -I${includedir} @RENDER_CFLAGS@ @X_NON_PKG_CFLAGS@
Libs: -L${libdir} -lXrender @X_NON_PKG_LIBS@
Libs: -L${libdir} -lNX_Xrender @X_NON_PKG_LIBS@
......@@ -10,7 +10,7 @@ XCOMM $XFree86: xc/lib/Xtst/Imakefile,v 1.2 1998/12/20 11:57:12 dawes Exp $
#define DoExtraLib SharedLibXtst
#define DoDebugLib DebugLibXtst
#define DoProfileLib ProfileLibXtst
#define LibName Xtst
#define LibName NX_Xtst
#define SoRev SOXTESTREV
#define LibHeaders NO
......
......@@ -31,7 +31,7 @@ XCOMM $XFree86: xc/lib/font/Imakefile,v 3.37 2003/10/24 16:21:12 tsi Exp $
STUBDIRS = stubs
#endif
LIBNAME = Xfont
LIBNAME = NX_Xfont
SOREV = $(SOFONTREV)
#ifndef SeparateSharedCompile
......
......@@ -10,7 +10,7 @@ XCOMM $XFree86: xc/lib/oldX/Imakefile,v 1.2 1998/12/20 11:57:19 dawes Exp $
#define DoExtraLib SharedOldX
#define DoDebugLib DebugOldX
#define DoProfileLib ProfileOldX
#define LibName oldX
#define LibName NX_oldX
#define SoRev SOOLDXREV
#define IncSubdir X11
......
......@@ -11,7 +11,7 @@ XCOMM $XFree86: xc/lib/xkbfile/Imakefile,v 3.5 2003/10/15 21:23:38 herrb Exp $
#define DoDebugLib DebugLibxkbfile
#define DoProfileLib ProfileLibxkbfile
#define HasSharedData NO
#define LibName xkbfile
#define LibName NX_xkbfile
#define SoRev SOXKBFILEREV
#define IncSubdir X11
#define IncSubSubdir extensions
......
......@@ -6,7 +6,7 @@ XCOMM $XFree86: xc/lib/xkbui/Imakefile,v 3.4 2003/10/15 21:23:38 herrb Exp $
#define DoDebugLib DebugLibxkbui
#define DoProfileLib ProfileLibxkbui
#define HasSharedData NO
#define LibName xkbui
#define LibName NX_xkbui
#define SoRev SOXKBUIREV
#define IncSubdir X11
#define IncSubSubdir extensions
......
......@@ -313,7 +313,7 @@ XPFBLIBS = dix/LibraryTargetName(xpstubs)
FONTBASE = $(FONTLIBSRC)/fontbase.o \
$(FONTLIBSRC)/LibraryTargetName(fontbase)
#if XserverStaticFontLib
FONT = $(FONTLIBSRC)/LibraryTargetName(Xfont) $(FREETYPE2LIB)
FONT = $(FONTLIBSRC)/LibraryTargetName(NX_Xfont) $(FREETYPE2LIB)
#else
FONT = $(LDPRELIB) $(XFONTLIB) $(FREETYPE2LIB)
#endif
......@@ -994,7 +994,7 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \
dix/main.o
#endif
XPMLIB = -lXpm
XPMLIB = -lNX_Xpm
NXAGENT = hw/nxagent/LibraryTargetName(nxagent)
NXAGENTLIBS = PreFbLibs $(NXAGENT) FbPostFbLibs $(NXAGENT) $(MI)
NXAGENTSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS) $(XPMLIB)
......@@ -1012,18 +1012,18 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS)
#if defined(SunArchitecture)
NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \
-lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lXrender -lXfixes \
-L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXdmcp \
-lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lNX_Xfixes \
-L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lNX_Xdmcp \
`pkg-config --libs libxml-2.0`
#elif defined(cygwinArchitecture)
NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \
-lXcomp -lXcompext -lXrender -lX11 -lXext -lXcomposite -lXfixes \
-L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp \
-lXcomp -lXcompext -lNX_Xrender -lX11 -lNX_Xext -lNX_Xcomposite -lNX_Xfixes \
-L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdmcp \
`pkg-config --libs libxml-2.0`
#else
NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \
-lXcomp -lXcompext -lXcompshad -lXrender -lX11 -lXext -lXfixes \
-L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite -lXinerama -lXdmcp \
-lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lNX_Xfixes \
-L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lNX_Xinerama -lNX_Xdmcp \
`pkg-config --libs libxml-2.0`
#endif
......@@ -1078,7 +1078,7 @@ nxagent_static_nolibs: nxagent
else exit 0; fi
$(CCLINK) -o nxagent_static_nolibs -Wl,-Bstatic $(LDOPTIONS) $(NXAGENTOBJS) \
$(NXAGENTLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER) $(LDLIBS) $(FONTLIBS) \
$(LDPRELIBS) $(SYSLIBS) -Wl,-Bdynamic -lXext -lX11 $(EXTRA_LOAD_FLAGS)
$(LDPRELIBS) $(SYSLIBS) -Wl,-Bdynamic -lNX_Xext -lNX_X11 $(EXTRA_LOAD_FLAGS)
#endif /* NXAgentServer */
#if defined(XnonServer) && XnonServer
......
......@@ -42,12 +42,12 @@ CCINCLUDES = -I. -I../nxcomp
CCDEFINES =
LDFLAGS = @LDFLAGS@ -L../nxcomp
LIBS = @LIBS@ -lz -lX11 -lXcomp
LIBS = @LIBS@ -lz -lNX_X11 -lXcomp
#
# Only if THREADS is defined
#
# LIBS = @LIBS@ -lz -ljpeg -lpthread -lX11 -lXcomp
# LIBS = @LIBS@ -lz -ljpeg -lpthread -lNX_X11 -lXcomp
#
srcdir = @srcdir@
......
......@@ -48,7 +48,7 @@ CCINCLUDES =
CCDEFINES =
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@ -lX11
LIBS = @LIBS@ -lNX_X11
#
# Only if THREADS is defined.
......@@ -139,7 +139,7 @@ all: depend $(LIBARCHIVE) $(LIBDLL)
else
EXTRALIBS = -lXtst -lXrandr -lXdamage
EXTRALIBS = -lNX_Xtst -lNX_Xrandr -lNX_Xdamage
all: depend $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment