From 9d9badc2cde336b867b914dcddd688ea15c4e077 Mon Sep 17 00:00:00 2001 From: joerg Date: Fri, 21 Feb 2014 20:25:27 +0000 Subject: Fix build with Clang. Use normal cmake rules. --- games/flare-engine/Makefile | 31 ++----------------------- games/flare-engine/distinfo | 3 ++- games/flare-engine/patches/patch-CMakeLists.txt | 21 +++++++++++++++++ 3 files changed, 25 insertions(+), 30 deletions(-) create mode 100644 games/flare-engine/patches/patch-CMakeLists.txt (limited to 'games') diff --git a/games/flare-engine/Makefile b/games/flare-engine/Makefile index 6923faed4d4..3dcc4121fbc 100644 --- a/games/flare-engine/Makefile +++ b/games/flare-engine/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2014/02/02 23:19:51 rodent Exp $ +# $NetBSD: Makefile,v 1.2 2014/02/21 20:25:27 joerg Exp $ # DISTNAME= v0.19 @@ -16,37 +16,10 @@ WRKSRC= ${WRKDIR}/${PKGNAME_NOREV} USE_LANGUAGES= c c++ USE_CMAKE= yes -CMAKE_ARGS+= -DCMAKE_INSTALL_PREFIX:STRING="${DESTDIR}${PREFIX}" -DMANDIR=man -CMAKE_ARGS+= -DDATADIR:STRING="${PREFIX}/share/flare" -DBINDIR=bin - -SUBST_CLASSES+= paths -SUBST_FILES.paths= CMakeLists.txt build/cmake_install.cmake src/Settings.cpp -SUBST_FILES.paths+= build/CMakeFiles/flare.dir/DependInfo.cmake -SUBST_FILES.paths+= build/CMakeFiles/flare.dir/flags.make -SUBST_FILES.paths+= build/CMakeCache.txt -SUBST_MESSAGE.paths= Fixing paths. -SUBST_SED.paths= -e "s|/usr/local/games|${PREFIX}/bin|g" -SUBST_SED.paths+= -e "s|/usr/local|${PREFIX}|g" -SUBST_SED.paths+= -e 's|share/games|share|g' -SUBST_SED.paths+= -e 's|/games|/bin|1' -SUBST_SED.paths+= -e "s|share/man|${PKGMANDIR}|1" -SUBST_SED.paths+= -e 's|BINDIR:STRING=games|BINDIR:STRING=bin|1' -SUBST_STAGE.paths= post-configure +CMAKE_ARGS+= -DDATADIR:STRING="${PREFIX}/share/flare" -DBINDIR:STRING=bin -DMANDIR:STRING=${PKGMANDIR} REPLACE_PYTHON+= mods/default/languages/xgettext.py -pre-configure: - cd ${WRKSRC} && ${MKDIR} build - -do-configure: - cd ${WRKSRC}/build && ${SETENV} ${CONFIGURE_ENV} ${CMAKE} .. - -do-build: - cd ${WRKSRC}/build && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} - -do-install: - cd ${WRKSRC}/build && ${SETENV} ${INSTALL_ENV} ${MAKE_PROGRAM} ${INSTALL_TARGET} - .include "../../lang/python/application.mk" .include "../../mk/pthread.buildlink3.mk" .include "../../audio/SDL_mixer/buildlink3.mk" diff --git a/games/flare-engine/distinfo b/games/flare-engine/distinfo index 50617eef909..359dd974b4f 100644 --- a/games/flare-engine/distinfo +++ b/games/flare-engine/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.1 2014/02/02 23:19:51 rodent Exp $ +$NetBSD: distinfo,v 1.2 2014/02/21 20:25:27 joerg Exp $ SHA1 (flare-engine/v0.19.tar.gz) = ec33aaf68738d7422fdada5599bb7c001abd5ed3 RMD160 (flare-engine/v0.19.tar.gz) = 0799e2b0ac9b4a07c6215c2f213efe0c48e1229c Size (flare-engine/v0.19.tar.gz) = 544468 bytes +SHA1 (patch-CMakeLists.txt) = 5c4d0f4b33c7ef4896911d1c2cbf9389033336c7 diff --git a/games/flare-engine/patches/patch-CMakeLists.txt b/games/flare-engine/patches/patch-CMakeLists.txt new file mode 100644 index 00000000000..bfeed4ae5ce --- /dev/null +++ b/games/flare-engine/patches/patch-CMakeLists.txt @@ -0,0 +1,21 @@ +$NetBSD: patch-CMakeLists.txt,v 1.1 2014/02/21 20:25:27 joerg Exp $ + +--- CMakeLists.txt.orig 2013-12-02 20:48:13.000000000 +0000 ++++ CMakeLists.txt +@@ -11,14 +11,11 @@ if (NOT MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-math-errno -fno-exceptions") + if (NOT CMAKE_CXX_COMPILER MATCHES "clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math") ++ set(CMAKE_LD_FLAGS "-fwhole-program") + endif (NOT CMAKE_CXX_COMPILER MATCHES "clang") +- set(CMAKE_LD_FLAGS "-fwhole-program") + endif (NOT MSVC) + +-if (CMAKE_CXX_COMPILER MATCHES "clang") +- # clang needs lstdc++ linked explicitly: +- set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -lstdc++") +-elseif () ++if (NOT CMAKE_CXX_COMPILER MATCHES "clang") + # assume gcc: + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-enforce-eh-specs") + endif () -- cgit v1.2.3