1 $NetBSD: patch-aa,v 1.3 2006/07/17 20:21:35 wiz Exp $
3 --- makefile.orig 2006-05-26 12:12:22.000000000 +0000
5 @@ -25,35 +25,6 @@ VERSION = "0.43.3"
6 # Use asm video core ? (comment to use C core)
9 -# Try to detect mingw... If you want to build the dos and the mingw
10 -# version on the same system you should unset djdir before making
12 -ifeq ("$(shell uname)","Linux")
16 -ifeq ("$(shell uname)","FreeBSD")
20 -ifeq ("$(OSTYPE)","msys")
41 @@ -123,8 +94,8 @@ RAINE32 = 1
42 DEFINE = -D__RAINE__ \
45 - PNG_LFLAGS = "$(shell libpng-config --ldflags)"
46 - PNG_STATIC_LFLAGS = "$(shell libpng-config --static --ldflags)"
47 + PNG_LFLAGS = "$(shell pkg-config --libs libpng)"
48 + PNG_STATIC_LFLAGS = "$(shell pkg-config --libs --static libpng)"
49 LIBS = -lz -lalleg $(PNG_LFAGS)
50 LIBS_STATIC = -lz -lalleg_s -lkernel32 -luser32 -lgdi32 -lcomdlg32 \
51 -lole32 -ldinput -lddraw -ldxguid -lwinmm -ldsound \
52 @@ -153,9 +124,9 @@ endif
56 - PNG_CFLAGS = "$(shell libpng-config --cflags)"
57 - PNG_LFAGS = "$(shell libpng-config --ldflags)"
58 - PNG_STATIC_LFLAGS = "$(shell libpng-config --static --ldflags)"
59 + PNG_CFLAGS = "$(shell pkg-config --cflags libpng)"
60 + PNG_LFAGS = "$(shell pkg-config --cflags libpng)"
61 + PNG_STATIC_LFLAGS = "$(shell pkg-config --cflags --static libpng)"
62 INCDIR += $(PNG_CFLAGS)
63 DEFINE = -D__RAINE__ \
65 @@ -193,7 +164,7 @@ else
67 bindir = $(prefix)/bin
68 sharedir = $(prefix)/share
69 - mandir = $(prefix)/man/man6
70 + mandir = $(prefix)/${PKGMANDIR}/man6
71 rainedata = $(sharedir)/raine
72 langdir = $(rainedata)/languages
73 romdir = $(rainedata)/roms
74 @@ -207,14 +178,14 @@ else
77 INSTALL = /usr/bin/install
78 - INSTALL_BIN = $(INSTALL) -m 755
79 - INSTALL_DATA = $(INSTALL) -m 644
80 + INSTALL_BIN = $(BSD_INSTALL_PROGRAM)
81 + INSTALL_DATA = $(BSD_INSTALL_DATA)
82 RD = rmdir --ignore-fail-on-non-empty
87 - PNG_CFLAGS = "$(shell libpng-config --cflags)"
88 + PNG_CFLAGS = "$(shell pkg-config --cflags libpng)"
90 ALLEGRO_CFLAGS = "$(shell allegro-config --cflags)"
92 @@ -226,9 +197,9 @@ endif
93 DEFINE = -D__RAINE__ \
96 - LIBS = -lz `allegro-config --libs` `libpng-config --ldflags`
97 - LIBS_DEBUG = -lz `allegro-config --libs ` `libpng-config --ldflags` # -lefence
98 - LIBS_STATIC = -lz `allegro-config --static` `libpng-config --static --ldflags`
99 + LIBS = -lz `allegro-config --libs` `pkg-config --libs libpng`
100 + LIBS_DEBUG = -lz `allegro-config --libs ` `pkg-config --libs libpng` # -lefence
101 + LIBS_STATIC = -lz `allegro-config --static` `pkg-config --static --libs libpng`
103 ifeq ("$(shell if [ -e /usr/include/vga.h ] || [ -e /usr/local/include/vga.h ]; then echo yes; fi)","yes")
105 @@ -838,13 +809,13 @@ LIBS += `sdl-config --libs`
109 -all: cpuinfo message maketree depend $(RAINE_EXE)
110 +all: message maketree depend $(RAINE_EXE)
113 @echo dependencies : if you get an error here, install the required dev package
116 - @libpng-config --version
117 + @pkg-config --version libpng
119 @sdl-config --version
121 @@ -1048,11 +1019,7 @@ dep: make.dep
123 ./makedep $(OBJDIR) $(OBJS) > make.dep
133 @@ -1094,11 +1061,18 @@ ifdef RAINE_UNIX
134 $(INSTALL_DATA) $(RAINE_DAT) $(rainedata)
135 sh -c "if [ -f hiscore.dat ]; then $(INSTALL_DATA) hiscore.dat $(rainedata); fi"
136 $(INSTALL_DATA) config/cheats.cfg $(rainedata)
137 - $(INSTALL_DATA) raine.desktop $(prefix)/usr/share/applications
138 - $(INSTALL_DATA) raine.png $(prefix)/usr/share/pixmaps
139 + $(INSTALL_DATA) raine.desktop $(prefix)/share/applications
140 + $(INSTALL_DATA) raine.png $(prefix)/share/pixmaps
143 - $(MD) -pv $(bindir) $(rainedata) $(langdir) $(romdir) $(artdir) $(emudxdir) $(prefix)/usr/share/applications $(prefix)/usr/share/pixmaps
144 + $(BSD_INSTALL_PROGRAM_DIR) $(bindir)
145 + $(BSD_INSTALL_DATA_DIR) $(rainedata)
146 + $(BSD_INSTALL_DATA_DIR) $(langdir)
147 + $(BSD_INSTALL_DATA_DIR) $(romdir)
148 + $(BSD_INSTALL_DATA_DIR) $(artdir)
149 + $(BSD_INSTALL_DATA_DIR) $(emudxdir)
150 + $(BSD_INSTALL_DATA_DIR) $(prefix)/share/applications
151 + $(BSD_INSTALL_DATA_DIR) $(prefix)/share/pixmaps
154 $(INSTALL_DATA) config/language/$@ $(langdir)