lkundrak / rpms / vim

Forked from rpms/vim 4 years ago
Clone
3dfd18d
To: vim-dev@vim.org
3dfd18d
Subject: Patch 7.2.372 (extra)
3dfd18d
Fcc: outbox
3dfd18d
From: Bram Moolenaar <Bram@moolenaar.net>
3dfd18d
Mime-Version: 1.0
3dfd18d
Content-Type: text/plain; charset=UTF-8
3dfd18d
Content-Transfer-Encoding: 8bit
3dfd18d
------------
3dfd18d
3dfd18d
Patch 7.2.372 (extra)
3dfd18d
Problem:    Cross-compiling GvimExt and xxd doesn't work.
3dfd18d
Solution:   Change the build files. (Markus Heidelberg)
3dfd18d
Files:	    src/INSTALLpc.txt, src/GvimExt/Make_ming.mak, src/Make_cyg.mak,
3dfd18d
	    src/Make_ming.mak, src/xxd/Make_cyg.mak
3dfd18d
3dfd18d
3dfd18d
*** ../vim-7.2.371/src/INSTALLpc.txt	2008-07-13 19:20:53.000000000 +0200
3dfd18d
--- src/INSTALLpc.txt	2010-01-19 12:37:03.000000000 +0100
3dfd18d
***************
3dfd18d
*** 215,222 ****
3dfd18d
  
3dfd18d
  You should not need to do *any* editing of any files to get vim compiled this
3dfd18d
  way.  If, for some reason, you want the console-mode-only version of vim (this
3dfd18d
! is NOT recommended on Win32, especially on '95/'98!!!), you need only change
3dfd18d
! the 'gvim.exe' to 'vim.exe' in the 'make' commands given above.
3dfd18d
  
3dfd18d
  If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX'
3dfd18d
  (also free!) and compress the file (typical compression is 50%). UPX can be
3dfd18d
--- 215,223 ----
3dfd18d
  
3dfd18d
  You should not need to do *any* editing of any files to get vim compiled this
3dfd18d
  way.  If, for some reason, you want the console-mode-only version of vim (this
3dfd18d
! is NOT recommended on Win32, especially on '95/'98!!!), you can use:
3dfd18d
! 
3dfd18d
!     make -f Make_ming.mak GUI=no vim.exe
3dfd18d
  
3dfd18d
  If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX'
3dfd18d
  (also free!) and compress the file (typical compression is 50%). UPX can be
3dfd18d
***************
3dfd18d
*** 240,246 ****
3dfd18d
  The Cygnus one many not fully work yet.
3dfd18d
  With Cygnus gcc you can use the Unix Makefile instead (you need to get the
3dfd18d
  Unix archive then).  Then you get a Cygwin application (feels like Vim is
3dfd18d
! runnin on Unix), while with Make_cyg.mak you get a Windows application (like
3dfd18d
  with the other makefiles).
3dfd18d
  
3dfd18d
  
3dfd18d
--- 241,247 ----
3dfd18d
  The Cygnus one many not fully work yet.
3dfd18d
  With Cygnus gcc you can use the Unix Makefile instead (you need to get the
3dfd18d
  Unix archive then).  Then you get a Cygwin application (feels like Vim is
3dfd18d
! running on Unix), while with Make_cyg.mak you get a Windows application (like
3dfd18d
  with the other makefiles).
3dfd18d
  
3dfd18d
  
3dfd18d
***************
3dfd18d
*** 259,268 ****
3dfd18d
--- 260,272 ----
3dfd18d
  If you like, you can compile the 'mingw' Win32 version from the comfort of
3dfd18d
  your Linux (or other unix) box.  To do this, you need to follow a few steps:
3dfd18d
      1) Install the mingw32 cross-compiler. See
3dfd18d
+ 	http://www.mingw.org/wiki/LinuxCrossMinGW
3dfd18d
  	http://www.libsdl.org/extras/win32/cross/README.txt
3dfd18d
      2) Get and unpack both the Unix sources and the extra archive
3dfd18d
      3) in 'Make_ming.mak', set 'CROSS' to 'yes' instead of 'no'.
3dfd18d
         Make further changes to 'Make_ming.mak' as you wish.
3dfd18d
+        If your cross-compiler prefix differs from the predefined value,
3dfd18d
+        set 'CROSS_COMPILE' corresponding.
3dfd18d
      4) make -f Make_ming.mak gvim.exe
3dfd18d
  
3dfd18d
  Now you have created the Windows binary from your Linux box!  Have fun...
3dfd18d
*** ../vim-7.2.371/src/GvimExt/Make_ming.mak	2005-01-09 22:15:44.000000000 +0100
3dfd18d
--- src/GvimExt/Make_ming.mak	2010-02-24 14:56:37.000000000 +0100
3dfd18d
***************
3dfd18d
*** 20,36 ****
3dfd18d
  ifeq ($(CROSS),yes)
3dfd18d
  DEL = rm
3dfd18d
  ifeq ($(MINGWOLD),yes)
3dfd18d
- CXX = i586-mingw32msvc-g++
3dfd18d
  CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks
3dfd18d
- WINDRES = i586-mingw32msvc-windres
3dfd18d
  else
3dfd18d
- CXX = i386-mingw32msvc-g++
3dfd18d
  CXXFLAGS := -O2 -mno-cygwin
3dfd18d
- WINDRES = i386-mingw32msvc-windres
3dfd18d
  endif
3dfd18d
  else
3dfd18d
- CXX := g++
3dfd18d
- WINDRES := windres
3dfd18d
  CXXFLAGS := -O2 -mno-cygwin
3dfd18d
  ifneq (sh.exe, $(SHELL))
3dfd18d
  DEL = rm
3dfd18d
--- 20,30 ----
3dfd18d
***************
3dfd18d
*** 38,43 ****
3dfd18d
--- 32,39 ----
3dfd18d
  DEL = del
3dfd18d
  endif
3dfd18d
  endif
3dfd18d
+ CXX := $(CROSS_COMPILE)g++
3dfd18d
+ WINDRES := $(CROSS_COMPILE)windres
3dfd18d
  LIBS :=  -luuid
3dfd18d
  RES  := gvimext.res
3dfd18d
  DEFFILE = gvimext_ming.def
3dfd18d
*** ../vim-7.2.371/src/Make_cyg.mak	2009-09-11 12:48:56.000000000 +0200
3dfd18d
--- src/Make_cyg.mak	2010-02-24 14:59:02.000000000 +0100
3dfd18d
***************
3dfd18d
*** 1,6 ****
3dfd18d
  #
3dfd18d
  # Makefile for VIM on Win32, using Cygnus gcc
3dfd18d
! # Last updated by Dan Sharp.  Last Change: 2007 Sep 29
3dfd18d
  #
3dfd18d
  # Also read INSTALLpc.txt!
3dfd18d
  #
3dfd18d
--- 1,6 ----
3dfd18d
  #
3dfd18d
  # Makefile for VIM on Win32, using Cygnus gcc
3dfd18d
! # Last updated by Dan Sharp.  Last Change: 2010 Feb 24
3dfd18d
  #
3dfd18d
  # Also read INSTALLpc.txt!
3dfd18d
  #
3dfd18d
***************
3dfd18d
*** 32,40 ****
3dfd18d
  # OLE		no or yes: set to yes to make OLE gvim (no)
3dfd18d
  # DEBUG		no or yes: set to yes if you wish a DEBUGging build (no)
3dfd18d
  # CPUNR		No longer supported, use ARCH.
3dfd18d
! # ARCH		i386 through pentium4: select -march argument to compile with (i386)
3dfd18d
  # USEDLL	no or yes: set to yes to use the Runtime library DLL (no)
3dfd18d
  #		For USEDLL=yes the cygwin1.dll is required to run Vim.
3dfd18d
  # POSTSCRIPT	no or yes: set to yes for PostScript printing (no)
3dfd18d
  # FEATURES	TINY, SMALL, NORMAL, BIG or HUGE (BIG)
3dfd18d
  # WINVER	Lowest Win32 version to support.  (0x0400)
3dfd18d
--- 32,43 ----
3dfd18d
  # OLE		no or yes: set to yes to make OLE gvim (no)
3dfd18d
  # DEBUG		no or yes: set to yes if you wish a DEBUGging build (no)
3dfd18d
  # CPUNR		No longer supported, use ARCH.
