fim: fix cross / strictDeps build

+53 -5
+26
pkgs/by-name/fi/fim/native-tools.patch
···
··· 1 + diff --git a/doc/Makefile.in b/doc/Makefile.in 2 + index be8ebe5..13ae676 100644 3 + --- a/doc/Makefile.in 4 + +++ b/doc/Makefile.in 5 + @@ -684,7 +684,7 @@ fimgs.man.html: fimgs.man 6 + if test ! -s $@ ; then $(MAN2TXT) ./$< > $<.txt && $(srcdir)/vim2html.pl tags $<.txt && mv $<.txt.html $@ ; fi 7 + 8 + doctags$(EXEEXT): doctags.c 9 + - $(CC) -o $@ $< 10 + + @cc_for_build@ -o $@ $< 11 + 12 + #clean: 13 + # $(RM) -f doctags.o doctags$(EXEEXT) FIM.html tags fim-stylesheet.css fim.man.html fimgs.man.html 14 + diff --git a/src/Makefile.in b/src/Makefile.in 15 + index 76f5e1e..027159c 100644 16 + --- a/src/Makefile.in 17 + +++ b/src/Makefile.in 18 + @@ -1132,7 +1132,7 @@ help-acm.cpp: fim.h 19 + $(ECHO) '//#endif' >> $@ 20 + 21 + b2ba$(EXEEXT): b2ba.c 22 + - $(CC) -o $@ $< 23 + + @cc_for_build@ -o $@ $< 24 + 25 + @FIM_WANT_CUSTOM_HARDCODED_CONSOLEFONT_TRUE@@HAVE_RUNNABLE_TESTS_TRUE@default_font_byte_array.h: $(FIM_CUSTOM_HARDCODED_CONSOLEFONT) b2ba$(EXEEXT) 26 + @FIM_WANT_CUSTOM_HARDCODED_CONSOLEFONT_TRUE@@HAVE_RUNNABLE_TESTS_TRUE@ ./b2ba$(EXEEXT) < $< > $@
+27 -5
pkgs/by-name/fi/fim/package.nix
··· 4 autoconf, 5 automake, 6 pkg-config, 7 lib, 8 perl, 9 flex, 10 bison, 11 readline, 12 libexif, 13 - x11Support ? true, 14 SDL, 15 svgSupport ? true, 16 inkscape, ··· 35 sha256 = "sha256-/p7bjeZM46DJOQ9sgtebhkNpBPj2RJYY3dMXhzHnNmg="; 36 }; 37 38 postPatch = '' 39 - substituteInPlace doc/vim2html.pl \ 40 - --replace /usr/bin/perl ${perl}/bin/perl 41 ''; 42 43 nativeBuildInputs = [ 44 autoconf 45 automake 46 pkg-config 47 ]; 48 49 buildInputs = 50 [ 51 - perl 52 flex 53 - bison 54 readline 55 libexif 56 ] 57 ++ lib.optional x11Support SDL 58 ++ lib.optional svgSupport inkscape ··· 62 ++ lib.optional jpegSupport libjpeg 63 ++ lib.optional pngSupport libpng; 64 65 env.NIX_CFLAGS_COMPILE = lib.optionalString x11Support "-lSDL"; 66 67 meta = with lib; {
··· 4 autoconf, 5 automake, 6 pkg-config, 7 + substituteAll, 8 lib, 9 perl, 10 flex, 11 bison, 12 readline, 13 libexif, 14 + bash, 15 + buildPackages, 16 + # SDL depends on Qt, which doesn't cross-compile 17 + x11Support ? (stdenv.buildPlatform.canExecute stdenv.hostPlatform), 18 SDL, 19 svgSupport ? true, 20 inkscape, ··· 39 sha256 = "sha256-/p7bjeZM46DJOQ9sgtebhkNpBPj2RJYY3dMXhzHnNmg="; 40 }; 41 42 + patches = [ 43 + # build tools with a build compiler 44 + (substituteAll { 45 + src = ./native-tools.patch; 46 + cc_for_build = lib.getExe buildPackages.stdenv.cc; 47 + }) 48 + ]; 49 + 50 postPatch = '' 51 + patchShebangs --build doc/vim2html.pl 52 ''; 53 54 nativeBuildInputs = [ 55 autoconf 56 automake 57 + bison 58 + flex 59 + perl 60 pkg-config 61 ]; 62 63 buildInputs = 64 [ 65 flex 66 readline 67 libexif 68 + bash 69 ] 70 ++ lib.optional x11Support SDL 71 ++ lib.optional svgSupport inkscape ··· 75 ++ lib.optional jpegSupport libjpeg 76 ++ lib.optional pngSupport libpng; 77 78 + configureFlags = [ 79 + # mmap works on all relevant platforms 80 + "ac_cv_func_mmap_fixed_mapped=yes" 81 + # system regexp works on all relevant platforms 82 + "fim_cv_regex_broken=no" 83 + ]; 84 + 85 + env.LIBAA_CONFIG = lib.getExe' (lib.getDev aalib) "aalib-config"; 86 + env.LIBPNG_CONFIG = lib.getExe' (lib.getDev libpng) "libpng-config"; 87 env.NIX_CFLAGS_COMPILE = lib.optionalString x11Support "-lSDL"; 88 89 meta = with lib; {