2013-07-10 04:54:11 +00:00
|
|
|
# Created by: asami
|
1999-08-25 06:06:33 +00:00
|
|
|
# $FreeBSD$
|
1995-03-28 12:13:27 +00:00
|
|
|
|
2015-12-27 23:05:19 +00:00
|
|
|
PORTNAME= nethack34
|
2003-12-11 19:57:17 +00:00
|
|
|
PORTVERSION= 3.4.3
|
2015-12-27 23:05:19 +00:00
|
|
|
PORTREVISION= 9
|
2014-06-29 06:36:43 +00:00
|
|
|
CATEGORIES= games
|
2016-01-21 05:20:02 +00:00
|
|
|
MASTER_SITES= SF/${TRUEPORTNAME}/${TRUEPORTNAME}/${PORTVERSION}
|
2015-12-27 23:05:19 +00:00
|
|
|
DISTNAME= ${TRUEPORTNAME}-${PORTVERSION:S/.//g}-src
|
1995-04-11 00:20:58 +00:00
|
|
|
|
2011-06-01 04:23:27 +00:00
|
|
|
MAINTAINER= glewis@FreeBSD.org
|
2014-06-29 06:40:31 +00:00
|
|
|
COMMENT= Dungeon explorin', slashin', hackin' game
|
1995-04-11 00:20:58 +00:00
|
|
|
|
2011-12-14 21:29:16 +00:00
|
|
|
LICENSE= nethack
|
|
|
|
LICENSE_NAME= NETHACK GENERAL PUBLIC LICENSE
|
|
|
|
LICENSE_FILE= ${WRKSRC}/dat/license
|
2013-07-10 04:54:11 +00:00
|
|
|
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
|
2011-12-14 21:29:16 +00:00
|
|
|
|
2015-12-27 23:05:19 +00:00
|
|
|
WRKSRC= ${WRKDIR}/${TRUEPORTNAME}-${PORTVERSION}
|
2002-05-14 20:00:25 +00:00
|
|
|
|
2014-07-29 19:11:51 +00:00
|
|
|
USES= gmake tar:tgz
|
2008-07-25 12:24:09 +00:00
|
|
|
MAKE_ENV= GRAPHICS="${GRAPHICS}"
|
2015-12-27 23:05:19 +00:00
|
|
|
PLIST_SUB= HACKNAME="${HACKNAME}" \
|
|
|
|
HACKEXT="${HACKEXT}"
|
|
|
|
MAKE_JOBS_UNSAFE= yes
|
|
|
|
TRUEPORTNAME= nethack
|
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.
|
2015-12-27 23:05:19 +00:00
|
|
|
HACKEXT?= 34
|
|
|
|
HACKNAME?= ${TRUEPORTNAME}${HACKEXT}
|
2014-06-29 06:36:43 +00:00
|
|
|
HACKDIR?= share/${HACKNAME}
|
2015-12-27 23:05:19 +00:00
|
|
|
HACKLINK= ${TRUEPORTNAME}
|
2014-06-29 06:36:43 +00:00
|
|
|
|
|
|
|
DATADIR= ${PREFIX}/${HACKDIR}
|
|
|
|
DOCSDIR= ${PREFIX}/share/doc/${HACKNAME}
|
|
|
|
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
|
2002-08-12 21:20:29 +00:00
|
|
|
|
2003-09-28 11:51:31 +00:00
|
|
|
.if !defined(PKGNAMESUFFIX)
|
2008-03-11 15:57:05 +00:00
|
|
|
USE_XORG= xaw xpm
|
2003-09-28 11:51:31 +00:00
|
|
|
GRAPHICS= X11_GRAPHICS
|
|
|
|
.else
|
2013-10-13 20:29:33 +00:00
|
|
|
.if ${PKGNAMESUFFIX} == "-nox11"
|
2003-09-28 11:51:31 +00:00
|
|
|
GRAPHICS= # none
|
2009-07-25 00:25:21 +00:00
|
|
|
#
|
|
|
|
# Patch notes:
|
|
|
|
# 1) hpmon and statuscolors conflict with one another
|
|
|
|
# 2) menucolors patch must be applied before statuscolors
|
|
|
|
#
|
|
|
|
.if defined(WITH_HPMON) && defined(WITH_STATUSCOLORS)
|
|
|
|
IGNORE= you cannot enable both HPMON and STATUSCOLORS
|
|
|
|
.endif
|
2004-06-30 09:58:09 +00:00
|
|
|
.if defined(WITH_MENUCOLORS)
|
2008-05-27 08:22:29 +00:00
|
|
|
PATCHFILES+= nh343-menucolor.diff
|
2012-12-17 02:39:05 +00:00
|
|
|
PATCH_SITES+= http://bilious.alt.org/~paxed/nethack/
|
2004-06-30 09:58:09 +00:00
|
|
|
PATCH_DIST_STRIP= -p1
|
2006-05-26 14:56:09 +00:00
|
|
|
CFLAGS+= -DMENU_COLOR_REGEX_POSIX
|
2004-06-30 09:58:09 +00:00
|
|
|
.endif
|
2009-07-25 00:25:21 +00:00
|
|
|
.if defined(WITH_STATUSCOLORS)
|
|
|
|
PATCHFILES+= nh343-statuscolors.fixed.patch
|
2012-06-28 20:15:27 +00:00
|
|
|
PATCH_SITES+= http://jdc.koitsu.org/nethack/ \
|
2015-05-14 10:15:04 +00:00
|
|
|
LOCAL/wxs
|
2009-07-25 00:25:21 +00:00
|
|
|
PATCH_DIST_STRIP= -p1
|
|
|
|
.endif
|
2007-01-15 15:57:21 +00:00
|
|
|
.if defined(WITH_HPMON)
|
|
|
|
PATCHFILES+= hpmon.diff
|
2007-01-15 17:24:33 +00:00
|
|
|
PATCH_SITES+= http://www.netsonic.fi/~walker/nh/ \
|
2015-05-14 10:15:04 +00:00
|
|
|
LOCAL/wxs
|
2007-01-15 15:57:21 +00:00
|
|
|
PATCH_DIST_STRIP= -p1
|
|
|
|
CFLAGS+= -DHPMON
|
|
|
|
.endif
|
2003-09-28 11:51:31 +00:00
|
|
|
.endif
|
2002-05-14 20:00:25 +00:00
|
|
|
.endif
|
|
|
|
|
2014-06-29 08:19:00 +00:00
|
|
|
OPTIONS_DEFINE= DOCS
|
|
|
|
|
2004-07-01 18:49:43 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2015-12-27 23:05:19 +00:00
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
|
|
|
.if !exists(${PREFIX}/bin/${HACKLINK}) && ${HACKNAME} != ${HACKLINK}
|
|
|
|
PLIST_SUB+= HACKLINK=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= HACKLINK="@comment "
|
|
|
|
.endif
|
|
|
|
|
2002-05-14 20:00:25 +00:00
|
|
|
pre-everything::
|
2004-06-30 09:58:09 +00:00
|
|
|
@if [ "${PKGBASE}" != "nethack" ]; then \
|
|
|
|
${ECHO_MSG} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ; \
|
|
|
|
${ECHO_MSG} " You cannot install nethack and ${PKGBASE} in parallel " ; \
|
|
|
|
${ECHO_MSG} " But ${PKGBASE} reads your prior nethack scores " ; \
|
|
|
|
${ECHO_MSG} " Don't forget to backup your nethack libdir if it's " ; \
|
|
|
|
${ECHO_MSG} " important for you " ; \
|
|
|
|
${ECHO_MSG} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ; \
|
|
|
|
fi
|
2002-05-14 20:00:25 +00:00
|
|
|
|
|
|
|
post-patch:
|
2015-12-27 23:05:19 +00:00
|
|
|
@${REINPLACE_CMD} -e \
|
|
|
|
's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/include/config.h
|
|
|
|
@${REINPLACE_CMD} -e \
|
|
|
|
's|<malloc.h>|<stdlib.h>|g' ${WRKSRC}/win/Qt/qt_win.cpp
|
|
|
|
.for f in include/config.h sys/unix/Makefile.doc sys/unix/Makefile.src sys/unix/Makefile.top
|
2014-06-29 06:36:43 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g' \
|
|
|
|
-e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \
|
2015-12-27 23:05:19 +00:00
|
|
|
-e 's|%%HACKEXT%%|${HACKEXT}|g' \
|
2014-06-29 06:36:43 +00:00
|
|
|
${WRKSRC}/${f}
|
2002-08-12 21:20:29 +00:00
|
|
|
.endfor
|
2015-12-27 23:05:19 +00:00
|
|
|
.for f in dgn_comp.6 dlb.6 lev_comp.6 nethack.6 recover.6
|
|
|
|
@${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g' \
|
|
|
|
-e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \
|
|
|
|
-e 's|%%HACKEXT%%|${HACKEXT}|g' \
|
|
|
|
${WRKSRC}/doc/${f}
|
|
|
|
.endfor
|
2003-01-12 02:08:49 +00:00
|
|
|
.if defined(WITHOUT_SHELL)
|
2006-05-26 14:56:09 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|#define SHELL|/* #define SHELL|' ${WRKSRC}/include/unixconf.h
|
2004-07-01 18:49:43 +00:00
|
|
|
.endif
|
|
|
|
.if defined(WITH_MAIL)
|
2006-05-26 14:56:09 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|/\* #define MAIL \*/|#define MAIL|' ${WRKSRC}/include/unixconf.h
|
2004-06-30 09:58:09 +00:00
|
|
|
.endif
|
2002-05-14 20:00:25 +00:00
|
|
|
|
2014-06-29 06:36:43 +00:00
|
|
|
do-configure:
|
1997-07-12 16:53:39 +00:00
|
|
|
@cd ${WRKSRC}/sys/unix; ${SH} setup.sh
|
1995-03-28 12:13:27 +00:00
|
|
|
|
2014-06-29 06:36:43 +00:00
|
|
|
pre-install:
|
|
|
|
@${CAT} ${FILESDIR}/pkg-deinstall.in | ${SED} \
|
|
|
|
-e 's|%%HACKDIR%%|${HACKDIR}|g' > ${PKGDEINSTALL}
|
|
|
|
|
1996-04-22 07:49:03 +00:00
|
|
|
post-install:
|
2015-12-27 23:05:19 +00:00
|
|
|
.if !exists(${PREFIX}/bin/${HACKLINK}) && ${HACKNAME} != ${HACKLINK}
|
|
|
|
@${LN} -s -f ${PREFIX}/bin/${HACKNAME} ${STAGEDIR}${PREFIX}/bin/${HACKLINK}
|
|
|
|
.endif
|
2014-06-29 06:36:43 +00:00
|
|
|
@cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} manpages
|
2014-10-06 22:43:05 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}/save
|
2013-07-10 04:54:11 +00:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2014-06-29 06:36:43 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/Guidebook.txt ${STAGEDIR}${DOCSDIR}
|
1996-04-22 07:49:03 +00:00
|
|
|
.endif
|
1995-03-28 12:13:27 +00:00
|
|
|
|
2004-07-01 18:49:43 +00:00
|
|
|
.include <bsd.port.post.mk>
|