3dfd18d
! # ARCH		i386 through pentium4: select -march argument to compile with
3dfd18d
! #               (i386)
3dfd18d
  # USEDLL	no or yes: set to yes to use the Runtime library DLL (no)
3dfd18d
  #		For USEDLL=yes the cygwin1.dll is required to run Vim.
3dfd18d
+ #		"no" does not work with latest version of Cygwin, use
3dfd18d
+ #		Make_ming.mak instead.  Or set CC to gcc-3.
3dfd18d
  # POSTSCRIPT	no or yes: set to yes for PostScript printing (no)
3dfd18d
  # FEATURES	TINY, SMALL, NORMAL, BIG or HUGE (BIG)
3dfd18d
  # WINVER	Lowest Win32 version to support.  (0x0400)
3dfd18d
***************
3dfd18d
*** 99,104 ****
3dfd18d
--- 102,108 ----
3dfd18d
  INCLUDES = -march=$(ARCH) -Iproto
3dfd18d
  
3dfd18d
  #>>>>> name of the compiler and linker, name of lib directory
3dfd18d
+ CROSS_COMPILE =
3dfd18d
  CC = gcc
3dfd18d
  RC = windres
3dfd18d
  
3dfd18d
***************
3dfd18d
*** 467,476 ****
3dfd18d
  	$(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)
3dfd18d
  
3dfd18d
  xxd/xxd.exe: xxd/xxd.c
3dfd18d
! 	$(MAKE) -C xxd -f Make_cyg.mak USEDLL=$(USEDLL)
3dfd18d
  
3dfd18d
  GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
3dfd18d
! 	$(MAKE) -C GvimExt -f Make_ming.mak
3dfd18d
  
3dfd18d
  vimrun.exe: vimrun.c
3dfd18d
  	$(CC) $(CFLAGS) -o vimrun.exe vimrun.c  $(LIBS)
3dfd18d
--- 471,480 ----
3dfd18d
  	$(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)
3dfd18d
  
3dfd18d
  xxd/xxd.exe: xxd/xxd.c
3dfd18d
! 	$(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) USEDLL=$(USEDLL)
3dfd18d
  
3dfd18d
  GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
3dfd18d
! 	$(MAKE) -C GvimExt -f Make_ming.mak CROSS_COMPILE=$(CROSS_COMPILE)
3dfd18d
  
3dfd18d
  vimrun.exe: vimrun.c
3dfd18d
  	$(CC) $(CFLAGS) -o vimrun.exe vimrun.c  $(LIBS)
3dfd18d
*** ../vim-7.2.371/src/Make_ming.mak	2009-09-11 12:48:56.000000000 +0200
3dfd18d
--- src/Make_ming.mak	2010-02-24 15:01:31.000000000 +0100
3dfd18d
***************
3dfd18d
*** 241,255 ****
3dfd18d
  DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
3dfd18d
  	-DHAVE_PATHDEF -DFEAT_$(FEATURES)
3dfd18d
  ifeq ($(CROSS),yes)
3dfd18d
! # cross-compiler:
3dfd18d
! CC = i586-pc-mingw32msvc-gcc
3dfd18d
  DEL = rm
3dfd18d
  MKDIR = mkdir -p
3dfd18d
! WINDRES = i586-pc-mingw32msvc-windres
3dfd18d
  else
3dfd18d
  # normal (Windows) compilation:
3dfd18d
- CC = gcc
3dfd18d
  ifneq (sh.exe, $(SHELL))
3dfd18d
  DEL = rm
3dfd18d
  MKDIR = mkdir -p
3dfd18d
  DIRSLASH = /
3dfd18d
--- 241,255 ----
3dfd18d
  DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
3dfd18d
  	-DHAVE_PATHDEF -DFEAT_$(FEATURES)
3dfd18d
  ifeq ($(CROSS),yes)
3dfd18d
! # cross-compiler prefix:
3dfd18d
! CROSS_COMPILE = i586-pc-mingw32msvc-
3dfd18d
  DEL = rm
3dfd18d
  MKDIR = mkdir -p
3dfd18d
! DIRSLASH = /
3dfd18d
  else
3dfd18d
  # normal (Windows) compilation:
3dfd18d
  ifneq (sh.exe, $(SHELL))
3dfd18d
+ CROSS_COMPILE =
3dfd18d
  DEL = rm
3dfd18d
  MKDIR = mkdir -p
