diff options
author | Roy Marples <uberlord@gentoo.org> | 2007-03-15 11:41:55 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2007-03-15 11:41:55 +0000 |
commit | 5d804f7676b17391ee3ff5200d242235295553d7 (patch) | |
tree | 3a708a84e5a3a52f8c327ef2d1c39a9448e1396a | |
parent | Fix init script to work with snd-card-x alias, #171009. (diff) | |
download | gentoo-2-5d804f7676b17391ee3ff5200d242235295553d7.tar.gz gentoo-2-5d804f7676b17391ee3ff5200d242235295553d7.tar.bz2 gentoo-2-5d804f7676b17391ee3ff5200d242235295553d7.zip |
Use sysconf to get the page size so we no longer need asm/page.h
Fixes #170502.
(Portage version: 2.1.2.2)
-rw-r--r-- | app-laptop/radeontool/ChangeLog | 9 | ||||
-rw-r--r-- | app-laptop/radeontool/files/radeontool-1.5-pagesize.patch | 33 | ||||
-rw-r--r-- | app-laptop/radeontool/radeontool-1.5-r3.ebuild | 5 |
3 files changed, 43 insertions, 4 deletions
diff --git a/app-laptop/radeontool/ChangeLog b/app-laptop/radeontool/ChangeLog index 99ff07c9f366..acaa89fdc94f 100644 --- a/app-laptop/radeontool/ChangeLog +++ b/app-laptop/radeontool/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for app-laptop/radeontool -# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-laptop/radeontool/ChangeLog,v 1.18 2006/07/19 11:21:15 uberlord Exp $ +# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-laptop/radeontool/ChangeLog,v 1.19 2007/03/15 11:41:55 uberlord Exp $ + + 15 Mar 2007; Roy Marples <uberlord@gentoo.org> + +files/radeontool-1.5-pagesize.patch, radeontool-1.5-r3.ebuild: + Use sysconf to get the page size so we no longer need asm/page.h + Fixes #170502. 19 Jul 2006; Roy Marples <uberlord@gentoo.org> metadata.xml, radeontool-1.5-r3.ebuild: diff --git a/app-laptop/radeontool/files/radeontool-1.5-pagesize.patch b/app-laptop/radeontool/files/radeontool-1.5-pagesize.patch new file mode 100644 index 000000000000..caa8be42f883 --- /dev/null +++ b/app-laptop/radeontool/files/radeontool-1.5-pagesize.patch @@ -0,0 +1,33 @@ +--- radeontool.c.orig 2007-03-15 11:25:23.000000000 +0000 ++++ radeontool.c 2007-03-15 11:27:30.000000000 +0000 +@@ -21,7 +21,6 @@ + #include <sys/stat.h> + #include <fcntl.h> + #include <sys/mman.h> +-#include <asm/page.h> + + #include "radeon_reg.h" + +@@ -87,6 +86,7 @@ + { + int mem_fd; + unsigned char *device_mem; ++ long page_size = sysconf(_SC_PAGESIZE); + + /* open /dev/mem */ + if ((mem_fd = open("/dev/mem", O_RDWR) ) < 0) { +@@ -94,11 +94,11 @@ + } + + /* mmap graphics memory */ +- if ((device_mem = malloc(length + (PAGE_SIZE-1))) == NULL) { ++ if ((device_mem = malloc(length + (page_size-1))) == NULL) { + fatal("allocation error \n"); + } +- if ((unsigned long)device_mem % PAGE_SIZE) +- device_mem += PAGE_SIZE - ((unsigned long)device_mem % PAGE_SIZE); ++ if ((unsigned long)device_mem % page_size) ++ device_mem += page_size - ((unsigned long)device_mem % page_size); + device_mem = (unsigned char *)mmap( + (caddr_t)device_mem, + length, diff --git a/app-laptop/radeontool/radeontool-1.5-r3.ebuild b/app-laptop/radeontool/radeontool-1.5-r3.ebuild index 49708d673ee5..74fc33acab7e 100644 --- a/app-laptop/radeontool/radeontool-1.5-r3.ebuild +++ b/app-laptop/radeontool/radeontool-1.5-r3.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2006 Gentoo Foundation +# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-laptop/radeontool/radeontool-1.5-r3.ebuild,v 1.3 2006/07/19 11:21:15 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-laptop/radeontool/radeontool-1.5-r3.ebuild,v 1.4 2007/03/15 11:41:55 uberlord Exp $ inherit eutils toolchain-funcs @@ -24,6 +24,7 @@ src_unpack() { cd "${S}" epatch "${FILESDIR}/${P}"-mmap.patch epatch "${FILESDIR}/${P}"-vga-ati.patch + epatch "${FILESDIR}/${P}"-pagesize.patch sed -i \ -e "s:-Wall -O2:${CFLAGS}:" \ |