[BACK]Return to Makefile.common CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / games / nethack-lib

File: [cvs.NetBSD.org] / pkgsrc / games / nethack-lib / Makefile.common (download)

Revision 1.34, Sun Jan 14 15:26:48 2018 UTC (2 years, 4 months ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2018Q1-base, pkgsrc-2018Q1
Changes since 1.33: +3 -3 lines

pkgsrc doesn't support PREFIX with spaces or other special characters.
Therefore it is not necessary to add the :Q modifier to this variable
and several others.

pkglint -r -Wall --autofix --only :Q

# $NetBSD: Makefile.common,v 1.34 2018/01/14 15:26:48 rillig Exp $
#
# used by games/nethack/Makefile
# used by games/nethack-lib/Makefile
# used by games/nethack-x11/Makefile
# used by games/nethack-tty/Makefile

NETHACK_BASEVER=	3.4.3
NETHACK_VERSION=	${NETHACK_BASEVER}
NETHACK_DISTVER=	${NETHACK_BASEVER:S/.//g}
NETHACK_DIR=		nethackdir340

DISTNAME=		nethack-${NETHACK_DISTVER}-src
CATEGORIES=		games
MASTER_SITES=		${MASTER_SITE_SOURCEFORGE:=nethack/${NETHACK_BASEVER}/}
EXTRACT_SUFX=		.tgz

MAINTAINER=		pooka@NetBSD.org
HOMEPAGE=		http://www.nethack.org/
LICENSE=		nethack-license

MAKE_JOBS_SAFE=		no

.if !defined(META_PACKAGE)

WRKSRC=			${WRKDIR}/nethack-${NETHACK_BASEVER}
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"

SUBST_CLASSES+=		ttylib
SUBST_MESSAGE.ttylib=	Configuring to use correct termcap library
SUBST_STAGE.ttylib=	pre-configure
SUBST_FILES.ttylib=	sys/unix/Makefile.src
SUBST_SED.ttylib=	-e 's!^WINTTYLIB = -ltermlib!WINTTYLIB = -L${BUILDLINK_PREFIX.termcap}/lib ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.termcap}/lib -l${BUILDLINK_LIBNAME.termcap}!'

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_SED.os=		-e 's,__NETHACK_OS__,${NETHACK_OS},'

SUBST_CLASSES+=		configh
SUBST_STAGE.configh=	pre-configure
SUBST_FILES.configh=	include/config.h
SUBST_VARS.configh=	PREFIX
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

GAMEDIR=		${PREFIX}/share/${NETHACK_DIR}
VARDIR=			/var/games/nethack340
MAKE_ENV+=		GAMEDIR=${GAMEDIR}
MAKE_ENV+=		VARDIR=${VARDIR}

pre-configure:
	@${CHMOD} 755 ${WRKSRC}/sys/unix/setup.sh

.endif # !NO_BUILD