Gentoo Archives: gentoo-commits

From: "Michael Sterrett (mr_bones_)" <mr_bones_@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in games-action/wordwarvi/files: wordwarvi-0.26-sound.patch
Date: Mon, 08 Feb 2010 22:52:29
Message-Id: E1NecSx-0004KN-Ph@stork.gentoo.org
1 mr_bones_ 10/02/08 22:52:27
2
3 Added: wordwarvi-0.26-sound.patch
4 Log:
5 fix sound (bug #303837); honor CC,CFLAGS,LDFLAGS
6 (Portage version: 2.1.7.16/cvs/Linux i686)
7
8 Revision Changes Path
9 1.1 games-action/wordwarvi/files/wordwarvi-0.26-sound.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-action/wordwarvi/files/wordwarvi-0.26-sound.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-action/wordwarvi/files/wordwarvi-0.26-sound.patch?rev=1.1&content-type=text/plain
13
14 Index: wordwarvi-0.26-sound.patch
15 ===================================================================
16 diff -ru wordwarvi-0.26.orig/Makefile wordwarvi-0.26/Makefile
17 --- wordwarvi-0.26.orig/Makefile 2009-08-09 10:33:02.000000000 -0400
18 +++ wordwarvi-0.26/Makefile 2010-02-08 17:45:30.977667366 -0500
19 @@ -1,5 +1,5 @@
20 PREFIX=/usr
21 -DATADIR=${PREFIX}/share/wordwarvi
22 +DATADIR?=${PREFIX}/share/wordwarvi
23 MANDIR?=${PREFIX}/share/man
24 MANPAGEDIR=${MANDIR}/man6
25
26 @@ -21,18 +21,6 @@
27 OGGOBJ=
28 endif
29
30 -# DEBUG=-g
31 -# DEBUG=
32 -# PROFILE_FLAG=-pg
33 -#PROFILE_FLAG=
34 -#OPTIMIZE_FLAG=
35 -# OPTIMIZE_FLAG=-O3
36 -#OPTIMIZE_FLAG=-O3 -pedantic -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
37 -OPTIMIZE_FLAG=-O3 -pedantic
38 -
39 -
40 -LDFLAGS=${PROFILE_FLAG}
41 -
42 DEFINES=${SNDFLAGS} -DDATADIR=\"${DATADIR}/\"
43
44 all: wordwarvi wordwarvi.6.gz
45 @@ -50,32 +38,32 @@
46 endif
47
48 joystick.o: joystick.c joystick.h Makefile
49 - gcc ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} -pthread -Wall -c joystick.c
50 + $(CC) ${DEBUG} ${PROFILE_FLAG} ${CFLAGS} -pthread -Wall -c joystick.c
51
52 ogg_to_pcm.o: ogg_to_pcm.c ogg_to_pcm.h Makefile
53 - gcc ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} `pkg-config --cflags vorbisfile` \
54 + $(CC) ${DEBUG} ${PROFILE_FLAG} ${CFLAGS} `pkg-config --cflags vorbisfile` \
55 -pthread -Wall -c ogg_to_pcm.c
56
57 wwviaudio.o: wwviaudio.c wwviaudio.h ogg_to_pcm.h my_point.h Makefile
58 - gcc -Wall ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} \
59 + $(CC) -Wall ${DEBUG} ${PROFILE_FLAG} ${CFLAGS} \
60 ${DEFINES} \
61 -pthread `pkg-config --cflags vorbisfile` \
62 -c wwviaudio.c
63
64 rumble.o: rumble.c rumble.h Makefile
65 - gcc ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} `pkg-config --cflags vorbisfile` \
66 + $(CC) ${DEBUG} ${PROFILE_FLAG} ${CFLAGS} `pkg-config --cflags vorbisfile` \
67 -pthread -Wall -c rumble.c
68
69 wwvi_font.o: wwvi_font.c wwvi_font.h my_point.h Makefile
70 - gcc ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} -pthread -Wall -c wwvi_font.c
71 + $(CC) ${DEBUG} ${PROFILE_FLAG} ${CFLAGS} -pthread -Wall -c wwvi_font.c
72
73 stamp: stamp.c
74 - gcc -o stamp stamp.c
75 + $(CC) $(LDFLAGS) -o stamp stamp.c
76
77 wordwarvi: wordwarvi.c joystick.o rumble.o ${OGGOBJ} wwviaudio.o wwvi_font.o \
78 Makefile version.h stamp levels.h rumble.h
79 ./stamp > stamp.h
80 - gcc ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} ${SCREENSAVERFLAG} -pthread -Wall ${DEFINES} \
81 + $(CC) $(LDFLAGS) ${DEBUG} ${PROFILE_FLAG} ${CFLAGS} ${SCREENSAVERFLAG} -pthread -Wall ${DEFINES} \
82 joystick.o \
83 rumble.o \
84 wwvi_font.o \
85 diff -ru wordwarvi-0.26.orig/wwviaudio.c wordwarvi-0.26/wwviaudio.c
86 --- wordwarvi-0.26.orig/wwviaudio.c 2009-08-09 10:33:02.000000000 -0400
87 +++ wordwarvi-0.26/wwviaudio.c 2010-02-08 17:45:07.127666854 -0500
88 @@ -124,7 +124,7 @@
89 strncpy(filebuf, filename, PATH_MAX);
90 rc = stat(filebuf, &statbuf);
91 if (rc != 0) {
92 - snprintf(filebuf, PATH_MAX, "%s", filename);
93 + snprintf(filebuf, PATH_MAX, "GENTOO_DATADIR%s", filename);
94 rc = stat(filebuf, &statbuf);
95 if (rc != 0) {
96 fprintf(stderr, "stat('%s') failed.\n", filebuf);