diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2010-10-13 15:48:37 +0000 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2010-10-13 15:48:37 +0000 |
commit | e82053ac947797f0bf49481a1acfc9aaa712b09c (patch) | |
tree | 68b17289f1db74a67c4952dbd7a55a7ffbd2bc64 /pkgs/applications/video/xawtv | |
parent | a81b5af5ee5e4410eb710c618cc3bde1f3971fb5 (diff) |
Fix XawTV build
svn path=/nixpkgs/trunk/; revision=24267
Diffstat (limited to 'pkgs/applications/video/xawtv')
-rw-r--r-- | pkgs/applications/video/xawtv/default.nix | 7 | ||||
-rw-r--r-- | pkgs/applications/video/xawtv/xawtv-3.95-page-mask.patch | 44 |
2 files changed, 49 insertions, 2 deletions
diff --git a/pkgs/applications/video/xawtv/default.nix b/pkgs/applications/video/xawtv/default.nix index aaa83ccc14490..5f2e905efa092 100644 --- a/pkgs/applications/video/xawtv/default.nix +++ b/pkgs/applications/video/xawtv/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, ncurses, libjpeg, libX11, libXt, libXft, xproto, libFS, fontsproto, libXaw, libXpm, libXext, libSM, libICE, perl, xextproto}: +{stdenv, fetchurl, ncurses, libjpeg, libX11, libXt, libXft, xproto, libFS, fontsproto, libXaw, libXpm, libXext, libSM, libICE, perl, xextproto, linux}: stdenv.mkDerivation { name = "xawtv-3.95"; @@ -6,7 +6,10 @@ stdenv.mkDerivation { url = http://dl.bytesex.org/releases/xawtv/xawtv-3.95.tar.gz; md5 = "ad25e03f7e128b318e392cb09f52207d"; }; + preConfigure = '' + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${linux}/lib/modules/*/build/include)" + ''; buildInputs = [ncurses libjpeg libX11 libXt libXft xproto libFS fontsproto libXaw libXpm libXext libSM libICE perl xextproto]; - patches = [./xawtv-3.95-libfs.patch ./xawtv-3.95-makefile.patch]; + patches = [./xawtv-3.95-libfs.patch ./xawtv-3.95-makefile.patch ./xawtv-3.95-page-mask.patch ]; } diff --git a/pkgs/applications/video/xawtv/xawtv-3.95-page-mask.patch b/pkgs/applications/video/xawtv/xawtv-3.95-page-mask.patch new file mode 100644 index 0000000000000..5714e8238e671 --- /dev/null +++ b/pkgs/applications/video/xawtv/xawtv-3.95-page-mask.patch @@ -0,0 +1,44 @@ +Fix problems with fbtv and kernel headers + +diff -urN ../tmp-orig/xawtv-3.95/console/fbtools.c ./console/fbtools.c +--- xawtv-3.95/console/fbtools.c 2003-02-14 14:14:04.000000000 +0000 ++++ xawtv-3.95/console/fbtools.c 2006-08-23 10:57:40.000000000 +0000 +@@ -21,8 +21,6 @@ + #include <linux/vt.h> + #include <linux/fb.h> + +-#include <asm/page.h> +- + #include "fbtools.h" + + /* -------------------------------------------------------------------- */ +@@ -424,7 +422,7 @@ + goto err; + } + #endif +- fb_mem_offset = (unsigned long)(fb_fix.smem_start) & (~PAGE_MASK); ++ fb_mem_offset = (unsigned long)(fb_fix.smem_start) & ~(sysconf(_SC_PAGE_SIZE)-1); + fb_mem = mmap(NULL,fb_fix.smem_len+fb_mem_offset, + PROT_READ|PROT_WRITE,MAP_SHARED,fb,0); + if (-1L == (long)fb_mem) { +diff -urN ../tmp-orig/xawtv-3.95/console/matrox.c ./console/matrox.c +--- xawtv-3.95/console/matrox.c 2005-02-03 10:40:41.000000000 +0000 ++++ xawtv-3.95/console/matrox.c 2006-08-23 11:09:51.000000000 +0000 +@@ -9,7 +9,6 @@ + #include <sys/ioctl.h> + #include <sys/mman.h> + +-#include <asm/page.h> /* PAGE_SIZE */ + #include <linux/fb.h> + + #include "byteswap.h" +@@ -226,7 +225,7 @@ + return -1; + } + off = (unsigned long)fb_fix.mmio_start - +- ((unsigned long)fb_fix.mmio_start & ~(PAGE_SIZE-1)); ++ ((unsigned long)fb_fix.mmio_start & ~(sysconf(_SC_PAGE_SIZE)-1)); + bmmio += off; + mmio = (uint32_t*)bmmio; + return 0; + |