freebsd-ports/games/scourge/Makefile
Mark Linimon c1a541e10b Conditionalize compiler flags that are specific to clang to fix errors
of the following forms on GCC-based architectures:

  cc1plus: error: unrecognized command line option "-Wno-c++11-narrowing"
  cc1plus: error: unrecognized command line option "-Wno-reserved-user-defined-literal"
  cc1plus: warning: unrecognized command line option '-Wno-error-narrowing'

Approved by:	portmgr (tier-2 blanket)
2019-04-04 17:38:10 +00:00

42 lines
1.1 KiB
Makefile

# Created by: Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe>
# $FreeBSD$
PORTNAME= scourge
PORTVERSION= 0.21.1
PORTREVISION= 13
CATEGORIES= games
MASTER_SITES= SF
DISTNAME= ${PORTNAME}-${PORTVERSION:S/$/.src/}
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= ports@FreeBSD.org
COMMENT= Rogue-like game
LIB_DEPENDS= libfreetype.so:print/freetype2
RUN_DEPENDS= ${LOCALBASE}/${DATADIR_REL}/config/scourge.cfg:games/scourge-data
USES= autoreconf compiler gettext gmake localbase
GNU_CONFIGURE= yes
USE_GL= gl
USE_SDL= sdl image mixer net ttf
CXXFLAGS+= ${CXXFLAGS_${CHOSEN_COMPILER_TYPE}}
CXXFLAGS_clang= -Wno-c++11-narrowing
CONFIGURE_ARGS= --with-data-dir=${DATADIR}
SUB_FILES= pkg-message
PLIST_FILES= bin/${PORTNAME}
WRKSRC= ${WRKDIR}/${PORTNAME}
OPTIONS_DEFINE= DEBUG
DEBUG_CONFIGURE_ENABLE= debug
post-patch:
@${REINPLACE_CMD} -e 's|GLvoid|void|g' ${WRKSRC}/src/sdlhandler.cpp ${WRKSRC}/src/sdlhandler.h
@${REINPLACE_CMD} -e 's|\([^a-z_]\)type(|\1squirrel_type(|g' ${WRKSRC}/src/squirrel/*.cpp ${WRKSRC}/src/squirrel/*.h
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
.include <bsd.port.mk>