Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 171716 | Differences between
and this patch

Collapse All | Expand All

(-)mupen64_src-0.5.orig/Makefile (-24 / +15 lines)
Lines 1-16 Link Here
1
#Makefile MUPEN64 for Linux
1
#Makefile MUPEN64 for Linux
2
2
3
CC		=gcc
3
CC		?=gcc
4
CXX		=g++
4
CXX		?=g++
5
5
6
#CFLAGS		=-DX86 -O3 -mpentium -Wall -DEMU64_DEBUG
6
#CFLAGS		=-DX86 -O3 -mpentium -Wall -DEMU64_DEBUG
7
CFLAGS		=-DX86 -O3 -fexpensive-optimizations -fomit-frame-pointer -funroll-loops -ffast-math -fno-strict-aliasing -mcpu=athlon -Wall -pipe
7
CFLAGS		?=-DX86 -O3 -fexpensive-optimizations -fomit-frame-pointer -funroll-loops -ffast-math -fno-strict-aliasing -mcpu=athlon -Wall -pipe
8
#CFLAGS		=-DX86 -O3 -mcpu=pentium -Wall -g -pg
8
#CFLAGS		=-DX86 -O3 -mcpu=pentium -Wall -g -pg
9
#CFLAGS		=-DX86 -Wall -pipe -g3 -DEMU64_DEBUG
9
#CFLAGS		=-DX86 -Wall -pipe -g3 -DEMU64_DEBUG
10
#CFLAGS		=-DX86 -Wall -pipe -g -DEMU64_DEBUG -DCOMPARE_CORE
10
#CFLAGS		=-DX86 -Wall -pipe -g -DEMU64_DEBUG -DCOMPARE_CORE
11
#CFLAGS		=-DX86 -Wall -pipe -g
11
#CFLAGS		=-DX86 -Wall -pipe -g
12
12
13
CXXFLAGS	=$(CFLAGS)
13
CFLAGS		+= -fPIC
14
CXXFLAGS	+= -fPIC
15
16
CXXFLAGS	?=$(CFLAGS)
14
17
15
GL_PATH		=-I/usr/X11R6/include
18
GL_PATH		=-I/usr/X11R6/include
16
19
Lines 80-86 Link Here
80
OBJ_INPUT	=mupen64_input/main.o
83
OBJ_INPUT	=mupen64_input/main.o
81
84
82
OBJ_BLIGHT	=blight_input/plugin.o \
85
OBJ_BLIGHT	=blight_input/plugin.o \
83
		blight_input/SDL_ttf.o \
84
		blight_input/arial.ttf.o \
86
		blight_input/arial.ttf.o \
85
		blight_input/configdialog_sdl.o \
87
		blight_input/configdialog_sdl.o \
86
		blight_input/pad.o
88
		blight_input/pad.o
Lines 166-172 Link Here
166
endif
168
endif
167
169
168
PREFIX		=$(shell grep WITH_HOME config.h | cut -d '"' -f 2)
170
PREFIX		=$(shell grep WITH_HOME config.h | cut -d '"' -f 2)
169
SHARE		="$(PREFIX)share/mupen64/"
171
SHARE		=$(shell grep "define SHARE" config.h | cut -d '"' -f 2)
172
173
ifeq ("$(SHARE)","")
174
SHARE		="$(PREFIX)/share/mupen64/"
175
CFLAGS		+= -DSHARE=\"$(SHARE)\"
176
endif
170
177
171
PLUGINS		=plugins/mupen64_input.so plugins/blight_input.so plugins/mupen64_hle_rsp_azimer.so plugins/dummyaudio.so plugins/mupen64_audio.so plugins/jttl_audio.so plugins/mupen64_soft_gfx.so plugins/glN64.so
178
PLUGINS		=plugins/mupen64_input.so plugins/blight_input.so plugins/mupen64_hle_rsp_azimer.so plugins/dummyaudio.so plugins/mupen64_audio.so plugins/jttl_audio.so plugins/mupen64_soft_gfx.so plugins/glN64.so
172
179
Lines 223-231 Link Here
223
blight_input/plugin.o:		blight_input/plugin.c
230
blight_input/plugin.o:		blight_input/plugin.c
224
				$(CC) $(CFLAGS) "-DPACKAGE=\"$(shell grep PACKAGE blight_input/package | cut -d "=" -f 2)\"" "-DVERSION=\"$(shell grep VERSION blight_input/package | cut -d "=" -f 2)\"" `sdl-config --cflags` -DGUI_SDL -c -o $@ $<
