[weasel-commit] Source: radeontool=1.5-1

  • From: rbuilder@xxxxxxxxx
  • To: weasel-commit@xxxxxxxxxxxxx
  • Date: Fri, 15 Jan 2010 07:57:14 -0500

================================
radeontool:source=1.5-1
cvc rdiff radeontool -1 /weasel.rpath.org@wgl:3-devel/1.5-1
================================
1.5-1 Filip Brcic (brcha@xxxxxxx) Fri Jan 15 07:56:50 2010
    radeontool 1.5

radeontool.recipe: new
--- /dev/null
+++ radeontool.recipe
@@ -0,0 +33 @@
+#
+# Copyright (c) 2010 Filip Brcic <brcha@xxxxxxxxxxxx>
+# Distributed under the terms of the GNU General Public License v3
+#
+
+class Radeontool(CPackageRecipe):
+    name = 'radeontool'
+    version = '1.5'
+
+    buildRequires = []
+
+    shortDesc  = 'Radeon cards control software'
+    longDesc   = """
+Control the backlight and external video output of ATI Radeon Mobility 
graphics cards.
+"""
+    url        = 'http://fdd.com/software/radeon/'
+    licenses   = [ 'ZLIB' ]
+    categories = [ 'Applications/Laptop' ]
+
+    def setup(r):
+        r.addArchive('http://fdd.com/software/radeon/')
+        
+        r.addPatch('radeontool-1.5-mmap.patch')
+        r.addPatch('radeontool-1.5-vga-ati.patch')
+        r.addPatch('radeontool-1.5-pagesize.patch')
+
+        r.Replace(('-Wall -O2', '%(cflags)s %(ldflags)s'),
+                  ('gcc', '%(cc)s'),
+                  'Makefile')
+
+        r.Make()
+        
+        r.Install('radeontool', '%(sbindir)s/')

radeontool-1.5.tar.gz: new
radeontool-1.5-vga-ati.patch: new
--- /dev/null
+++ radeontool-1.5-vga-ati.patch
@@ -0,0 +11 @@
+--- radeontool-1.5/radeontool.c                2005-07-26 20:59:16.000000000 
+0200
++++ radeontool-1.5-ati-vga/radeontool.c        2005-07-26 20:59:48.000000000 
+0200
+@@ -293,7 +293,7 @@
+        if(fgets(line,sizeof(line),fp) == NULL) {  /* if end of file */
+           fatal("Radeon hardware not found in lspci output.\n");
+        }
+-       if(strstr(line,"Radeon") || strstr(line,"ATI Tech")) {  /* if line 
contains a "radeon" string */
++       if(strstr(line,"Radeon") || strstr(line,"VGA compatible controller: 
ATI Tech")) {  /* if line contains a "radeon" string */
+           if(skip-- < 1) {
+              break;
+           }

radeontool-1.5-mmap.patch: new
--- /dev/null
+++ radeontool-1.5-mmap.patch
@@ -0,0 +12 @@
+diff -urp radeontool-1.5/radeontool.c radeontool-1.5-mmap/radeontool.c
+--- radeontool-1.5/radeontool.c        2004-02-11 04:50:27.000000000 +0100
++++ radeontool-1.5-mmap/radeontool.c   2005-01-20 13:12:50.000000000 +0100
+@@ -107,7 +107,7 @@ static unsigned char * map_devince_memor
+         mem_fd, 
+         base
+     );
+-    if ((long)device_mem < 0) {
++    if (device_mem == MAP_FAILED) {
+         if(debug)
+             fprintf(stderr,"mmap returned %d\n",(int)device_mem);
+         fatal("mmap error \n");

radeontool-1.5-pagesize.patch: new
--- /dev/null
+++ radeontool-1.5-pagesize.patch
@@ -0,0 +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,


Committed by: brcha

Other related posts: