mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
Merge pull request #4576 from cstrahan/macvim-clang
Fix MacVim by using clang.
This commit is contained in:
commit
5d6e039cd6
3 changed files with 41 additions and 6 deletions
|
@ -1,17 +1,16 @@
|
|||
{ stdenv, stdenvAdapters, gccApple, fetchFromGitHub, ncurses, gettext,
|
||||
{ stdenv, fetchFromGitHub, ncurses, gettext,
|
||||
pkgconfig, cscope, python, ruby, tcl, perl, luajit
|
||||
}:
|
||||
|
||||
let inherit (stdenvAdapters.overrideGCC stdenv gccApple) mkDerivation;
|
||||
in mkDerivation rec {
|
||||
stdenv.mkDerivation rec {
|
||||
name = "macvim-${version}";
|
||||
|
||||
version = "7.4.355";
|
||||
version = "7.4.479";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "genoma";
|
||||
repo = "macvim";
|
||||
rev = "c18a61f9723565664ffc2eda9179e96c95860e25";
|
||||
rev = "f9c084b97fa9d5cad2448dfd3eff3d9b7f0fac59";
|
||||
sha256 = "190bngg8m4bwqcia7w24gn7mmqkhk0mavxy81ziwysam1f652ymf";
|
||||
};
|
||||
|
||||
|
@ -46,6 +45,7 @@ in mkDerivation rec {
|
|||
"--enable-perlinterp=dynamic"
|
||||
"--enable-rubyinterp=dynamic"
|
||||
"--enable-tclinterp=yes"
|
||||
"--without-local-dir"
|
||||
"--with-luajit"
|
||||
"--with-lua-prefix=${luajit}"
|
||||
"--with-ruby-command=${ruby}/bin/ruby"
|
||||
|
@ -54,6 +54,8 @@ in mkDerivation rec {
|
|||
"--with-compiledby=Nix"
|
||||
];
|
||||
|
||||
makeFlags = ''PREFIX=$(out) CPPFLAGS="-Wno-error"'';
|
||||
|
||||
preConfigure = ''
|
||||
DEV_DIR=$(/usr/bin/xcode-select -print-path)/Platforms/MacOSX.platform/Developer
|
||||
configureFlagsArray+=(
|
||||
|
|
|
@ -187,3 +187,36 @@ index bc9f074..9b9125e 100755
|
|||
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
|
||||
# would make configure fail if this is the last instruction.
|
||||
$ac_cs_success || as_fn_exit 1
|
||||
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 1c4d104..fff2015 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -1298,7 +1298,7 @@ MACVIMGUI_SRC = gui.c gui_beval.c MacVim/gui_macvim.m MacVim/MMBackend.m \
|
||||
MacVim/MacVim.m
|
||||
MACVIMGUI_OBJ = objects/gui.o objects/gui_beval.o objects/pty.o \
|
||||
objects/gui_macvim.o objects/MMBackend.o objects/MacVim.o
|
||||
-MACVIMGUI_DEFS = -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
|
||||
+MACVIMGUI_DEFS = -DMACOS_X_UNIX -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
|
||||
MACVIMGUI_IPATH =
|
||||
MACVIMGUI_LIBS_DIR =
|
||||
MACVIMGUI_LIBS1 = -framework Cocoa -framework Carbon
|
||||
|
||||
diff --git a/src/if_python.c b/src/if_python.c
|
||||
index b356bf7..b7bfa78 100644
|
||||
--- a/src/if_python.c
|
||||
+++ b/src/if_python.c
|
||||
@@ -55,11 +55,7 @@
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
-#ifdef FEAT_GUI_MACVIM
|
||||
-# include <Python/Python.h>
|
||||
-#else
|
||||
-# include <Python.h>
|
||||
-#endif
|
||||
+#include <Python.h>
|
||||
|
||||
#if !defined(PY_VERSION_HEX) || PY_VERSION_HEX < 0x02050000
|
||||
# undef PY_SSIZE_T_CLEAN
|
||||
MACVIMGUI_LIBS1 = -framework Cocoa -framework Carbon
|
||||
|
|
|
@ -10516,7 +10516,7 @@ let
|
|||
|
||||
vim = callPackage ../applications/editors/vim { };
|
||||
|
||||
macvim = callPackage ../applications/editors/vim/macvim.nix { };
|
||||
macvim = callPackage ../applications/editors/vim/macvim.nix { stdenv = clangStdenv; };
|
||||
|
||||
vimHugeX = vim_configurable;
|
||||
|
||||
|
|
Loading…
Reference in a new issue