1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-02 01:20:54 +00:00
freebsd-ports/games/nethack34/Makefile

139 lines
4.0 KiB
Makefile
Raw Normal View History

# Created by: asami
1999-08-25 06:06:33 +00:00
# $FreeBSD$
PORTNAME= nethack34
PORTVERSION= 3.4.3
PORTREVISION= 9
2014-06-29 06:36:43 +00:00
CATEGORIES= games
MASTER_SITES= SF/${TRUEPORTNAME}/${TRUEPORTNAME}/${PORTVERSION}
DISTNAME= ${TRUEPORTNAME}-${PORTVERSION:S/.//g}-src
MAINTAINER= glewis@FreeBSD.org
2014-06-29 06:40:31 +00:00
COMMENT= Dungeon explorin', slashin', hackin' game
LICENSE= nethack
LICENSE_NAME= NETHACK GENERAL PUBLIC LICENSE
LICENSE_FILE= ${WRKSRC}/dat/license
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
WRKSRC= ${WRKDIR}/${TRUEPORTNAME}-${PORTVERSION}
USES= gmake tar:tgz
MAKE_ENV= GRAPHICS="${GRAPHICS}"
PLIST_SUB= HACKNAME="${HACKNAME}" \
HACKEXT="${HACKEXT}"
MAKE_JOBS_UNSAFE= yes
TRUEPORTNAME= nethack
# Configure these variables as you want them to be.
HACKEXT?= 34
HACKNAME?= ${TRUEPORTNAME}${HACKEXT}
2014-06-29 06:36:43 +00:00
HACKDIR?= share/${HACKNAME}
HACKLINK= ${TRUEPORTNAME}
2014-06-29 06:36:43 +00:00
DATADIR= ${PREFIX}/${HACKDIR}
DOCSDIR= ${PREFIX}/share/doc/${HACKNAME}
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
.if !defined(PKGNAMESUFFIX)
USE_XORG= xaw xpm
GRAPHICS= X11_GRAPHICS
.else
.if ${PKGNAMESUFFIX} == "-nox11"
GRAPHICS= # none
#
# 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
.if defined(WITH_MENUCOLORS)
PATCHFILES+= nh343-menucolor.diff
PATCH_SITES+= http://bilious.alt.org/~paxed/nethack/
PATCH_DIST_STRIP= -p1
CFLAGS+= -DMENU_COLOR_REGEX_POSIX
.endif
.if defined(WITH_STATUSCOLORS)
PATCHFILES+= nh343-statuscolors.fixed.patch
PATCH_SITES+= http://jdc.koitsu.org/nethack/ \
LOCAL/wxs
PATCH_DIST_STRIP= -p1
.endif
.if defined(WITH_HPMON)
PATCHFILES+= hpmon.diff
PATCH_SITES+= http://www.netsonic.fi/~walker/nh/ \
LOCAL/wxs
PATCH_DIST_STRIP= -p1
CFLAGS+= -DHPMON
.endif
.endif
.endif
OPTIONS_DEFINE= DOCS
.include <bsd.port.pre.mk>
.include <bsd.port.options.mk>
.if !exists(${PREFIX}/bin/${HACKLINK}) && ${HACKNAME} != ${HACKLINK}
PLIST_SUB+= HACKLINK=""
.else
PLIST_SUB+= HACKLINK="@comment "
.endif
pre-everything::
@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
post-patch:
@${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' \
-e 's|%%HACKEXT%%|${HACKEXT}|g' \
2014-06-29 06:36:43 +00:00
${WRKSRC}/${f}
.endfor
.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
.if defined(WITHOUT_SHELL)
@${REINPLACE_CMD} -e 's|#define SHELL|/* #define SHELL|' ${WRKSRC}/include/unixconf.h
.endif
.if defined(WITH_MAIL)
@${REINPLACE_CMD} -e 's|/\* #define MAIL \*/|#define MAIL|' ${WRKSRC}/include/unixconf.h
.endif
2014-06-29 06:36:43 +00:00
do-configure:
@cd ${WRKSRC}/sys/unix; ${SH} setup.sh
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:
.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
.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
.include <bsd.port.post.mk>