1995-03-28 12:13:27 +00:00
|
|
|
# New ports collection makefile for: nethack
|
|
|
|
# Date created: 27 March 1995
|
|
|
|
# Whom: asami
|
|
|
|
#
|
1999-08-25 06:06:33 +00:00
|
|
|
# $FreeBSD$
|
1995-03-28 12:13:27 +00:00
|
|
|
#
|
|
|
|
|
2000-04-14 12:28:40 +00:00
|
|
|
PORTNAME= nethack
|
2003-12-11 19:57:17 +00:00
|
|
|
PORTVERSION= 3.4.3
|
2004-02-04 05:21:48 +00:00
|
|
|
PORTREVISION= 1
|
2002-05-14 20:00:25 +00:00
|
|
|
CATEGORIES?= games
|
2003-03-11 20:57:54 +00:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
2003-06-05 20:06:31 +00:00
|
|
|
MASTER_SITE_SUBDIR= ${PORTNAME}
|
2003-12-11 19:57:17 +00:00
|
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.//g}-src
|
2000-12-21 04:14:17 +00:00
|
|
|
EXTRACT_SUFX= .tgz
|
1995-04-11 00:20:58 +00:00
|
|
|
|
2003-06-05 20:06:31 +00:00
|
|
|
MAINTAINER?= ports@FreeBSD.org
|
2003-02-18 05:56:18 +00:00
|
|
|
COMMENT?= A dungeon explorin', slashin', hackin' game
|
1995-04-11 00:20:58 +00:00
|
|
|
|
2000-12-21 04:14:17 +00:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
2002-05-14 20:00:25 +00:00
|
|
|
|
2002-08-12 21:20:29 +00:00
|
|
|
USE_REINPLACE= yes
|
1995-03-28 12:13:27 +00:00
|
|
|
USE_GMAKE= yes
|
2002-05-14 20:00:25 +00:00
|
|
|
MAKE_ENV= CXX="${CXX}" GRAPHICS="${GRAPHICS}"
|
2002-08-12 21:20:29 +00:00
|
|
|
PLIST_SUB= HACKNAME="${HACKNAME}" \
|
|
|
|
HACKDIR="${HACKDIR}" \
|
|
|
|
HACKDOCSDIR="${HACKDOCSDIR}"
|
2002-05-14 20:00:25 +00:00
|
|
|
|
1996-11-18 10:25:35 +00:00
|
|
|
MAN6= dgn_comp.6 dlb.6 lev_comp.6 nethack.6 recover.6
|
1995-03-28 12:13:27 +00:00
|
|
|
|
2002-08-12 21:52:00 +00:00
|
|
|
# Configure these variables as you want them to be.
|
2002-08-12 21:20:29 +00:00
|
|
|
HACKNAME?= nethack
|
|
|
|
HACKDIR?= lib/${HACKNAME}
|
|
|
|
HACKDOCSDIR?= share/doc/${HACKNAME}
|
|
|
|
|
2003-09-28 11:51:31 +00:00
|
|
|
.if !defined(PKGNAMESUFFIX)
|
|
|
|
USE_XPM= yes
|
|
|
|
GRAPHICS= X11_GRAPHICS
|
|
|
|
.else
|
|
|
|
.if ${PKGNAMESUFFIX} == "-gnome"
|
2002-05-14 20:00:25 +00:00
|
|
|
CATEGORIES= games gnome
|
2003-05-07 14:09:07 +00:00
|
|
|
USE_GETOPT_LONG= yes
|
|
|
|
USE_GNOME= gnomelibs
|
|
|
|
MAKE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
|
2002-05-14 20:00:25 +00:00
|
|
|
GRAPHICS= GNOME_GRAPHICS
|
2003-09-28 11:51:31 +00:00
|
|
|
.elif ${PKGNAMESUFFIX} == "-nox11"
|
|
|
|
GRAPHICS= # none
|
|
|
|
.elif ${PKGNAMESUFFIX} == "-qt"
|
2003-01-12 02:08:49 +00:00
|
|
|
USE_QT_VER= 3
|
|
|
|
MAKE_ENV+= QTCPPFLAGS="${QTCPPFLAGS} ${PTHREAD_CFLAGS}" \
|
|
|
|
QTCFGLIBS="${QTCFGLIBS} ${PTHREAD_LIBS}" \
|
|
|
|
MOC="${MOC}" LIBQT="-lqt-mt"
|
2002-05-14 20:00:25 +00:00
|
|
|
GRAPHICS= QT_GRAPHICS
|
2003-09-28 11:51:31 +00:00
|
|
|
.endif
|
2002-05-14 20:00:25 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-everything::
|
|
|
|
@${ECHO_MSG} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
|
|
|
@${ECHO_MSG} " You cannot install nethack and ${PKGBASE} in parallel "
|
|
|
|
@${ECHO_MSG} " But ${PKGBASE} read your prior nethack scores "
|
|
|
|
@${ECHO_MSG} " Don't forget to backup your nethack libdir if it's "
|
|
|
|
@${ECHO_MSG} " important for you "
|
|
|
|
@${ECHO_MSG} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
|
|
|
|
|
|
|
post-patch:
|
2002-08-12 21:20:29 +00:00
|
|
|
.for f in include/config.h sys/unix/Makefile.src sys/unix/Makefile.top
|
|
|
|
${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g;s|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' ${WRKSRC}/${f}
|
|
|
|
.endfor
|
|
|
|
${REINPLACE_CMD} -e 's|<regex.h>|<gnuregex.h>|g' ${WRKSRC}/src/sounds.c
|
|
|
|
${REINPLACE_CMD} -e 's|<malloc.h>|<stdlib.h>|g' ${WRKSRC}/win/Qt/qt_win.cpp
|
2003-01-12 02:08:49 +00:00
|
|
|
.if defined(WITHOUT_SHELL)
|
|
|
|
@${REINPLACE_CMD} -e 's|#define SHELL|/* #define SHELL|' ${WRKSRC}/include/unixconf.h
|
|
|
|
.endif
|
2002-05-14 20:00:25 +00:00
|
|
|
|
1995-03-28 12:13:27 +00:00
|
|
|
pre-configure:
|
1997-07-12 16:53:39 +00:00
|
|
|
@cd ${WRKSRC}/sys/unix; ${SH} setup.sh
|
1995-03-28 12:13:27 +00:00
|
|
|
|
1996-04-22 07:49:03 +00:00
|
|
|
post-install:
|
2002-05-14 20:00:25 +00:00
|
|
|
@cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${MAKE} manpages
|
1996-04-22 07:49:03 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
2002-08-12 21:20:29 +00:00
|
|
|
@${MKDIR} ${PREFIX}/${HACKDOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/Guidebook.txt ${PREFIX}/${HACKDOCSDIR}
|
1996-04-22 07:49:03 +00:00
|
|
|
.endif
|
1995-03-28 12:13:27 +00:00
|
|
|
|
2003-06-05 20:06:31 +00:00
|
|
|
.include <bsd.port.mk>
|