SDL: split the dev output and fix referrers

This commit is contained in:
Vladimír Čunát 2015-10-11 16:21:43 +02:00
parent 8e381b89a1
commit 9da12a6713
20 changed files with 30 additions and 25 deletions

View File

@ -21,7 +21,7 @@ stdenv.mkDerivation {
cmakeFlags = "-DPTHREAD_INCLUDE_DIR=${stdenv.glibc.dev}/include" +
" -DGETTEXT_INCLUDE_DIR=${gettext}/include" +
" -DSDL_INCLUDE_DIR=${SDL}/include/SDL";
" -DSDL_INCLUDE_DIR=${SDL.dev}/include/SDL";
NIX_LDFLAGS="-lpthread";

View File

@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
preConfigure =
'' configureFlags=" \
--with-sdl-incl=${SDL}/include/SDL \
--with-sdl-incl=${SDL.dev}/include/SDL \
--with-npapi-plugindir=$out/plugins \
--enable-media=gst \
--without-gconf

View File

@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
'';
NIX_CFLAGS_COMPILE = ''
-I${SDL}/include/SDL
-I${SDL.dev}/include/SDL
-I${freetype}include/freetype2
'';

View File

@ -26,7 +26,8 @@ stdenv.mkDerivation rec {
sha256 = "005d993xcac8236fpvd1iawkz4wqjybkpn8dbwaliqz5jfkidlyn";
};
outputs = [ "out" "man" ];
outputs = [ "dev" "out" "man" ];
outputBin = "dev"; # sdl-config
nativeBuildInputs = [ pkgconfig ];
@ -64,6 +65,8 @@ stdenv.mkDerivation rec {
sha1 = "3137feb503a89a8d606405373905b92dcf7e293b";
}) ];
postFixup = ''_moveToOutput share/aclocal "$dev" '';
crossAttrs =stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") {
patches = let
f = rev: sha256: fetchurl {

View File

@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
wrapProgram $out/bin/smpeg-config \
--prefix PATH ":" "${pkgconfig}/bin" \
--prefix PKG_CONFIG_PATH ":" "${SDL}/lib/pkgconfig"
--prefix PKG_CONFIG_PATH ":" "${SDL.dev}/lib/pkgconfig"
'';
meta = {

View File

@ -5,7 +5,7 @@ stdenv.mkDerivation {
buildInputs = [ SDL SDL_image SDL_ttf SDL_mixer ];
NIX_CFLAGS_COMPILE = "-I${SDL}/include/SDL";
NIX_CFLAGS_COMPILE = "-I${SDL.dev}/include/SDL";
NIX_CFLAGS_LINK = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin
"-framework CoreFoundation -framework OpenGL -framework Cocoa";

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
makefile = "Makefile.linux";
NIX_CFLAGS_COMPILE = "-I${SDL}/include/SDL";
NIX_CFLAGS_COMPILE = "-I${SDL.dev}/include/SDL";
NIX_LDFLAGS = "-lGL";

View File

@ -34,8 +34,8 @@ stdenv.mkDerivation rec {
sourceRoot = srcs.df_unfuck.name;
cmakeFlags = [
"-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include"
"-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2}/lib/gtk-2.0/include"
"-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
"-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
];
permission = ./df_permission;
@ -85,7 +85,9 @@ stdenv.mkDerivation rec {
done
# now run Dwarf Fortress!
export LD_LIBRARY_PATH=\${stdenv.cc}/lib:${SDL}/lib:${SDL_image}/lib/:${SDL_ttf}/lib/:${gtk2}/lib/:${glib}/lib/:${mesa}/lib/:${openal}/lib/:${libsndfile}/lib:\$DF_DIR/df_linux/libs/
export LD_LIBRARY_PATH='${stdenv.lib.makeLibraryPath
[ stdenv.cc SDL SDL_image SDL_ttf gtk2 glib mesa openal libsndfile ]
}':\$DF_DIR/df_linux/libs/
export SDL_DISABLE_LOCK_KEYS=1 # Work around for bug in Debian/Ubuntu SDL patch.
#export SDL_VIDEO_CENTERED=1 # Centre the screen. Messes up resizing.

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
configureFlags = [ "--with-tcl=${tcl}/lib" ];
preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL}/include/SDL"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL.dev}/include/SDL"
'';
meta = {

View File

@ -28,11 +28,11 @@ stdenv.mkDerivation rec {
-rpath ${SDL_mixer}/lib
-rpath ${SDL_net}/lib
-rpath ${SDL_ttf}/lib
-rpath ${SDL}/lib
-rpath ${libpng}/lib
-rpath ${SDL.out}/lib
-rpath ${libpng.out}/lib
-rpath ${lua5_1}/lib
-rpath ${mesa}/lib
-rpath ${zlib}/lib
-rpath ${zlib.out}/lib
"
'';

View File

@ -16,7 +16,7 @@ rec {
preBuild = a.fullDepEntry (''
sed -e "s@/usr/games@$out/bin@g" -i Makefile
sed -e "s@/usr/@$out/@g" -i Makefile
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.SDL}/include/SDL"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.SDL.dev}/include/SDL"
'') ["minInit" "addInputs" "doUnpack"];
/* doConfigure should be removed if not needed */

View File

@ -30,7 +30,7 @@ rec {
phaseNames = ["setVars" "doConfigure" "doMakeInstall"];
setVars = a.noDepEntry (''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.SDL}/include/SDL"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.SDL.dev}/include/SDL"
'');
meta = {

View File

@ -20,7 +20,7 @@ stdenv.mkDerivation {
inherit (s) url sha256;
};
preBuild = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL}/include/SDL"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL.dev}/include/SDL"
sed -re 's@"(gfx|fonts|tracks)/@"'"$out"'/share/quantumminigolf/\1/@g' -i *.cpp
'';

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation {
patches = [ ./moderinze_cpp.patch ];
preConfigure = ''
export CPPFLAGS="-I${SDL}/include -I${SDL}/include/SDL -I${SDL_mixer}/include"
export CPPFLAGS="-I${SDL.dev}/include -I${SDL.dev}/include/SDL -I${SDL_mixer}/include"
autoreconf -i
'';

View File

@ -12,7 +12,7 @@ stdenv.mkDerivation {
buildInputs = [python pil pygame SDL];
configurePhase = ''
sed -e "/includes = /aincludes.append('${SDL}/include/SDL')" -i setup.py;
sed -e "/includes = /aincludes.append('${SDL.dev}/include/SDL')" -i setup.py;
sed -e "/includes = /aincludes.append('$(echo ${pygame}/include/python*)')" -i setup.py;
cat setup.py;
export NIX_LDFLAGS="$NIX_LDFLAGS -lgcc_s"

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
postUnpack = optionalString debug
"mkdir -p $out/src; cp -R * $out/src ; cd $out/src";
NIX_CFLAGS_COMPILE = "-iquote ${SDL}/include/SDL";
NIX_CFLAGS_COMPILE = "-iquote ${SDL.dev}/include/SDL";
configureFlags = optionalString debug "--enable-debug";
patchPhase = ''

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
# The fpc is not properly wrapped to add -rpath. I add this manually.
# I even do a trick on lib/lib64 for libgcc, that I expect it will work.
preBuild = ''
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath ${SDL}/lib -rpath ${SDL_image}/lib -rpath ${libpng}/lib -rpath ${freetype}/lib -rpath ${portaudio}/lib -rpath ${ffmpeg}/lib -rpath ${zlib}/lib -rpath ${sqlite}/lib -rpath ${libX11}/lib -rpath ${pcre}/lib -rpath ${lua}/lib -rpath ${stdenv.cc.cc}/lib64 -rpath ${stdenv.cc.cc}/lib"
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath ${SDL.out}/lib -rpath ${SDL_image}/lib -rpath ${libpng.out}/lib -rpath ${freetype.out}/lib -rpath ${portaudio}/lib -rpath ${ffmpeg.out}/lib -rpath ${zlib.out}/lib -rpath ${sqlite.out}/lib -rpath ${libX11.out}/lib -rpath ${pcre.out}/lib -rpath ${lua}/lib -rpath ${stdenv.cc.cc.out}/lib64 -rpath ${stdenv.cc.cc.out}/lib"
sed -i 414,424d Makefile
'';

View File

@ -14,10 +14,10 @@ stdenv.mkDerivation {
cmakeFlags = [
"-DFMOD_LIBRARY=${fmod}/lib/libfmodex.so"
"-DSDL_INCLUDE_DIR=${SDL}/include"
"-DSDL_INCLUDE_DIR=${SDL.dev}/include"
];
NIX_CFLAGS_COMPILE = [ "-I ${SDL}/include/SDL" ];
NIX_CFLAGS_COMPILE = [ "-I ${SDL.dev}/include/SDL" ];
preConfigure = ''
sed s@zdoom.pk3@$out/share/zdoom.pk3@ -i src/version.h

View File

@ -182,7 +182,7 @@ in
extraBuildInputs = [ libpng SDL ];
}).override {
patchPhase = "sed -i -e 's,SDL_CONFIG=\".*\",SDL_CONFIG=\"${SDL}/bin/sdl-config\",' configure";
patchPhase = "sed -i -e 's,SDL_CONFIG=\".*\",SDL_CONFIG=\"${SDL.dev}/bin/sdl-config\",' configure";
configurePhase = "./configure";
};

View File

@ -20,7 +20,7 @@ stdenv.mkDerivation {
src = fetchgit {
inherit (s) url sha256 rev;
};
NIX_CFLAGS_COMPILE="-I${SDL}/include/SDL";
NIX_CFLAGS_COMPILE="-I${SDL.dev}/include/SDL";
configurePhase = ''
sed -e 's/-[og] root//g' -i Makefile
'';