Merge pull request #51154 from Mic92/cross-fixes

Various cross-compilation fixes
This commit is contained in:
Jörg Thalheim 2018-12-12 00:56:12 +00:00 committed by GitHub
commit d66c960c23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 3 deletions

View File

@ -62,6 +62,9 @@ in stdenv.mkDerivation rec {
doCheck = true;
postInstall = glib.flattenInclude + ''
substituteInPlace $dev/bin/freetype-config \
--replace ${buildPackages.pkgconfig} ${pkgconfig}
wrapProgram "$dev/bin/freetype-config" \
--set PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$dev/lib/pkgconfig"
'';

View File

@ -11,6 +11,11 @@ stdenv.mkDerivation rec {
installFlags = "DESTDIR=\${out} PREFIX= LDCONFIG=true";
makeFlags = [
"ARCH=${stdenv.targetPlatform.uname.processor}"
"SYS=${stdenv.targetPlatform.uname.system}"
];
NIX_CFLAGS_COMPILE = [ "-Wno-error" ];
meta = with stdenv.lib; {

View File

@ -1,5 +1,5 @@
{ lib, stdenv, fetchurl, pkgconfig
, libffi, libxml2
, libffi, libxml2, wayland
, expat ? null # Build wayland-scanner (currently cannot be disabled as of 1.7.0)
}:
@ -15,9 +15,18 @@ stdenv.mkDerivation rec {
sha256 = "1xajhxad43izq9f7sbww1hlg42nayijy8xnp21kgpk09c6sw4wjf";
};
configureFlags = [ "--with-scanner" "--disable-documentation" ];
configureFlags = [
"--disable-documentation"
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"--with-host-scanner"
];
nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = [
pkgconfig
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
# for wayland-scanner during build
wayland
];
buildInputs = [ libffi /* docbook_xsl doxygen graphviz libxslt xmlto */ expat libxml2 ];