anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / applications / editors / vim / macvim.patch
blob223778acf60cc8adea93fd7a2d9d3710c77da983
1 diff --git a/src/MacVim/vimrc b/src/MacVim/vimrc
2 index 162af04..4322049 100644
3 --- a/src/MacVim/vimrc
4 +++ b/src/MacVim/vimrc
5 @@ -9,45 +9,7 @@ set nocompatible
6 " more sensible value. Add "set backspace&" to your ~/.vimrc to reset it.
7 set backspace+=indent,eol,start
9 -" Python2
10 -" MacVim is configured by default in the binary release to use the
11 -" pre-installed System python2 version. However, following code tries to
12 -" find a Homebrew, MacPorts or an installation from python.org:
13 -if exists("&pythondll") && exists("&pythonhome")
14 - " Homebrew python 2.7
15 - if filereadable("/usr/local/Frameworks/Python.framework/Versions/2.7/Python")
16 - set pythondll=/usr/local/Frameworks/Python.framework/Versions/2.7/Python
18 - " MacPorts python 2.7
19 - elseif filereadable("/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python")
20 - set pythondll=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python
22 - " https://www.python.org/downloads/mac-osx/
23 - elseif filereadable("/Library/Frameworks/Python.framework/Versions/2.7/Python")
24 - set pythondll=/Library/Frameworks/Python.framework/Versions/2.7/Python
25 - endif
26 -endif
28 -" Python3
29 -" MacVim is configured by default in the binary release to set
30 -" pythonthreedll to Homebrew python3. If it cannot be found, the following
31 -" code tries to find Python3 from other popular locations. Note that we are
32 -" using "Current" for the version, because Vim supports the stable ABI and
33 -" therefore any new version of Python3 will work.
34 -if exists("&pythonthreedll") && exists("&pythonthreehome") &&
35 - \ !filereadable(&pythonthreedll)
36 - " MacPorts python
37 - if filereadable("/opt/local/Library/Frameworks/Python.framework/Versions/Current/Python")
38 - set pythonthreedll=/opt/local/Library/Frameworks/Python.framework/Versions/Current/Python
40 - " macOS default Python, installed by 'xcode-select --install'
41 - elseif filereadable("/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/Current/Python3")
42 - set pythonthreedll=/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/Current/Python3
44 - " https://www.python.org/downloads/mac-osx/
45 - elseif filereadable("/Library/Frameworks/Python.framework/Versions/Current/Python")
46 - set pythonthreedll=/Library/Frameworks/Python.framework/Versions/Current/Python
47 - endif
48 -endif
49 +" Default cscopeprg to the Nix-installed path
50 +set cscopeprg=@CSCOPE@
52 " vim: sw=2 ts=2 et
53 diff --git a/src/Makefile b/src/Makefile
54 index 5b4cdff..72fee3a 100644
55 --- a/src/Makefile
56 +++ b/src/Makefile
57 @@ -1290,7 +1290,7 @@ MACVIMGUI_SRC = gui.c gui_beval.c MacVim/gui_macvim.m MacVim/MMBackend.m \
58 MacVim/MacVim.m
59 MACVIMGUI_OBJ = objects/gui.o objects/gui_beval.o \
60 objects/gui_macvim.o objects/MMBackend.o objects/MacVim.o
61 -MACVIMGUI_DEFS = -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
62 +MACVIMGUI_DEFS = -DMACOS_X_DARWIN -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
63 MACVIMGUI_IPATH =
64 MACVIMGUI_LIBS_DIR =
65 MACVIMGUI_LIBS1 =
66 diff --git a/src/auto/configure b/src/auto/configure
67 index ecf10c4..4b691d0 100755
68 --- a/src/auto/configure
69 +++ b/src/auto/configure
70 @@ -6247,10 +6247,7 @@ printf "%s\n" "not found" >&6; }
72 for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
73 if test "X$path" != "X"; then
74 - if test "x$MACOS_X" = "xyes"; then
75 - MZSCHEME_LIBS="-framework Racket"
76 - MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
77 - elif test -f "${path}/libmzscheme3m.a"; then
78 + if test -f "${path}/libmzscheme3m.a"; then
79 MZSCHEME_LIBS="${path}/libmzscheme3m.a"
80 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
81 elif test -f "${path}/libracket3m.a"; then
82 @@ -6646,23 +6643,6 @@ printf "%s\n" ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
85 if test "x$MACOS_X" = "xyes"; then
86 - dir=/System/Library/Perl
87 - darwindir=$dir/darwin
88 - if test -d $darwindir; then
89 - PERL=/usr/bin/perl
90 - else
91 - dir=/System/Library/Perl/5.8.1
92 - darwindir=$dir/darwin-thread-multi-2level
93 - if test -d $darwindir; then
94 - PERL=/usr/bin/perl
95 - fi
96 - fi
97 - if test -n "$PERL"; then
98 - PERL_DIR="$dir"
99 - PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
100 - PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
101 - PERL_LIBS="-L$darwindir/CORE -lperl"
102 - fi
103 PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
104 PERL_CFLAGS=`echo "$PERL_CFLAGS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
106 @@ -6902,13 +6882,7 @@ __:
108 eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
109 rm -f -- "${tmp_mkf}"
110 - if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
111 - "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
112 - vi_cv_path_python_plibs="-framework Python"
113 - if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
114 - vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
115 - fi
116 - else
118 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
119 if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
120 python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
121 @@ -6923,7 +6897,6 @@ eof
123 vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
124 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
125 - fi
129 @@ -7004,13 +6977,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
130 printf "%s\n" "no" >&6; }
133 - if test -n "$MACSDK"; then
134 - PYTHON_CFLAGS=
135 - PYTHON_LIBS=-framework Python
136 - PYTHON_CONFDIR=
137 - PYTHON_GETPATH_CFLAGS=
138 - fi
140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
141 printf %s "checking if compile and link flags for Python are sane... " >&6; }
142 cflags_save=$CFLAGS
143 @@ -8060,11 +8026,7 @@ printf "%s\n" "$tclver - OK" >&6; };
145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
146 printf %s "checking for location of Tcl include... " >&6; }
147 - if test "x$MACOS_X" != "xyes"; then
148 tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/local/include/tcl$tclver /usr/include /usr/include/tcl$tclver"
149 - else
150 - 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"
151 - fi
152 TCL_INC=
153 for try in $tclinc; do
154 if test -f "$try/tcl.h"; then
155 @@ -8082,13 +8044,8 @@ printf "%s\n" "<not found>" >&6; }
156 if test -z "$SKIP_TCL"; then
157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
158 printf %s "checking for location of tclConfig.sh script... " >&6; }
159 - if test "x$MACOS_X" != "xyes"; then
160 tclcnf=`echo $tclinc | sed s/include/lib/g`
161 tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
162 - else
163 - tclcnf=`echo $tclinc | sed s/include/lib/g`
164 - tclcnf="$tclcnf /System/Library/Frameworks/Tcl.framework `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework"
165 - fi
166 for try in $tclcnf; do
167 if test -f "$try/tclConfig.sh"; then
168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
169 @@ -8285,10 +8242,6 @@ printf "%s\n" "$rubyhdrdir" >&6; }
170 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
171 if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby"; then
172 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
173 - elif test "$vi_cv_path_ruby" = "/usr/bin/ruby" -a -d "/System/Library/Frameworks/Ruby.framework"; then
174 - RUBY_LIBS="-framework Ruby"
175 - RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
176 - librubyarg=
179 if test "X$librubyarg" != "X"; then
180 diff --git a/src/vim.h b/src/vim.h
181 index 6e33142..6185f45 100644
182 --- a/src/vim.h
183 +++ b/src/vim.h
184 @@ -270,17 +270,6 @@
185 # define SUN_SYSTEM
186 #endif
188 -// If we're compiling in C++ (currently only KVim), the system
189 -// headers must have the correct prototypes or nothing will build.
190 -// Conversely, our prototypes might clash due to throw() specifiers and
191 -// cause compilation failures even though the headers are correct. For
192 -// a concrete example, gcc-3.2 enforces exception specifications, and
193 -// glibc-2.2.5 has them in their system headers.
194 -#if !defined(__cplusplus) && defined(UNIX) \
195 - && !defined(MACOS_X) // MACOS_X doesn't yet support osdef.h
196 -# include "auto/osdef.h" // bring missing declarations in
197 -#endif
199 #ifdef AMIGA
200 # include "os_amiga.h"
201 #endif
202 diff --git a/src/vimtutor b/src/vimtutor
203 index 3b154f2..e89f260 100755
204 --- a/src/vimtutor
205 +++ b/src/vimtutor
206 @@ -16,7 +16,7 @@ seq="vim vim81 vim80 vim8 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
207 if test "$1" = "-g"; then
208 # Try to use the GUI version of Vim if possible, it will fall back
209 # on Vim if Gvim is not installed.
210 - seq="gvim gvim81 gvim80 gvim8 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
211 + seq="mvim gvim gvim81 gvim80 gvim8 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
212 shift