-diff -urN xc.org/config/cf/Imake.cf xc/config/cf/Imake.cf
---- xc.org/config/cf/Imake.cf 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/cf/Imake.cf 2003-11-21 15:20:56.000000000 +0100
-@@ -766,6 +766,10 @@
+--- xc/Makefile 2006-06-11 00:28:00.305505872 +0200
++++ xc/Makefile-new 2006-06-11 00:31:06.181248464 +0200
+@@ -3,7 +3,7 @@
+ # Luna users will need to either run make as "make MAKE=make"
+ # or add "MAKE = make" to this file.
+
+-SHELL = /bin/sh
++SHELL = /bin/sh -e
+ RM = rm -f
+ MV = mv
+ WORLDOPTS =
+--- xc/config/cf/Imake.cf.orig 2006-01-09 15:56:12.000000000 +0100
++++ xc/config/cf/Imake.cf 2006-06-11 00:28:00.321503440 +0200
+@@ -800,6 +800,10 @@
# define s390Architecture
# undef __s390__
# endif /* s390 */
# ifdef __alpha
# define AlphaArchitecture
# undef __alpha
-diff -urN xc.org/config/cf/Imake.tmpl xc/config/cf/Imake.tmpl
---- xc.org/config/cf/Imake.tmpl 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/cf/Imake.tmpl 2003-11-21 15:20:56.000000000 +0100
-@@ -261,7 +261,7 @@
+--- xc/config/cf/Imake.tmpl.orig 2006-04-03 01:12:46.000000000 +0200
++++ xc/config/cf/Imake.tmpl 2006-06-11 00:28:00.323503136 +0200
+@@ -308,7 +308,7 @@
#ifndef BuildHtmlManPages
#ifdef RmanCmd
#else
#define BuildHtmlManPages NO
#endif
-@@ -854,11 +854,7 @@
+@@ -904,11 +904,7 @@
#define LintlibDir $(USRLIBDIR)/lint
#endif
#ifndef SystemManDirectory
#endif
#ifndef ManDirectoryRoot
#ifdef ProjectRoot
-@@ -998,7 +994,7 @@
+@@ -1055,7 +1051,7 @@
#define NoRConst NO /* YES if const for structs of funcs is bad */
#endif
#ifndef InstPgmFlags
#endif
#ifndef InstBinFlags
#define InstBinFlags -m 0755
-@@ -1140,7 +1136,7 @@
+@@ -1212,7 +1208,7 @@
#define CppCmd /LibDirName/cpp
#endif
#ifndef RawCppCmd
#endif
#ifndef CppNoLineInfoOption
#define CppNoLineInfoOption /**/
-diff -urN xc.org/config/cf/linux.cf xc/config/cf/linux.cf
---- xc.org/config/cf/linux.cf 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/cf/linux.cf 2003-11-21 15:20:56.000000000 +0100
-@@ -325,7 +325,7 @@
- */
- #if BuildXF86DRI
- # if defined(i386Architecture)
--# define BuildLibGlxWithoutPIC YES
-+# define BuildLibGlxWithoutPIC NO
- # endif
- #endif
-
-@@ -344,7 +344,7 @@
- # if defined(i386Architecture) || defined(ia64Architecture) || defined(SparcArchitecture) || defined(AlphaArchitecture) || defined(AMD64Architecture)
- # if OSMajorVersion == 2
- /* Only tested for Linux 2.2.0 through 2.2.12 */
--# if OSMinorVersion == 2 && OSTeenyVersion <= 12
-+# if OSMinorVersion == 2
- # define BuildXF86DRM YES
- # else
- /* Only tested for Linux 2.3.0 through 2.3.18 */
-@@ -740,7 +740,7 @@
-
- #define HasVarRun YES
- #ifndef VarDbDirectory
--# define VarDbDirectory $(VARDIR)/lib
-+# define VarDbDirectory /var/lib
- #endif
-
- #ifndef XF86OSCardDrivers
-diff -urN xc.org/config/cf/site.def xc/config/cf/site.def
---- xc.org/config/cf/site.def 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/cf/site.def 2003-11-21 15:20:56.000000000 +0100
-@@ -119,10 +119,14 @@
- #define HasSentinel YES
- */
-
--/*
- #undef DefaultUserPath
--#define DefaultUserPath /bin:/usr/bin:$(BINDIR):/usr/ucb:/usr/local/bin
--*/
-+#define DefaultUserPath /usr/local/bin:/bin:/usr/bin:$(BINDIR)
-+#undef DefaultSystemPath
-+#define DefaultSystemPath /sbin:/bin:/usr/sbin:/usr/bin:$(BINDIR)
-+
-+
-+#define HasPam YES
-+#define HasPamMisc YES
-
-
- /* You do NOT need SetUID if you only run the server under xdm */
-diff -urN xc.org/config/cf/X11.tmpl xc/config/cf/X11.tmpl
---- xc.org/config/cf/X11.tmpl 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/cf/X11.tmpl 2003-11-21 15:20:56.000000000 +0100
-@@ -1261,8 +1261,12 @@
+--- xc/config/cf/X11.tmpl.orig 2006-04-18 17:57:25.000000000 +0200
++++ xc/config/cf/X11.tmpl 2006-06-11 00:28:00.327502528 +0200
+@@ -1649,8 +1649,12 @@
# define UsbMouseSupport NO
#endif
#endif
/* X-TrueType settings */
-@@ -1385,7 +1389,7 @@
+@@ -1783,7 +1787,7 @@
#define ConfigDir $(LIBDIR)/config
#endif
#ifndef DocDir
#endif
#ifndef DocHtmlDir
#define DocHtmlDir $(DOCDIR)/html
-@@ -1397,31 +1401,31 @@
+@@ -1795,31 +1799,31 @@
#define DocPdfDir $(DOCDIR)/PDF
#endif
#ifndef FontDir
#endif
#ifndef NlsDir
#define NlsDir $(LIBDIR)/nls
-@@ -1430,23 +1434,20 @@
+@@ -1828,23 +1832,20 @@
#define XLocaleDir $(LIBDIR)/locale
#endif
#ifndef LbxproxyDir
#ifndef InstallSecurityConfig
#define InstallSecurityConfig YES /* Install sample security policy */
#endif
-@@ -1478,10 +1479,10 @@
+@@ -1876,10 +1877,10 @@
#define OsNameDefines /* as nothing */
#endif
#ifndef DefaultUserPath /* for xdm */
#endif
#ifndef DefaultSystemShell /* for xdm to set in SHELL */
#define DefaultSystemShell BourneShell
-@@ -1608,7 +1609,7 @@
+@@ -2014,7 +2015,7 @@
HTMLINDEXCMD = HtmlIndexCmd
CLIENTSRC = $(TOP)/clients
DEMOSRC = $(TOP)/demos
XDOCMACROS = $(DOCUTILSRC)/macros.t
-@@ -1622,7 +1623,7 @@
+@@ -2028,7 +2029,7 @@
SERVERSRC = $(XTOP)/programs/Xserver
CONTRIBSRC = ContribDir
UNSUPPORTEDSRC = UnsupportedDir
RGBSRC = $(XTOP)/programs/rgb
BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf
MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir
-diff -urN xc.org/config/cf/xf86site.def xc/config/cf/xf86site.def
---- xc.org/config/cf/xf86site.def 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/cf/xf86site.def 2003-11-21 15:20:56.000000000 +0100
-@@ -260,8 +260,8 @@
- /*
- * To not build/install the Cyrillic fonts, uncomment the following
- *
--#define BuildCyrillicFonts NO
+--- xc/config/cf/linux.cf.orig 2006-04-03 01:12:46.000000000 +0200
++++ xc/config/cf/linux.cf 2006-06-11 00:28:00.329502224 +0200
+@@ -335,7 +335,7 @@
*/
-+#define BuildCyrillicFonts YES
+ #if BuildXF86DRI
+ # if defined(i386Architecture)
+-# define BuildLibGlxWithoutPIC YES
++# define BuildLibGlxWithoutPIC NO
+ # endif
+ #endif
- /*
- * To not install the local font directory, uncomment the following
-@@ -307,27 +307,26 @@
- * HasGlide2 to YES and set the Glide2IncDir variable.
- * HasGlide2 is per default NO.
- *
--#define HasGlide2 YES
- */
-+#define HasGlide2 YES
+@@ -749,7 +749,7 @@
- /*
- * Set the path to your Glide include files.
- *
--#define Glide2IncDir /usr/include/glide
- */
-+#define Glide2IncDir /usr/include/glide
+ #define HasVarRun YES
+ #ifndef VarDbDirectory
+-# define VarDbDirectory $(VARDIR)/lib
++# define VarDbDirectory /var/lib
+ #endif
+
+ #ifndef XF86OSCardDrivers
+--- xc/config/cf/site.def.orig 2006-01-09 15:56:13.000000000 +0100
++++ xc/config/cf/site.def 2006-06-11 00:28:00.330502072 +0200
+@@ -104,10 +104,10 @@
+ #define HasSentinel YES
+ */
+
+-/*
+ #undef DefaultUserPath
+-#define DefaultUserPath /bin:/usr/bin:$(BINDIR):/usr/ucb:/usr/local/bin
+-*/
++#define DefaultUserPath /usr/local/bin:/bin:/usr/bin:$(BINDIR)
++#undef DefaultSystemPath
++#define DefaultSystemPath /sbin:/bin:/usr/sbin:/usr/bin:$(BINDIR)
- /*
- * Have glide 3?
- *
--#define HasGlide3 YES
- */
-+#define HasGlide3 YES
+ /* You do NOT need SetUID if you only run the server under xdm */
+--- xc/config/cf/xf86site.def.orig 2006-04-08 20:33:00.000000000 +0200
++++ xc/config/cf/xf86site.def 2006-06-11 00:28:00.335501312 +0200
+@@ -257,8 +257,8 @@
/*
- * Set the path to your Glide 3 include files.
+ * To not build/install the Cyrillic fonts, uncomment the following
*
--#define Glide3IncDir /usr/include/glide3
+-#define BuildCyrillicFonts NO
*/
--
-+#define Glide3IncDir /usr/include/glide3
-
++#define BuildCyrillicFonts YES
/*
-@@ -429,8 +428,8 @@
+ * To not install the local font directory, uncomment the following
+@@ -426,8 +425,8 @@
* Some Linux releases don't have a libtermcap. In this case you may need
* to uncomment the following
*
-#define TermcapLibrary -lncurses
*/
-+#define TermcapLibrary -lncurses
++#define TermcapLibrary -ltinfo
/*
* Build a server that dynamically loads the modules by setting
-@@ -605,8 +604,8 @@
+@@ -602,8 +601,8 @@
* To forceably build static libraries in addition to shared libraries,
* uncomment this.
*
/*
* Uncomment this if your default tools (eg, gcc, ld, as, etc) are
-diff -urN xc.org/config/cf/xfree86.cf xc/config/cf/xfree86.cf
---- xc.org/config/cf/xfree86.cf 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/cf/xfree86.cf 2003-11-21 15:20:56.000000000 +0100
-@@ -128,7 +128,7 @@
+@@ -691,4 +691,8 @@
+ #define X86EMU_LIBPATH /usr/local/lib
+ */
+
+-
++/* these must be before linux.cf is included */
++#define UsePam YES
++#define HasPam YES
++#define HasPamMisc YES
++#define HasFontconfig YES
+--- xc/config/cf/xfree86.cf.orig 2006-04-26 02:28:16.000000000 +0200
++++ xc/config/cf/xfree86.cf 2006-06-11 00:28:00.337501008 +0200
+@@ -148,7 +148,7 @@
#define XConfigFile XF86Config
#endif
#ifndef XConfigDir
#endif
#ifndef XLogFile
#define XLogFile XFree86
-@@ -760,7 +760,7 @@
+@@ -788,7 +788,7 @@
# ifndef XF86CardDrivers
# define XF86CardDrivers mga glint nv s3 s3virge sis savage \
DevelDrivers newport \
XF86OSCardDrivers XF86ExtraCardDrivers
# endif
-diff -urN xc.org/config/imake/imake.c xc/config/imake/imake.c
---- xc.org/config/imake/imake.c 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/imake/imake.c 2003-11-21 15:20:56.000000000 +0100
-@@ -1057,6 +1057,7 @@
+--- xc/config/imake/imake.c.orig 2006-01-09 15:56:14.000000000 +0100
++++ xc/config/imake/imake.c 2006-06-11 00:28:00.339500704 +0200
+@@ -1056,6 +1056,7 @@
static char* suse = "/etc/SuSE-release";
static char* redhat = "/etc/redhat-release";
static char* debian = "/etc/debian_version";
fprintf (inFile, "%s\n", "#define LinuxUnknown 0");
fprintf (inFile, "%s\n", "#define LinuxSuSE 1");
-@@ -1071,6 +1072,7 @@
+@@ -1070,6 +1071,7 @@
fprintf (inFile, "%s\n", "#define LinuxTurbo 10");
fprintf (inFile, "%s\n", "#define LinuxWare 11");
fprintf (inFile, "%s\n", "#define LinuxYggdrasil 12");
#ifdef CROSSCOMPILE
if (CrossCompiling) {
-@@ -1097,6 +1099,11 @@
+@@ -1096,6 +1098,11 @@
* at the content of /etc/debian_version */
return;
}
/* what's the definitive way to tell what any particular distribution is? */
fprintf (inFile, "%s\n", "#define DefaultLinuxDistribution LinuxUnknown");
-diff -urN xc.org/Makefile xc/Makefile
---- xc.org/Makefile 2003-11-21 15:13:57.000000000 +0100
-+++ xc/Makefile 2003-11-21 15:20:56.000000000 +0100
-@@ -8,7 +8,7 @@
- # or add "MAKE = make" to this file.
+--- xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile.orig 2006-03-11 18:36:50.000000000 +0100
++++ xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile 2006-06-11 00:28:00.340500552 +0200
+@@ -108,7 +108,7 @@
- RELEASE = "Release 6.6"
--SHELL = /bin/sh
-+SHELL = /bin/sh -e
- RM = rm -f
- MV = mv
- WORLDOPTS =
-diff -urN xc.org/programs/xdm/config/Xres.cpp xc/programs/xdm/config/Xres.cpp
---- xc.org/programs/xdm/config/Xres.cpp 2003-11-21 15:18:39.000000000 +0100
-+++ xc/programs/xdm/config/Xres.cpp 2003-11-21 15:21:45.000000000 +0100
-@@ -71,9 +71,9 @@
+ #if HasNCurses
+ CURSESLIB = NCursesLibName
+-CURSESDEFINES = -DHAS_NCURSES
++CURSESDEFINES = -DHAS_NCURSES -I/usr/include/ncurses
+ #endif
+
+ XF86CONFIGFILE = XConfigFile
+--- xc/programs/xdm/config/Xres.cpp.orig 2006-01-09 16:01:06.000000000 +0100
++++ xc/programs/xdm/config/Xres.cpp 2006-06-11 00:28:00.341500400 +0200
+@@ -65,10 +65,10 @@
+ #endif /* XPM */
XHASHendif
#ifdef XPM
- XHASHif PLANES >= 8
+-XHASHif PLANES >= 8
-xlogin*logoFileName: BITMAPDIR/**//XDM_PIXMAP
++XHASHif PLANES > 8
+xlogin*logoFileName: BITMAPDIR/**//xdm-pld-logo.xpm
XHASHelse
-xlogin*logoFileName: BITMAPDIR/**//XDM_BWPIXMAP
XHASHendif
xlogin*useShape: true
xlogin*logoPadding: 10
-diff -urN xc.org/programs/xdm/resource.c xc/programs/xdm/resource.c
---- xc.org/programs/xdm/resource.c 2003-11-21 15:18:38.000000000 +0100
-+++ xc/programs/xdm/resource.c 2003-11-21 15:20:56.000000000 +0100
-@@ -84,31 +84,31 @@
+--- xc/programs/xdm/resource.c.orig 2006-01-09 16:01:04.000000000 +0100
++++ xc/programs/xdm/resource.c 2006-06-11 00:28:00.342500248 +0200
+@@ -83,31 +83,31 @@
*/
#ifndef __EMX__
#ifndef DEF_SERVER_LINE
#endif
#ifndef DEF_AUTH_NAME
#ifdef HASXDMAUTH
-@@ -118,7 +118,7 @@
+@@ -117,7 +117,7 @@
#endif
#endif
#ifndef DEF_AUTH_DIR
#endif
#ifndef DEF_USER_AUTH_DIR
#define DEF_USER_AUTH_DIR "/tmp"
-diff -urN xc.org/programs/xinit/Imakefile xc/programs/xinit/Imakefile
---- xc.org/programs/xinit/Imakefile 2003-11-21 15:18:47.000000000 +0100
-+++ xc/programs/xinit/Imakefile 2003-11-21 15:20:56.000000000 +0100
-@@ -46,11 +46,12 @@
+--- xc/programs/xinit/Imakefile.orig 2006-03-06 17:06:23.000000000 +0100
++++ xc/programs/xinit/Imakefile 2006-06-11 00:28:00.342500248 +0200
+@@ -41,11 +41,12 @@
#endif
InstallManPage(startx,$(MANDIR))
-#else
-InstallNonExecFileNoClobber($(SAMPLECONFIG),$(XINITDIR))
-#endif
-+XCOMM Red Hat gets this from a different package
++XCOMM PLD gets this from a different package
+XCOMM #if InstallXinitConfig
+XCOMM InstallNonExecFile($(SAMPLECONFIG),$(XINITDIR))
+XCOMM #else
LinkConfDirectory(xinit,.,xinit,.)
-diff -urN xc.org/programs/Xserver/hw/xfree86/xf86cfg/Imakefile xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile
---- xc.org/programs/Xserver/hw/xfree86/xf86cfg/Imakefile 2003-11-21 15:17:43.000000000 +0100
-+++ xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile 2003-11-21 15:20:56.000000000 +0100
-@@ -100,7 +100,7 @@
-
- #if HasNCurses
- CURSESLIB = NCursesLibName
--CURSESDEFINES = -DHAS_NCURSES
-+CURSESDEFINES = -DHAS_NCURSES -I/usr/include/ncurses
- #endif
-
- XF86CONFIGFILE = XConfigFile
-diff -urN xc.org/programs/xterm/Imakefile xc/programs/xterm/Imakefile
---- xc.org/programs/xterm/Imakefile 2003-11-21 15:19:09.000000000 +0100
-+++ xc/programs/xterm/Imakefile 2003-11-21 15:20:56.000000000 +0100
-@@ -36,6 +36,10 @@
- #define XkbClientLibs /**/
+--- xc/programs/xterm/Imakefile.orig 2008-11-01 20:57:39.000000000 +0100
++++ xc/programs/xterm/Imakefile 2013-02-15 18:39:33.885210018 +0100
+@@ -102,6 +102,10 @@
+ # endif
#endif
+#if InstallXtermSetUID
#ifndef SpecialCObjectRule
#define SpecialCObjectRule(module,ignore,defines) \
module.o: ; $(CC) -c defines $(CFLAGS) module.c
-@@ -57,6 +61,8 @@
- PTYLIB = -lpucc
- #endif
-
-+ PTYLIB = -lutil
-+
- #if defined(NetBSDArchitecture) || defined(OpenBSDArchitecture) || \
- (defined(LinuxArchitecture) && \
- (LinuxCLibMajorVersion == 6) && (LinuxCLibMinorVersion < 1))
-@@ -115,7 +121,7 @@
- MISC_DEFINES = /* -DALLOWLOGGING -DALLOWLOGFILEEXEC */
- XKB_DEFINES = XkbClientDefines
- PATH_DEFINES = -DPROJECTROOT=$(PROJECTROOT)
-- DEFINES = -I. $(XKB_DEFINES) $(TERMCAPDEFINES) $(FEATURE_DEFINES) $(SCROLLBAR_RIGHT) $(UTF8_OPTION) $(XRFDEF) $(PATH_DEFINES) $(TRACEDEF)
-+ DEFINES = -I. -I/usr/include/ncurses $(XKB_DEFINES) $(TERMCAPDEFINES) $(FEATURE_DEFINES) $(SCROLLBAR_RIGHT) $(UTF8_OPTION) $(XRFDEF) $(PATH_DEFINES) $(TRACEDEF)
- INCLUDES = $(XRFINCLUDES)
+@@ -209,7 +213,7 @@
+ $(SCROLLBAR_RIGHT) $(UTF8_OPTION) $(XRFDEF) $(PATH_DEFINES) \
+ $(XTERM_FEATURE_OPTIONS) $(PUTENVDEF) \
+ $(IMAKEDEFINES) $(TRACEDEF)
+- INCLUDES = $(OBSOLETE_INCLUDES) $(XRFINCLUDES)
++ INCLUDES = $(OBSOLETE_INCLUDES) $(XRFINCLUDES) -I/usr/include/ncurses
#ifdef OS2Architecture
-diff -urN xc.org/programs/xterm/xterm.h xc/programs/xterm/xterm.h
---- xc.org/programs/xterm/xterm.h 2003-11-21 15:19:12.000000000 +0100
-+++ xc/programs/xterm/xterm.h 2003-11-21 15:20:56.000000000 +0100
-@@ -73,7 +73,7 @@
- #endif
-
- #ifndef DFT_TERMTYPE
--#define DFT_TERMTYPE "xterm"
-+#define DFT_TERMTYPE "xterm-color"
- #endif
-
- #ifndef X_NOT_POSIX
+ MAINSRC = os2main.c