Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jul 2006 21:18:43 +0200 (CEST)
From:      Ed Schouten <ed@fxq.nl>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/100928: [games/openttd] Uncripple the Makefile and remove useless warnings when removing data directory
Message-ID:  <200607271918.k6RJIhjD023376@zonk.fxq.nl>
Resent-Message-ID: <200607271920.k6RJK8Uv067703@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 27 19:20:08 GMT 2006
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607271918.k6RJIhjD023376>