231
				$(CC) $(CFLAGS) "-DPACKAGE=\"$(shell grep PACKAGE blight_input/package | cut -d "=" -f 2)\"" "-DVERSION=\"$(shell grep VERSION blight_input/package | cut -d "=" -f 2)\"" `sdl-config --cflags` -DGUI_SDL -c -o $@ $<
225
232
226
blight_input/SDL_ttf.o:		blight_input/SDL_ttf.c
227
				$(CC) $(CFLAGS) `freetype-config --cflags` `sdl-config --cflags` -c -o $@ $<
228
229
blight_input/arial.ttf.o:	blight_input/arial.ttf.c
233
blight_input/arial.ttf.o:	blight_input/arial.ttf.c
230
234
231
blight_input/arial.ttf.c:	blight_input/ttftoh
235
blight_input/arial.ttf.c:	blight_input/ttftoh
Lines 234-240 Link Here
234
238
235
blight_input/ttftoh:		blight_input/ttftoh.o
239
blight_input/ttftoh:		blight_input/ttftoh.o
236
				$(CC) $^ -o $@
240
				$(CC) $^ -o $@
237
				strip --strip-all $@
238
241
239
blight_input/configdialog_sdl.o: blight_input/configdialog_sdl.c
242
blight_input/configdialog_sdl.o: blight_input/configdialog_sdl.c
240
				$(CC) $(CFLAGS) "-DPACKAGE=\"$(shell grep PACKAGE blight_input/package | cut -d "=" -f 2)\"" "-DVERSION=\"$(shell grep VERSION blight_input/package | cut -d "=" -f 2)\"" -DGUI_SDL `sdl-config --cflags` -c -o $@ $<
243
				$(CC) $(CFLAGS) "-DPACKAGE=\"$(shell grep PACKAGE blight_input/package | cut -d "=" -f 2)\"" "-DVERSION=\"$(shell grep VERSION blight_input/package | cut -d "=" -f 2)\"" -DGUI_SDL `sdl-config --cflags` -c -o $@ $<
Lines 343-398 Link Here
343
346
344
mupen64_nogui:	$(OBJ) $(OBJ_X86) main/main.o main/gui_gtk/config.o
347
mupen64_nogui:	$(OBJ) $(OBJ_X86) main/main.o main/gui_gtk/config.o
345
		$(CC) $^ $(LIB) -Wl,-export-dynamic -L/usr/X11R6/lib `sdl-config --libs` -lGL -lpthread -ldl -o $@
348
		$(CC) $^ $(LIB) -Wl,-export-dynamic -L/usr/X11R6/lib `sdl-config --libs` -lGL -lpthread -ldl -o $@
346
		strip --strip-all $@
347
349
348
ifneq ("$(shell grep VCR config.h)","\#define VCR_SUPPORT 1")
350
ifneq ("$(shell grep VCR config.h)","\#define VCR_SUPPORT 1")
349
351
350
mupen64:	$(OBJ) $(OBJ_X86) $(OBJ_GTK_GUI)
352
mupen64:	$(OBJ) $(OBJ_X86) $(OBJ_GTK_GUI)
351
		$(CC) $^ $(CFLAGS) $(LIB) -Wl,-export-dynamic $(GTK_LIBS) -L/usr/X11R6/lib `sdl-config --libs` -lGL -lpthread -ldl -o $@
353
		$(CC) $^ $(CFLAGS) $(LIB) -Wl,-export-dynamic $(GTK_LIBS) -L/usr/X11R6/lib `sdl-config --libs` -lGL -lpthread -ldl -o $@
352
		strip --strip-all $@
353
354
354
else
355
else
355
356
356
mupen64:	$(OBJ) $(OBJ_X86) $(OBJ_GTK_GUI) $(OBJ_VCR)
357
mupen64:	$(OBJ) $(OBJ_X86) $(OBJ_GTK_GUI) $(OBJ_VCR)
357
		$(CXX) $^ $(CFLAGS) $(LIB) -Wl,-export-dynamic $(GTK_LIBS) `avifile-config --libs` `sdl-config --libs` -L/usr/X11R6/lib -lGL -lpthread -ldl -o $@
358
		$(CXX) $^ $(CFLAGS) $(LIB) -Wl,-export-dynamic $(GTK_LIBS) `avifile-config --libs` `sdl-config --libs` -L/usr/X11R6/lib -lGL -lpthread -ldl -o $@
358
		strip --strip-all $@
359
endif
359
endif
360
360
361
mupen64_oldgui:	$(OBJ) $(OBJ_X86) main/main_gtk.o
361
mupen64_oldgui:	$(OBJ) $(OBJ_X86) main/main_gtk.o
362
		$(CC) $^ $(LIB) -Wl,-export-dynamic $(GTK_LIBS) `sdl-config --libs` -L/usr/X11R6/lib -lGL -lpthread -ldl -o $@
362
		$(CC) $^ $(LIB) -Wl,-export-dynamic $(GTK_LIBS) `sdl-config --libs` -L/usr/X11R6/lib -lGL -lpthread -ldl -o $@
363
		strip --strip-all $@
364
363
365
plugins/mupen64_input.so: $(OBJ_INPUT)
364
plugins/mupen64_input.so: $(OBJ_INPUT)
366
			  $(CC) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) -o $@
365
			  $(CC) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) -o $@
367
			  strip --strip-all $@
368
366
369
plugins/blight_input.so: $(OBJ_BLIGHT)
367
plugins/blight_input.so: $(OBJ_BLIGHT)
370
			 $(CC) $^ -Wl,-Bsymbolic -shared `sdl-config --libs` `freetype-config --libs` -o $@
368
			 $(CC) $^ -Wl,-Bsymbolic -shared `sdl-config --libs` -lSDL_ttf -o $@
371
			 strip --strip-all $@
372
369
373
plugins/mupen64_hle_rsp_azimer.so: $(OBJ_RSPHLE)
370
plugins/mupen64_hle_rsp_azimer.so: $(OBJ_RSPHLE)
374
				   $(CXX) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) -o $@
371
				   $(CXX) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) -o $@
375
				   strip --strip-all $@
376
372
377
plugins/dummyaudio.so:	$(OBJ_DUMMY)
373
plugins/dummyaudio.so:	$(OBJ_DUMMY)
378
			$(CC) $^ -Wl,-Bsymbolic -shared -o $@
374
			$(CC) $^ -Wl,-Bsymbolic -shared -o $@
379
			strip --strip-all $@
380
375
381
plugins/mupen64_audio.so:	$(OBJ_AUDIO)
376
plugins/mupen64_audio.so:	$(OBJ_AUDIO)
382
				$(CC) $(GTK_LIBS) -lpthread $^ -Wl,-Bsymbolic -shared -o $@
377
				$(CC) $(GTK_LIBS) -lpthread $^ -Wl,-Bsymbolic -shared -o $@
383
				strip --strip-all $@
384
378
385
plugins/jttl_audio.so:	$(OBJ_JTTL)
379
plugins/jttl_audio.so:	$(OBJ_JTTL)
386
			$(CC) $^ -Wl,-Bsymbolic -shared `sdl-config --libs` $(GTK_LIBS) -o $@
380
			$(CC) $^ -Wl,-Bsymbolic -shared `sdl-config --libs` $(GTK_LIBS) -o $@
387
			strip --strip-all $@
388
381
389
plugins/mupen64_soft_gfx.so:	$(OBJ_SOFT_GFX)
382
plugins/mupen64_soft_gfx.so:	$(OBJ_SOFT_GFX)
390
				$(CXX) `sdl-config --libs` $^ -Wl,-Bsymbolic -shared -o $@
383
				$(CXX) `sdl-config --libs` $^ -Wl,-Bsymbolic -shared -o $@
391
				strip --strip-all $@
392
384
393
plugins/glN64.so:	$(OBJ_GLN64)
385
plugins/glN64.so:	$(OBJ_GLN64)
394
			$(CXX) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) $(GTHREAD_LIBS) `sdl-config --libs` -lGL -o $@
386
			$(CXX) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) $(GTHREAD_LIBS) `sdl-config --libs` -lGL -o $@
395
			strip --strip-all $@
396
387
397
install:
388
install:
398
	cp mupen64 "$(PREFIX)bin"
389
	cp mupen64 "$(PREFIX)bin"
Lines 405-411 Link Here
405
	
396
	
406
clean:
397
clean:
407
	find . -name '*.o' -print0 | xargs -0r rm -f
398
	find . -name '*.o' -print0 | xargs -0r rm -f
408
	rm mupen64 mupen64_nogui mupen64_dbg plugins/mupen64_input.so blight_input/arial.ttf.c blight_input/ttftoh plugins/blight_input.so plugins/mupen64_hle_rsp_azimer.so plugins/dummyaudio.so plugins/mupen64_audio.so plugins/jttl_audio.so plugins/mupen64_soft_gfx.so plugins/glN64.so
399
	rm -f mupen64 mupen64_nogui mupen64_dbg plugins/mupen64_input.so blight_input/arial.ttf.c blight_input/ttftoh plugins/blight_input.so plugins/mupen64_hle_rsp_azimer.so plugins/dummyaudio.so plugins/mupen64_audio.so plugins/jttl_audio.so plugins/mupen64_soft_gfx.so plugins/glN64.so
409
400
410
clean_o:
401
clean_o:
411
	find . -name '*.o' -print0 | xargs -0r rm -f
402
	find . -name '*.o' -print0 | xargs -0r rm -f
(-)mupen64_src-0.5.orig/config.h (+1 lines)
Lines 2-7 Link Here
2
#define CONFIG_H
2
#define CONFIG_H
3
3
4
#undef WITH_HOME
4
#undef WITH_HOME
5
#undef SHARE
5
#undef VCR_SUPPORT
6
#undef VCR_SUPPORT
6
#define GTK2_SUPPORT 1
7
#define GTK2_SUPPORT 1
7
8
(-)mupen64_src-0.5.orig/main/gui_gtk/main_gtk.c (-12 / +12 lines)
Lines 1880-1887 Link Here
1880
	  {
1880
	  {
1881
	     unsigned char byte;
1881
	     unsigned char byte;
1882
	     dest = fopen(temp, "wb");
1882
	     dest = fopen(temp, "wb");
1883
	     strcpy(orig, WITH_HOME);
1883
	     strcpy(orig, SHARE);
1884
	     strcat(orig, "share/mupen64/mupen64.ini");
1884
	     strcat(orig, "mupen64.ini");
1885
	     src = fopen(orig, "rb");
1885
	     src = fopen(orig, "rb");
1886
	     while(fread(&byte, 1, 1, src))
1886
	     while(fread(&byte, 1, 1, src))
1887
	       fwrite(&byte, 1, 1, dest);
1887
	       fwrite(&byte, 1, 1, dest);
Lines 1892-1919 Link Here
1892
	
1892
	
1893
	strcpy(temp, g_WorkingDir);
1893
	strcpy(temp, g_WorkingDir);
1894
	strcat(temp, "lang");
1894
	strcat(temp, "lang");
1895
	strcpy(orig, WITH_HOME);
1895
	strcpy(orig, SHARE);
1896
	strcat(orig, "share/mupen64/lang");
1896
	strcat(orig, "lang");
1897
	symlink(orig, temp);
1897
	symlink(orig, temp);
1898
	
1898
	
1899
	/*strcpy(temp, g_WorkingDir);
1899
	/*strcpy(temp, g_WorkingDir);
1900
	strcat(temp, "plugins");
1900
	strcat(temp, "plugins");
1901
	strcpy(orig, WITH_HOME);
1901
	strcpy(orig, SHARE);
1902
	strcat(orig, "share/mupen64/plugins");
1902
	strcat(orig, "plugins");
1903
	symlink(orig, temp);*/
1903
	symlink(orig, temp);*/
1904
	
1904
	
1905
	strcpy(temp, g_WorkingDir);
1905
	strcpy(temp, g_WorkingDir);
1906
	strcat(temp, "plugins");
1906
	strcat(temp, "plugins");
1907
	mkdir(temp, 0700);
1907
	mkdir(temp, 0700);
1908
	strcpy(orig, WITH_HOME);
1908
	strcpy(orig, SHARE);
1909
	strcat(orig, "share/mupen64/plugins");
1909
	strcat(orig, "plugins");
1910
	dir = opendir(orig);
1910
	dir = opendir(orig);
1911
	while((entry = readdir(dir)) != NULL)
1911
	while((entry = readdir(dir)) != NULL)
1912
	  {
1912
	  {
1913
	     if(strcmp(entry->d_name + strlen(entry->d_name) - 3, ".so"))
1913
	     if(strcmp(entry->d_name + strlen(entry->d_name) - 3, ".so"))
1914
	       {
1914
	       {
1915
		  strcpy(orig, WITH_HOME);
1915
		  strcpy(orig, SHARE);
1916
		  strcat(orig, "share/mupen64/plugins/");
1916
		  strcat(orig, "plugins/");
1917
		  strcat(orig, entry->d_name);
1917
		  strcat(orig, entry->d_name);
1918
		  src = fopen(orig, "rb");
1918
		  src = fopen(orig, "rb");
1919
		  if(src == NULL) continue;
1919
		  if(src == NULL) continue;
Lines 1938-1945 Link Here
1938
		  strcpy(temp, g_WorkingDir);
1938
		  strcpy(temp, g_WorkingDir);
1939
		  strcat(temp, "plugins/");
1939
		  strcat(temp, "plugins/");
1940
		  strcat(temp, entry->d_name);
1940
		  strcat(temp, entry->d_name);
1941
		  strcpy(orig, WITH_HOME);
1941
		  strcpy(orig, SHARE);
1942
		  strcat(orig, "share/mupen64/plugins/");
1942
		  strcat(orig, "plugins/");
1943
		  strcat(orig, entry->d_name);
1943
		  strcat(orig, entry->d_name);
1944
		  symlink(orig, temp);
1944
		  symlink(orig, temp);
1945
	       }
1945
	       }
(-)mupen64_src-0.5.orig/main/main.c (-12 / +14 lines)
Lines 37-42 Link Here
37
37
38
#include <stdlib.h>
38
#include <stdlib.h>
39
#include <unistd.h>
39
#include <unistd.h>
40
#include <dirent.h>
41
#include <sys/stat.h>
40
42
41
#include "main.h"
43
#include "main.h"
42
#include "guifuncs.h"
44
#include "guifuncs.h"
Lines 262-269 Link Here
262
	  {
264
	  {
263
	     unsigned char byte;
265
	     unsigned char byte;
264
	     dest = fopen(temp, "wb");
266
	     dest = fopen(temp, "wb");
265
	     strcpy(orig, WITH_HOME);
267
	     strcpy(orig, SHARE);
266
	     strcat(orig, "share/mupen64/mupen64.ini");
268
	     strcat(orig, "mupen64.ini");
267
	     src = fopen(orig, "rb");
269
	     src = fopen(orig, "rb");
268
	     while(fread(&byte, 1, 1, src))
270
	     while(fread(&byte, 1, 1, src))
269
	       fwrite(&byte, 1, 1, dest);
271
	       fwrite(&byte, 1, 1, dest);
Lines 274-301 Link Here
274
	
276
	
275
	strcpy(temp, g_WorkingDir);
277
	strcpy(temp, g_WorkingDir);
276
	strcat(temp, "lang");
278
	strcat(temp, "lang");
277
	strcpy(orig, WITH_HOME);
279
	strcpy(orig, SHARE);
278
	strcat(orig, "share/mupen64/lang");
280
	strcat(orig, "lang");
279
	symlink(orig, temp);
281
	symlink(orig, temp);
280
	
282
	
281
	/*strcpy(temp, g_WorkingDir);
283
	/*strcpy(temp, g_WorkingDir);
282
	strcat(temp, "plugins");
284
	strcat(temp, "plugins");
283
	strcpy(orig, WITH_HOME);
285
	strcpy(orig, SHARE);
284
	strcat(orig, "share/mupen64/plugins");
286
	strcat(orig, "plugins");
285
	symlink(orig, temp);*/
287
	symlink(orig, temp);*/
286
	
288
	
287
	strcpy(temp, g_WorkingDir);
289
	strcpy(temp, g_WorkingDir);
288
	strcat(temp, "plugins");
290
	strcat(temp, "plugins");
289
	mkdir(temp, 0700);
291
	mkdir(temp, 0700);
290
	strcpy(orig, WITH_HOME);
292
	strcpy(orig, SHARE);
291
	strcat(orig, "share/mupen64/plugins");
293
	strcat(orig, "plugins");
292
	dir = opendir(orig);
294
	dir = opendir(orig);
293
	while((entry = readdir(dir)) != NULL)
295
	while((entry = readdir(dir)) != NULL)
294
	  {
296
	  {
295
	     if(strcmp(entry->d_name + strlen(entry->d_name) - 3, ".so"))
297
	     if(strcmp(entry->d_name + strlen(entry->d_name) - 3, ".so"))
296
	       {
298
	       {
297
		  strcpy(orig, WITH_HOME);
299
		  strcpy(orig, SHARE);
298
		  strcat(orig, "share/mupen64/plugins/");
300
		  strcat(orig, "plugins/");
299
		  strcat(orig, entry->d_name);
301
		  strcat(orig, entry->d_name);
300
		  src = fopen(orig, "rb");
302
		  src = fopen(orig, "rb");
301
		  if(src == NULL) continue;
303
		  if(src == NULL) continue;
Lines 320-327 Link Here
320
		  strcpy(temp, g_WorkingDir);
322
		  strcpy(temp, g_WorkingDir);
321
		  strcat(temp, "plugins/");
323
		  strcat(temp, "plugins/");
322
		  strcat(temp, entry->d_name);
324
		  strcat(temp, entry->d_name);
323
		  strcpy(orig, WITH_HOME);
325
		  strcpy(orig, SHARE);
324
		  strcat(orig, "share/mupen64/plugins/");
326
		  strcat(orig, "plugins/");
325
		  strcat(orig, entry->d_name);
327
		  strcat(orig, entry->d_name);
326
		  symlink(orig, temp);
328
		  symlink(orig, temp);
327
	       }
329
	       }

Return to bug 171716