freebsd-ports/games/xscrabble/Makefile
Edwin Groothuis f4e89d7c04 games/xscrabble: update to 2.12
1. Update to xscrabble 2.12
	2. Fix typo in pkg-descr and trim trailing blanks

	"You might be able to improve upon this"

	This port does something I don't like: it installs an empty,
	unwritable scrabble_scores file in a directory whose contents
	shouldn't be modified. Players then need to override the
	app-defaults by placing a

	XScrabble.scorefile: /path/to/scrabble_scores

	line in $HOME/.Xdefaults (or $HOME/.Xresources, whatever).

	Wouldn't it make more sense to create a new, empty, writable
	score file under /var/games (if it doesn't exist) upon
	package installation; make the app-defaults file reference that;
	on deinstall, remove /var/games/scrabble_scores if it is empty or
	print a message indicating this file needs to be deleted manually
	in order to remove all traces?

PR:		ports/111839
Submitted by:	"Eric P. Scott" <eps+pbug0704@ana.com>
2007-09-25 12:02:57 +00:00

47 lines
1.5 KiB
Makefile

# New ports collection makefile for: xscrabble
# Date created: 27 July 1997
# Whom: Thomas Gellekum <tg@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= xscrabble
PORTVERSION= 2.12
CATEGORIES= games
MASTER_SITES= ftp://ftp.ac-grenoble.fr/ge/educational_games/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${PORTNAME}_en${EXTRACT_SUFX}
MAINTAINER= ports@FreeBSD.org
COMMENT= X version of the popular board game
USE_BZIP2= yes
USE_IMAKE= yes
USE_XPM= yes
NO_INSTALL_MANPAGES= yes
XSCRABBLEDIR= ${PREFIX}/lib/X11/xscrabble
post-patch:
@${ECHO_CMD} '#define VERSION ${PORTVERSION:S/.//g}' \
> ${WRKSRC}/src/config.h
@${ECHO_CMD} '#define DICT_FILE "${XSCRABBLEDIR}/OSPD3.gz"' \
>> ${WRKSRC}/src/config.h
@${ECHO_CMD} '#define SCORE_FILE "${XSCRABBLEDIR}/scrabble_scores"' \
>> ${WRKSRC}/src/config.h
@${ECHO_CMD} '#define RULES_FILE "${XSCRABBLEDIR}/scrabble_rules"' \
>> ${WRKSRC}/src/config.h
@${SED} -e 's|/usr/share/games/scrabble/en|${XSCRABBLEDIR}|g' \
${WRKSRC}/../xscrabble_en/app-defaults/XScrabble_en \
> ${WRKSRC}/XScrabble
@${REINPLACE_CMD} -e 's|= -O|=$$(CDEBUGFLAGS)|g' ${WRKSRC}/Imakefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/xscrab ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/src/xscrabble ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/XScrabble ${PREFIX}/lib/X11/app-defaults
@${MKDIR} ${XSCRABBLEDIR}
.for file in OSPD3.gz duplicate scrabble_rules scrabble_scores
${INSTALL_DATA} ${WRKSRC}/../xscrabble_en/lib/${file} ${XSCRABBLEDIR}
.endfor
.include <bsd.port.mk>