aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorjeh <jeh@FreeBSD.org>2000-10-27 07:30:54 +0800
committerjeh <jeh@FreeBSD.org>2000-10-27 07:30:54 +0800
commitee02ed2ea4c71eb6df4c345243baff27ec5d0a00 (patch)
tree802a7c531a98918b5e47f08f90e130686a22e1a1 /games
parent243034ab7203481713ca884f87bb6efe332e10b7 (diff)
downloadfreebsd-ports-gnome-ee02ed2ea4c71eb6df4c345243baff27ec5d0a00.tar.gz
freebsd-ports-gnome-ee02ed2ea4c71eb6df4c345243baff27ec5d0a00.tar.zst
freebsd-ports-gnome-ee02ed2ea4c71eb6df4c345243baff27ec5d0a00.zip
Update to recognize CC/CFLAGS/X11BASE
PR: 21630 Submitted by: Dan Papasian <bugg@bugg.strangled.net>
Diffstat (limited to 'games')
-rw-r--r--games/KnightCap/Makefile8
-rw-r--r--games/KnightCap/files/patch-aa43
2 files changed, 32 insertions, 19 deletions
diff --git a/games/KnightCap/Makefile b/games/KnightCap/Makefile
index 96a6ff32c14a..49b2bd1b474d 100644
--- a/games/KnightCap/Makefile
+++ b/games/KnightCap/Makefile
@@ -15,15 +15,15 @@ DISTNAME= KnightCap-${PORTVERSION}
MAINTAINER= bugg@bugg.strangled.net
+WRKSRC= ${WRKDIR}/Export
USE_MESA= yes
ALL_TARGET= KnightCap
-WRKSRC= ${WRKDIR}/Export
do-install:
- @ ${INSTALL_PROGRAM} ${WRKSRC}/KnightCap ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/KnightCap ${PREFIX}/bin
.if !defined(NOPORTDOCS)
- @ ${MKDIR} ${PREFIX}/share/doc/KnightCap
- @ ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/KnightCap
+ @${MKDIR} ${PREFIX}/share/doc/KnightCap
+ ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/KnightCap
.endif
.include <bsd.port.mk>
diff --git a/games/KnightCap/files/patch-aa b/games/KnightCap/files/patch-aa
index 2f21a4447a1c..1a7331194860 100644
--- a/games/KnightCap/files/patch-aa
+++ b/games/KnightCap/files/patch-aa
@@ -1,38 +1,51 @@
---- Makefile.orig Tue Jun 20 21:19:26 2000
-+++ Makefile Tue Jun 20 21:19:30 2000
-@@ -5,8 +5,8 @@
- CC = gcc
+--- Makefile.orig Mon May 18 08:09:21 1998
++++ Makefile Wed Aug 9 04:55:31 2000
+@@ -2,11 +2,11 @@
+
+ # what C compiler? It better be Ansi-C. Use gcc if you have it.
+ # you may find that KnightCap is very slow if you don't use gcc
+-CC = gcc
++CC ?= gcc
# What compiler switches do you want? These ones work well with gcc
--#OPT = -O2 -fshort-enums -Wall
+ #OPT = -O2 -fshort-enums -Wall
-OPT = -g -fshort-enums -Wall
-+#OPT = -O3 -fomit-frame-pointer -fshort-enums -Wall -DCPU=686
+# OPT = -g -fshort-enums -Wall
# If you don't have gcc then perhaps try this instead. You only need
# the null definition for inline if your C compiler doesn't know about
-@@ -27,25 +27,22 @@
- GLUT_LIBS = -L$(GLUT)/lib/glut -lglut
+@@ -21,23 +21,23 @@
+ # display (or you don't have OpenGL and Glut libraries)
+ # If you do have these libs then make sure the first three
+ # lines point at the right places
+-MESA = /usr/local/Mesa-2.1
+-GLUT = /usr/local/Mesa-2.1/glut-3.2
+-X11 = /usr/X11R6
+-GLUT_LIBS = -L$(GLUT)/lib/glut -lglut
++MESA = ${X11BASE}
++GLUT = ${X11BASE}
++X11 = ${X11BASE}
++GLUT_LIBS = -L$(GLUT)/lib -lglut
MESA_LIBS = -L$(MESA)/lib -lMesaGLU -lMesaGL -lm
XLIBS = -L$(X11)/lib -lXmu -lXt -lXext -lX11 -lXi
-DISPLAYFLAGS = -I$(MESA)/include -I$(GLUT) -DRENDERED_DISPLAY=1
-+DISPLAYFLAGS = -I/usr/X11R6/include -I$(MESA)/include -I$(GLUT) -DRENDERED_DISPLAY=1
++DISPLAYFLAGS = -I$(X11)/include -I$(MESA)/include -I$(GLUT)/include -DRENDERED_DISPLAY=1
--# comment out the following line if you don't want KnightCap's
--# evaluation function learning turned on.
+ # comment out the following line if you don't want KnightCap's
+ # evaluation function learning turned on.
-LEARNFLAGS = -DLEARN_EVAL=1
++#LEARNFLAGS = -DLEARN_EVAL=1
# you shouldn't need to edit anything below this line. Unless
# something goes wrong.
INCLUDE = $(DISPLAYFLAGS)
-CFLAGS = $(OPT) $(INCLUDE) $(LEARNFLAGS)
-+CFLAGS = $(OPT) $(INCLUDE) #-DLEARN_EVAL=1
++CFLAGS += $(OPT) $(INCLUDE) $(LEARNFLAGS)
--LIBS = $(GLUT_LIBS) $(MESA_LIBS) $(XLIBS)
-+LIBS = $(GLUT_LIBS) $(MESA_LIBS) $(XLIBS) -lm
+ LIBS = $(GLUT_LIBS) $(MESA_LIBS) $(XLIBS)
- TARGET = KnightCap
+@@ -45,7 +45,7 @@
OBJS = knightcap.o trackball.o move.o util.o generate.o eval.o movement.o \
ordering.o hash.o board.o log.o prog.o timer.o ics.o display.o \