- Support CFLAGS/PREFIX/X11BASE properly

PR:		21034
Submitted by:	KATO Tsuguru <tkato@prontomail.ne.jp>
This commit is contained in:
Steve Price 2000-09-05 01:15:08 +00:00
parent c88dda479a
commit 2d0092ac11
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=32262
3 changed files with 24 additions and 16 deletions

View file

@ -9,19 +9,19 @@ PORTNAME= xworm
PORTVERSION= 1.02
CATEGORIES= games
MASTER_SITES= http://www.ekran.no/archive/x/
DISTNAME= xworm102
DISTNAME= ${PORTNAME}102
MAINTAINER= ports@FreeBSD.org
ALL_TARGET= freebsd
USE_X_PREFIX= yes
WRKSRC= ${WRKDIR}/XWorm
USE_X_PREFIX= yes
ALL_TARGET= freebsd
do-install:
@ ${INSTALL_PROGRAM} ${WRKSRC}/xworm ${PREFIX}/bin
@ ${MKDIR} ${PREFIX}/share/xworm
${INSTALL_PROGRAM} ${WRKSRC}/xworm ${PREFIX}/bin
@${MKDIR} ${PREFIX}/share/xworm
.for file in font grid raw
@ ${INSTALL_DATA} ${WRKSRC}/xworm.${file} ${PREFIX}/share/xworm
${INSTALL_DATA} ${WRKSRC}/xworm.${file} ${PREFIX}/share/xworm
.endfor
.include <bsd.port.mk>

View file

@ -1,18 +1,26 @@
--- Makefile.orig Wed May 7 11:28:12 1997
+++ Makefile Sun Sep 27 12:19:42 1998
@@ -6,21 +6,26 @@
--- Makefile.orig Thu May 8 01:28:12 1997
+++ Makefile Sat Aug 12 03:01:04 2000
@@ -1,26 +1,31 @@
# Makefile for XWorm.
#CC = cc
-CC = gcc
+CC ?= gcc
HPFLAGS = -O -D_HPUX_SOURCE
SUNFLAGS = -O
LINUXFLAGS = -O
+FREEBSDFLAGS= -O -DPREFIX=\"/usr/X11R6/share/xworm\"
+FREEBSDFLAGS= ${CFLAGS} -DXWORMDIR=\"${PREFIX}/share/xworm\"
INCDIR = -I/usr/include/X11R5 -I/usr/include -I/usr/X11R6/include
-INCDIR = -I/usr/include/X11R5 -I/usr/include -I/usr/X11R6/include
+INCDIR = -I${X11BASE}/include
HPLINK = -L/usr/local/lib/X11R5 -lXt -lX11 -lm
SUNLINK = -L/usr/local/lib/X11R5 -lXt -lX11 -lm -lsocket -lnsl -lICE -lSM
LINUXLINK = -L/usr/X11R6/lib -lXt -lX11 -lm
-LINUXLINK = -L/usr/X11R6/lib -lXt -lX11 -lm
+LINUXLINK = -L${X11BASE}/lib -lXt -lX11 -lm
+.if ${PORTOBJFORMAT} == "elf"
+LINUXLINK+= -Wl,-rpath,$(X11BASE)/lib
+LINUXLINK+= -Wl,-rpath,${X11BASE}/lib
+.endif
all:

View file

@ -18,9 +18,9 @@
+#define PREFIX "."
+#endif
+
+#define gridfile PREFIX "/xworm.grid"
+#define fontfile PREFIX "/xworm.font"
+#define logofile PREFIX "/xworm.raw"
+#define gridfile XWORMDIR "/xworm.grid"
+#define fontfile XWORMDIR "/xworm.font"
+#define logofile XWORMDIR "/xworm.raw"
#define maxQ 5000 /* max queue */
#define NCOLORS 15 /* number of colours */