From owner-freebsd-ports-bugs@FreeBSD.ORG Mon May 19 01:20:02 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02A34106566C for ; Mon, 19 May 2008 01:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D06F38FC0C for ; Mon, 19 May 2008 01:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m4J1K1qo032778 for ; Mon, 19 May 2008 01:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m4J1K1r7032777; Mon, 19 May 2008 01:20:01 GMT (envelope-from gnats) Resent-Date: Mon, 19 May 2008 01:20:01 GMT Resent-Message-Id: <200805190120.m4J1K1r7032777@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dmitry Marakasov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B205106566B for ; Mon, 19 May 2008 01:13:27 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from cp65.agava.net (cp65.agava.net [89.108.66.215]) by mx1.freebsd.org (Postfix) with ESMTP id F05288FC0A for ; Mon, 19 May 2008 01:13:26 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from [213.148.20.85] (helo=hive.panopticon) by cp65.agava.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1Jxu2Q-000CVT-DE for FreeBSD-gnats-submit@freebsd.org; Mon, 19 May 2008 05:19:42 +0400 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 88B59B017 for ; Mon, 19 May 2008 05:13:34 +0400 (MSD) Received: by hades.panopticon (Postfix, from userid 1000) id 110921702D; Mon, 19 May 2008 05:13:17 +0400 (MSD) Message-Id: <20080519011317.110921702D@hades.panopticon> Date: Mon, 19 May 2008 05:13:17 +0400 (MSD) From: Dmitry Marakasov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/123806: [PATCH] games/openastromenace: fix build with CMake 2.6, sanitize port X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dmitry Marakasov List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2008 01:20:02 -0000 >Number: 123806 >Category: ports >Synopsis: [PATCH] games/openastromenace: fix build with CMake 2.6, sanitize port >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Mon May 19 01:20:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Dmitry Marakasov >Release: FreeBSD 7.0-RELEASE-p1 i386 >Organization: >Environment: System: FreeBSD hades.panopticon 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #0: Fri Apr 25 11:18:45 MSD 2008 root@hades.panopticon:/usr/obj/usr/src/sys/HADES i386 >Description: * Patch CMakeLists.txt so this builds with new CMake 2.6 * Remove useless DATA and SRC knobs * Improve language knobs handling * Make game run without need so specify --dir argument, thus remove pkg-message * Other minor improvements to the port >How-To-Repeat: >Fix: --- openastromenace.patch begins here --- diff -ruN openastromenace.orig/Makefile openastromenace/Makefile --- openastromenace.orig/Makefile 2008-05-19 04:35:40.080764974 +0400 +++ openastromenace/Makefile 2008-05-19 05:07:31.386478689 +0400 @@ -7,90 +7,65 @@ PORTNAME= openastromenace PORTVERSION= 1.2.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= games MASTER_SITES= SF +DISTFILES= oamenace-src-${PORTVERSION}${EXTRACT_SUFX} \ + oamenace-data-${PORTVERSION}${EXTRACT_SUFX} \ + oamenace-lang-${LANGPACK}-${PORTVERSION}${EXTRACT_SUFX} MAINTAINER= proler@gmail.com COMMENT= Hardcore 3D space shooter with spaceship upgrade possibilities +BUILD_DEPENDS= ${CMAKE}:${PORTSDIR}/devel/cmake +LIB_DEPENDS+= vorbisfile:${PORTSDIR}/audio/libvorbis \ + jpeg:${PORTSDIR}/graphics/jpeg \ + openal:${PORTSDIR}/audio/openal \ + alut:${PORTSDIR}/audio/freealut + USE_BZIP2= yes -USE_GL= yes +USE_GL= gl glu WANT_SDL= yes USE_SDL= sdl +CMAKE?= ${LOCALBASE}/bin/cmake CMAKE_ARGS= -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_C_COMPILER:STRING='${CC}' \ - -DCMAKE_CXX_COMPILER:STRING=${CXX} \ + -DCMAKE_C_COMPILER:STRING="${CC}" \ + -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \ + -DCMAKE_CXX_COMPILER:STRING="${CXX}" \ -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \ - -DCMAKE_INSTALL_PREFIX=${PREFIX} - -SUB_FILES= pkg-message - -BUILD_DEPENDS+= ${LOCALBASE}/bin/cmake:${PORTSDIR}/devel/cmake \ + -DCMAKE_INSTALL_PREFIX="${PREFIX}" -LIB_DEPENDS+= vorbisfile:${PORTSDIR}/audio/libvorbis \ - jpeg:${PORTSDIR}/graphics/jpeg \ - openal:${PORTSDIR}/audio/openal \ - alut:${PORTSDIR}/audio/freealut \ - -OPTIONS= SRC "build src" on \ - DATA "install data file" on \ - EN " en lang" on \ - DE " de lang " on \ - RU " ru lang " on \ +OPTIONS= EN "English language pack" on \ + DE "German language pack" off \ + RU "Russian language pack" off .include -.undef DISTFILES -.if defined(WITH_SRC) -DISTFILES+=oamenace-src-${PORTVERSION}.tar.bz2 +.if !defined(WITHOUT_EN) +LANGPACK= en +.elif defined(WITH_DE) +LANGPACK= de +.elif defined(WITH_RU) +LANGPACK= ru .else -NO_BUILD= yes -.endif -.if defined(WITH_DATA) -DISTFILES+=oamenace-data-${PORTVERSION}.tar.bz2 -.endif -.if defined(WITH_EN) -DISTFILES+=oamenace-lang-en-${PORTVERSION}.tar.bz2 -.endif -.if defined(WITH_DE) -DISTFILES+=oamenace-lang-de-${PORTVERSION}.tar.bz2 -.endif -.if defined(WITH_RU) -DISTFILES+=oamenace-lang-ru-${PORTVERSION}.tar.bz2 +IGNORE= cannot be build without/with multiple language packs. Please rerun 'make config' and select single language pack .endif +post-patch: + ${REINPLACE_CMD} -e 's|/usr/local/share/openastromenace|${DATADIR}|' \ + ${WRKSRC}/AstroMenaceSource/Main.cpp + do-configure: -.if defined(WITH_SRC) - @(cd ${WRKSRC}; \ - ${LOCALBASE}/bin/cmake ${CMAKE_ARGS} ${PATCH_WRKSRC}) -.endif + @cd ${WRKSRC} && ${CMAKE} . ${CMAKE_ARGS} do-install: -.if defined(WITH_SRC) ${INSTALL_PROGRAM} ${WRKSRC}/AstroMenace ${PREFIX}/bin -.endif ${MKDIR} ${DATADIR} -.if defined(WITH_DATA) ${INSTALL_DATA} ${WRKDIR}/gamedata.vfs ${DATADIR}/ ${MKDIR} ${DATADIR}/DATA/SCRIPT ${INSTALL_DATA} ${WRKDIR}/DATA/SCRIPT/* ${DATADIR}/DATA/SCRIPT -.endif -.if defined(WITH_EN) - ${INSTALL_DATA} ${WRKDIR}/gamelang_en.vfs ${DATADIR}/ - ${LN} -sf ${DATADIR}/gamelang_en.vfs ${DATADIR}/gamelang.vfs -.endif -.if defined(WITH_DE) - ${INSTALL_DATA} ${WRKDIR}/gamelang_de.vfs ${DATADIR}/ - ${LN} -sf ${DATADIR}/gamelang_de.vfs ${DATADIR}/gamelang.vfs -.endif -.if defined(WITH_RU) - ${INSTALL_DATA} ${WRKDIR}/gamelang_ru.vfs ${DATADIR}/ - ${LN} -sf ${DATADIR}/gamelang_ru.vfs ${DATADIR}/gamelang.vfs -.endif - -post-install: - @${CAT} ${PKGMESSAGE} + ${INSTALL_DATA} ${WRKDIR}/gamelang_${LANGPACK}.vfs \ + ${DATADIR}/gamelang.vfs .include diff -ruN openastromenace.orig/files/patch-AstroMenaceSource-Main.cpp openastromenace/files/patch-AstroMenaceSource-Main.cpp --- openastromenace.orig/files/patch-AstroMenaceSource-Main.cpp 1970-01-01 03:00:00.000000000 +0300 +++ openastromenace/files/patch-AstroMenaceSource-Main.cpp 2008-05-19 05:03:02.687044264 +0400 @@ -0,0 +1,39 @@ +--- AstroMenaceSource/Main.cpp.orig 2007-09-23 00:51:32.000000000 +0400 ++++ AstroMenaceSource/Main.cpp 2008-05-19 04:59:05.387115362 +0400 +@@ -312,35 +312,7 @@ + const char* key = "HOME"; + const char* homeval = getenv(key); + +- bool dirpresent = false; +- for (int i=1; iRelease-Note: >Audit-Trail: >Unformatted: