Subject: Re: Looking for XF86_SVGA sources (XF 2.1) with NetBSD patches
To: Michael L. VanLoon -- Iowa State University <michaelv@iastate.edu>
From: Matthieu Herrb <matthieu@laas.fr>
List: current-users
Date: 04/15/1994 09:21:28
You wrote (in your message from Thu 14)
>
> >Where can I get XFree 2.1 sources ported to NetBSD (preferably before
> >off_t change) ? I want try to compile SVGA server with my favourite
> >optimization options.
> >
> >Thank in advance. Zdenek Salvet
> > salvet@nyx.dcs.muni,cz
>
> The XFree86-2.1 sources are generic -- there's one set that adapts
> itself to the OS you're building on. Look for them on ftp.x.org.
> You'll also need a full set of the mit X11R5 sources with patches,
> which are also on ftp.x.org.
Or you can get an already patched XFree86 source tree from
physics.su.oz.au:/XFree86/2.1-source
>
> Read the readme files with XFree86-2.1 source carefully and you should
> have no problems getting it to build.
>
There are a few problems however. Here are the patches provided by
Mark Weaver and Thomas Eberhardt. to build XFree86 2.1 on -current:
(binaries available from ftp.laas.fr:/pub/NetBSD/XFree86-2.1):
*** mit/config/imake.c.orig Sat Jan 15 13:57:38 1994
--- mit/config/imake.c Thu Apr 7 20:32:36 1994
***************
*** 591,597 ****
if ((infd = open(Imakefile, O_RDONLY)) < 0)
LogFatal("Cannot open %s for input.", Imakefile);
fstat(infd, &st);
! buf = Emalloc(st.st_size+1);
if (read(infd, buf, st.st_size) != st.st_size)
LogFatal("Cannot read all of %s:", Imakefile);
close(infd);
--- 591,597 ----
if ((infd = open(Imakefile, O_RDONLY)) < 0)
LogFatal("Cannot open %s for input.", Imakefile);
fstat(infd, &st);
! buf = Emalloc((int)(st.st_size+1));
if (read(infd, buf, st.st_size) != st.st_size)
LogFatal("Cannot read all of %s:", Imakefile);
close(infd);
***************
*** 732,738 ****
*/
fseek(tmpfd, 0, 0);
fstat(fileno(tmpfd), &st);
! pline = buf = Emalloc(st.st_size+1);
total_red = fread(buf, 1, st.st_size, tmpfd);
if (total_red != st.st_size)
LogFatal("cannot read %s\n", tmpMakefile);
--- 732,738 ----
*/
fseek(tmpfd, 0, 0);
fstat(fileno(tmpfd), &st);
! pline = buf = Emalloc((int)(st.st_size+1));
total_red = fread(buf, 1, st.st_size, tmpfd);
if (total_red != st.st_size)
LogFatal("cannot read %s\n", tmpMakefile);
***************
*** 742,748 ****
#if defined(SYSV) || defined(AMOEBA) || defined(_MINIX)
freopen(tmpfname, "w+", tmpfd);
#else /* !SYSV */
! ftruncate(fileno(tmpfd), 0);
#endif /* !SYSV */
initialized = TRUE;
fprintf (tmpfd, "# Makefile generated by imake - do not edit!\n");
--- 742,748 ----
#if defined(SYSV) || defined(AMOEBA) || defined(_MINIX)
freopen(tmpfname, "w+", tmpfd);
#else /* !SYSV */
! ftruncate(fileno(tmpfd), (off_t)0);
#endif /* !SYSV */
initialized = TRUE;
fprintf (tmpfd, "# Makefile generated by imake - do not edit!\n");
*** mit/server/ddx/x386/os-support/bsd/bsd_video.c.orig Sat Jan 15 13:57:26 1994
--- mit/server/ddx/x386/os-support/bsd/bsd_video.c Thu Apr 7 20:35:33 1994
***************
*** 33,38 ****
--- 33,42 ----
#include "x386Priv.h"
#include "xf86_OSlib.h"
+ #if defined(__NetBSD__) && !defined(MAP_FILE)
+ #define MAP_FILE 0
+ #endif
+
/***************************************************************************/
/* Video Memory Mapping section */
/***************************************************************************/
*** mit/config/bsdLib.tmpl.orig Thu Apr 7 20:53:09 1994
--- mit/config/bsdLib.tmpl Thu Apr 7 20:56:27 1994
***************
*** 2,10 ****
XCOMM $XConsortium: sunLib.tmpl,v 1.14.1.2 92/11/11 09:52.02 rws Exp $
/*
! * SunOS shared library template
*/
#ifndef SharedXlibRev
#define SharedXlibRev 2.0
#endif
--- 2,11 ----
XCOMM $XConsortium: sunLib.tmpl,v 1.14.1.2 92/11/11 09:52.02 rws Exp $
/*
! * Free/NetBSD shared library template
*/
+ #ifndef i386NetBsd
#ifndef SharedXlibRev
#define SharedXlibRev 2.0
#endif
***************
*** 32,37 ****
--- 33,67 ----
#ifndef SharedPexRev
#define SharedPexRev 2.0
#endif
+ #else /* i386NetBsd */
+ #ifndef SharedXlibRev
+ #define SharedXlibRev 3.0
+ #endif
+ #ifndef SharedOldXRev
+ #define SharedOldXRev 3.0
+ #endif
+ #ifndef SharedXtRev
+ #define SharedXtRev 3.0
+ #endif
+ #ifndef SharedXawRev
+ #define SharedXawRev 3.0
+ #endif
+ #ifndef SharedXmuRev
+ #define SharedXmuRev 3.0
+ #endif
+ #ifndef SharedXextRev
+ #define SharedXextRev 3.0
+ #endif
+ #ifndef SharedXinputRev
+ #define SharedXinputRev 3.0
+ #endif
+ #ifndef SharedXTrapRev
+ #define SharedXTrapRev 3.0
+ #endif
+ #ifndef SharedPexRev
+ #define SharedPexRev 3.0
+ #endif
+ #endif /* i386NetBsd */
SHLIBLDFLAGS = SharedLibraryLoadFlags
PICFLAGS = PositionIndependentCFlags
*** mit/server/ddx/x386/SuperProbe/OS_386BSD.c.orig Fri Apr 8 08:28:16 1994
--- mit/server/ddx/x386/SuperProbe/OS_386BSD.c Fri Apr 8 07:40:20 1994
***************
*** 48,53 ****
--- 48,56 ----
# undef CONSOLE_X_MODE_OFF
# define CONSOLE_X_MODE_OFF _IO('t',122)
#endif
+ #if defined(__NetBSD__) && !defined(MAP_FILE)
+ #define MAP_FILE 0
+ #endif
static int CONS_fd = -1;
static int BIOS_fd = -1;
Matthieu
------------------------------------------------------------------------------