Merge pull request #29028 from obsidiansystems/cross-cleanup
misc pkgs: Clean up cross
This commit is contained in:
commit
5b6d78194c
@ -11,9 +11,6 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [ pkgconfig ncurses boehmgc ];
|
||||
nativeBuildInputs = [ help2man perl ];
|
||||
|
||||
# `help2man' wants to run Zile, which fails when cross-compiling.
|
||||
crossAttrs.nativeBuildInputs = [];
|
||||
|
||||
# Tests can't be run because most of them rely on the ability to
|
||||
# fiddle with the terminal.
|
||||
doCheck = false;
|
||||
|
@ -1,7 +1,10 @@
|
||||
{ stdenv, fetchurl, perl, ncurses, xlibsWrapper, bzip2, zlib, openssl
|
||||
, spidermonkey_1_8_5, gpm
|
||||
, enableGuile ? false, guile ? null # Incompatible licenses, LGPLv3 - GPLv2
|
||||
, enablePython ? false, python ? null
|
||||
{ stdenv, fetchurl, ncurses, xlibsWrapper, bzip2, zlib, openssl
|
||||
, gpm
|
||||
, # Incompatible licenses, LGPLv3 - GPLv2
|
||||
enableGuile ? false, guile ? null
|
||||
, enablePython ? false, python ? null
|
||||
, enablePerl ? (stdenv.hostPlatform == stdenv.buildPlatform), perl ? null
|
||||
, enableSpidermonkey ? (stdenv.hostPlatform == stdenv.buildPlatform), spidermonkey_1_8_5 ? null
|
||||
}:
|
||||
|
||||
assert enableGuile -> guile != null;
|
||||
@ -17,28 +20,26 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [ ./gc-init.patch ];
|
||||
|
||||
buildInputs = [ perl ncurses xlibsWrapper bzip2 zlib openssl spidermonkey_1_8_5 gpm ]
|
||||
buildInputs = [ ncurses xlibsWrapper bzip2 zlib openssl spidermonkey_1_8_5 gpm ]
|
||||
++ stdenv.lib.optional enableGuile guile
|
||||
++ stdenv.lib.optional enablePython python;
|
||||
++ stdenv.lib.optional enablePython python
|
||||
++ stdenv.lib.optional enablePerl perl
|
||||
;
|
||||
|
||||
configureFlags =
|
||||
''
|
||||
--enable-finger --enable-html-highlight
|
||||
--with-perl --enable-gopher --enable-cgi --enable-bittorrent
|
||||
--with-spidermonkey=${spidermonkey_1_8_5}
|
||||
--enable-nntp --with-openssl=${openssl.dev}
|
||||
'' + stdenv.lib.optionalString enableGuile " --with-guile"
|
||||
+ stdenv.lib.optionalString enablePython " --with-python";
|
||||
|
||||
crossAttrs = {
|
||||
propagatedBuildInputs = [ ncurses.crossDrv zlib.crossDrv openssl.crossDrv ];
|
||||
configureFlags = ''
|
||||
--enable-finger --enable-html-highlight
|
||||
--enable-gopher --enable-cgi --enable-bittorrent --enable-nntp
|
||||
--with-openssl=${openssl.crossDrv}
|
||||
--with-bzip2=${bzip2.crossDrv}
|
||||
'';
|
||||
};
|
||||
configureFlags = [
|
||||
"--enable-finger"
|
||||
"--enable-html-highlight"
|
||||
"--enable-gopher"
|
||||
"--enable-cgi"
|
||||
"--enable-bittorrent"
|
||||
"--enable-nntp"
|
||||
"--with-openssl=${openssl.dev}"
|
||||
"--with-bzip2=${bzip2.dev}"
|
||||
] ++ stdenv.lib.optional enableGuile "--with-guile"
|
||||
++ stdenv.lib.optional enablePython "--with-python"
|
||||
++ stdenv.lib.optional enablePerl "--with-perl"
|
||||
++ stdenv.lib.optional enableSpidermonkey "--with-spidermonkey=${spidermonkey_1_8_5}"
|
||||
;
|
||||
|
||||
meta = {
|
||||
description = "Full-featured text-mode web browser";
|
||||
|
@ -30,12 +30,6 @@ stdenv.mkDerivation rec {
|
||||
++ stdenv.lib.optional enableFB "--with-fb"
|
||||
++ stdenv.lib.optional enableDirectFB "--with-directfb";
|
||||
|
||||
crossAttrs = {
|
||||
preConfigure = ''
|
||||
export CC=$crossConfig-gcc
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://links.twibright.com/;
|
||||
description = "A small browser with some graphics support";
|
||||
|
@ -26,7 +26,7 @@
|
||||
, libjpegSupport ? true, libjpeg ? null
|
||||
, useUnfreeCodecs ? false
|
||||
, darwin ? null
|
||||
, hostPlatform
|
||||
, buildPackages
|
||||
}:
|
||||
|
||||
assert fontconfigSupport -> (fontconfig != null);
|
||||
@ -84,6 +84,8 @@ let
|
||||
meta.license = stdenv.lib.licenses.unfree;
|
||||
} else null;
|
||||
|
||||
crossBuild = stdenv.hostPlatform != stdenv.buildPlatform;
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -100,8 +102,10 @@ stdenv.mkDerivation rec {
|
||||
rm -rf ffmpeg
|
||||
'';
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ pkgconfig yasm ];
|
||||
buildInputs = with stdenv.lib;
|
||||
[ pkgconfig freetype ffmpeg ]
|
||||
[ freetype ffmpeg ]
|
||||
++ optional aalibSupport aalib
|
||||
++ optional fontconfigSupport fontconfig
|
||||
++ optional fribidiSupport fribidi
|
||||
@ -129,45 +133,66 @@ stdenv.mkDerivation rec {
|
||||
++ (with darwin.apple_sdk.frameworks; optionals stdenv.isDarwin [ Cocoa OpenGL ])
|
||||
;
|
||||
|
||||
nativeBuildInputs = [ yasm ];
|
||||
configurePlatforms = [ ];
|
||||
configureFlags = with stdenv.lib; [
|
||||
"--enable-freetype"
|
||||
(if fontconfigSupport then "--enable-fontconfig" else "--disable-fontconfig")
|
||||
(if x11Support then "--enable-x11 --enable-gl" else "--disable-x11 --disable-gl")
|
||||
(if xineramaSupport then "--enable-xinerama" else "--disable-xinerama")
|
||||
(if xvSupport then "--enable-xv" else "--disable-xv")
|
||||
(if alsaSupport then "--enable-alsa" else "--disable-alsa")
|
||||
(if screenSaverSupport then "--enable-xss" else "--disable-xss")
|
||||
(if vdpauSupport then "--enable-vdpau" else "--disable-vdpau")
|
||||
(if cddaSupport then "--enable-cdparanoia" else "--disable-cdparanoia")
|
||||
(if dvdnavSupport then "--enable-dvdnav" else "--disable-dvdnav")
|
||||
(if bluraySupport then "--enable-bluray" else "--disable-bluray")
|
||||
(if amrSupport then "--enable-libopencore_amrnb" else "--disable-libopencore_amrnb")
|
||||
(if cacaSupport then "--enable-caca" else "--disable-caca")
|
||||
(if lameSupport then "--enable-mp3lame --disable-mp3lame-lavc" else "--disable-mp3lame --enable-mp3lame-lavc")
|
||||
(if speexSupport then "--enable-speex" else "--disable-speex")
|
||||
(if theoraSupport then "--enable-theora" else "--disable-theora")
|
||||
(if x264Support then "--enable-x264 --disable-x264-lavc" else "--disable-x264 --enable-x264-lavc")
|
||||
(if jackaudioSupport then "" else "--disable-jack")
|
||||
(if pulseSupport then "--enable-pulse" else "--disable-pulse")
|
||||
"--disable-xanim"
|
||||
"--disable-ivtv"
|
||||
"--disable-xvid --disable-xvid-lavc"
|
||||
"--disable-ossaudio"
|
||||
"--disable-ffmpeg_a"
|
||||
"--yasm=${buildPackages.yasm}/bin/yasm"
|
||||
# Note, the `target` vs `host` confusion is intensional.
|
||||
"--target=${stdenv.hostPlatform.config}"
|
||||
] ++ optional
|
||||
(useUnfreeCodecs && codecs != null && !crossBuild)
|
||||
"--codecsdir=${codecs}"
|
||||
++ optional
|
||||
((stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) && !crossBuild)
|
||||
"--enable-runtime-cpudetection"
|
||||
++ optional fribidiSupport "--enable-fribidi"
|
||||
++ optional stdenv.isLinux "--enable-vidix"
|
||||
++ optional stdenv.isLinux "--enable-fbdev"
|
||||
++ optionals (crossBuild) [
|
||||
"--enable-cross-compile"
|
||||
"--disable-vidix-pcidb"
|
||||
"--with-vidix-drivers=no"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
configureFlagsArray+=(
|
||||
"--cc=$CC"
|
||||
"--host-cc=$BUILD_CC"
|
||||
"--as=$AS"
|
||||
"--nm=$NM"
|
||||
"--ar=$AR"
|
||||
"--ranlib=$RANLIB"
|
||||
"--windres=$WINDRES"
|
||||
)
|
||||
'';
|
||||
|
||||
postConfigure = ''
|
||||
echo CONFIG_MPEGAUDIODSP=yes >> config.mak
|
||||
'';
|
||||
|
||||
configureFlags = with stdenv.lib;
|
||||
''
|
||||
--enable-freetype
|
||||
${if fontconfigSupport then "--enable-fontconfig" else "--disable-fontconfig"}
|
||||
${if x11Support then "--enable-x11 --enable-gl" else "--disable-x11 --disable-gl"}
|
||||
${if xineramaSupport then "--enable-xinerama" else "--disable-xinerama"}
|
||||
${if xvSupport then "--enable-xv" else "--disable-xv"}
|
||||
${if alsaSupport then "--enable-alsa" else "--disable-alsa"}
|
||||
${if screenSaverSupport then "--enable-xss" else "--disable-xss"}
|
||||
${if vdpauSupport then "--enable-vdpau" else "--disable-vdpau"}
|
||||
${if cddaSupport then "--enable-cdparanoia" else "--disable-cdparanoia"}
|
||||
${if dvdnavSupport then "--enable-dvdnav" else "--disable-dvdnav"}
|
||||
${if bluraySupport then "--enable-bluray" else "--disable-bluray"}
|
||||
${if amrSupport then "--enable-libopencore_amrnb" else "--disable-libopencore_amrnb"}
|
||||
${if cacaSupport then "--enable-caca" else "--disable-caca"}
|
||||
${if lameSupport then "--enable-mp3lame --disable-mp3lame-lavc" else "--disable-mp3lame --enable-mp3lame-lavc"}
|
||||
${if speexSupport then "--enable-speex" else "--disable-speex"}
|
||||
${if theoraSupport then "--enable-theora" else "--disable-theora"}
|
||||
${if x264Support then "--enable-x264 --disable-x264-lavc" else "--disable-x264 --enable-x264-lavc"}
|
||||
${if jackaudioSupport then "" else "--disable-jack"}
|
||||
${if pulseSupport then "--enable-pulse" else "--disable-pulse"}
|
||||
${optionalString (useUnfreeCodecs && codecs != null) "--codecsdir=${codecs}"}
|
||||
${optionalString (stdenv.isi686 || stdenv.isx86_64) "--enable-runtime-cpudetection"}
|
||||
${optionalString fribidiSupport "--enable-fribidi"}
|
||||
--disable-xanim
|
||||
--disable-ivtv
|
||||
--disable-xvid --disable-xvid-lavc
|
||||
${optionalString stdenv.isLinux "--enable-vidix"}
|
||||
${optionalString stdenv.isLinux "--enable-fbdev"}
|
||||
--disable-ossaudio
|
||||
--disable-ffmpeg_a
|
||||
'';
|
||||
|
||||
NIX_LDFLAGS = with stdenv.lib;
|
||||
optional fontconfigSupport "-lfontconfig"
|
||||
++ optional fribidiSupport "-lfribidi"
|
||||
@ -188,20 +213,6 @@ stdenv.mkDerivation rec {
|
||||
fi
|
||||
'';
|
||||
|
||||
crossAttrs = {
|
||||
configurePlatforms = [];
|
||||
# Some things (vidix) are nanonote specific. Once someone cares, we can make options from them.
|
||||
# Note, the `target` vs `host` confusion is intensional.
|
||||
preConfigure = ''
|
||||
configureFlags="`echo $configureFlags |
|
||||
sed -e 's/--codecsdir[^ ]\+//' \
|
||||
-e 's/--enable-runtime-cpudetection//' `"
|
||||
configureFlags="$configureFlags --target=${hostPlatform.arch}-linux
|
||||
--enable-cross-compile --cc=$crossConfig-gcc --as=$crossConfig-as
|
||||
--disable-vidix-pcidb --with-vidix-drivers=no --host-cc=gcc"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A movie player that supports many video formats";
|
||||
homepage = http://mplayerhq.hu;
|
||||
|
Loading…
Reference in New Issue
Block a user