ffmpeg: Don't use stdenv.cross
This commit is contained in:
parent
fcef0add76
commit
38dbd4b161
@ -1,4 +1,5 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, perl, texinfo, yasm
|
{ stdenv, fetchurl, pkgconfig, perl, texinfo, yasm
|
||||||
|
, hostPlatform
|
||||||
/*
|
/*
|
||||||
* Licensing options (yes some are listed twice, filters and such are not listed)
|
* Licensing options (yes some are listed twice, filters and such are not listed)
|
||||||
*/
|
*/
|
||||||
@ -428,30 +429,13 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
/* Cross-compilation is untested, consider this an outline, more work
|
/* Cross-compilation is untested, consider this an outline, more work
|
||||||
needs to be done to portions of the build to get it to work correctly */
|
needs to be done to portions of the build to get it to work correctly */
|
||||||
crossAttrs = let
|
crossAttrs = {
|
||||||
os = ''
|
|
||||||
if [ "${stdenv.cross.config}" = "*cygwin*" ] ; then
|
|
||||||
# Probably should look for mingw too
|
|
||||||
echo "cygwin"
|
|
||||||
elif [ "${stdenv.cross.config}" = "*darwin*" ] ; then
|
|
||||||
echo "darwin"
|
|
||||||
elif [ "${stdenv.cross.config}" = "*freebsd*" ] ; then
|
|
||||||
echo "freebsd"
|
|
||||||
elif [ "${stdenv.cross.config}" = "*linux*" ] ; then
|
|
||||||
echo "linux"
|
|
||||||
elif [ "${stdenv.cross.config}" = "*netbsd*" ] ; then
|
|
||||||
echo "netbsd"
|
|
||||||
elif [ "${stdenv.cross.config}" = "*openbsd*" ] ; then
|
|
||||||
echo "openbsd"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
configurePlatforms = [];
|
configurePlatforms = [];
|
||||||
configureFlags = configureFlags ++ [
|
configureFlags = configureFlags ++ [
|
||||||
"--cross-prefix=${stdenv.cross.config}-"
|
"--cross-prefix=${stdenv.cc.prefix}"
|
||||||
"--enable-cross-compile"
|
"--enable-cross-compile"
|
||||||
"--target_os=${os}"
|
"--target_os=${hostPlatform.parsed.kernel.name}"
|
||||||
"--arch=${stdenv.cross.arch}"
|
"--arch=${hostPlatform.arch}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
, alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg
|
, alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg
|
||||||
, libtheora, libva, libvorbis, libvpx, lzma, libpulseaudio, soxr
|
, libtheora, libva, libvorbis, libvpx, lzma, libpulseaudio, soxr
|
||||||
, x264, x265, xvidcore, zlib, libopus
|
, x264, x265, xvidcore, zlib, libopus
|
||||||
|
, hostPlatform
|
||||||
, openglSupport ? false, mesa ? null
|
, openglSupport ? false, mesa ? null
|
||||||
# Build options
|
# Build options
|
||||||
, runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime
|
, runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime
|
||||||
@ -169,30 +170,13 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
/* Cross-compilation is untested, consider this an outline, more work
|
/* Cross-compilation is untested, consider this an outline, more work
|
||||||
needs to be done to portions of the build to get it to work correctly */
|
needs to be done to portions of the build to get it to work correctly */
|
||||||
crossAttrs = let
|
crossAttrs = {
|
||||||
os = ''
|
|
||||||
if [ "${stdenv.cross.config}" = "*cygwin*" ] ; then
|
|
||||||
# Probably should look for mingw too
|
|
||||||
echo "cygwin"
|
|
||||||
elif [ "${stdenv.cross.config}" = "*darwin*" ] ; then
|
|
||||||
echo "darwin"
|
|
||||||
elif [ "${stdenv.cross.config}" = "*freebsd*" ] ; then
|
|
||||||
echo "freebsd"
|
|
||||||
elif [ "${stdenv.cross.config}" = "*linux*" ] ; then
|
|
||||||
echo "linux"
|
|
||||||
elif [ "${stdenv.cross.config}" = "*netbsd*" ] ; then
|
|
||||||
echo "netbsd"
|
|
||||||
elif [ "${stdenv.cross.config}" = "*openbsd*" ] ; then
|
|
||||||
echo "openbsd"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
configurePlatforms = [];
|
configurePlatforms = [];
|
||||||
configureFlags = configureFlags ++ [
|
configureFlags = configureFlags ++ [
|
||||||
"--cross-prefix=${stdenv.cross.config}-"
|
"--cross-prefix=${stdenv.cc.prefix}"
|
||||||
"--enable-cross-compile"
|
"--enable-cross-compile"
|
||||||
"--target_os=${os}"
|
"--target_os=${hostPlatform.parsed.kernel}"
|
||||||
"--arch=${stdenv.cross.arch}"
|
"--arch=${hostPlatform.arch}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user