From 91184df3b2ca5d2249c7472c4ba4489ee0d1a26c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 25 Jan 2004 08:51:03 +0000 Subject: [PATCH] * Teletext support for zapping. svn path=/nixpkgs/trunk/; revision=719 --- pkgs/applications/video/zapping/builder.sh | 2 +- pkgs/applications/video/zapping/default.nix | 22 +++++++++++++++++---- pkgs/development/libraries/zvbi/builder.sh | 11 +++++++++++ pkgs/development/libraries/zvbi/default.nix | 19 ++++++++++++++++++ pkgs/system/all-packages-generic.nix | 14 +++++++++++++ 5 files changed, 63 insertions(+), 5 deletions(-) create mode 100755 pkgs/development/libraries/zvbi/builder.sh create mode 100644 pkgs/development/libraries/zvbi/default.nix diff --git a/pkgs/applications/video/zapping/builder.sh b/pkgs/applications/video/zapping/builder.sh index 69ae4cfb2f4..cbbfdc4d0da 100755 --- a/pkgs/applications/video/zapping/builder.sh +++ b/pkgs/applications/video/zapping/builder.sh @@ -1,7 +1,7 @@ #! /bin/sh buildinputs="$pkgconfig $perl $python $x11 $libgnomeui \ - $libglade $scrollkeeper $esound $gettext" + $libglade $scrollkeeper $esound $gettext $zvbi $libjpeg $libpng" . $stdenv/setup || exit 1 # !!! hack; this is because $linuxHeaders/config.h includes some diff --git a/pkgs/applications/video/zapping/default.nix b/pkgs/applications/video/zapping/default.nix index 49f75732e87..613053bd810 100644 --- a/pkgs/applications/video/zapping/default.nix +++ b/pkgs/applications/video/zapping/default.nix @@ -1,12 +1,19 @@ -{ stdenv, fetchurl, pkgconfig, perl, python, x11, libgnomeui -, libglade, scrollkeeper, esound, gettext }: +{ teletextSupport ? true +, jpegSupport ? true +, pngSupport ? true +, stdenv, fetchurl, pkgconfig, perl, python, x11, libgnomeui +, libglade, scrollkeeper, esound, gettext +, zvbi ? null, libjpeg ? null, libpng ? null }: assert !isNull pkgconfig && !isNull perl && !isNull python && !isNull x11 && !isNull libgnomeui && !isNull libglade && !isNull scrollkeeper && !isNull esound && !isNull gettext; -# !!! zvbi library -# !!! arts, jpeg, png, rte +assert teletextSupport -> !isNull zvbi && zvbi.pngSupport + && pngSupport && zvbi.libpng == libpng; + +assert jpegSupport -> !isNull libjpeg; +assert pngSupport -> !isNull libpng; derivation { name = "zapping-0.7cvs6"; @@ -18,6 +25,10 @@ derivation { md5 = "cdedc0088c70f4520c37066ec05cb996"; }; + teletextSupport = teletextSupport; + jpegSupport = jpegSupport; + pngSupport = pngSupport; + stdenv = stdenv; pkgconfig = pkgconfig; perl = perl; @@ -28,4 +39,7 @@ derivation { scrollkeeper = scrollkeeper; esound = esound; gettext = gettext; + zvbi = if teletextSupport then zvbi else null; + libjpeg = if jpegSupport then libjpeg else null; + libpng = if pngSupport then libpng else null; } diff --git a/pkgs/development/libraries/zvbi/builder.sh b/pkgs/development/libraries/zvbi/builder.sh new file mode 100755 index 00000000000..a123b16dce2 --- /dev/null +++ b/pkgs/development/libraries/zvbi/builder.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +buildinputs="$x11 $libpng" +. $stdenv/setup || exit 1 + +tar xvfj $src || exit 1 +cd zvbi-* || exit 1 +./configure --prefix=$out || exit 1 +make || exit 1 +make install || exit 1 +strip -S $out/lib/*.a || exit 1 diff --git a/pkgs/development/libraries/zvbi/default.nix b/pkgs/development/libraries/zvbi/default.nix new file mode 100644 index 00000000000..55a106b349e --- /dev/null +++ b/pkgs/development/libraries/zvbi/default.nix @@ -0,0 +1,19 @@ +{ pngSupport ? true +, stdenv, fetchurl, x11, libpng ? null}: + +assert !isNull x11; +assert pngSupport -> !isNull libpng; + +derivation { + name = "zvbi-0.2.5"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = http://heanet.dl.sourceforge.net/sourceforge/zapping/zvbi-0.2.5.tar.bz2; + md5 = "06b370565246758813f6580797369518"; + }; + stdenv = stdenv; + x11 = x11; + pngSupport = pngSupport; + libpng = if pngSupport then libpng else null; +} diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index 5eec9f232e0..484358c89c3 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -693,6 +693,14 @@ stdenv = stdenv; }; + zvbi = (import ../development/libraries/zvbi) { + fetchurl = fetchurl; + stdenv = stdenv; + x11 = xfree86; + pngSupport = true; + libpng = libpng; + }; + perlBerkeleyDB = (import ../development/perl-modules/BerkeleyDB) { fetchurl = fetchurl; stdenv = stdenv; @@ -846,6 +854,12 @@ scrollkeeper = scrollkeeper; esound = esound; gettext = gettext; + teletextSupport = true; + zvbi = zvbi; + jpegSupport = true; + libjpeg = libjpeg; + pngSupport = true; + libpng = libpng; }; gqview = (import ../applications/graphics/gqview) {