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
|
2002-05-14 20:00:25 +00:00
|
|
|
PORTVERSION= 3.4.0
|
|
|
|
CATEGORIES?= games
|
2001-01-04 20:15:12 +00:00
|
|
|
MASTER_SITES= ftp://ftp.nethack.org/pub/nethack/nh${PORTVERSION:S/.//g}/src/
|
2000-12-21 04:14:17 +00:00
|
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.//g}
|
|
|
|
EXTRACT_SUFX= .tgz
|
1995-04-11 00:20:58 +00:00
|
|
|
|
2002-05-14 20:00:25 +00:00
|
|
|
MAINTAINER?= dscheidt@enteract.com
|
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:20:29 +00:00
|
|
|
HACKNAME?= nethack
|
|
|
|
HACKDIR?= lib/${HACKNAME}
|
|
|
|
HACKDOCSDIR?= share/doc/${HACKNAME}
|
|
|
|
|
2002-05-14 20:00:25 +00:00
|
|
|
.if defined(WITH_GNOME_GRAPHICS)
|
|
|
|
CATEGORIES= games gnome
|
|
|
|
PKGNAMESUFFIX= -gnome
|
|
|
|
LIB_DEPENDS+= gnugetopt:${PORTSDIR}/devel/libgnugetopt
|
|
|
|
USE_GNOME= yes
|
|
|
|
GRAPHICS= GNOME_GRAPHICS
|
|
|
|
.elif defined(WITH_QT_GRAPHICS)
|
|
|
|
PKGNAMESUFFIX= -qt
|
|
|
|
USE_QT_VER= 2
|
|
|
|
MAKE_ENV+= QTCPPFLAGS="${QTCPPFLAGS}" QTCFGLIBS="${QTCFGLIBS}" \
|
|
|
|
MOC="${MOC}" LIBQT="-l${QTNAME}"
|
|
|
|
GRAPHICS= QT_GRAPHICS
|
|
|
|
.elif defined(WITH_TTY_GRAPHICS) || defined(WITHOUT_X11)
|
|
|
|
PKGNAMESUFFIX= -nox11
|
|
|
|
.else
|
|
|
|
USE_XPM= yes
|
|
|
|
GRAPHICS= X11_GRAPHICS
|
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-everything::
|
|
|
|
.if defined(WITH_GNOME_GRAPHICS) || defined(WITH_QT_GRAPHICS) \
|
|
|
|
|| defined(WITH_TTY_GRAPHICS) || defined(WITHOUT_X11)
|
|
|
|
@${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} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
|
|
|
.else
|
|
|
|
@${ECHO_MSG} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
|
|
|
@${ECHO_MSG} " You may use the following build options: "
|
|
|
|
@${ECHO_MSG} " WITH_GNOME_GRAPHICS=yes build with GNOME GUI "
|
|
|
|
@${ECHO_MSG} " WITH_QT_GRAPHICS=yes build with Qt GUI "
|
|
|
|
@${ECHO_MSG} " WITH_TTY_GRAPHICS=yes build with no GUI "
|
|
|
|
@${ECHO_MSG} " WITHOUT_X11=yes same as above "
|
|
|
|
@${ECHO_MSG} " "
|
|
|
|
@${ECHO_MSG} " By default, nethack port is built with X11 GUI. "
|
|
|
|
@${ECHO_MSG} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
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
|
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
|
|
|
|
|
|
|
.include <bsd.port.mk>
|