1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-11 23:24:35 +00:00
nixpkgs/pkgs/applications/editors/vim/macvim.patch

205 lines
8.8 KiB
Diff
Raw Normal View History

diff --git a/src/MacVim/vimrc b/src/MacVim/vimrc
2020-09-28 23:22:17 +01:00
index af43549..dfb10fe 100644
--- a/src/MacVim/vimrc
+++ b/src/MacVim/vimrc
@@ -14,35 +14,5 @@ set backspace+=indent,eol,start
" translated to English).
set langmenu=none
-" Python2
-" MacVim is configured by default to use the pre-installed System python2
-" version. However, following code tries to find a Homebrew, MacPorts or
-" an installation from python.org:
-if exists("&pythondll") && exists("&pythonhome")
- if filereadable("/usr/local/Frameworks/Python.framework/Versions/2.7/Python")
- " Homebrew python 2.7
- set pythondll=/usr/local/Frameworks/Python.framework/Versions/2.7/Python
- elseif filereadable("/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python")
- " MacPorts python 2.7
- set pythondll=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python
- elseif filereadable("/Library/Frameworks/Python.framework/Versions/2.7/Python")
- " https://www.python.org/downloads/mac-osx/
- set pythondll=/Library/Frameworks/Python.framework/Versions/2.7/Python
- endif
-endif
-
-" Python3
-" MacVim is configured by default to use Homebrew python3 version
-" If this cannot be found, following code tries to find a MacPorts
-" or an installation from python.org:
-if exists("&pythonthreedll") && exists("&pythonthreehome") &&
- \ !filereadable(&pythonthreedll)
2020-09-28 23:22:17 +01:00
- if filereadable("/opt/local/Library/Frameworks/Python.framework/Versions/3.8/Python")
- " MacPorts python 3.8
- set pythonthreedll=/opt/local/Library/Frameworks/Python.framework/Versions/3.8/Python
- elseif filereadable("/Library/Frameworks/Python.framework/Versions/3.8/Python")
- " https://www.python.org/downloads/mac-osx/
2020-09-28 23:22:17 +01:00
- set pythonthreedll=/Library/Frameworks/Python.framework/Versions/3.8/Python
- endif
-endif
-
+" Default cscopeprg to the Nix-installed path
+set cscopeprg=@CSCOPE@
diff --git a/src/Makefile b/src/Makefile
2020-09-28 23:22:17 +01:00
index fd2d5e1..37a6d6a 100644
--- a/src/Makefile
+++ b/src/Makefile
2020-09-28 23:22:17 +01:00
@@ -1397,7 +1397,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/gui_macvim.o objects/MMBackend.o objects/MacVim.o
-MACVIMGUI_DEFS = -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
+MACVIMGUI_DEFS = -DMACOS_X_DARWIN -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
MACVIMGUI_IPATH =
MACVIMGUI_LIBS_DIR =
MACVIMGUI_LIBS1 = -framework Cocoa -framework Carbon
2014-06-06 22:45:22 +01:00
diff --git a/src/auto/configure b/src/auto/configure
2020-09-28 23:22:17 +01:00
index 06257a5..68437df 100755
2014-06-06 22:45:22 +01:00
--- a/src/auto/configure
+++ b/src/auto/configure
2020-09-28 23:22:17 +01:00
@@ -5872,10 +5872,7 @@ $as_echo "not found" >&6; }
2014-06-06 22:45:22 +01:00
for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
if test "X$path" != "X"; then
- if test "x$MACOS_X" = "xyes"; then
- MZSCHEME_LIBS="-framework Racket"
- MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
- elif test -f "${path}/libmzscheme3m.a"; then
+ if test -f "${path}/libmzscheme3m.a"; then
MZSCHEME_LIBS="${path}/libmzscheme3m.a"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
elif test -f "${path}/libracket3m.a"; then
2020-09-28 23:22:17 +01:00
@@ -6260,23 +6257,6 @@ $as_echo ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
2014-06-06 22:45:22 +01:00
fi
if test "x$MACOS_X" = "xyes"; then
2014-06-06 22:45:22 +01:00
- dir=/System/Library/Perl
- darwindir=$dir/darwin
- if test -d $darwindir; then
- PERL=/usr/bin/perl
- else
- dir=/System/Library/Perl/5.8.1
- darwindir=$dir/darwin-thread-multi-2level
- if test -d $darwindir; then
- PERL=/usr/bin/perl
- fi
- fi
- if test -n "$PERL"; then
- PERL_DIR="$dir"
- PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
- PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
- PERL_LIBS="-L$darwindir/CORE -lperl"
- fi
PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
PERL_CFLAGS=`echo "$PERL_CFLAGS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
fi
2020-09-28 23:22:17 +01:00
@@ -6499,13 +6479,7 @@ __:
2014-06-06 22:45:22 +01:00
eof
eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
rm -f -- "${tmp_mkf}"
- if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
2014-06-06 22:45:22 +01:00
- "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
- vi_cv_path_python_plibs="-framework Python"
- if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
- vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
- fi
2014-06-06 22:45:22 +01:00
- else
+
vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
2020-09-28 23:22:17 +01:00
@@ -6520,7 +6494,6 @@ eof
2014-06-06 22:45:22 +01:00
fi
vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
- fi
fi
2020-09-28 23:22:17 +01:00
@@ -6599,13 +6572,6 @@ rm -f core conftest.err conftest.$ac_objext \
2014-06-06 22:45:22 +01:00
$as_echo "no" >&6; }
fi
- if test -n "$MACSDK"; then
- PYTHON_CFLAGS=
- PYTHON_LIBS=-framework Python
- PYTHON_CONFDIR=
- PYTHON_GETPATH_CFLAGS=
- fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
$as_echo_n "checking if compile and link flags for Python are sane... " >&6; }
cflags_save=$CFLAGS
2020-09-28 23:22:17 +01:00
@@ -7499,11 +7465,7 @@ $as_echo "$tclver - OK" >&6; };
2014-06-06 22:45:22 +01:00
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
$as_echo_n "checking for location of Tcl include... " >&6; }
- if test "x$MACOS_X" != "xyes"; then
2014-06-06 22:45:22 +01:00
tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/local/include/tcl$tclver /usr/include /usr/include/tcl$tclver"
- else
2020-09-28 23:22:17 +01:00
- tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /System/Library/Frameworks/Tcl.framework/Headers `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework/Versions/Current/Headers"
2014-06-06 22:45:22 +01:00
- fi
TCL_INC=
for try in $tclinc; do
if test -f "$try/tcl.h"; then
2020-09-28 23:22:17 +01:00
@@ -7521,13 +7483,8 @@ $as_echo "<not found>" >&6; }
2014-06-06 22:45:22 +01:00
if test -z "$SKIP_TCL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
$as_echo_n "checking for location of tclConfig.sh script... " >&6; }
- if test "x$MACOS_X" != "xyes"; then
2014-06-06 22:45:22 +01:00
tclcnf=`echo $tclinc | sed s/include/lib/g`
tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
- else
2020-09-28 23:22:17 +01:00
- tclcnf=`echo $tclinc | sed s/include/lib/g`
- tclcnf="$tclcnf /System/Library/Frameworks/Tcl.framework `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework"
2014-06-06 22:45:22 +01:00
- fi
for try in $tclcnf; do
if test -f "$try/tclConfig.sh"; then
2014-06-06 22:45:22 +01:00
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
2020-09-28 23:22:17 +01:00
@@ -7717,10 +7674,6 @@ $as_echo "$rubyhdrdir" >&6; }
2014-06-06 22:45:22 +01:00
if test -f "$rubylibdir/$librubya"; then
librubyarg="$librubyarg"
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
- elif test "$vi_cv_path_ruby" = "/usr/bin/ruby" -a -d "/System/Library/Frameworks/Ruby.framework"; then
2014-06-06 22:45:22 +01:00
- RUBY_LIBS="-framework Ruby"
- RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
2014-06-06 22:45:22 +01:00
- librubyarg=
fi
if test "X$librubyarg" != "X"; then
diff --git a/src/vim.h b/src/vim.h
2020-09-28 23:22:17 +01:00
index bbc01ee..5a93591 100644
--- a/src/vim.h
+++ b/src/vim.h
2020-09-28 23:22:17 +01:00
@@ -244,17 +244,6 @@
# define SUN_SYSTEM
#endif
2019-10-19 08:19:46 +01:00
-// If we're compiling in C++ (currently only KVim), the system
-// headers must have the correct prototypes or nothing will build.
-// Conversely, our prototypes might clash due to throw() specifiers and
-// cause compilation failures even though the headers are correct. For
-// a concrete example, gcc-3.2 enforces exception specifications, and
-// glibc-2.2.5 has them in their system headers.
-#if !defined(__cplusplus) && defined(UNIX) \
2019-10-19 08:19:46 +01:00
- && !defined(MACOS_X) // MACOS_X doesn't yet support osdef.h
-# include "auto/osdef.h" // bring missing declarations in
-#endif
-
#ifdef AMIGA
# include "os_amiga.h"
#endif
diff --git a/src/vimtutor b/src/vimtutor
2020-04-14 21:49:27 +01:00
index 1e8769b..47078b0 100755
--- a/src/vimtutor
+++ b/src/vimtutor
@@ -16,7 +16,7 @@ seq="vim vim81 vim80 vim8 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
if test "$1" = "-g"; then
# Try to use the GUI version of Vim if possible, it will fall back
# on Vim if Gvim is not installed.
- seq="gvim gvim81 gvim80 gvim8 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
+ seq="mvim gvim gvim81 gvim80 gvim8 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
shift
fi