From d6e12aa1f62788a00f8560be984a755c674b2cd3 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Wed, 25 Jul 2012 15:43:34 +0200 Subject: [PATCH] more progress on XBMC build --- pkgs/applications/multimedia/xbmc/default.nix | 51 +++++++++++++++---- pkgs/development/tools/misc/autoconf/2.67.nix | 48 +++++++++++++++++ pkgs/top-level/all-packages.nix | 6 +++ 3 files changed, 96 insertions(+), 9 deletions(-) create mode 100644 pkgs/development/tools/misc/autoconf/2.67.nix diff --git a/pkgs/applications/multimedia/xbmc/default.nix b/pkgs/applications/multimedia/xbmc/default.nix index 081d6108793..0647652f2c4 100644 --- a/pkgs/applications/multimedia/xbmc/default.nix +++ b/pkgs/applications/multimedia/xbmc/default.nix @@ -3,23 +3,56 @@ libjpeg, libsamplerate, libogg, libvorbis, libmodplug, curl, flac, libgcrypt, bzip2, libtiff, lzo, yajl, pkgconfig, fontconfig, fribidi, sqlite, libpng, pcre, libcdio, freetype, jasper, SDL, SDL_mixer, SDL_image, alsaLib, dbus, - libbluray + libbluray, libmicrohttpd, libXmu, samba, udev, libusb, python, cmake, hal, + gperf, unzip, avahi, zip, nasm, pulseaudio, ftgl, + + # TODO: Check which of these are actually necessary. + + autoconf, automake, libtool, gettext }: +# TODO: Check whether unzip is actually needed. + stdenv.mkDerivation { - buildInputs = [ - boost mesa glew mysql libass libmpeg2 libmad libjpeg libsamplerate libogg - libvorbis libmodplug curl flac libgcrypt bzip2 libtiff lzo yajl pkgconfig - fontconfig fribidi sqlite libpng pcre libcdio freetype jasper SDL SDL_mixer - SDL_image alsaLib dbus libbluray - ]; name = "xbmc-11.0"; + src = fetchurl { url = http://mirrors.xbmc.org/releases/source/xbmc-11.0.tar.gz; sha256 = "068bgg6h593xwwinyqy8wsn4hpz90ib59g0k5dpg4f31q48d7r8z"; }; + + buildInputs = [ + boost mesa glew mysql libass libmpeg2 libmad libjpeg libsamplerate libogg + libvorbis libmodplug curl flac libgcrypt bzip2 libtiff lzo yajl pkgconfig + fontconfig fribidi sqlite libpng pcre libcdio freetype jasper SDL SDL_mixer + SDL_image alsaLib dbus libbluray libmicrohttpd libXmu samba udev libusb + python cmake hal gperf unzip avahi zip nasm pulseaudio ftgl + + autoconf automake libtool gettext + ]; + + # TODO: Can we leave out some of these options? + + dontFixCmake = true; + dontUseCmakeBuildDir = true; + dontUseCmakeConfigure = true; + + # configure performs a SONAME check for some libraries by + # + # > $CC -nostdlib -o /dev/null $LDFLAGS -l$2 -Wl,-M 2>/dev/null + # + # The $2 is the library name under inspection, e.g. bluray. However, the + # option -o /dev/null raises an error. Since this doesn't appear to be + # necessary, we can simply remove this option. Note that ./configure is + # generated by ./bootstrap. + + patchPhase = '' + sed -i 's@CC -nostdlib -o /dev/null@CC -nostdlib@g' configure.in + ''; + configurePhase = '' - ./configure || cat config.log - exit 1 + ./bootstrap + ./configure --prefix="$out" ''; } + diff --git a/pkgs/development/tools/misc/autoconf/2.67.nix b/pkgs/development/tools/misc/autoconf/2.67.nix new file mode 100644 index 00000000000..71e67b1f21c --- /dev/null +++ b/pkgs/development/tools/misc/autoconf/2.67.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchurl, m4, perl }: + +stdenv.mkDerivation rec { + name = "autoconf-2.67"; + + src = fetchurl { + url = "mirror://gnu/autoconf/${name}.tar.xz"; + sha256 = "80c6bda1dd6ab04510d42f594c69a06f98dc5e589683b03c11abd89270502ac1"; + }; + + buildInputs = [ m4 perl ]; + + # Work around a known issue in Cygwin. See + # http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6822 for + # details. + # There are many test failures on `i386-pc-solaris2.11'. + # doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS)); + # doCheck = false; + # TODO: Enable tests again. + + # Don't fixup "#! /bin/sh" in Autoconf, otherwise it will use the + # "fixed" path in generated files! + dontPatchShebangs = true; + + enableParallelBuilding = true; + + preCheck = + # Make the Autotest test suite run in parallel. + '' export TESTSUITEFLAGS="-j$NIX_BUILD_CORES" + ''; + + meta = { + homepage = http://www.gnu.org/software/autoconf/; + description = "GNU Autoconf, a part of the GNU Build System"; + + longDescription = '' + GNU Autoconf is an extensible package of M4 macros that produce + shell scripts to automatically configure software source code + packages. These scripts can adapt the packages to many kinds of + UNIX-like systems without manual user intervention. Autoconf + creates a configuration script for a package from a template + file that lists the operating system features that the package + can use, in the form of M4 macro calls. + ''; + + license = "GPLv2+"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7498fb7638c..6d782e04fad 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2848,6 +2848,8 @@ let autoconf213 = callPackage ../development/tools/misc/autoconf/2.13.nix { }; + autoconf267 = callPackage ../development/tools/misc/autoconf/2.67.nix { }; + automake = automake112x; automake110x = callPackage ../development/tools/misc/automake/automake-1.10.x.nix { }; @@ -8752,4 +8754,8 @@ let bullet = callPackage ../development/libraries/bullet {}; + xbmc = callPackage ../applications/multimedia/xbmc { + #autoconf = autoconf267; + }; + }; in pkgs