diff options
author | Eric Anholt <anholt@FreeBSD.org> | 2002-08-21 21:53:59 +0000 |
---|---|---|
committer | Eric Anholt <anholt@FreeBSD.org> | 2002-08-21 21:53:59 +0000 |
commit | cdfd4e95c7d9c7c1fc298f471759eb8393fecd60 (patch) | |
tree | 9302b782e6fa7c7dac3b539518b3459340e4f383 /graphics/dri-devel | |
parent | Change MAINTAINER to my FreeBSD address. (diff) |
dri-devel port provides development DRI libraries and X Server.
Reviewed by: lioux
Diffstat (limited to 'graphics/dri-devel')
-rw-r--r-- | graphics/dri-devel/Makefile | 65 | ||||
-rw-r--r-- | graphics/dri-devel/distinfo | 1 | ||||
-rw-r--r-- | graphics/dri-devel/files/patch-bsdLib.rules | 37 | ||||
-rw-r--r-- | graphics/dri-devel/files/patch-drv-Imakefile | 11 | ||||
-rw-r--r-- | graphics/dri-devel/files/patch-host.def | 53 | ||||
-rw-r--r-- | graphics/dri-devel/files/patch-linuxcompat | 141 | ||||
-rw-r--r-- | graphics/dri-devel/pkg-comment | 1 | ||||
-rw-r--r-- | graphics/dri-devel/pkg-descr | 8 | ||||
-rw-r--r-- | graphics/dri-devel/pkg-message | 14 | ||||
-rw-r--r-- | graphics/dri-devel/pkg-plist | 18 |
10 files changed, 349 insertions, 0 deletions
diff --git a/graphics/dri-devel/Makefile b/graphics/dri-devel/Makefile new file mode 100644 index 000000000000..f865e119803c --- /dev/null +++ b/graphics/dri-devel/Makefile @@ -0,0 +1,65 @@ +# Ports collection makefile for: dri development +# Date created: Wed Aug 21 14:47:34 PDT 2002 +# Whom: Eric Anholt <anholt@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= dri +PORTVERSION= 20020820 +CATEGORIES= graphics x11-servers +MASTER_SITES= http://people.freebsd.org/~anholt/dri/files/ +PKGNAMESUFFIX= -devel +DISTNAME= dri-r200-${PORTVERSION} + +MAINTAINER= anholt@FreeBSD.org + +RUN_DEPENDS= XFree86:${PORTSDIR}/x11-servers/XFree86-4-Server + +WRKSRC= ${WRKDIR}/xc + +USE_BZIP2= yes +USE_X_PREFIX= yes +MAKE_ENV= FBSDCFLAGS="${CFLAGS}" +INSTALLS_SHLIB= yes + +DRILIST= i810/i810_dri.so i830/i830_dri.so \ + r128/r128_dri.so radeon/radeon_dri.so r200/r200_dri.so +# gamma/gamma_dri.so mga/mga_dri.so tdfx/tdfx_dri.so +DDXLIST= ati/r128_drv.o ati/radeon_drv.o \ + i810/i810_drv.o \ + mga/mga_drv.o tdfx/tdfx_drv.o +XMAKEFILE_TARGETS= VerifyOS version.def Makefiles includes depend + +do-configure: + @${RM} -f ${WRKSRC}/config/cf/version.def + @${ECHO} "" > ${WRKSRC}/config/cf/version.def + @cd ${WRKSRC} && ${MAKE} Makefile.boot +.for target in ${XMAKEFILE_TARGETS} + @cd ${WRKSRC} && ${MAKE} -f xmakefile ${target} +.endfor + +do-install: + ${INSTALL_DATA} ${WRKSRC}/lib/GL/GL/libGL.so.1.2 ${PREFIX}/lib/libGL.so.1 + ${INSTALL_DATA} ${WRKSRC}/lib/GLU/libGLU.so.1.3 ${PREFIX}/lib/libGLU.so.1 + ${INSTALL_DATA} ${WRKSRC}/lib/GL/mesa/src/OSmesa/libOSMesa.so.4.0 ${PREFIX}/lib/libOSMesa.so.4 +.for i in ${DRILIST} + ${INSTALL_DATA} ${WRKSRC}/lib/GL/mesa/src/drv/${i} \ + ${PREFIX}/lib/modules/dri +.endfor +.for i in ${DDXLIST} + ${INSTALL_DATA} ${WRKSRC}/programs/Xserver/hw/xfree86/drivers/${i} \ + ${PREFIX}/lib/modules/drivers +.endfor + ${INSTALL_DATA} ${WRKSRC}/programs/Xserver/hw/xfree86/os-support/bsd/drm/libdrm.a \ + ${PREFIX}/lib/modules/freebsd/ + ${INSTALL_DATA} ${WRKSRC}/programs/Xserver/GL/dri/libdri.a \ + ${PREFIX}/lib/modules/extensions/ + ${INSTALL_DATA} ${WRKSRC}/programs/Xserver/GL/libglx.a \ + ${PREFIX}/lib/modules/extensions/ + ${INSTALL_DATA} ${WRKSRC}/programs/Xserver/GL/mesa/GLcore/libGLcore.a \ + ${PREFIX}/lib/modules/extensions/ + ${INSTALL_PROGRAM} ${WRKSRC}/programs/Xserver/XFree86 ${PREFIX}/bin + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/graphics/dri-devel/distinfo b/graphics/dri-devel/distinfo new file mode 100644 index 000000000000..aa9307cffc62 --- /dev/null +++ b/graphics/dri-devel/distinfo @@ -0,0 +1 @@ +MD5 (dri-r200-20020820.tar.bz2) = 5556f48239615b319a377bed28d8a293 diff --git a/graphics/dri-devel/files/patch-bsdLib.rules b/graphics/dri-devel/files/patch-bsdLib.rules new file mode 100644 index 000000000000..6feea2583eae --- /dev/null +++ b/graphics/dri-devel/files/patch-bsdLib.rules @@ -0,0 +1,37 @@ +--- config/cf/bsdLib.rules.orig Wed Jul 10 17:25:29 2002 ++++ config/cf/bsdLib.rules Wed Jul 10 17:25:32 2002 +@@ -306,6 +306,34 @@ + + #endif /* SharedDepLibraryTarget */ + ++/* ++ * SharedDepCplusplusLibraryTarget - generate rules to create a shared library. ++ */ ++#ifndef SharedDepCplusplusLibraryTarget ++#define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up) @@\ ++AllTarget(Concat(lib,libname.so.rev)) @@\ ++ @@\ ++Concat(lib,libname.so.rev): deplist @@\ ++ $(RM) $@~ @@\ ++ @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \ @@\ ++ (cd down; $(CXX) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ ++ $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ ++ LinkBuildSonameLibrary($$SONAME) @@\ ++ $(RM) $@ @@\ ++ $(MV) $@~ $@ @@\ ++ $(RM) Concat(lib,libname.so) @@\ ++ $(LN) $@ Concat(lib,libname.so) @@\ ++ LinkBuildLibrary($@) @@\ ++ LinkBuildLibrary(Concat(lib,libname.so)) @@\ ++ @@\ ++clean:: @@\ ++ @SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`; \ @@\ ++ set -x; $(RM) $$SONAME @@\ ++ $(RM) Concat(lib,libname.so) @@\ ++ $(RM) Concat(lib,libname.so.rev) ++ ++#endif /* SharedDepLibraryTarget */ ++ + #ifndef SharedDepModuleTarget + #define SharedDepModuleTarget(name,deps,solist) @@\ + AllTarget(name) @@\ diff --git a/graphics/dri-devel/files/patch-drv-Imakefile b/graphics/dri-devel/files/patch-drv-Imakefile new file mode 100644 index 000000000000..9aa4b44ddab6 --- /dev/null +++ b/graphics/dri-devel/files/patch-drv-Imakefile @@ -0,0 +1,11 @@ +--- lib/GL/mesa/src/drv/Imakefile.orig Sun Aug 18 16:59:00 2002 ++++ lib/GL/mesa/src/drv/Imakefile Sun Aug 18 16:59:14 2002 +@@ -5,7 +5,7 @@ + #define IHaveSubdirs + #define PassCDebugFlags + +-SUBDIRS = common r200 radeon ++SUBDIRS = common DriDrivers + + MakeSubdirs($(SUBDIRS)) + DependSubdirs($(SUBDIRS)) diff --git a/graphics/dri-devel/files/patch-host.def b/graphics/dri-devel/files/patch-host.def new file mode 100644 index 000000000000..75a729b16f46 --- /dev/null +++ b/graphics/dri-devel/files/patch-host.def @@ -0,0 +1,53 @@ +--- config/cf/host.def.orig Thu Jul 18 12:23:07 2002 ++++ config/cf/host.def Wed Aug 21 10:21:01 2002 +@@ -2,17 +2,17 @@ + * Set this for each DRI branch. It will be appended to the XFree86 version + * information. + */ +-#define XFree86CustomVersion "DRI trunk" ++#define XFree86CustomVersion "DRI trunk: dri-devel-20020820" + +-#define DefaultGcc2AxpOpt -O2 -mcpu=ev6 +-#define DefaultGcc2PpcOpt -O2 -mcpu=750 +-#define DefaultGcc2i386Opt -O2 ++#define DefaultGcc2AxpOpt ${FBSDCFLAGS} ++#define DefaultGcc2PpcOpt ${FBSDCFLAGS} ++#define DefaultGcc2i386Opt ${FBSDCFLAGS} + #if defined(AlphaArchitecture) +-# define LibraryCDebugFlags -O2 -mcpu=ev6 ++# define LibraryCDebugFlags ${FBSDCFLAGS} + #elif defined(PpcArchitecture) +-# define LibraryCDebugFlags -O2 -mcpu=750 ++# define LibraryCDebugFlags ${FBSDCFLAGS} + #else +-# define LibraryCDebugFlags -O2 ++# define LibraryCDebugFlags ${FBSDCFLAGS} + #endif + + #define BuildXFree86ConfigTools YES +@@ -25,14 +25,11 @@ + #else + + #define XF86CardDrivers tdfx i810 mga ati glint vga +-#define DriDrivers tdfx mga i810 r128 radeon gamma i830 /* sis ffb */ ++#define DriDrivers i810 i830 r128 radeon r200 /* sis ffb */ + + #endif + +-#define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \ +- -Wmissing-prototypes -Wmissing-declarations \ +- -Wnested-externs +-#define DefaultCCOptions -ansi GccWarningOptions -pipe -g ++#define DefaultCCOptions -g + + #define NormalLibGlx NO + +@@ -63,7 +60,7 @@ + /* #define ProjectRoot /usr/X11R6-DRI */ + + /* Optionally turn this on to force the kernel modules to build */ +-#define BuildXF86DRM YES ++#define BuildXF86DRM NO + + #define XF86AFB NO + diff --git a/graphics/dri-devel/files/patch-linuxcompat b/graphics/dri-devel/files/patch-linuxcompat new file mode 100644 index 000000000000..3b6af5bf5179 --- /dev/null +++ b/graphics/dri-devel/files/patch-linuxcompat @@ -0,0 +1,141 @@ +Index: drm_drv.h +=================================================================== +RCS file: /cvsroot/dri/xc/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/drm_drv.h,v +retrieving revision 1.3 +diff -u -r1.3 programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/drm_drv.h +--- programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/drm_drv.h 5 Jul 2002 08:31:07 -0000 1.3 ++++ programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/drm_drv.h 21 Aug 2002 07:13:26 -0000 +@@ -1221,27 +1221,83 @@ + } + + #if DRM_LINUX ++#define LINUX_IOCTL_DRM_MIN 0x6400 ++#define LINUX_IOCTL_DRM_MAX 0x64ff ++ + static linux_ioctl_function_t DRM( linux_ioctl); + static struct linux_ioctl_handler DRM( handler) = {DRM( linux_ioctl), LINUX_IOCTL_DRM_MIN, LINUX_IOCTL_DRM_MAX}; + SYSINIT (DRM( register), SI_SUB_KLD, SI_ORDER_MIDDLE, linux_ioctl_register_handler, &DRM( handler)); + SYSUNINIT(DRM( unregister), SI_SUB_KLD, SI_ORDER_MIDDLE, linux_ioctl_unregister_handler, &DRM( handler)); + ++#define LINUX_IOC_VOID IOC_VOID ++#define LINUX_IOC_IN IOC_OUT /* Linux has the values the other way around */ ++#define LINUX_IOC_OUT IOC_IN ++ + /* + * Linux emulation IOCTL + */ + static int + DRM(linux_ioctl)(DRM_STRUCTPROC *p, struct linux_ioctl_args* args) + { ++ u_long cmd = args->cmd; ++#define STK_PARAMS 128 ++ union { ++ char stkbuf[STK_PARAMS]; ++ long align; ++ } ubuf; ++ caddr_t data=NULL, memp=NULL; ++ u_int size = IOCPARM_LEN(cmd); ++ int error; ++#if (__FreeBSD_version >= 500000) ++ struct file *fp; ++#else ++ struct file *fp = p->p_fd->fd_ofiles[args->fd]; ++#endif ++ if ( size > STK_PARAMS ) { ++ if ( size > IOCPARM_MAX ) ++ return EINVAL; ++ memp = malloc( (u_long)size, DRM(M_DRM), M_WAITOK ); ++ data = memp; ++ } else { ++ data = ubuf.stkbuf; ++ } ++ ++ if ( cmd & LINUX_IOC_IN ) { ++ if ( size ) { ++ error = copyin( (caddr_t)args->arg, data, (u_int)size ); ++ if (error) { ++ if ( memp ) ++ free( data, DRM(M_DRM) ); ++ return error; ++ } ++ } else { ++ data = (caddr_t)args->arg; ++ } ++ } else if ( (cmd & LINUX_IOC_OUT) && size ) { ++ /* ++ * Zero the buffer so the user always ++ * gets back something deterministic. ++ */ ++ bzero( data, size ); ++ } else if ( cmd & LINUX_IOC_VOID ) { ++ *(caddr_t *)data = (caddr_t)args->arg; ++ } ++ + #if (__FreeBSD_version >= 500000) +- struct file *fp = p->td_proc->p_fd->fd_ofiles[args->fd]; ++ if ( (error = fget( p, args->fd, &fp )) != 0 ) { ++ if ( memp ) ++ free( memp, DRM(M_DRM) ); ++ return (error); ++ } ++ error = fo_ioctl( fp, cmd, data, p->td_ucred, p ); ++ fdrop( fp, p ); + #else +- struct file *fp = p->p_fd->fd_ofiles[args->fd]; ++ error = fo_ioctl( fp, cmd, data, p ); + #endif +- u_long cmd = args->cmd; +- caddr_t data = (caddr_t) args->arg; +- /* +- * Pass the ioctl off to our standard handler. +- */ +- return(fo_ioctl(fp, cmd, data, p)); ++ if ( error == 0 && (cmd & LINUX_IOC_OUT) && size ) ++ error = copyout( data, (caddr_t)args->arg, (u_int)size ); ++ if ( memp ) ++ free( memp, DRM(M_DRM) ); ++ return error; + } + #endif /* DRM_LINUX */ +Index: drm_os_freebsd.h +=================================================================== +RCS file: /cvsroot/dri/xc/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/drm_os_freebsd.h,v +retrieving revision 1.3 +diff -u -r1.3 programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/drm_os_freebsd.h +--- programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/drm_os_freebsd.h 5 Jul 2002 08:31:07 -0000 1.3 ++++ programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/drm_os_freebsd.h 21 Aug 2002 07:13:27 -0000 +@@ -65,7 +65,6 @@ + #include <sys/proc.h> + #include <machine/../linux/linux.h> + #include <machine/../linux/linux_proto.h> +-#include "drm_linux.h" + #endif + + #define DRM_TIME_SLICE (hz/20) /* Time slice for GLXContexts */ +@@ -140,14 +139,18 @@ + } \ + } while (0) + +-#define DRM_COPY_TO_USER_IOCTL(arg1, arg2, arg3) \ +- *arg1 = arg2 +-#define DRM_COPY_FROM_USER_IOCTL(arg1, arg2, arg3) \ +- arg1 = *arg2 +-#define DRM_COPY_TO_USER(arg1, arg2, arg3) \ +- copyout(arg2, arg1, arg3) +-#define DRM_COPY_FROM_USER(arg1, arg2, arg3) \ +- copyin(arg2, arg1, arg3) ++#define DRM_COPY_TO_USER_IOCTL(user, kern, size) \ ++ if ( IOCPARM_LEN(cmd) != size) \ ++ return EINVAL; \ ++ *user = kern; ++#define DRM_COPY_FROM_USER_IOCTL(kern, user, size) \ ++ if ( IOCPARM_LEN(cmd) != size) \ ++ return EINVAL; \ ++ kern = *user; ++#define DRM_COPY_TO_USER(user, kern, size) \ ++ copyout(kern, user, size) ++#define DRM_COPY_FROM_USER(kern, user, size) \ ++ copyin(user, kern, size) + /* Macros for userspace access with checking readability once */ + /* FIXME: can't find equivalent functionality for nocheck yet. + * It's be slower than linux, but should be correct. diff --git a/graphics/dri-devel/pkg-comment b/graphics/dri-devel/pkg-comment new file mode 100644 index 000000000000..e7d64afcab18 --- /dev/null +++ b/graphics/dri-devel/pkg-comment @@ -0,0 +1 @@ +Development DRI (3d HW OpenGL acceleration) drivers for some chipsets diff --git a/graphics/dri-devel/pkg-descr b/graphics/dri-devel/pkg-descr new file mode 100644 index 000000000000..9c386a9ea028 --- /dev/null +++ b/graphics/dri-devel/pkg-descr @@ -0,0 +1,8 @@ +dri-devel installs development DRI drivers from a CVS snapshot, +replacing parts of your existing XFree86-4 install. + +Current major updates include r200 (8500) support, Transform and +Lighting for radeons, and pageflipping support for radeons. Requires +updated DRM to use. See pkg-message for information. + +WWW: http://people.freebsd.org/~anholt/dri/ diff --git a/graphics/dri-devel/pkg-message b/graphics/dri-devel/pkg-message new file mode 100644 index 000000000000..ba2938a24798 --- /dev/null +++ b/graphics/dri-devel/pkg-message @@ -0,0 +1,14 @@ +For R200 (8500) support you will require an updated DRM. Radeon 1 +users will need an updated DRM if they want TCL (Transform & Lighting) +support. + +To do this, remove drm-kmod if you have it, and remove the DRM from +your kernel if you have it. You need /sys to point to the source +for your kernel. Then from this port's directory: + +$ make configure +$ cd work/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel +$ make -f Makefile.bsd depend all install + +This installs to your kernel's module directory, so you will have +to redo this after each kernel install. diff --git a/graphics/dri-devel/pkg-plist b/graphics/dri-devel/pkg-plist new file mode 100644 index 000000000000..74b0b4e3c451 --- /dev/null +++ b/graphics/dri-devel/pkg-plist @@ -0,0 +1,18 @@ +bin/XFree86 +lib/libGL.so.1 +lib/libGLU.so.1 +lib/libOSMesa.so.4 +lib/modules/dri/i810_dri.so +lib/modules/dri/i830_dri.so +lib/modules/dri/r128_dri.so +lib/modules/dri/r200_dri.so +lib/modules/dri/radeon_dri.so +lib/modules/drivers/i810_drv.o +lib/modules/drivers/mga_drv.o +lib/modules/drivers/r128_drv.o +lib/modules/drivers/radeon_drv.o +lib/modules/drivers/tdfx_drv.o +lib/modules/extensions/libGLcore.a +lib/modules/extensions/libdri.a +lib/modules/extensions/libglx.a +lib/modules/freebsd/libdrm.a |