]> git.pld-linux.org Git - packages/vim.git/blame - 6.2.142
- initial import
[packages/vim.git] / 6.2.142
CommitLineData
eb0ac1ae
AG
1To: vim-dev@vim.org
2Subject: Patch 6.2.142
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 6.2.142 (after 6.2.124)
11Problem: Mac: building without GUI through configure doesn't work.
12 When the system is slow, unpacking the resource file takes too
13 long.
14Solution: Don't always define FEAT_GUI_MAC when MACOS is defined, define it
15 in the Makefile.
16 Add a configure option to skip Darwin detection.
17 Use a Python script to unpack the resources to avoid a race
18 condition. (Taro Muraoka)
19Files: Makefile, src/Makefile, src/auto/configure, src/configure.in,
20 src/dehqx.py, src/vim.h
21
22
23*** ../vim-6.2.141/Makefile Fri Oct 17 11:55:09 2003
24--- Makefile Sun Nov 2 15:33:24 2003
25***************
26*** 505,510 ****
27--- 505,511 ----
28 SRC_MAC = \
29 src/INSTALLmac.txt \
30 src/Make_mpw.mak \
31+ src/dehqx.py \
32 src/gui_mac.c \
33 src/gui_mac.icns \
34 src/gui_mac.r \
35*** ../vim-6.2.141/src/Makefile Fri Oct 17 12:08:46 2003
36--- src/Makefile Sun Nov 2 13:26:45 2003
37***************
38*** 24,29 ****
39--- 24,31 ----
40 # - Uncomment the line with --disable-gui if you have Motif, GTK and/or
41 # Athena but don't want to make gvim (the GUI version of Vim with nice
42 # menus and scrollbars, but makes Vim bigger and startup slower).
43+ # - Uncomment --disable-darwin if on Mac OS X but you want to compile a
44+ # Unix version.
45 # - Uncomment the line "CONF_OPT_X = --without-x" if you have X11 but
46 # want to disable using X11 libraries. This speeds up starting Vim,
47 # but the window title will not be set and the X11 selection can not
48***************
49*** 340,345 ****
50--- 342,352 ----
51 #CONF_OPT_GUI = --enable-gui=athena
52 #CONF_OPT_GUI = --enable-gui=nextaw
53
54+ # DARWIN - detecting Mac OS X
55+ # Uncomment this line when you want to compile a Unix version of Vim on
56+ # Darwin. None of the Mac specific options or files will be used.
57+ #CONF_OPT_DARWIN = --disable-darwin
58+
59 # PERL - For creating Vim with Perl interface
60 # Uncomment this when you want to include the Perl interface.
61 # The Perl option sometimes causes problems, because it adds extra flags
62***************
63*** 1132,1147 ****
64 PHOTONGUI_TESTTARGET = gui
65
66 # CARBON GUI
67! CARBONGUI_SRC = gui.c gui_mac.c
68! CARBONGUI_OBJ = objects/gui.o objects/gui_mac.o objects/pty.o
69! CARBONGUI_DEFS = -arch ppc -fno-common -fpascal-strings \
70 -Wall -Wno-unknown-pragmas \
71 -mdynamic-no-pic -pipe
72! CARBONGUI_IPATH = -I. -Iproto -I/Developer/Headers/FlatCarbon
73 CARBONGUI_LIBS_DIR =
74 CARBONGUI_LIBS1 = -framework Carbon
75 CARBONGUI_LIBS2 = -ltermcap
76! CARBONGUI_INSTALL = gui_mac.rsrc install_macosx
77 CARBONGUI_TARGETS =
78 CARBONGUI_MAN_TARGETS =
79 CARBONGUI_TESTTARGET =
80--- 1139,1154 ----
81 PHOTONGUI_TESTTARGET = gui
82
83 # CARBON GUI
84! CARBONGUI_SRC = gui.c gui_mac.c
85! CARBONGUI_OBJ = objects/gui.o objects/gui_mac.o objects/pty.o
86! CARBONGUI_DEFS = -DFEAT_GUI_MAC -arch ppc -fno-common -fpascal-strings \
87 -Wall -Wno-unknown-pragmas \
88 -mdynamic-no-pic -pipe
89! CARBONGUI_IPATH = -I. -Iproto
90 CARBONGUI_LIBS_DIR =
91 CARBONGUI_LIBS1 = -framework Carbon
92 CARBONGUI_LIBS2 = -ltermcap
93! CARBONGUI_INSTALL = install_macosx
94 CARBONGUI_TARGETS =
95 CARBONGUI_MAN_TARGETS =
96 CARBONGUI_TESTTARGET =
97***************
98*** 1429,1435 ****
99 CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \
100 LDFLAGS="$(LDFLAGS)" $(CONF_SHELL) srcdir="$(srcdir)" \
101 ./configure $(CONF_OPT_GUI) $(CONF_OPT_X) $(CONF_OPT_XSMP) \
102! $(CONF_OPT_PERL) $(CONF_OPT_PYTHON) \
103 $(CONF_OPT_TCL) $(CONF_OPT_RUBY) \
104 $(CONF_OPT_CSCOPE) $(CONF_OPT_MULTIBYTE) $(CONF_OPT_INPUT) \
105 $(CONF_OPT_OUTPUT) $(CONF_OPT_GPM) $(CONF_OPT_WORKSHOP) \
106--- 1436,1442 ----
107 CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \
108 LDFLAGS="$(LDFLAGS)" $(CONF_SHELL) srcdir="$(srcdir)" \
109 ./configure $(CONF_OPT_GUI) $(CONF_OPT_X) $(CONF_OPT_XSMP) \
110! $(CONF_OPT_DARWIN) $(CONF_OPT_PERL) $(CONF_OPT_PYTHON) \
111 $(CONF_OPT_TCL) $(CONF_OPT_RUBY) \
112 $(CONF_OPT_CSCOPE) $(CONF_OPT_MULTIBYTE) $(CONF_OPT_INPUT) \
113 $(CONF_OPT_OUTPUT) $(CONF_OPT_GPM) $(CONF_OPT_WORKSHOP) \
114***************
115*** 2309,2315 ****
116 ### This creates a runnable Vim.app in the src directory
117
118 REZ = /Developer/Tools/Rez
119- RESMRG = /Developer/Tools/ResMerger
120 APPDIR = $(VIMNAME).app
121 RESDIR = $(APPDIR)/Contents/Resources
122 # FIXME: i'm sure someone else can do something clever with grep
123--- 2316,2321 ----
124***************
125*** 2353,2370 ****
126 ### Classic resources
127 # Resource fork (in the form of a .rsrc file) for Classic Vim (Mac OS 9)
128 # This file is also required for OS X Vim.
129! bundle-rsrc: gui_mac.rsrc
130 @echo "Creating resource fork"
131! $(RESMRG) gui_mac.rsrc -dstIs DF -o $(RESDIR)/$(VIMNAME).rsrc
132!
133! gui_mac.rsrc:
134! open os_mac.rsr.hqx
135! sleep 1
136! @echo
137! @echo "--------------------"
138! @echo "If this fails, run make install again after StuffIt Expander quits."
139! @echo "--------------------"
140! @echo
141
142 # po/Make_osx.pl says something about generating a Mac message file
143 # for Ukrananian. Would somebody using Mac OS X in Ukranian
144--- 2359,2369 ----
145 ### Classic resources
146 # Resource fork (in the form of a .rsrc file) for Classic Vim (Mac OS 9)
147 # This file is also required for OS X Vim.
148! bundle-rsrc: os_mac.rsr.hqx
149 @echo "Creating resource fork"
150! python dehqx.py $<
151! rm -f gui_mac.rsrc
152! mv gui_mac.rsrc.rsrcfork $(RESDIR)/$(VIMNAME).rsrc
153
154 # po/Make_osx.pl says something about generating a Mac message file
155 # for Ukrananian. Would somebody using Mac OS X in Ukranian
156*** ../vim-6.2.141/src/auto/configure Wed Oct 29 14:51:49 2003
157--- src/auto/configure Sun Nov 2 15:28:41 2003
158***************
159*** 12,17 ****
160--- 12,19 ----
161 ac_default_prefix=/usr/local
162 # Any additions from configure.in:
163 ac_help="$ac_help
164+ --disable-darwin Disable Darwin (Mac OS X) support."
165+ ac_help="$ac_help
166 --with-vim-name=NAME what to call the Vim executable"
167 ac_help="$ac_help
168 --with-ex-name=NAME what to call the Ex executable"
169***************
170*** 1173,1199 ****
171
172 DEFAULT_VIMNAME=vim
173 echo $ac_n "checking for Darwin (Mac OS X)""... $ac_c" 1>&6
174! echo "configure:1177: checking for Darwin (Mac OS X)" >&5
175 if test "`(uname) 2>/dev/null`" = Darwin; then
176 echo "$ac_t""yes" 1>&6
177- MACOSX=yes
178- OS_EXTRA_SCR="os_macosx.c";
179- OS_EXTRA_OBJ="objects/os_macosx.o"
180- CFLAGS="$CFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
181
182! ac_safe=`echo "Carbon/Carbon.h" | sed 'y%./+-%__p_%'`
183 echo $ac_n "checking for Carbon/Carbon.h""... $ac_c" 1>&6
184! echo "configure:1187: checking for Carbon/Carbon.h" >&5
185 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
186 echo $ac_n "(cached) $ac_c" 1>&6
187 else
188 cat > conftest.$ac_ext <<EOF
189! #line 1192 "configure"
190 #include "confdefs.h"
191 #include <Carbon/Carbon.h>
192 EOF
193 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
194! { (eval echo configure:1197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
195 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
196 if test -z "$ac_err"; then
197 rm -rf conftest*
198--- 1175,1227 ----
199
200 DEFAULT_VIMNAME=vim
201 echo $ac_n "checking for Darwin (Mac OS X)""... $ac_c" 1>&6
202! echo "configure:1179: checking for Darwin (Mac OS X)" >&5
203 if test "`(uname) 2>/dev/null`" = Darwin; then
204 echo "$ac_t""yes" 1>&6
205
206! echo $ac_n "checking --disable-darwin argument""... $ac_c" 1>&6
207! echo "configure:1184: checking --disable-darwin argument" >&5
208! # Check whether --enable-darwin or --disable-darwin was given.
209! if test "${enable_darwin+set}" = set; then
210! enableval="$enable_darwin"
211! :
212! else
213! enable_darwin="yes"
214! fi
215!
216! if test "$enable_darwin" = "yes"; then
217! echo "$ac_t""no" 1>&6
218! echo $ac_n "checking if Darwin files are there""... $ac_c" 1>&6
219! echo "configure:1196: checking if Darwin files are there" >&5
220! if test -f os_macosx.c; then
221! echo "$ac_t""yes" 1>&6
222! else
223! echo "$ac_t""no, Darwin support disabled" 1>&6
224! enable_darwin=no
225! fi
226! else
227! echo "$ac_t""yes, Darwin support excluded" 1>&6
228! fi
229!
230! if test "$enable_darwin" = "yes"; then
231! MACOSX=yes
232! OS_EXTRA_SCR="os_macosx.c";
233! OS_EXTRA_OBJ="objects/os_macosx.o"
234! CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -I/Developer/Headers/FlatCarbon -no-cpp-precomp"
235!
236! ac_safe=`echo "Carbon/Carbon.h" | sed 'y%./+-%__p_%'`
237 echo $ac_n "checking for Carbon/Carbon.h""... $ac_c" 1>&6
238! echo "configure:1215: checking for Carbon/Carbon.h" >&5
239 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
240 echo $ac_n "(cached) $ac_c" 1>&6
241 else
242 cat > conftest.$ac_ext <<EOF
243! #line 1220 "configure"
244 #include "confdefs.h"
245 #include <Carbon/Carbon.h>
246 EOF
247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
248! { (eval echo configure:1225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
250 if test -z "$ac_err"; then
251 rm -rf conftest*
252***************
253*** 1214,1223 ****
254 echo "$ac_t""no" 1>&6
255 fi
256
257! if test "x$CARBON" = "xyes"; then
258! if test -z "$with_x"; then
259! with_x=no
260! DEFAULT_VIMNAME=Vim
261 fi
262 fi
263 else
264--- 1242,1252 ----
265 echo "$ac_t""no" 1>&6
266 fi
267
268! if test "x$CARBON" = "xyes"; then
269! if test -z "$with_x"; then
270! with_x=no
271! DEFAULT_VIMNAME=Vim
272! fi
273 fi
274 fi
275 else
276*** ../vim-6.2.141/src/configure.in Wed Oct 29 14:51:49 2003
277--- src/configure.in Sun Nov 2 13:08:39 2003
278***************
279*** 82,99 ****
280 AC_MSG_CHECKING([for Darwin (Mac OS X)])
281 if test "`(uname) 2>/dev/null`" = Darwin; then
282 AC_MSG_RESULT(yes)
283- MACOSX=yes
284- OS_EXTRA_SCR="os_macosx.c";
285- OS_EXTRA_OBJ="objects/os_macosx.o"
286- CFLAGS="$CFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
287
288! dnl If Carbon is found, assume we don't want X11
289! dnl unless it was specifically asked for (--with-x)
290! AC_CHECK_HEADER(Carbon/Carbon.h, CARBON=yes)
291! if test "x$CARBON" = "xyes"; then
292! if test -z "$with_x"; then
293! with_x=no
294! DEFAULT_VIMNAME=Vim
295 fi
296 fi
297 else
298--- 82,119 ----
299 AC_MSG_CHECKING([for Darwin (Mac OS X)])
300 if test "`(uname) 2>/dev/null`" = Darwin; then
301 AC_MSG_RESULT(yes)
302
303! AC_MSG_CHECKING(--disable-darwin argument)
304! AC_ARG_ENABLE(darwin,
305! [ --disable-darwin Disable Darwin (Mac OS X) support.],
306! , [enable_darwin="yes"])
307! if test "$enable_darwin" = "yes"; then
308! AC_MSG_RESULT(no)
309! AC_MSG_CHECKING(if Darwin files are there)
310! if test -f os_macosx.c; then
311! AC_MSG_RESULT(yes)
312! else
313! AC_MSG_RESULT([no, Darwin support disabled])
314! enable_darwin=no
315! fi
316! else
317! AC_MSG_RESULT([yes, Darwin support excluded])
318! fi
319!
320! if test "$enable_darwin" = "yes"; then
321! MACOSX=yes
322! OS_EXTRA_SCR="os_macosx.c";
323! OS_EXTRA_OBJ="objects/os_macosx.o"
324! CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -I/Developer/Headers/FlatCarbon -no-cpp-precomp"
325!
326! dnl If Carbon is found, assume we don't want X11
327! dnl unless it was specifically asked for (--with-x)
328! AC_CHECK_HEADER(Carbon/Carbon.h, CARBON=yes)
329! if test "x$CARBON" = "xyes"; then
330! if test -z "$with_x"; then
331! with_x=no
332! DEFAULT_VIMNAME=Vim
333! fi
334 fi
335 fi
336 else
337*** ../vim-6.2.141/src/dehqx.py Sun Nov 2 15:34:05 2003
338--- src/dehqx.py Sat Oct 25 16:19:34 2003
339***************
340*** 0 ****
341--- 1,40 ----
342+ # Python script to get both the data and resource fork from a BinHex encoded
343+ # file.
344+ # Author: Taro Muraoka
345+ # Last Change: 2003 Oct 25
346+
347+ import sys
348+ import binhex
349+
350+ input = sys.argv[1]
351+ conv = binhex.HexBin(input)
352+ info = conv.FInfo
353+ out = conv.FName
354+ out_data = out
355+ out_rsrc = out + '.rsrcfork'
356+ #print 'out_rsrc=' + out_rsrc
357+ print 'In file: ' + input
358+
359+ outfile = open(out_data, 'wb')
360+ print ' Out data fork: ' + out_data
361+ while 1:
362+ d = conv.read(128000)
363+ if not d: break
364+ outfile.write(d)
365+ outfile.close()
366+ conv.close_data()
367+
368+ d = conv.read_rsrc(128000)
369+ if d:
370+ print ' Out rsrc fork: ' + out_rsrc
371+ outfile = open(out_rsrc, 'wb')
372+ outfile.write(d)
373+ while 1:
374+ d = conv.read_rsrc(128000)
375+ if not d: break
376+ outfile.write(d)
377+ outfile.close()
378+
379+ conv.close()
380+
381+ # vim:set ts=8 sts=4 sw=4 et:
382*** ../vim-6.2.141/src/vim.h Wed Oct 29 14:45:27 2003
383--- src/vim.h Sun Nov 2 12:22:17 2003
384***************
385*** 76,84 ****
386 #endif
387
388
389- #if defined(MACOS)
390- # define FEAT_GUI_MAC
391- #endif
392 #if defined(FEAT_GUI_MOTIF) \
393 || defined(FEAT_GUI_GTK) \
394 || defined(FEAT_GUI_ATHENA) \
395--- 76,81 ----
396*** ../vim-6.2.141/src/version.c Sun Nov 2 15:27:38 2003
397--- src/version.c Sun Nov 2 15:28:53 2003
398***************
399*** 639,640 ****
400--- 639,642 ----
401 { /* Add new patch number below this line */
402+ /**/
403+ 142,
404 /**/
405
406--
407So when I saw the post to comp.editors, I rushed over to the FTP site to
408grab it. So I yank apart the tarball, light x candles, where x= the
409vim version multiplied by the md5sum of the source divided by the MAC of
410my NIC (8A3FA78155A8A1D346C3C4A), put on black robes, dim the lights,
411wave a dead chicken over the hard drive, and summon the power of GNU GCC
412with the magic words "make config ; make!".
413 [Jason Spence, compiling Vim 5.0]
414
415 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
416/// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
417\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
418 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
This page took 0.99143 seconds and 4 git commands to generate.