summaryrefslogtreecommitdiff
path: root/games/nethack34/Makefile
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2002-05-14 20:00:25 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2002-05-14 20:00:25 +0000
commitcbc10a11c137d58b1b8e169bef88084fcd4a67b4 (patch)
treedb55c075dd286ff148e5d01e1607560b85391c05 /games/nethack34/Makefile
parentRename nethack ports and put version numbers in the port names. (diff)
Update to nethack 3.4.0 after repocopying from nethack33{,-*}.
Unify the variant ports and make them slave ports of the master port, nethack34. Unbreak nethack34-gnome. PR: ports/36576, ports/36880 Submitted by: KATO Tsuguru <tkato@prontomail.com>, Jan Stocker <Jan.Stocker@t-online.de> (MAINTAINER of -gnome)
Notes
Notes: svn path=/head/; revision=59098
Diffstat (limited to 'games/nethack34/Makefile')
-rw-r--r--games/nethack34/Makefile63
1 files changed, 54 insertions, 9 deletions
diff --git a/games/nethack34/Makefile b/games/nethack34/Makefile
index ea19b7314b8f..06f91c14c1d6 100644
--- a/games/nethack34/Makefile
+++ b/games/nethack34/Makefile
@@ -6,29 +6,74 @@
#
PORTNAME= nethack
-PORTVERSION= 3.3.1
-CATEGORIES= games
+PORTVERSION= 3.4.0
+CATEGORIES?= games
MASTER_SITES= ftp://ftp.nethack.org/pub/nethack/nh${PORTVERSION:S/.//g}/src/
-MASTER_SITE_SUBDIR= nethack
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.//g}
EXTRACT_SUFX= .tgz
-MAINTAINER= dscheidt@enteract.com
+MAINTAINER?= dscheidt@enteract.com
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-USE_XPM= yes
+
USE_GMAKE= yes
+MAKE_ENV= CXX="${CXX}" GRAPHICS="${GRAPHICS}"
+
MAN6= dgn_comp.6 dlb.6 lev_comp.6 nethack.6 recover.6
+.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:
+ @${PERL} -pi -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/include/config.h
+ @${PERL} -pi -e 's|<regex.h>|<gnuregex.h>|g' ${WRKSRC}/src/sounds.c
+ @${PERL} -pi -e 's|<malloc.h>|<stdlib.h>|g' ${WRKSRC}/win/Qt/qt_win.cpp
+
pre-configure:
@cd ${WRKSRC}/sys/unix; ${SH} setup.sh
post-install:
- @cd ${WRKSRC}/doc; ${CHMOD} 644 *.6
- @cd ${WRKSRC}/doc; PREFIX=${PREFIX} ${MAKE} manpages
+ @cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${MAKE} manpages
.if !defined(NOPORTDOCS)
- ${MKDIR} ${PREFIX}/share/doc/nethack
- ${CP} ${WRKSRC}/doc/Guidebook.txt ${PREFIX}/share/doc/nethack
+ @${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/Guidebook.txt ${DOCSDIR}
.endif
.include <bsd.port.mk>