From ed@zonk.fxq.nl  Thu Jul 27 19:18:54 2006
Return-Path: <ed@zonk.fxq.nl>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9C0AC16A4DA
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 27 Jul 2006 19:18:54 +0000 (UTC)
	(envelope-from ed@zonk.fxq.nl)
Received: from swip.net (mailfe10.swip.net [212.247.155.33])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E5D2643D66
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 27 Jul 2006 19:18:50 +0000 (GMT)
	(envelope-from ed@zonk.fxq.nl)
Received: from [83.180.59.125] (HELO zonk.fxq.nl)
  by mailfe10.swip.net (CommuniGate Pro SMTP 5.0.8)
  with ESMTPS id 74262089 for FreeBSD-gnats-submit@freebsd.org; Thu, 27 Jul 2006 21:18:49 +0200
Received: from zonk.fxq.nl (localhost [127.0.0.1])
	by zonk.fxq.nl (8.13.6/8.13.6) with ESMTP id k6RJIiKg023377
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 27 Jul 2006 21:18:44 +0200 (CEST)
	(envelope-from ed@zonk.fxq.nl)
Received: (from ed@localhost)
	by zonk.fxq.nl (8.13.6/8.13.6/Submit) id k6RJIhjD023376;
	Thu, 27 Jul 2006 21:18:43 +0200 (CEST)
	(envelope-from ed)
Message-Id: <200607271918.k6RJIhjD023376@zonk.fxq.nl>
Date: Thu, 27 Jul 2006 21:18:43 +0200 (CEST)
From: Ed Schouten <ed@fxq.nl>
Reply-To: Ed Schouten <ed@fxq.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [games/openttd] Uncripple the Makefile and remove useless warnings when removing data directory
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         100928
>Category:       ports
>Synopsis:       [games/openttd] Uncripple the Makefile and remove useless warnings when removing data directory
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    danfe
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 27 19:20:08 GMT 2006
>Closed-Date:    Wed Nov 29 22:57:31 GMT 2006
>Last-Modified:  Wed Nov 29 23:00:21 GMT 2006
>Originator:     Ed Schouten
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD zonk.fxq.nl 6.1-STABLE FreeBSD 6.1-STABLE #0: Sat Jul 15 23:07:29 CEST 2006 root@zonk.fxq.nl:/usr/obj/usr/src/sys/ZONK i386
>Description:
The current Makefile of the OpenTTD port is quite broken. There are
variable assignments inside make target definitions. This prevents you
from using the WITH_* switches.

The plist also has some @dirrm's that will cause warnings on deletion
when the user as the data files installed.
>How-To-Repeat:
Try to compile OpenTTD with WITH_MIDI_PLAYER defined. This will fail.
Removing an installation of OpenTTD with the data files installed will
cause warnings.
>Fix:
Apply the following patch:

%%%
--- games/openttd/Makefile	Fri Jun 16 06:45:44 2006
+++ games/openttd/Makefile	Thu Jul 27 21:14:38 2006
@@ -20,17 +20,21 @@
 
 USE_GMAKE=	yes
 
+.if defined(WITH_MIDI_PLAYER)
+MAKE_ARGS+=	MIDI=${WITH_MIDI_PLAYER}
+.endif
+.if defined(WITH_DEDICATED_SERVER_ONLY)
+MAKE_ARGS+=	DEDICATED=1
+.else
+USE_SDL=	sdl
+.endif
+
 pre-everything::
 .if !defined(WITH_MIDI_PLAYER)
 	@${ECHO_MSG} "Define WITH_MIDI_PLAYER=/path/to/player to build with external MIDI player"
-.else
-MAKE_ARGS+=	MIDI=${WITH_MIDI_PLAYER}
 .endif
 .if !defined(WITH_DEDICATED_SERVER_ONLY)
 	@${ECHO_MSG} "Define WITH_DEDICATED_SERVER_ONLY to build CLI-based dedicated server"
-USE_SDL=	sdl
-.else
-MAKE_ARGS+=	DEDICATED=1
 .endif
 
 post-extract:
--- games/openttd/pkg-plist	Tue Feb  7 14:16:07 2006
+++ games/openttd/pkg-plist	Thu Jul 27 21:14:38 2006
@@ -6,7 +6,7 @@
 %%DATADIR%%/data/openttd.grf
 %%DATADIR%%/data/opntitle.dat
 %%DATADIR%%/data/trkfoundw.grf
-@dirrm %%DATADIR%%/data
+@dirrmtry %%DATADIR%%/data
 %%DATADIR%%/lang/american.lng
 %%DATADIR%%/lang/brazilian_portuguese.lng
 %%DATADIR%%/lang/catalan.lng
@@ -32,7 +32,7 @@
 %%DATADIR%%/lang/swedish.lng
 %%DATADIR%%/lang/turkish.lng
 @dirrm %%DATADIR%%/lang
-@dirrm %%DATADIR%%
+@dirrmtry %%DATADIR%%
 %%PORTDOCS%%%%DOCSDIR%%/Howto_compile_lng_files_from_CLI.txt
 %%PORTDOCS%%%%DOCSDIR%%/Manual.txt
 %%PORTDOCS%%%%DOCSDIR%%/console.txt
%%%
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->danfe 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Jul 27 19:20:20 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100928 

From: Dmitry Marakasov <amdmi3@mail.ru>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/100928: [games/openttd] Uncripple the Makefile and remove useless warnings when removing data directory
Date: Thu, 27 Jul 2006 23:49:06 +0400

 * Ed Schouten (ed@fxq.nl) wrote:
 > The plist also has some @dirrm's that will cause warnings on deletion
 > when the user as the data files installed.
 @dirrm's should stay, since warnings are absolutely correct. These will
 also remind you that data should be deleted when removing openttd.
 
 -- 
 Best regards,
  Dmitry                          mailto:amdmi3@mail.ru
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Wed Nov 29 22:43:23 UTC 2006 
State-Changed-Why:  
Committed Makefile part, thanks. 
I agree the pkg-plist change is undesirable. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100928 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/100928: commit references a PR
Date: Wed, 29 Nov 2006 22:58:10 +0000 (UTC)

 pav         2006-11-29 22:56:41 UTC
 
   FreeBSD ports repository
 
   Modified files:
     games/openttd        Makefile 
   Added files:
     games/openttd/files  pkg-message.in 
   Removed files:
     games/openttd        pkg-message 
   Log:
   - Fix WITH_MIDI_PLAYER option (mixing of variable assignments and targets)
   
   PR:             ports/100928
   Submitted by:   Ed Schouten <ed@fxq.nl>
   Approved by:    maintainer timeout (4 months)
   
   - Add desktop entry
   
   PR:             ports/104069
   Submitted by:   Pawel Pekala <c0rn@o2.pl>
   Approved by:    maintainer timeout (1,5 month)
   
   - Modernize pkg-message handling, style
   
   Revision  Changes    Path
   1.12      +22 -17    ports/games/openttd/Makefile
   1.1       +16 -0     ports/games/openttd/files/pkg-message.in (new)
   1.2       +0 -16     ports/games/openttd/pkg-message (dead)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
