patches/PDCurses/3.4/mingw32_cross_compile.patch
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Tue Jul 31 22:27:29 2012 +0200 (2012-07-31)
changeset 3018 7776e8369284
permissions -rw-r--r--
complibs/cloog: create missing m4 dir

Because we now patch configure.in and configure, the Makefile quicks
in a re-build rule as the source files are now more recent than the
bundled generated files, and that fails because the m4 directory
is missing, although on some systems where aclocal is not installed,
the re-build rule does nothing (except a warning).

Always create tht directory.

Reported-by: Per Arnold Blaasmo <per-arnold.blaasmo@atmel.com>
[Also thanks to Thomas De Schampheleire <patrickdepinguin@gmail.com>
for some digging works on this issue]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.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