summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <dberkholz@gentoo.org>2004-10-14 03:32:11 +0000
committerDonnie Berkholz <dberkholz@gentoo.org>2004-10-14 03:32:11 +0000
commitfd211afc3d2e35925376e246fc51e7cbdb3bb3a3 (patch)
treec61f9a315698033cf322440f2e617da1e872f28e /media-video/mtxdrivers-pro
parentMarked 1.3.0 stable for x86 and sparc, and some old version cleanup. (diff)
downloadhistorical-fd211afc3d2e35925376e246fc51e7cbdb3bb3a3.tar.gz
historical-fd211afc3d2e35925376e246fc51e7cbdb3bb3a3.tar.bz2
historical-fd211afc3d2e35925376e246fc51e7cbdb3bb3a3.zip
Fix to reflect upstream's change from a tarball to a .run makeself archive. Also fix the compile on 2.6 kernels by adding mtxdrivers-pro-1.1.0_beta-r2-kernel-2.6-will1-20041013.patch. Thanks to Matthew Cerha <matthew.cerha@gmail.com> for giving me the incentive to do this and letting me know about the .run issue.
Diffstat (limited to 'media-video/mtxdrivers-pro')
-rw-r--r--media-video/mtxdrivers-pro/ChangeLog11
-rw-r--r--media-video/mtxdrivers-pro/Manifest7
-rw-r--r--media-video/mtxdrivers-pro/files/digest-mtxdrivers-pro-1.1.0_beta-r22
-rw-r--r--media-video/mtxdrivers-pro/files/mtxdrivers-pro-1.1.0_beta-r2-kernel-2.6-will1-20041013.patch505
-rw-r--r--media-video/mtxdrivers-pro/mtxdrivers-pro-1.1.0_beta-r2.ebuild13
5 files changed, 531 insertions, 7 deletions
diff --git a/media-video/mtxdrivers-pro/ChangeLog b/media-video/mtxdrivers-pro/ChangeLog
index 5379c3298e38..b18f957993cb 100644
--- a/media-video/mtxdrivers-pro/ChangeLog
+++ b/media-video/mtxdrivers-pro/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for media-video/mtxdrivers-pro
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/mtxdrivers-pro/ChangeLog,v 1.16 2004/10/04 06:37:25 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/mtxdrivers-pro/ChangeLog,v 1.17 2004/10/14 03:32:11 spyderous Exp $
+
+ 13 Oct 2004; Donnie Berkholz <spyderous@gentoo.org>;
+ +files/mtxdrivers-pro-1.1.0_beta-r2-kernel-2.6-will1-20041013.patch,
+ mtxdrivers-pro-1.1.0_beta-r2.ebuild:
+ Fix to reflect upstream's change from a tarball to a .run makeself archive.
+ Also fix the compile on 2.6 kernels by adding
+ mtxdrivers-pro-1.1.0_beta-r2-kernel-2.6-will1-20041013.patch. Thanks to
+ Matthew Cerha <matthew.cerha@gmail.com> for giving me the incentive to do this
+ and letting me know about the .run issue.
03 Oct 2004; Donnie Berkholz <spyderous@gentoo.org>;
-mtxdrivers-pro-1.1.0_beta-r1.ebuild, -mtxdrivers-pro-1.1.0_beta.ebuild:
diff --git a/media-video/mtxdrivers-pro/Manifest b/media-video/mtxdrivers-pro/Manifest
index 644e56186df9..815fdfc8f367 100644
--- a/media-video/mtxdrivers-pro/Manifest
+++ b/media-video/mtxdrivers-pro/Manifest
@@ -1,4 +1,5 @@
-MD5 a9d9405ea02996b6ff0c33b4b061a202 ChangeLog 2503
+MD5 0a7ee65f6f59f55a193c6dd451b593ec ChangeLog 2994
MD5 7fdeefd89269976f35269e66213a607c metadata.xml 156
-MD5 a6e8240f5877bb3df717b8d21820b5c6 mtxdrivers-pro-1.1.0_beta-r2.ebuild 2083
-MD5 3f15e26d6b4149ea16fdc1c338a6506f files/digest-mtxdrivers-pro-1.1.0_beta-r2 85
+MD5 6d83d48b5a2ebe88b126cf1e50349b2f mtxdrivers-pro-1.1.0_beta-r2.ebuild 2284
+MD5 8117b3258097c083df35b2a39e267bd2 files/mtxdrivers-pro-1.1.0_beta-r2-kernel-2.6-will1-20041013.patch 16754
+MD5 d4d9b7ac51ee44b940c5432cf290b565 files/digest-mtxdrivers-pro-1.1.0_beta-r2 82
diff --git a/media-video/mtxdrivers-pro/files/digest-mtxdrivers-pro-1.1.0_beta-r2 b/media-video/mtxdrivers-pro/files/digest-mtxdrivers-pro-1.1.0_beta-r2
index 3ec4bba8c835..697ed6cec084 100644
--- a/media-video/mtxdrivers-pro/files/digest-mtxdrivers-pro-1.1.0_beta-r2
+++ b/media-video/mtxdrivers-pro/files/digest-mtxdrivers-pro-1.1.0_beta-r2
@@ -1 +1 @@
-MD5 f6a0889f98df944b6d0e6b1d68dc3de5 mtxdrivers-rh9.0-v1.1.0-pro-beta.tar.gz 2658433
+MD5 adeda36e10fe63e13542a586e3a82dd1 mtxdrivers-rh9.0-v1.1.0-pro-beta.run 2668657
diff --git a/media-video/mtxdrivers-pro/files/mtxdrivers-pro-1.1.0_beta-r2-kernel-2.6-will1-20041013.patch b/media-video/mtxdrivers-pro/files/mtxdrivers-pro-1.1.0_beta-r2-kernel-2.6-will1-20041013.patch
new file mode 100644
index 000000000000..68a3f74bfc74
--- /dev/null
+++ b/media-video/mtxdrivers-pro/files/mtxdrivers-pro-1.1.0_beta-r2-kernel-2.6-will1-20041013.patch
@@ -0,0 +1,505 @@
+diff -Nru v110-dist/src/kernel/Makefile v110/src/kernel/Makefile
+--- v110-dist/src/kernel/Makefile 2003-09-24 15:55:39.000000000 +0100
++++ v110/src/kernel/Makefile 2004-03-01 16:24:59.000000000 +0000
+@@ -1,187 +1,27 @@
+-CC = gcc
+-CPP = g++
+-INSTALL = install
+-DEPEND = mkdep
+-MV = mv
+-LD = ld
++# Makefile to work with 2.6.x kernels
+
+-MTXVXD = mtxvxd
++KDIR := /lib/modules/$(shell uname -r)/build
+
+-WARNINGS = -Wall -Wwrite-strings -Wpointer-arith -Wcast-align \
+- -Wstrict-prototypes -Wnested-externs \
+- -Wpointer-arith
++ifneq ($(KERNELRELEASE),)
+
+-CFLAGS = $(WARNINGS) -D__KERNEL__
+-CPPFLAGS = $(CFLAGS) -fno-rtti -fno-exceptions -fno-use-cxa-atexit
++PWD := $(shell pwd)
+
+-MODCFLAGS = $(CFLAGS) -DMODULE
++CFLAGS := -fno-common -I$(MTXDIR) -I$(MTXDIR)/../include -I$(MTXDIR)/../include/mtxvxd -I$(MTXDIR)/mtxvxd -I$(MTXDIR)/parhelia -I$(KDIR)/include/asm/mach-default
+
+-SUBDIRS = $(MTXVXD)
++EXTRA_LDFLAGS := $(MTXDIR)/parhelia/mtx_parhelia.o
+
+-# **** Parse config file
++obj-m := mtx.o
++mtx-objs := mtx_drv.o mtx_dev.o mtx_ctx.o mtx_mem.o mtx_fops.o mtx_ioctl.o mtx_vm.o mtx_agp.o mtx_irq.o mtx_reg_access.o \
++ mtxvxd/MtxCpu.o mtxvxd/MtxCs.o mtxvxd/MtxIo.o mtxvxd/MtxMem.o mtxvxd/MtxMsr.o mtxvxd/MtxPci.o mtxvxd/MtxTimer.o mtxvxd/MtxMap.o mtxvxd/MtxDte.o mtxvxd/MtxLdt.o mtxvxd/MtxLdtr.o mtxvxd/MtxGdt.o mtxvxd/MtxGdtr.o mtxvxd/MtxDbg.o \
++ parhelia/MtxParhlParms.o parhelia/MtxParhlOS.o
+
+-ifeq ($(PARHELIUX)/config.mk,$(wildcard $(PARHELIUX)/config.mk))
+-include $(PARHELIUX)/config.mk
+-endif
+-
+-ifeq ($(CFG_MTX_DEBUG), YES)
+-CFLAGS += -DDEBUG=1 -g -O -fno-inline-functions
+-CPPFLAGS += -fno-inline
+-else
+-CFLAGS += -O2 -fomit-frame-pointer -finline-functions
+-endif
+-
+-ifeq ($(CFG_MTX_MEMORY_STATS), YES)
+-CFLAGS += -DMEMORY_STATS=1
+-endif
+-
+-# **** Get right version of kernel headers
+-
+-VERSION := $(shell uname -r)
+-A := /lib/modules/$(VERSION)/build/include
+-B := /usr/src/linux-$(VERSION)/include
+-C := /usr/src/linux/include
+-D := /usr/include
+-
+-V := $(shell gcc -E -nostdinc -I$A knl-conf.c 2>/dev/null | grep -s 'RELEASE = ' | cut -d' ' -f3)
+-ifeq ($(V),"$(VERSION)")
+-LNXTREE := $A
+-else
+-V := $(shell gcc -E -nostdinc -I$B knl-conf.c 2>/dev/null | grep -s 'RELEASE = ' | cut -d' ' -f3)
+-ifeq ($(V),"$(VERSION)")
+-LNXTREE := $B
+-else
+-V := $(shell gcc -E -nostdinc -I$C knl-conf.c 2>/dev/null | grep -s 'RELEASE = ' | cut -d' ' -f3)
+-ifeq ($(V),"$(VERSION)")
+-LNXTREE := $C
+-else
+-V := $(shell gcc -E -nostdinc -I$D knl-conf.c 2>/dev/null | grep -s 'RELEASE = ' | cut -d' ' -f3)
+-ifeq ($(V),"$(VERSION)")
+-LNXTREE := $D
+-else
+-LNXTREE := 0
+-endif
+-endif
+-endif
+-endif
+-
+-ifeq ($(LNXTREE),0)
+-$(error ERROR: Could not locate kernel tree in $A $B $C $D)
+-endif
+-
+-KNLMODDIR = /lib/modules/$(VERSION)
+-ifeq ($(shell if test -d $(KNLMODDIR)/kernel; then echo yes; fi),yes)
+- INSTALLDIR=$(KNLMODDIR)/kernel/drivers/video
+ else
+-INSTALLDIR=$(KNLMODDIR)/video
+-endif
++PWD := $(shell pwd)
+
+-# **** Check kernel configuration and set compilation accordingly
++default:
++ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) MTXDIR=$(PWD) modules
+
+- # configuration check
+-INCLUDES = -I$(LNXTREE) -I. -I$(PARHELIUX)/include
+-
+-SMP := $(shell gcc -E -nostdinc -I$(LNXTREE) knl-conf.c 2>/dev/null \
+-| grep -s 'SMP = ' | cut -d' ' -f3)
+-
+-MODULES := $(shell gcc -E -nostdinc -I$(LNXTREE) knl-conf.c 2>/dev/null \
+-| grep -s 'MODULES = ' | cut -d' ' -f3)
+-MODVERSIONS := $(shell gcc -E -nostdinc -I$(LNXTREE) knl-conf.c 2>/dev/null \
+-| grep -s 'MODVERSIONS = ' | cut -d' ' -f3)
+-
+-AGP := $(shell gcc -E -nostdinc -I$(LNXTREE) knl-conf.c 2>/dev/null \
+-| grep -s 'AGP = ' | cut -d' ' -f3)
+-ifeq ($(AGP),0)
+-AGP := $(shell gcc -E -nostdinc -I$(LNXTREE) knl-conf.c 2>/dev/null \
+-| grep -s 'AGP_MODULE = ' | cut -d' ' -f3)
+-endif
+-
+-REDHAT_KERNEL := $(shell gcc -E -nostdinc -I$(LNXTREE) knl-conf.c 2>/dev/null \
+-| grep -s 'REDHAT_KERNEL = ' | cut -d' ' -f3)
+-
+- # fix compilation settings
+-ifeq ($(AGP),0)
+-$(error ERROR: This version of kernel do not support AGP devices)
+-endif
+-
+-ifeq ($(MODULES),0)
+-$(error ERROR: This version of kernel do not support loadable modules)
+-endif
+-
+-ifeq ($(SMP),1)
+-MODCFLAGS += -D__SMP__
+-endif
+-
+-ifeq ($(MODVERSIONS),1)
+-MODCFLAGS += -DMODVERSIONS -include $(LNXTREE)/linux/modversions.h
+-endif
+-
+-ifeq ($(REDHAT_KERNEL),1)
+-MODCFLAGS += -DREDHAT_KERNEL
+-endif
+-
+-export LNXTREE MODCFLAGS CFLAGS CPPFLAGS
+-
+-# **** Sources and rules
+-
+-INCLUDES = -I. -I$(LNXTREE) -I$(PARHELIUX)/include -I$(PARHELIUX)/include/mtxvxd
+-
+-CORE_DRIVERS = parhelia
+-CORE_OSOBJS = parhelia/MtxParhlParms.o parhelia/MtxParhlOS.o
+-CORE_MAINOBJS = parhelia/mtx_parhelia.o
+-
+-MTXOSDRV = mtx_os.o
+-MTXDRV = mtx.o
+-
+-SUBDIRS += $(CORE_DRIVERS)
+-
+-OBJS = mtx_drv.o mtx_dev.o mtx_ctx.o mtx_mem.o mtx_fops.o mtx_ioctl.o mtx_vm.o mtx_agp.o mtx_irq.o mtx_reg_access.o
+-HEADERS = mtx.h mtx_drv.h mtx_reg_access.h
+-
+-all::; @echo Using kernel headers in $(LNXTREE)
+-
+-all:: $(OBJS) build $(MTXOSDRV) $(MTXDRV) $(POST_RULES)
+-
+-.PHONY : build
+-build:
+- @for i in $(SUBDIRS) ; \
+- do \
+- echo "making" all "in $(CURRENT_DIR)/$$i..."; \
+- set -e; $(MAKE) -C $$i $(MFLAGS) all; \
+- done;
+-
+-$(MTXOSDRV): $(OBJS) $(CORE_OSOBJS) $(MTXVXD)/mtxvxd.o
+- $(RM) $@
+- $(LD) -r -o $@ $(OBJS) $(CORE_OSOBJS) $(MTXVXD)/mtxvxd.o
+-
+-
+-$(MTXDRV): $(MTXOSDRV) $(CORE_MAINOBJS)
+- $(RM) $@
+- @#link global_beg/end at the begin/end of the list
+- $(LD) -r -o $@ $(MTXOSDRV) $(CORE_MAINOBJS)
+-
+-reset:
+- $(CC) -o reset reset.c $(INCLUDES)
+-
+-%.o: %.c
+- $(CC) $(MODCFLAGS) $(INCLUDES) -c $< -o $@
+-
+-$(OBJS): $(HEADERS)
+-
+ clean:
+- @for i in $(SUBDIRS) ; \
+- do \
+- echo "making" clean "in $(CURRENT_DIR)/$$i..."; \
+- $(MAKE) -C $$i $(MFLAGS) clean; \
+- done;
+- $(RM) -f *.o *.a *~ core
+-
+-depend:
+- @for i in $(SUBDIRS) ; \
+- do \
+- $(MAKE) -C $$i $(MFLAGS) depend; \
+- done;
+- $(DEPEND) $(INCLUDES) $(MODCFLAGS) $(wildcard *.c)
++ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) MTXDIR=$(PWD) clean
+
+-install:
+- $(INSTALL) -m 0644 -o root -g root mtx.o $(INSTALLDIR)/mtx.o
++endif
+diff -Nru v110-dist/src/kernel/mtx.mod.c v110/src/kernel/mtx.mod.c
+--- v110-dist/src/kernel/mtx.mod.c 1970-01-01 01:00:00.000000000 +0100
++++ v110/src/kernel/mtx.mod.c 2004-03-05 13:28:25.000000000 +0000
+@@ -0,0 +1,11 @@
++#include <linux/module.h>
++#include <linux/vermagic.h>
++#include <linux/compiler.h>
++
++MODULE_INFO(vermagic, VERMAGIC_STRING);
++
++static const char __module_depends[]
++__attribute_used__
++__attribute__((section(".modinfo"))) =
++"depends=";
++
+diff -Nru v110-dist/src/kernel/mtx_agp.c v110/src/kernel/mtx_agp.c
+--- v110-dist/src/kernel/mtx_agp.c 2003-04-08 14:54:34.000000000 +0100
++++ v110/src/kernel/mtx_agp.c 2004-03-01 16:25:09.000000000 +0000
+@@ -19,7 +19,7 @@
+ mtx_agp_driver_t *agp_drv = NULL;
+
+ /* AGP backend support */
+-static const drm_agp_t *agp_backend = NULL;
++const drm_agp_t *agp_backend = NULL;
+
+
+ /***************************************************************************************
+@@ -59,6 +59,7 @@
+ agp_drv->aperture_base = agp_drv->kern_info.aper_base;
+ agp_drv->aperture_size = agp_drv->kern_info.aper_size * 1024L * 1024L;
+
++#if 0
+ switch(agp_drv->kern_info.chipset) {
+
+ case NOT_SUPPORTED:
+@@ -132,6 +133,12 @@
+ #endif
+ default: chipset_name = "Unknown"; break;
+ }
++#else
++ if (agp_drv->kern_info.chipset == SUPPORTED)
++ chipset_name = "Supported";
++ else
++ chipset_name = "Unsupported";
++#endif
+
+ MTX_INFO("AGP driver v%u.%u on %s\n",
+ agp_drv->kern_info.version.major,
+diff -Nru v110-dist/src/kernel/mtx_drv.c v110/src/kernel/mtx_drv.c
+--- v110-dist/src/kernel/mtx_drv.c 2003-04-08 21:02:23.000000000 +0100
++++ v110/src/kernel/mtx_drv.c 2004-03-01 16:24:59.000000000 +0000
+@@ -203,7 +203,7 @@
+
+ switch (pci_host_dev->device) {
+
+- case PCI_DEVICE_ID_VIA_82C691: /* 694X */
++ case PCI_DEVICE_ID_VIA_82C691_0: /* 694X */
+ case PCI_DEVICE_ID_VIA_8363_0: /* KT133 */
+ case PCI_DEVICE_ID_VIA_8371_0: /* KX133 */
+ case PCI_DEVICE_ID_VIA_8605_0: /* S3 */
+@@ -341,7 +341,7 @@
+ void* mtx_find_symbol(const char* symbol)
+ {
+ struct module* pmod = THIS_MODULE;
+- struct module_symbol* psym;
++ struct kernel_symbol* psym;
+
+ if (!symbol)
+ return NULL;
+@@ -350,7 +350,7 @@
+ {
+ int i;
+
+- for (i = 0, psym = pmod->syms; i < pmod->nsyms; i++, psym++)
++ for (i = 0, psym = pmod->syms; i < pmod->num_syms; i++, psym++)
+ {
+ if (!strcmp(psym->name, symbol))
+ {
+diff -Nru v110-dist/src/kernel/mtx_drv.h v110/src/kernel/mtx_drv.h
+--- v110-dist/src/kernel/mtx_drv.h 2003-09-24 15:55:39.000000000 +0100
++++ v110/src/kernel/mtx_drv.h 2004-03-05 13:28:03.000000000 +0000
+@@ -52,6 +52,14 @@
+
+ #ifndef __cplusplus
+
++// Some kernel stuff from 2.6.x
++#define VMALLOC_VMADDR(x) ((unsigned long)(x))
++#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
++// #define MOD_CAN_QUERY(mod) (((mod)->flags & (MOD_RUNNING | MOD_INITIALIZING)) && !((mod)->flags & MOD_DELETED))
++#define MOD_CAN_QUERY(mod) 1
++#define mem_map_reserve(p) set_bit(PG_reserved, &((p)->flags))
++#define mem_map_unreserve(p) clear_bit(PG_reserved, &((p)->flags))
++
+ /******************************************
+ *
+ * Constants and types
+@@ -159,10 +167,10 @@
+ * Holds information about AGP driver backend
+ */
+ typedef struct mtx_agp_driver {
+-
++
+ struct mtx_device *dev; /* MTX device that control AGP driver */
+-
+- agp_kern_info kern_info; /* AGP information retrieve from kernel driver */
++
++ struct agp_kern_info kern_info; /* AGP information retrieve from kernel driver */
+ off_t aperture_base; /* Shortcut to kern_info->aper_base */
+ size_t aperture_size; /* Size in bytes of AGP aperture */
+
+@@ -293,10 +301,12 @@
+ * Helping macros
+ *
+ *****************************************/
++#if 0
+ #ifndef module_init
+ #define module_init(x) int init_module(void) { return x(); }
+ #define module_exit(x) void cleanup_module(void) { x(); }
+ #endif
++#endif
+
+ /*** print statements ***/
+ #define MTX_PRINT(fmt, arg...) printk(KERN_CRIT "[mtx] "fmt, ##arg)
+@@ -496,12 +506,12 @@
+ int mtx_mmap(struct file *filp, struct vm_area_struct *vma);
+
+ /* vm */
+-struct page* mtx_vm_nopage_stub(struct vm_area_struct*, unsigned long, int);
++struct page* mtx_vm_nopage_stub(struct vm_area_struct*, unsigned long, int*);
+ void mtx_vm_open_stub(struct vm_area_struct*);
+ void mtx_vm_close_stub(struct vm_area_struct*);
+-struct page* mtx_vm_nopage_agp(struct vm_area_struct*, unsigned long, int);
+-struct page* mtx_vm_nopage_pci(struct vm_area_struct*, unsigned long, int);
+-struct page* mtx_vm_nopage_sys(struct vm_area_struct*, unsigned long, int);
++struct page* mtx_vm_nopage_agp(struct vm_area_struct*, unsigned long, int*);
++struct page* mtx_vm_nopage_pci(struct vm_area_struct*, unsigned long, int*);
++struct page* mtx_vm_nopage_sys(struct vm_area_struct*, unsigned long, int*);
+ int mtx_vm_map_io(mtx_device_t*, mtx_region_t*, struct vm_area_struct*);
+ int mtx_vm_map_agp(mtx_device_t*, mtx_region_t*, struct vm_area_struct*);
+ int mtx_vm_map_pci(mtx_device_t*, mtx_region_t*, struct vm_area_struct*);
+@@ -550,7 +560,7 @@
+ #endif
+
+ /* irq */
+-void mtx_irq_interrupt(int irq, void *dev_id, struct pt_regs *regs);
++irqreturn_t mtx_irq_interrupt(int irq, void *dev_id, struct pt_regs *regs);
+ int mtx_irq_init(mtx_device_t* dev);
+ void mtx_irq_cleanup(mtx_device_t* dev);
+
+diff -Nru v110-dist/src/kernel/mtx_irq.c v110/src/kernel/mtx_irq.c
+--- v110-dist/src/kernel/mtx_irq.c 2003-11-26 21:54:12.000000000 +0000
++++ v110/src/kernel/mtx_irq.c 2004-03-05 14:06:09.000000000 +0000
+@@ -31,7 +31,7 @@
+ *
+ * Comments: None.
+ */
+-void
++irqreturn_t
+ mtx_irq_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+ {
+ mtx_device_t *dev = (mtx_device_t*)dev_id;
+@@ -42,13 +42,15 @@
+
+ if (ret < 0) {
+ /* We don't own the interrupt or an error occured, return immediately */
+- return;
++ return IRQ_NONE;
+ }
+
+ if (ret > 0) {
+ /* We want the bottom-half routine to be schedule */
+ tasklet_schedule(&dev->irq_bh);
+ }
++
++ return IRQ_HANDLED;
+ }
+
+ /***************************************************************************************
+@@ -63,6 +65,7 @@
+ *
+ * Comments: None.
+ */
++
+ int
+ mtx_irq_init(mtx_device_t *dev)
+ {
+@@ -70,7 +73,7 @@
+
+ /* Request IRQ line */
+ /* TODO fix the sharing problem*/
+- ret = request_irq(dev->pci_dev->irq, mtx_irq_interrupt, SA_SHIRQ, dev->pci_dev->name, dev);
++ ret = request_irq(dev->pci_dev->irq, mtx_irq_interrupt, SA_SHIRQ, "parhelia", dev);
+ if (ret < 0)
+ {
+ MTX_WARNING("Failed to request IRQ %u for device 0x%04x, some feature will"
+diff -Nru v110-dist/src/kernel/mtx_mem.c v110/src/kernel/mtx_mem.c
+--- v110-dist/src/kernel/mtx_mem.c 2003-04-17 19:30:48.000000000 +0100
++++ v110/src/kernel/mtx_mem.c 2004-03-01 16:24:59.000000000 +0000
+@@ -17,13 +17,13 @@
+ #include "mtx_drv.h"
+
+ #include <linux/slab.h>
+-#include <linux/wrapper.h>
++// #include <linux/wrapper.h>
+
+ /* import agp backend interface */
+ extern drm_agp_t *agp_backend;
+
+ /* list of agp memory blocks (first item use as sentinel) */
+-static agp_memory agp_blocks = { 0, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0, 0 };
++static struct agp_memory agp_blocks = { 0, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0, 0 };
+
+ /* this holds real size of last allocation */
+ static size_t last_alloc_size = 0;
+@@ -434,7 +434,7 @@
+ static unsigned long
+ mtx_mem_alloc_agp(size_t size)
+ {
+- agp_memory *info_block, *ptr_block;
++ struct agp_memory *info_block, *ptr_block;
+ unsigned long pg_offset = 0, pg_count = 0;
+ int ret;
+
+@@ -520,7 +520,7 @@
+ static void
+ mtx_mem_free_agp(unsigned long ptr, size_t size)
+ {
+- agp_memory *ptr_block = NULL;
++ struct agp_memory *ptr_block = NULL;
+ unsigned int pg_start, pg_count;
+ int ret;
+
+diff -Nru v110-dist/src/kernel/mtx_vm.c v110/src/kernel/mtx_vm.c
+--- v110-dist/src/kernel/mtx_vm.c 2003-11-11 15:55:24.000000000 +0000
++++ v110/src/kernel/mtx_vm.c 2004-03-01 16:25:09.000000000 +0000
+@@ -16,11 +16,15 @@
+ #define __NO_VERSION__
+ #include "mtx_drv.h"
+
+-#if defined(REDHAT_KERNEL) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20)) && (LINUX_VERSION_CODE != KERNEL_VERSION(2,4,22))
+- #define REMAP_PAGE_RANGE remap_page_range
++#if 0
++ #if defined(REDHAT_KERNEL) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20)) && (LINUX_VERSION_CODE != KERNEL_VERSION(2,4,22))
++ #define REMAP_PAGE_RANGE remap_page_range
++ #else
++ #define REMAP_PAGE_RANGE(vma, start, base, size, prot) \
++ remap_page_range(start, base, size, prot)
++ #endif
+ #else
+- #define REMAP_PAGE_RANGE(vma, start, base, size, prot) \
+- remap_page_range(start, base, size, prot)
++ #define REMAP_PAGE_RANGE remap_page_range
+ #endif
+
+ /* Stub vm operations (noop) */
+@@ -52,8 +56,11 @@
+ * Comments:
+ */
+ struct page*
+-mtx_vm_nopage_stub(struct vm_area_struct *vma, unsigned long address, int write_access)
++mtx_vm_nopage_stub(struct vm_area_struct *vma, unsigned long address, int *type)
+ {
++ if (type != NULL)
++ *type = VM_FAULT_MINOR;
++
+ return NOPAGE_SIGBUS; /* mremap is not allowed */
+ }
+
+@@ -106,7 +113,7 @@
+ * Comments:
+ */
+ struct page*
+-mtx_vm_nopage_sys(struct vm_area_struct *vma, unsigned long address, int write_access)
++mtx_vm_nopage_sys(struct vm_area_struct *vma, unsigned long address, int *type)
+ {
+ struct page *page;
+ mtx_region_t *region;
+@@ -116,6 +123,9 @@
+ pmd_t *pmd;
+ pte_t *pte;
+
++ if (type != NULL)
++ *type = VM_FAULT_MINOR;
++
+ /* retrieve the region for this vma */
+ region = (mtx_region_t*)vma->vm_private_data;
+ if (!region) return NOPAGE_SIGBUS;
+diff -Nru v110-dist/src/kernel/parhelia/MtxParhlOS.c v110/src/kernel/parhelia/MtxParhlOS.c
+--- v110-dist/src/kernel/parhelia/MtxParhlOS.c 2003-09-24 15:55:39.000000000 +0100
++++ v110/src/kernel/parhelia/MtxParhlOS.c 2004-03-01 16:24:59.000000000 +0000
+@@ -158,7 +158,7 @@
+ oInSharedLockedDataInit.ulFrameBufferPhys = dev->framebuffer.base;
+ oInSharedLockedDataInit.ulFrameBufferSize = dev->framebuffer.size;
+ oInSharedLockedDataInit.ulAgpFlags = dev->bm_flags;
+- oInSharedLockedDataInit.bMultiCPU = (smp_num_cpus > 1) ? TRUE : FALSE;
++ oInSharedLockedDataInit.bMultiCPU = (num_booting_cpus() > 1) ? TRUE : FALSE;
+
+ ISharedLockedData_Init( &oInSharedLockedDataInit );
+
diff --git a/media-video/mtxdrivers-pro/mtxdrivers-pro-1.1.0_beta-r2.ebuild b/media-video/mtxdrivers-pro/mtxdrivers-pro-1.1.0_beta-r2.ebuild
index 29ee7f4d25df..9f670d178ef6 100644
--- a/media-video/mtxdrivers-pro/mtxdrivers-pro-1.1.0_beta-r2.ebuild
+++ b/media-video/mtxdrivers-pro/mtxdrivers-pro-1.1.0_beta-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/mtxdrivers-pro/mtxdrivers-pro-1.1.0_beta-r2.ebuild,v 1.6 2004/10/04 06:34:43 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/mtxdrivers-pro/mtxdrivers-pro-1.1.0_beta-r2.ebuild,v 1.7 2004/10/14 03:32:11 spyderous Exp $
inherit matrox
@@ -13,7 +13,7 @@ MY_PN="${PN/-pro}"
MY_P="${MY_PN}-rh9.0-v${MY_PV}"
S="${WORKDIR}/${MY_PN}"
DESCRIPTION="Drivers for the Matrox Parhelia and Millenium P650/P750 cards with OpenGL support."
-SRC_URI="${MY_P}.tar.gz"
+SRC_URI="${MY_P}.run"
KEYWORDS="x86"
IUSE=""
@@ -22,6 +22,8 @@ RDEPEND="x11-base/opengl-update
!media-video/mtxdrivers"
PROVIDE="virtual/opengl"
+S="${WORKDIR}"
+
pkg_nofetch() {
einfo "You must go to:"
einfo "http://www.matrox.com/mga/registration/driverhub.cfm?aid=103&dtype=3&osid=7&prodid=40"
@@ -30,6 +32,13 @@ pkg_nofetch() {
einfo "downloading the driver."
}
+src_unpack() {
+ unpack_makeself ${A}
+ # Patch from http://sowerbutts.com/matrox/
+ # found on matrox forums at forum.matrox.com
+ epatch ${FILESDIR}/${PF}-kernel-2.6-will1-20041013.patch
+}
+
src_install() {
# Install 2D driver and DRM kernel module
matrox_base_src_install