xawtv: 3.95 -> 3.103

- package now builds on linux
- added linux platforms
- removed patches
This commit is contained in:
Domen Kožar 2013-11-10 17:46:00 +01:00
parent 72aae985ae
commit 2099a81487
4 changed files with 24 additions and 95 deletions

View file

@ -1,15 +1,31 @@
{stdenv, fetchurl, ncurses, libjpeg, libX11, libXt, libXft, xproto, libFS, fontsproto, libXaw, libXpm, libXext, libSM, libICE, perl, xextproto, linux}:
{stdenv, fetchurl, ncurses, libjpeg, libX11, libXt, alsaLib, aalib, libXft, xproto, libv4l
, libFS, fontsproto, libXaw, libXpm, libXext, libSM, libICE, perl, xextproto, linux}:
stdenv.mkDerivation {
name = "xawtv-3.95";
stdenv.mkDerivation rec {
name = "xawtv-3.103";
src = fetchurl {
url = http://dl.bytesex.org/releases/xawtv/xawtv-3.95.tar.gz;
md5 = "ad25e03f7e128b318e392cb09f52207d";
url = "http://linuxtv.org/downloads/xawtv/${name}.tar.bz2";
sha256 = "0lnxr3xip80g0rz7h6n14n9d1qy0cm56h0g1hsyr982rbldskwrc";
};
preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${linux}/lib/modules/*/build/include)"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${linux}/lib/modules/${linux.modDirVersion}/build"
'';
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 ./xawtv-3.95-page-mask.patch ];
configureFlags="--prefix=";
NIX_LDFLAGS="-lgcc_s";
makeFlags = "SUID_ROOT= DESTDIR=\$(out) PREFIX=";
buildInputs = [ncurses libjpeg libX11 libXt libXft xproto libFS perl alsaLib aalib
fontsproto libXaw libXpm libXext libSM libICE xextproto libv4l];
meta = {
description = "TV application for Linux with apps and tools such as a teletext browser";
license = stdenv.lib.licenses.gpl2;
homePage = https://www.kraxel.org/blog/linux/xawtv/;
maintainers = with stdenv.lib.maintainers; [ iElectric ];
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -1,22 +0,0 @@
diff -ruN xawtv-3.95/console/fs.h xawtv-3.95.new/console/fs.h
--- xawtv-3.95/console/fs.h 2003-02-14 15:14:04.000000000 +0100
+++ xawtv-3.95.new/console/fs.h 2006-01-03 22:16:06.000000000 +0100
@@ -1,5 +1,5 @@
#ifndef X_DISPLAY_MISSING
-# include <FSlib.h>
+# include <X11/fonts/FSlib.h>
struct fs_font {
Font font;
diff -ruN xawtv-3.95/console/Subdir.mk xawtv-3.95.new/console/Subdir.mk
--- xawtv-3.95/console/Subdir.mk 2003-02-14 15:14:04.000000000 +0100
+++ xawtv-3.95.new/console/Subdir.mk 2006-01-03 22:32:38.000000000 +0100
@@ -74,7 +74,7 @@
# libraries to link
console/fbtv : LDLIBS += \
$(THREAD_LIBS) $(CURSES_LIBS) $(LIRC_LIBS) $(ALSA_LIBS) \
- $(FS_LIBS) -ljpeg -lm
+ $(FS_LIBS) -ljpeg -lm -lFS
console/ttv : LDLIBS += $(THREAD_LIBS) $(AA_LIBS) -ljpeg -lm
console/scantv : LDLIBS += $(THREAD_LIBS) $(VBI_LIBS) -ljpeg
console/streamer : LDLIBS += $(THREAD_LIBS) -ljpeg -lm

View file

@ -1,21 +0,0 @@
diff -ruN xawtv-3.95/Makefile.in xawtv-3.95.new/Makefile.in
--- xawtv-3.95/Makefile.in 2004-04-22 16:52:29.000000000 +0200
+++ xawtv-3.95.new/Makefile.in 2006-01-20 13:07:00.000000000 +0100
@@ -3,7 +3,7 @@
# for package builds (buildroot install + no root privs needed)
DESTDIR=
-SUID_ROOT=-m4755 -o root
+SUID_ROOT=
# install paths
prefix := @prefix@
@@ -12,7 +12,7 @@
mandir := $(DESTDIR)@mandir@
libdir := $(DESTDIR)@libdir@/xawtv
datadir := $(DESTDIR)@datadir@/xawtv
-resdir := $(DESTDIR)@resdir@
+resdir := $(out)@resdir@
config := @x11conf@/xawtvrc
# programs

View file

@ -1,44 +0,0 @@
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;