Unverified Commit 61cfeab4 authored by Jared Baur's avatar Jared Baur
Browse files

x265: fix cross-compiling to armv7

Some of the cmake calls in `preConfigure` require setting the correct
cross-compilation flags, so appending these after those calls do not
end up working.
parent ae73301a
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -79,6 +79,9 @@ stdenv.mkDerivation rec {
    "-DEXPORT_C_API=OFF"
  ] ++ lib.optionals stdenv.hostPlatform.isPower [
    "-DENABLE_ALTIVEC=OFF" # https://bitbucket.org/multicoreware/x265_git/issues/320/fail-to-build-on-power8-le
  ] ++ lib.optionals isCross [
    (mkFlag stdenv.hostPlatform.isAarch32 "CROSS_COMPILE_ARM")
    (mkFlag stdenv.hostPlatform.isAarch64 "CROSS_COMPILE_ARM64")
  ];

  preConfigure = lib.optionalString multibitdepthSupport ''
@@ -99,11 +102,6 @@ stdenv.mkDerivation rec {
      ${mkFlag cliSupport "ENABLE_CLI"}
      ${mkFlag unittestsSupport "ENABLE_TESTS"}
    )
  '' + lib.optionalString isCross ''
    cmakeFlagsArray+=(
      ${mkFlag (stdenv.hostPlatform.isAarch32) "CROSS_COMPILE_ARM"}
      ${mkFlag (stdenv.hostPlatform.isAarch64) "CROSS_COMPILE_ARM64"}
    )
  '';

  # Builds 10bits and 12bits static libs on the side if multi bit-depth is wanted