freebsd-ports/games/keeperrl/Makefile
Jan Beich 8bcfb2d1c5 games/keeperrl: unbreak with GCC
On WITHOUT_CLANG_IS_CC architectures:
g++7 -x c++-header stdafx.h -MMD -O2 -pipe  -fstack-protector -Wl,-rpath=/usr/local/lib/gcc7 -isystem /usr/local/include -fno-strict-aliasing -Wall -std=c++1y -Wno-sign-compare -Wno-unused-variable -Wno-shift-count-overflow -Wno-tautological-constant-out-of-range-compare -Wno-mismatched-tags -ftemplate-depth=512 -DDATA_DIR=\"/usr/local/share/keeperrl\" -DRELEASE -I. -I./extern -o obj/stdafx.h.gch
stdafx.h:16:9: warning: #pragma once in main file
 #pragma once
         ^~~~
cc1plus: warning: unrecognized command line option '-Wno-mismatched-tags'
cc1plus: warning: unrecognized command line option '-Wno-tautological-constant-out-of-range-compare'
/usr/lib/crt1.o: In function `_start1':
/usr/src/lib/csu/powerpc64/crt1.c:(.text+0x156): undefined reference to `main'
collect2: error: ld returned 1 exit status

On DragonFly (in-base GCC 5.4.1):
c++ -MMD -pipe -O2 -isystem /usr/local/include -fno-strict-aliasing -Wall -std=c++1y -Wno-sign-compare -Wno-unused-variable -Wno-shift-count-overflow -Wno-tautological-constant-out-of-range-compare -Wno-mismatched-tags -ftemplate-depth=512 -DDATA_DIR=\"/usr/local/share/keeperrl\" -DRELEASE -I. -I./extern -include-pch obj/stdafx.h.gch -c attr_type.cpp -o obj/attr_type.o
cc1plus: fatal error: -pch: No such file or directory
compilation terminated.
2018-08-27 17:29:39 +00:00

55 lines
1.4 KiB
Makefile

# $FreeBSD$
PORTNAME= keeperrl
PORTVERSION= 0.0.${ALPHA_VERSION}
PORTREVISION= 2
CATEGORIES= games
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES= c0fc69cbee72.patch:-p1
MAINTAINER= ports@FreeBSD.org
COMMENT= Ambitious dungeon builder with roguelike elements
LICENSE= GPLv2 OFL11
LICENSE_COMB= multi
LICENSE_FILE_GPLv2= ${WRKSRC}/COPYING.txt
LICENSE_FILE_OFL11= ${WRKSRC}/data_contrib/SIL_Open_Font_License.txt
LIB_DEPENDS= libvorbis.so:audio/libvorbis \
libcurl.so:ftp/curl
USES= compiler:c++14-lang gmake localbase openal
USE_GITHUB= yes
GH_ACCOUNT= miki151
GH_TAGNAME= alpha${ALPHA_VERSION}
USE_GL= gl
USE_SDL= sdl2 image2
ALPHA_VERSION= 23
NO_CONFIGURE= yes
LIBS+= -lexecinfo
LLD_UNSAFE= yes
MAKE_ARGS= DATA_DIR="${DATADIR}" GCC="${CXX}" \
LDFLAGS="${LDFLAGS}" RELEASE=true
# USE_GCC adds -Wl,-rpath=${_GCC_RUNTIME} which breaks -x c++-header
MAKE_ARGS+= PCH= PCHINC=
DESKTOP_ENTRIES="KeeperRL" "" "" "keeper" \
"Game;Simulation;" false
post-patch:
@${REINPLACE_CMD} -e '/^CFLAGS =/ s|=|= ${CFLAGS}|' \
-e '/^LIBS =/ s|$$| ${LIBS}|' \
-e 's|bash|sh|' \
${WRKSRC}/Makefile
@${REINPLACE_CMD} 's|bash|sh|' ${WRKSRC}/check_serial.sh
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/keeper ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${DATADIR}
cd ${WRKSRC} && ${COPYTREE_SHARE} "data_contrib data_free" \
${STAGEDIR}${DATADIR} "! -name *License.txt"
.include <bsd.port.mk>