patches/PDCurses/3.4/mingw32_cross_compile.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Aug 02 18:28:10 2011 +0200 (2011-08-02)
changeset 2590 b64cfb67944e
permissions -rw-r--r--
scripts/functions: svn retrieval first tries the mirror for tarballs

The svn download helper looks for the local tarballs dir to see if it
can find a pre-downloaded tarball, and if it does not find it, does
the actual fetch to upstream via svn.

In the process, it does not even try to get a tarball from the local
mirror, which can be useful if the mirror has been pre-populated
manually (or with a previously downloaded tree).

Fake a tarball get with the standard tarball-download helper, but
without specifying any upstream URL, which makes the helper directly
try the LAN mirror.

Of course, if no mirror is specified, no URL wil be available, and
the standard svn retrieval will kick in.

Reported-by: ANDY KENNEDY <ANDY.KENNEDY@adtran.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 --- PDCurses-3.4.orig/win32/mingwin32.mak	2009-11-02 13:50:11.000000000 +0100
     2 +++ PDCurses-3.4/win32/mingwin32.mak	2009-11-02 13:53:43.000000000 +0100
     3 @@ -18,7 +18,7 @@
     4 
     5  PDCURSES_WIN_H	= $(osdir)/pdcwin.h
     6 
     7 -CC		= gcc
     8 +CC		= $(CROSS_COMPILE)gcc
     9 
    10  ifeq ($(DEBUG),Y)
    11  	CFLAGS  = -g -Wall -DPDCDEBUG
    12 @@ -30,8 +30,8 @@
    13 
    14  CFLAGS += -I$(PDCURSES_SRCDIR)
    15 
    16 -BASEDEF		= $(PDCURSES_SRCDIR)\exp-base.def
    17 -WIDEDEF		= $(PDCURSES_SRCDIR)\exp-wide.def
    18 +BASEDEF		= $(PDCURSES_SRCDIR)/exp-base.def
    19 +WIDEDEF		= $(PDCURSES_SRCDIR)/exp-wide.def
    20 
    21  DEFDEPS		= $(BASEDEF)
    22 
    23 @@ -46,17 +46,17 @@
    24 
    25  DEFFILE		= pdcurses.def
    26 
    27 -LINK		= gcc
    28 +LINK		= $(CROSS_COMPILE)gcc
    29 
    30  ifeq ($(DLL),Y)
    31  	CFLAGS += -DPDC_DLL_BUILD
    32 -	LIBEXE = gcc $(DEFFILE)
    33 +	LIBEXE = $(CROSS_COMPILE)gcc $(DEFFILE)
    34  	LIBFLAGS = -Wl,--out-implib,pdcurses.a -shared -o
    35  	LIBCURSES = pdcurses.dll
    36  	LIBDEPS = $(LIBOBJS) $(PDCOBJS) $(DEFFILE)
    37  	CLEAN = $(LIBCURSES) *.a $(DEFFILE)
    38  else
    39 -	LIBEXE = ar
    40 +	LIBEXE = $(CROSS_COMPILE)ar
    41  	LIBFLAGS = rcv
    42  	LIBCURSES = pdcurses.a
    43  	LIBDEPS = $(LIBOBJS) $(PDCOBJS)
    44 @@ -70,24 +70,24 @@
    45  libs:	$(LIBCURSES)
    46 
    47  clean:
    48 -	-del *.o
    49 -	-del *.exe
    50 -	-del $(CLEAN)
    51 +	-rm *.o
    52 +	-rm *.exe
    53 +	-rm $(CLEAN)
    54 
    55  demos:	$(DEMOS)
    56 -	strip *.exe
    57 +	$(CROSS_COMPILE)strip *.exe
    58 
    59  $(DEFFILE): $(DEFDEPS)
    60  	echo LIBRARY pdcurses > $@
    61  	echo EXPORTS >> $@
    62 -	type $(BASEDEF) >> $@
    63 +	cat $(BASEDEF) >> $@
    64  ifeq ($(WIDE),Y)
    65 -	type $(WIDEDEF) >> $@
    66 +	cat $(WIDEDEF) >> $@
    67  endif
    68 
    69  $(LIBCURSES) : $(LIBDEPS)
    70  	$(LIBEXE) $(LIBFLAGS) $@ $?
    71 -	-copy pdcurses.a panel.a
    72 +	-cp pdcurses.a panel.a
    73 
    74  $(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
    75  $(PDCOBJS) : $(PDCURSES_WIN_H)
    76 --- PDCurses-3.4.orig/curses.h	2009-11-03 14:12:18.000000000 +0100
    77 +++ PDCurses-3.4./curses.h	2009-11-03 14:14:09.000000000 +0100
    78 @@ -82,7 +82,9 @@
    79   *
    80   */
    81 
    82 +#ifndef __bool_true_false_are_defined
    83  typedef unsigned char bool;    /* PDCurses Boolean type */
    84 +#endif
    85 
    86  #ifdef CHTYPE_LONG
    87  # if _LP64