Adjust most things to be cross-buildable. Problem: gnutls. Solution: manually replace it with openssl while cross-building

svn path=/nixpkgs/trunk/; revision=30709
This commit is contained in:
Michael Raskin 2011-12-03 09:29:38 +00:00
parent bfa4a2d374
commit fdbef21ceb

View File

@ -1,6 +1,12 @@
{ stdenv, fetchurl, libX11, libXext, gettext, libICE, libXtst, libXi, libSM, xorgserver { stdenv, fetchurl, libX11, libXext, gettext, libICE, libXtst, libXi, libSM, xorgserver
, autoconf, automake, cvs, libtool, nasm, utilmacros, pixman, xkbcomp, xkeyboard_config , autoconf, automake, cvs, libtool, nasm, utilmacros, pixman, xkbcomp, xkeyboard_config
, fontDirectories, fontutil, libgcrypt, gnutls, pam }: , fontDirectories, fontutil, libgcrypt, gnutls, pam, flex, bison
, fixesproto, damageproto, xcmiscproto, bigreqsproto, randrproto, renderproto
, fontsproto, videoproto, compositeproto, scrnsaverproto, resourceproto
, libxkbfile, libXfont, libpciaccess
}:
with stdenv.lib; with stdenv.lib;
@ -17,9 +23,9 @@ stdenv.mkDerivation rec {
inherit fontDirectories; inherit fontDirectories;
patchPhase = '' patchPhase = ''
sed -i -e 's,$(includedir)/pixman-1,${pixman}/include/pixman-1,' unix/xserver/hw/vnc/Makefile.am sed -i -e 's,$(includedir)/pixman-1,${if stdenv ? cross then pixman.hostDrv else pixman}/include/pixman-1,' unix/xserver/hw/vnc/Makefile.am
sed -i -e '/^$pidFile/a$ENV{XKB_BINDIR}="${xkbcomp}/bin";' unix/vncserver sed -i -e '/^$pidFile/a$ENV{XKB_BINDIR}="${if stdenv ? cross then xkbcomp.hostDrv else xkbcomp}/bin";' unix/vncserver
sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -xkbdir ${xkeyboard_config}/etc/X11/xkb";' unix/vncserver sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -xkbdir ${if stdenv ? cross then xkeyboard_config.hostDrv else xkeyboard_config}/etc/X11/xkb";' unix/vncserver
fontPath= fontPath=
for i in $fontDirectories; do for i in $fontDirectories; do
@ -62,13 +68,22 @@ stdenv.mkDerivation rec {
make TIGERVNC_SRCDIR=`pwd`/../.. install make TIGERVNC_SRCDIR=`pwd`/../.. install
''; '';
crossAttrs = {
buildInputs = (map (x : x.hostDrv) (buildInputs ++ [
fixesproto damageproto xcmiscproto bigreqsproto randrproto renderproto
fontsproto videoproto compositeproto scrnsaverproto resourceproto
libxkbfile libXfont libpciaccess
]));
};
buildInputs = buildInputs =
[ libX11 libXext gettext libICE libXtst libXi libSM [ libX11 libXext gettext libICE libXtst libXi libSM
libtool nasm utilmacros fontutil libgcrypt gnutls pam nasm libgcrypt gnutls pam pixman
]; ];
buildNativeInputs = buildNativeInputs =
[ autoconf automake cvs ] ++ xorgserver.buildNativeInputs; [ autoconf automake cvs utilmacros fontutil libtool flex bison ]
++ xorgserver.buildNativeInputs;
propagatedBuildNativeInputs = xorgserver.propagatedBuildNativeInputs; propagatedBuildNativeInputs = xorgserver.propagatedBuildNativeInputs;