3dfd18d
  DIRSLASH = /
3dfd18d
***************
3dfd18d
*** 258,265 ****
3dfd18d
  MKDIR = mkdir
3dfd18d
  DIRSLASH = \\
3dfd18d
  endif
3dfd18d
- WINDRES = windres
3dfd18d
  endif
3dfd18d
  
3dfd18d
  #>>>>> end of choices
3dfd18d
  ###########################################################################
3dfd18d
--- 258,266 ----
3dfd18d
  MKDIR = mkdir
3dfd18d
  DIRSLASH = \\
3dfd18d
  endif
3dfd18d
  endif
3dfd18d
+ CC := $(CROSS_COMPILE)gcc
3dfd18d
+ WINDRES := $(CROSS_COMPILE)windres
3dfd18d
  
3dfd18d
  #>>>>> end of choices
3dfd18d
  ###########################################################################
3dfd18d
***************
3dfd18d
*** 549,558 ****
3dfd18d
  	upx vim.exe
3dfd18d
  
3dfd18d
  xxd/xxd.exe: xxd/xxd.c
3dfd18d
! 	$(MAKE) -C xxd -f Make_cyg.mak
3dfd18d
  
3dfd18d
  GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
3dfd18d
  	$(MAKE) -C GvimExt -f Make_ming.mak
3dfd18d
  
3dfd18d
  clean:
3dfd18d
  	-$(DEL) $(OUTDIR)$(DIRSLASH)*.o
3dfd18d
--- 550,560 ----
3dfd18d
  	upx vim.exe
3dfd18d
  
3dfd18d
  xxd/xxd.exe: xxd/xxd.c
3dfd18d
! 	$(MAKE) -C xxd -f Make_cyg.mak CC=$(CC)
3dfd18d
  
3dfd18d
  GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
3dfd18d
  	$(MAKE) -C GvimExt -f Make_ming.mak
3dfd18d
+ 	$(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE)
3dfd18d
  
3dfd18d
  clean:
3dfd18d
  	-$(DEL) $(OUTDIR)$(DIRSLASH)*.o
3dfd18d
*** ../vim-7.2.371/src/xxd/Make_cyg.mak	2004-06-13 17:48:52.000000000 +0200
3dfd18d
--- src/xxd/Make_cyg.mak	2010-02-24 15:05:24.000000000 +0100
3dfd18d
***************
3dfd18d
*** 12,17 ****
3dfd18d
--- 12,18 ----
3dfd18d
  LIBS    =
3dfd18d
  endif
3dfd18d
  
3dfd18d
+ CC = gcc
3dfd18d
  CFLAGS = -O2 -Wall -DWIN32 $(DEFINES)
3dfd18d
  
3dfd18d
  ifneq (sh.exe, $(SHELL))
3dfd18d
***************
3dfd18d
*** 21,27 ****
3dfd18d
  endif
3dfd18d
  
3dfd18d
  xxd.exe: xxd.c
3dfd18d
! 	gcc $(CFLAGS) -s -o xxd.exe xxd.c $(LIBS)
3dfd18d
  
3dfd18d
  clean:
3dfd18d
  	-$(DEL) xxd.exe
3dfd18d
--- 22,28 ----
3dfd18d
  endif
3dfd18d
  
3dfd18d
  xxd.exe: xxd.c
3dfd18d
! 	$(CC) $(CFLAGS) -s -o xxd.exe xxd.c $(LIBS)
3dfd18d
  
3dfd18d
  clean:
3dfd18d
  	-$(DEL) xxd.exe
3dfd18d
*** ../vim-7.2.371/src/version.c	2010-02-24 14:46:58.000000000 +0100
3dfd18d
--- src/version.c	2010-02-24 15:05:48.000000000 +0100
3dfd18d
***************
3dfd18d
*** 683,684 ****
3dfd18d
--- 683,686 ----
3dfd18d
  {   /* Add new patch number below this line */
3dfd18d
+ /**/
3dfd18d
+     372,
3dfd18d
  /**/
3dfd18d
3dfd18d
-- 
3dfd18d
Ten bugs in the hand is better than one as yet undetected.
3dfd18d
3dfd18d
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
3dfd18d
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3dfd18d
\\\        download, build and distribute -- http://www.A-A-P.org        ///
3dfd18d
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///