diff options
Diffstat (limited to 'cross.patch')
-rw-r--r-- | cross.patch | 155 |
1 files changed, 155 insertions, 0 deletions
diff --git a/cross.patch b/cross.patch new file mode 100644 index 000000000000..e01883078701 --- /dev/null +++ b/cross.patch @@ -0,0 +1,155 @@ +Index: tuxpuck-0.8.2/utils/Makefile +=================================================================== +--- tuxpuck-0.8.2.orig/utils/Makefile ++++ tuxpuck-0.8.2/utils/Makefile +@@ -1,18 +1,18 @@ + # Makefile for TuxPuck Utils , Copyright Jacob Kroon 2001-2002 +-CC = gcc ++CC_FOR_BUILD = gcc + CFLAGS += -g -Wall -Werror + ############################################################# + + all : ttf2font data2c anim + + ttf2font : ttf2font.c +- $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) ttf2font.c `pkg-config --cflags --libs freetype2` -o ttf2font ++ $(CC_FOR_BUILD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) ttf2font.c `pkg-config --cflags --libs freetype2` -o ttf2font + + data2c : data2c.c +- $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) data2c.c `sdl-config --cflags --libs` -o data2c ++ $(CC_FOR_BUILD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) data2c.c -o data2c + + anim : anim.c +- $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) anim.c `sdl-config --cflags --libs` -o anim ++ $(CC_FOR_BUILD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) anim.c -o anim + + clean : + rm -f *~ data2c ttf2font anim +Index: tuxpuck-0.8.2/utils/anim.c +=================================================================== +--- tuxpuck-0.8.2.orig/utils/anim.c ++++ tuxpuck-0.8.2/utils/anim.c +@@ -1,11 +1,10 @@ + /* anim.c - Copyright (C) 2001-2002 Jacob Kroon, see COPYING for details */ + ++#include <inttypes.h> + #include <stdlib.h> + #include <string.h> + #include <stdio.h> + #include <sys/stat.h> +-#include <SDL_endian.h> +-#include <SDL_types.h> + + void errorc(char *msg) + { +@@ -23,15 +22,15 @@ + { + FILE *in = NULL; + struct stat theStat; +- Uint8 *data; +- Uint32 size; ++ uint8_t *data; ++ uint32_t size; + + if ((in = fopen(filename, "rb")) == NULL) + errorcc("Couldn't open file, ", filename); + stat(filename, &theStat); +- data = (Uint8 *) malloc(theStat.st_size); ++ data = (uint8_t *) malloc(theStat.st_size); + size = theStat.st_size; +- fwrite(&size, sizeof(Uint32), 1, out); ++ fwrite(&size, sizeof(uint32_t), 1, out); + if (fread(data, theStat.st_size, 1, in) != 1) + errorcc("Error reading from file, ", filename); + fwrite(data, theStat.st_size, 1, out); +@@ -45,8 +44,8 @@ + char buffer1[100]; + char buffer2[100]; + char *ptr; +- Uint8 nbrOfFrames, nbrOfAnimations; +- Uint32 uint32; ++ uint8_t nbrOfFrames, nbrOfAnimations; ++ uint32_t uint32; + int j = 0, i = 0; + + if (argc != 3) +@@ -57,7 +56,7 @@ + errorcc("Couldn't open file for writing: ", argv[2]); + if (fscanf(in, "NbrOfFrames: %d\n", &uint32) != 1) + errorc("Wrong number of frames!"); +- nbrOfFrames = (Uint8) uint32; ++ nbrOfFrames = (uint8_t) uint32; + fwrite(&nbrOfFrames, 1, 1, out); + ptr = strrchr(argv[1], '/'); + if (ptr) +@@ -72,26 +71,26 @@ + } + if (fscanf(in, "NbrOfAnimations: %d\n", &uint32) != 1) + errorc("Wrong number of animations!"); +- nbrOfAnimations = (Uint8) uint32; ++ nbrOfAnimations = (uint8_t) uint32; + fwrite(&nbrOfAnimations, 1, 1, out); + for (i = 0; i < nbrOfAnimations; i++) { +- Uint32 n; +- Uint8 n2; ++ uint32_t n; ++ uint8_t n2; + + if (fscanf(in, "%d\n", &n) != 1) + errorc("Couldnt read number of frames in animation!"); +- n2 = (Uint8) n; ++ n2 = (uint8_t) n; + fwrite(&n2, 1, 1, out); + for (j = 0; j < n2; j++) { +- Uint32 frame; +- Uint32 time; +- Uint8 frame2; +- Uint16 time2; ++ uint32_t frame; ++ uint32_t time; ++ uint8_t frame2; ++ uint16_t time2; + + if (fscanf(in, "%d %d\n", &frame, &time) != 2) + errorc("Error reading frames"); +- frame2 = (Uint8) frame; +- time2 = (Uint16) time; ++ frame2 = (uint8_t) frame; ++ time2 = (uint16_t) time; + fwrite(&frame2, 1, 1, out); + fwrite(&time2, sizeof(time2), 1, out); + } +Index: tuxpuck-0.8.2/utils/data2c.c +=================================================================== +--- tuxpuck-0.8.2.orig/utils/data2c.c ++++ tuxpuck-0.8.2/utils/data2c.c +@@ -1,10 +1,9 @@ + /* data2c - Copyright (C) 2001-2002 Jacob Kroon, see COPYING for details */ + ++#include <inttypes.h> + #include <stdlib.h> + #include <stdio.h> + #include <sys/stat.h> +-#include <SDL_types.h> +-#include <SDL_endian.h> + + void errorc(char *msg) + { +@@ -24,7 +23,7 @@ + char buffer[100]; + unsigned char ch; + int i = 0; +- Uint32 size; ++ uint32_t size; + struct stat theStat; + + if (argc != 3) +@@ -39,7 +38,7 @@ + fprintf(out, "/* %s */\n", buffer); + fprintf(out, "unsigned char %s[] = {\n", argv[2]); + for (i = 0; i < 4; i++) +- fprintf(out, "%d,", ((Uint8 *) & size)[i]); ++ fprintf(out, "%d,", ((uint8_t *) & size)[i]); + while (fread(&ch, 1, 1, in) != 0) + fprintf(out, "%d,", ch); + fseek(out, -1, SEEK_CUR); |