From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Aug 8 15:20:02 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 589B380C for ; Thu, 8 Aug 2013 15:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 36B1D2A9A for ; Thu, 8 Aug 2013 15:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r78FK0rj006486 for ; Thu, 8 Aug 2013 15:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r78FK0OB006485; Thu, 8 Aug 2013 15:20:00 GMT (envelope-from gnats) Resent-Date: Thu, 8 Aug 2013 15:20:00 GMT Resent-Message-Id: <201308081520.r78FK0OB006485@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 [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2411B2D1 for ; Thu, 8 Aug 2013 15:13:30 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [92.53.117.21]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B021B2A21 for ; Thu, 8 Aug 2013 15:13:29 +0000 (UTC) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1V7Reh-0004He-CX; Thu, 08 Aug 2013 18:57:35 +0400 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id D5347ADB; Thu, 8 Aug 2013 18:57:34 +0400 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id A445FA41; Thu, 8 Aug 2013 18:57:34 +0400 (MSK) Message-Id: <20130808145734.A445FA41@hades.panopticon> Date: Thu, 8 Aug 2013 18:57:34 +0400 (MSK) From: Dmitry Marakasov To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/181145: [PATCH] games/xrobots: fix build with clang Cc: edwin@mavetju.org X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Aug 2013 15:20:02 -0000 >Number: 181145 >Category: ports >Synopsis: [PATCH] games/xrobots: fix build with clang >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Aug 08 15:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Dmitry Marakasov >Release: FreeBSD 9.1-RELEASE-p4 amd64 >Organization: >Environment: System: FreeBSD hades.panopticon 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 #0 r251956: Tue Jun 18 21:41:37 MSK >Description: - Add bunch of patches to make it compile with clang - Rename old patches according to porter's handbook patch naming guidelines - Silence REINPLACE_CMD Port maintainer (edwin@mavetju.org) is cc'd. Generated with FreeBSD Port Tools 0.99_8 (mode: change, diff: SVN) >How-To-Repeat: >Fix: --- xrobots-1.0_3.patch begins here --- Index: Makefile =================================================================== --- Makefile (revision 324396) +++ Makefile (working copy) @@ -20,7 +20,7 @@ ${INSTALL} -c -g games -m 664 ${FILESDIR}/xrobotscores ${PREFIX}/lib/X11 post-patch: - ${REINPLACE_CMD} -e 's|__PREFIX__|${PREFIX}|g' \ + @${REINPLACE_CMD} -e 's|__PREFIX__|${PREFIX}|g' \ ${WRKSRC}/xrobots.man ${WRKSRC}/Imakefile .include Index: files/patch-aa =================================================================== --- files/patch-aa (revision 324396) +++ files/patch-aa (working copy) @@ -1,91 +0,0 @@ -*** score.c.orig Thu Jan 22 09:58:52 1998 ---- score.c Sun Apr 12 14:00:32 1998 -*************** -*** 56,61 **** ---- 56,62 ---- - - #include /* brings in */ - #include -+ #include - #include "xrobots.h" - - /*----------------------------------------------------------------------*/ -*************** -*** 67,73 **** - - static SCORE scores[MAXSCORES]; - -! void show_scores(), - write_out_scores(); - - static void new_high_score(), ---- 68,74 ---- - - static SCORE scores[MAXSCORES]; - -! static void show_scores(), - write_out_scores(); - - static void new_high_score(), -*************** -*** 110,121 **** - #ifndef SYSV - flock(scorefile->_file, LOCK_EX); - #endif -! while( fgets(scores[i].score,6,scorefile) /* get score */ -! && fgets(scores[i].name,26,scorefile) /* get name */ -! && fgetc(scorefile)) /* and newline */ -! { -! i++; -! if( i > MAXSCORES ) break; - } - } - ---- 111,123 ---- - #ifndef SYSV - flock(scorefile->_file, LOCK_EX); - #endif -! for(i = 0; i < MAXSCORES; i++) { -! if(!fgets(scores[i].score, 6, scorefile)) /* get score */ -! break; -! if(!fgets(scores[i].name, 26, scorefile)) /* get name */ -! break; -! if(!fgetc(scorefile)) /* and newline */ -! break; - } - } - -*************** -*** 194,200 **** - - - /*ARGSUSED*/ -! static XtCallbackProc - popdown_callback(w, closure, call_data) - Widget w; - caddr_t closure; ---- 196,202 ---- - - - /*ARGSUSED*/ -! static void - popdown_callback(w, closure, call_data) - Widget w; - caddr_t closure; -*************** -*** 253,259 **** - show_scores() - { - int i; -! char tmp_str[31]; - Arg tmp_arg; - - for(i = 0;ib)?a:b) -- - #define INXRANGE( _x_ ) (((_x_) >=0) && ((_x_)=0) && ((_y_) ++#include ++#include ++ + #include "xrobots.h" + + #define srandom srand +@@ -170,31 +174,31 @@ {"-scorefile","scorefile",XrmoptionSepArg, NULL }, }; @@ -36,11 +47,17 @@ }; /*----------------------------------------------------------------------*/ -@@ -205,6 +205,16 @@ - new_game_command; + main(argc, argv) +- unsigned int argc; ++ int argc; + char **argv; + { + Arg args[1]; +@@ -206,6 +210,16 @@ + srandom(getpid()); -+ + + application_resources[0].resource_offset=(Cardinal)&fg; + application_resources[1].resource_offset=(Cardinal)&bg; + application_resources[2].resource_offset=(Cardinal)&spiffy; @@ -50,6 +67,7 @@ + application_resources[6].resource_offset=(Cardinal)&diewaiting; + application_resources[7].resource_offset=(Cardinal)&translations; + application_resources[8].resource_offset=(Cardinal)&score_filename; - ++ top_shell = XtInitialize(argv[0], "xrobots", options, XtNumber(options), (int *)&argc, argv); + XtSetValues(top_shell, arglisttop_shell, XtNumber(arglisttop_shell)); Index: files/patch-xrobots.h =================================================================== --- files/patch-xrobots.h (revision 324359) +++ files/patch-xrobots.h (working copy) @@ -1,14 +1,21 @@ -*** xrobots.h.orig Fri Nov 17 14:37:40 1989 ---- xrobots.h Mon Jan 2 22:47:56 1995 -*************** -*** 146,154 **** - game_active, - sonic_used; - -- #define MIN(a,b) ((ab)?a:b) -- - #define INXRANGE( _x_ ) (((_x_) >=0) && ((_x_)=0) && ((_y_)b)?a:b) +- + #define INXRANGE( _x_ ) (((_x_) >=0) && ((_x_)=0) && ((_y_)Release-Note: >Audit-Trail: >Unformatted: