summaryrefslogtreecommitdiff
path: root/games/xnibbles/patches/patch-aa
blob: c3d19c89bf084c6956bfbf41f3d2ad40d091d39b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
$NetBSD: patch-aa,v 1.5 2006/08/29 20:03:24 rillig Exp $

--- Makefile.orig	1998-03-05 14:06:19.000000000 -0800
+++ Makefile	2004-03-09 15:02:02.000000000 -0800
@@ -21,14 +21,15 @@
 ### GENERAL OPTIONS ###
 
   # Compiler to use (C++ compiler _please_)
-  CC = g++
+  CC = ${CXX}
 
   # Directory for XNibbles specific data
   # This must be set correctly at compile time
-  DATADIR = /usr/local/games/xnibbles
+  DATADIR=$(PREFIX)/share/xnibbles
+  CPPFLAGS+=-DDATADIR=\"$(DATADIR)\" $(SDEV)
+  CFLAGS+=-fwritable-strings
 
   # Prefix to find bin and man directories for installation
-  PREFIX  = /usr/local
 
   # Install program
   INSTALL = /usr/bin/install
@@ -41,10 +42,10 @@
 
   # Requires kernel sound support, change from 0 to 1 if you want it
   SOUND = 1
-  SOUNDDEV = /dev/dsp
+  SOUNDDEV = /dev/audio
 
   # Requires kernel joystick support, change from 0 to 1 if you want it
-  JOYSTICK = 1
+  JOYSTICK = 0
   JOYSTICK0DEV = /dev/js0
   JOYSTICK1DEV = /dev/js1
 
@@ -90,7 +91,7 @@ xnibbles: bodyPart.o boni.o bonus.o dead
 	$(CC) $(CFLAGS) $(LDFLAGS) \
 	bodyPart.o boni.o bonus.o levels.o people.o statusBar.o ticker.o \
 	timer.o walls.o worm.o xnibbles.o xpms.o $(OBJECTS) deadWorm.o counter.o \
-	-o xnibbles -lm -lXpm -lX11
+	-o xnibbles -lm -lXpm -lX11 ${LIBOSSAUDIO}
 
 xnleditor: xnleditor/level.o xnleditor/newWalls.o xnleditor/sideBar.o xnleditor/walls.o xnleditor/xnleditor.o xnleditor/xpms.o xnleditor/numericDisplay.o
 	$(CC) $(CFLAGS) $(LDFLAGS) \
@@ -115,19 +116,14 @@ tar: pristine
 	(cd ..; tar -cvzf xnibbles.tgz xnibbles/ ; chmod 644 xnibbles.tgz)
 
 install:
-	$(INSTALL) -d $(DATADIR) -g $(GROUP) -m 755 -o $(USER)
-	$(INSTALL) -d $(DATADIR)/levels -g $(GROUP) -m 755 -o $(USER)
-	$(INSTALL) -d $(DATADIR)/sounds -g $(GROUP) -m 755 -o $(USER)
-	$(INSTALL) -d $(PREFIX) -g $(GROUP) -m 755 -o $(USER)
-	$(INSTALL) -d $(PREFIX)/bin -g $(GROUP) -m 755 -o $(USER)
-	$(INSTALL) -d $(PREFIX)/man -g $(GROUP) -m 755 -o $(USER)
-	$(INSTALL) -d $(PREFIX)/man/man6 -g $(GROUP) -m 755 -o $(USER)
-	$(INSTALL) -g $(GROUP) -m 644 -o $(USER) levels/*.xnl $(DATADIR)/levels
-	$(INSTALL) -g $(GROUP) -m 644 -o $(USER) levels/README $(DATADIR)/levels
-	$(INSTALL) -g $(GROUP) -m 644 -o $(USER) sounds/*.ub $(DATADIR)/sounds
-	$(INSTALL) -g $(GROUP) -m 755 -o $(USER) xnibbles $(PREFIX)/bin
-	$(INSTALL) -g $(GROUP) -m 755 -o $(USER) xnleditor/xnleditor $(PREFIX)/bin
-	$(INSTALL) -g $(GROUP) -m 644 -o $(USER) xnibbles.6 $(PREFIX)/man/man6
+	$(BSD_INSTALL_DATA_DIR) $(DATADIR)/levels
+	$(BSD_INSTALL_DATA_DIR) $(DATADIR)/sounds
+	$(BSD_INSTALL_DATA) levels/*.xnl $(DATADIR)/levels
+	$(BSD_INSTALL_DATA) levels/README $(DATADIR)/levels
+	$(BSD_INSTALL_DATA) sounds/*.ub $(DATADIR)/sounds
+	$(BSD_INSTALL_PROGRAM) xnibbles $(PREFIX)/bin
+	$(BSD_INSTALL_PROGRAM) xnleditor/xnleditor $(PREFIX)/bin
+	$(BSD_INSTALL_MAN) xnibbles.6 $(PREFIX)/$(PKGMANDIR)/man6
 	./make-LEVELS $(DATADIR) OOGA
 
 bodyPart.o:	common.h bodyPart.h