90 lines
2.5 KiB
Text
90 lines
2.5 KiB
Text
# $NetBSD: Makefile.common,v 1.44 2022/04/24 22:21:33 tnn Exp $
|
|
#
|
|
# used by games/nethack/Makefile
|
|
# used by games/nethack-lib/Makefile
|
|
# used by games/nethack-x11/Makefile
|
|
# used by games/nethack-tty/Makefile
|
|
#
|
|
# System-provided variables:
|
|
#
|
|
# GAMEPERM
|
|
# The desired owner and the file mode of game executables.
|
|
#
|
|
|
|
NETHACK_BASEVER= 3.6.6
|
|
NETHACK_VERSION= ${NETHACK_BASEVER}
|
|
NETHACK_DISTVER= ${NETHACK_BASEVER:S/.//g}
|
|
NETHACK_DIR= nethackdir${NETHACK_SAVEVER:S/.//g}
|
|
|
|
# The oldest compatible version of save files. Only change this when
|
|
# the upstream breaks save file compatibility.
|
|
NETHACK_SAVEVER= 3.6.0
|
|
|
|
DISTNAME= nethack-${NETHACK_DISTVER}-src
|
|
CATEGORIES= games
|
|
MASTER_SITES= https://www.nethack.org/download/${NETHACK_BASEVER}/
|
|
EXTRACT_SUFX= .tgz
|
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
|
HOMEPAGE= https://www.nethack.org/
|
|
LICENSE= nethack-license
|
|
|
|
MAKE_JOBS_SAFE= no
|
|
|
|
.if !defined(META_PACKAGE)
|
|
|
|
WRKSRC= ${WRKDIR}/NetHack-NetHack-${NETHACK_BASEVER}_Released
|
|
HAS_CONFIGURE= yes
|
|
CONFIGURE_SCRIPT= ./sys/unix/setup.sh
|
|
USE_TOOLS+= gzip yacc lex awk
|
|
|
|
.include "../../mk/curses.buildlink3.mk"
|
|
.include "../../mk/termcap.buildlink3.mk"
|
|
|
|
OPSYSVARS+= NETHACK_OS
|
|
NETHACK_OS.Linux= SYSV
|
|
NETHACK_OS.*= BSD
|
|
|
|
SUBST_CLASSES+= os
|
|
SUBST_MESSAGE.os= Configuring for ${NETHACK_OS}
|
|
SUBST_STAGE.os= pre-configure
|
|
SUBST_FILES.os= include/unixconf.h
|
|
SUBST_VARS.os= VARDIR NETHACK_OS
|
|
|
|
SUBST_CLASSES+= configh
|
|
SUBST_STAGE.configh= pre-configure
|
|
SUBST_FILES.configh= include/config.h
|
|
SUBST_VARS.configh= HACKDIR
|
|
SUBST_SED.configh= -e "s|@GZIP_PROGRAM@|${GZIP_CMD:[1]}|g"
|
|
|
|
USE_GAMESGROUP= yes
|
|
NETHACK_USER= ${GAMES_USER}
|
|
NETHACK_GROUP= ${GAMES_GROUP}
|
|
BUILD_DEFS+= GAMES_USER GAMES_GROUP
|
|
GAMEPERM= ${NETHACK_USER} ${NETHACK_GROUP} 2555
|
|
|
|
BUILD_DEFS+= VARBASE
|
|
HACKDIR= ${PREFIX}/share/${NETHACK_DIR}
|
|
VARDIR= ${VARBASE}/games/nethack${NETHACK_SAVEVER:S/.//g}
|
|
|
|
MAKE_ENV+= HACKDIR=${HACKDIR}
|
|
MAKE_ENV+= VARDIR=${VARDIR}
|
|
MAKE_ENV+= INSTALL_DATA=${INSTALL_DATA:Q}
|
|
MAKE_ENV+= INSTALL_SCRIPT=${INSTALL_SCRIPT:Q}
|
|
MAKE_ENV+= INSTALL_PROGRAM=${INSTALL_PROGRAM:Q}
|
|
|
|
WINTTYLIB= -L${BUILDLINK_PREFIX.termcap}/lib \
|
|
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.termcap}/lib \
|
|
-l${BUILDLINK_LIBNAME.termcap}
|
|
MAKE_ENV+= WINTTYLIB=${WINTTYLIB:Q}
|
|
|
|
CHECK_PORTABILITY_SKIP+= sys/unix/hints/macosx.sh
|
|
|
|
pre-configure:
|
|
${RUN}${CHMOD} 755 ${WRKSRC}/sys/unix/setup.sh
|
|
|
|
# Substitute NETHACK_DIR in PLIST.
|
|
PLIST_SUBST+= NETHACK_DIR=${NETHACK_DIR}
|
|
PRINT_PLIST_AWK+= { gsub(/${NETHACK_DIR}/, "$${NETHACK_DIR}"); }
|
|
|
|
.endif # !defined(META_PACKAGE)
|