diff options
author | anholt <anholt@FreeBSD.org> | 2002-09-02 02:58:12 +0800 |
---|---|---|
committer | anholt <anholt@FreeBSD.org> | 2002-09-02 02:58:12 +0800 |
commit | d38b59318177dbb21dcb606d68035e6a29c0134c (patch) | |
tree | 34d546da404f886db611e02061a924802e60f2ee /graphics | |
parent | b3bc0cb970f4715a158d0ac649be95c8224477ba (diff) | |
download | freebsd-ports-gnome-d38b59318177dbb21dcb606d68035e6a29c0134c.tar.gz freebsd-ports-gnome-d38b59318177dbb21dcb606d68035e6a29c0134c.tar.zst freebsd-ports-gnome-d38b59318177dbb21dcb606d68035e6a29c0134c.zip |
Update dri-devel to recent trunk, respect CFLAGS
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/dri-devel/Makefile | 29 | ||||
-rw-r--r-- | graphics/dri-devel/distinfo | 3 | ||||
-rw-r--r-- | graphics/dri-devel/files/patch-FreeBSD.cf | 25 | ||||
-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 |
6 files changed, 63 insertions, 199 deletions
diff --git a/graphics/dri-devel/Makefile b/graphics/dri-devel/Makefile index f865e119803c..ebc4afcfed1b 100644 --- a/graphics/dri-devel/Makefile +++ b/graphics/dri-devel/Makefile @@ -6,11 +6,16 @@ # PORTNAME= dri -PORTVERSION= 20020820 +PORTVERSION= 20020830 CATEGORIES= graphics x11-servers -MASTER_SITES= http://people.freebsd.org/~anholt/dri/files/ +MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= anholt/dri-devel PKGNAMESUFFIX= -devel -DISTNAME= dri-r200-${PORTVERSION} +DISTNAME= dri-20020826 + +PATCH_SITES= ${MASTER_SITE_LOCAL} +PATCH_SITE_SUBDIR= anholt/dri-devel +PATCHFILES= dri-20020826-${PORTVERSION}.diff.bz2 MAINTAINER= anholt@FreeBSD.org @@ -20,29 +25,35 @@ WRKSRC= ${WRKDIR}/xc USE_BZIP2= yes USE_X_PREFIX= yes -MAKE_ENV= FBSDCFLAGS="${CFLAGS}" +MAKE_ENV= FBSDCFLAGS="${CFLAGS}" FBSDCC="${CC}" FBSDCXX="${CXX}" INSTALLS_SHLIB= yes +USE_REINPLACE= 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 + 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 +post-patch: + @${REINPLACE_CMD} -e 's/DRI trunk/DRI trunk: dri-devel-${PORTVERSION}/g' \ + ${WRKSRC}/config/cf/host.def + do-configure: @${RM} -f ${WRKSRC}/config/cf/version.def @${ECHO} "" > ${WRKSRC}/config/cf/version.def - @cd ${WRKSRC} && ${MAKE} Makefile.boot + @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} Makefile.boot .for target in ${XMAKEFILE_TARGETS} - @cd ${WRKSRC} && ${MAKE} -f xmakefile ${target} + @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${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 + ${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 diff --git a/graphics/dri-devel/distinfo b/graphics/dri-devel/distinfo index aa9307cffc62..007861d9a58b 100644 --- a/graphics/dri-devel/distinfo +++ b/graphics/dri-devel/distinfo @@ -1 +1,2 @@ -MD5 (dri-r200-20020820.tar.bz2) = 5556f48239615b319a377bed28d8a293 +MD5 (dri-20020826.tar.bz2) = 2a598aeb7833e0840ab7046978feac2b +MD5 (dri-20020826-20020830.diff.bz2) = 90d3fde7aff2d810c565e244c87611c0 diff --git a/graphics/dri-devel/files/patch-FreeBSD.cf b/graphics/dri-devel/files/patch-FreeBSD.cf new file mode 100644 index 000000000000..894c432706d9 --- /dev/null +++ b/graphics/dri-devel/files/patch-FreeBSD.cf @@ -0,0 +1,25 @@ +Index: config/cf/FreeBSD.cf +=================================================================== +RCS file: /cvsroot/dri/xc/xc/config/cf/FreeBSD.cf,v +retrieving revision 1.15.24.1 +diff -u -r1.15.24.1 FreeBSD.cf +--- config/cf/FreeBSD.cf 15 Jul 2002 20:20:54 -0000 1.15.24.1 ++++ config/cf/FreeBSD.cf 23 Aug 2002 22:44:33 -0000 +@@ -144,6 +144,7 @@ + * + * ld: warning: libXThrStub.so.6, needed by libX11.so, not found + */ ++/* + #if BuildThreadStubLibrary && !UseInstalled + # define CcCmd $(CLIENTENVSETUP) cc + # define CplusplusCmd $(CLIENTENVSETUP) c++ +@@ -151,6 +152,9 @@ + # define CcCmd cc + # define CplusplusCmd c++ + #endif ++*/ ++#define CcCmd ${FBSDCC} ++#define CplusplusCmd ${FBSDCXX} + + #define CppCmd /usr/bin/cpp + #define PreProcessCmd CppCmd diff --git a/graphics/dri-devel/files/patch-drv-Imakefile b/graphics/dri-devel/files/patch-drv-Imakefile deleted file mode 100644 index 9aa4b44ddab6..000000000000 --- a/graphics/dri-devel/files/patch-drv-Imakefile +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 index 75a729b16f46..e0dca4a9bd0d 100644 --- a/graphics/dri-devel/files/patch-host.def +++ b/graphics/dri-devel/files/patch-host.def @@ -1,53 +1,32 @@ ---- 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. +--- config/cf/host.def.orig Fri Aug 30 15:05:13 2002 ++++ config/cf/host.def Fri Aug 30 15:12:10 2002 +@@ -4,16 +4,10 @@ */ --#define XFree86CustomVersion "DRI trunk" -+#define XFree86CustomVersion "DRI trunk: dri-devel-20020820" + #define XFree86CustomVersion "DRI trunk" -#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) +-#if defined(AlphaArchitecture) -# define LibraryCDebugFlags -O2 -mcpu=ev6 -+# define LibraryCDebugFlags ${FBSDCFLAGS} - #elif defined(PpcArchitecture) +-#elif defined(PpcArchitecture) -# define LibraryCDebugFlags -O2 -mcpu=750 -+# define LibraryCDebugFlags ${FBSDCFLAGS} - #else +-#else -# define LibraryCDebugFlags -O2 -+# define LibraryCDebugFlags ${FBSDCFLAGS} - #endif +-#endif ++#define DefaultGcc2AxpOpt ${FBSDCFLAGS} ++#define DefaultGcc2PpcOpt ${FBSDCFLAGS} ++#define DefaultGcc2i386Opt ${FBSDCFLAGS} ++#define LibraryCDebugFlags ${FBSDCFLAGS} #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 +@@ -32,7 +26,7 @@ + #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 deleted file mode 100644 index 3b6af5bf5179..000000000000 --- a/graphics/dri-devel/files/patch-linuxcompat +++ /dev/null @@ -1,141 +0,0 @@ -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. |