- update openttd to 1.0.3, fixing a host of security issues along the way

from Anton Yabchinskiy and Daniel Dickman

mk@ drops maintainership, any takers?
This commit is contained in:
jasper 2010-09-19 18:52:08 +00:00
parent 169104f7c0
commit 4b7f2459c3
11 changed files with 217 additions and 92 deletions

View File

@ -1,45 +1,59 @@
# $OpenBSD: Makefile,v 1.10 2010/03/01 14:13:04 espie Exp $
# $OpenBSD: Makefile,v 1.11 2010/09/19 18:52:08 jasper Exp $
COMMENT= open source clone of the game Transport Tycoon Deluxe
DISTNAME= openttd-0.6.1-source
V= 1.0.3
DISTNAME= openttd-${V}-source
PKGNAME= ${DISTNAME:S/-source//}
EXTRACT_SUFX= .tar.bz2
DIST_GFX= opengfx-0.2.4
DIST_SFX= opensfx-0.2.3
DIST_MSX= openmsx-0.3.1
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
${DIST_GFX}.tar.bz2:0 ${DIST_SFX}.zip:1 ${DIST_MSX}.zip:2
CATEGORIES= games
HOMEPAGE= http://www.openttd.com/
HOMEPAGE= http://www.openttd.org/
MAINTAINER= Michael Knudsen <mk@molioner.dk>
# GPL
# GPLv2
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c expat fontconfig freetype m pthread stdc++ z
WANTLIB= SDL c expat fontconfig freetype lzo2 m png pthread stdc++ z
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=openttd/}
MASTER_SITES= http://cz.binaries.openttd.org/openttd/binaries/releases/${V}/
MASTER_SITES0= http://bundles.openttdcoop.org/opengfx/releases/
MASTER_SITES1= http://bundles.openttdcoop.org/opensfx/releases/
MASTER_SITES2= http://bundles.openttdcoop.org/openmsx/releases/0.3.1/
LIB_DEPENDS= SDL::devel/sdl \
png.>=2::graphics/png
LIB_DEPENDS= ::archivers/lzo2 \
::devel/sdl \
::graphics/png
RUN_DEPENDS= ::devel/desktop-file-utils
CONFIGURE_STYLE= simple
CONFIGURE_ARGS+= --prefix-dir=${PREFIX} \
--install-dir=${WRKINST}
--binary-dir=bin \
--data-dir=share/openttd \
--icon-dir=share/pixmaps \
--man-dir=man/man6 \
--personal-dir=.openttd \
--install-dir=${WRKINST} \
--with-png \
--with-zlib
MAKE_ENV+= VERBOSE=1 WITH_PNG=1 \
WITH_ZLIB=1 \
DATA_DIR=share/openttd \
ICON_DIR=share/pixmaps \
BINARY_DIR=bin \
PERSONAL_DIR=.openttd
MAKE_ENV+= VERBOSE=1
USE_X11= Yes
USE_GMAKE= Yes
NO_REGRESS= Yes
WRKDIST= ${WRKDIR}/${DISTNAME:S/-source//}
WRKDIST= ${WRKDIR}/${DISTNAME:S/-source//}
DOCSDIR= ${PREFIX}/share/doc/openttd
EXAMPLESDIR= ${PREFIX}/share/examples/openttd
@ -54,5 +68,8 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/bin/scripts/* ${EXAMPLESDIR}
${INSTALL_DATA_DIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/docs/* ${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/${DIST_GFX}/*.{grf,obg} ${GAMEDIR}/data
${INSTALL_DATA} ${WRKDIR}/${DIST_SFX}/*.{cat,obs} ${GAMEDIR}/data
${INSTALL_DATA} ${WRKDIR}/${DIST_MSX}/*.{mid,obm} ${GAMEDIR}/gm
.include <bsd.port.mk>

View File

@ -1,5 +1,20 @@
MD5 (openttd-0.6.1-source.tar.bz2) = 98DxncygUc0oZBEJ15XyAg==
RMD160 (openttd-0.6.1-source.tar.bz2) = +sCIp9VM/O43aMHaWseysQuFzb4=
SHA1 (openttd-0.6.1-source.tar.bz2) = Cc8rAcBjiddeW2KT5T66sdjIs6A=
SHA256 (openttd-0.6.1-source.tar.bz2) = 19JuQfeKkE6E2/r60PVV5dKaog82iOjWhlpXpGg3CGw=
SIZE (openttd-0.6.1-source.tar.bz2) = 3690207
MD5 (opengfx-0.2.4.tar.bz2) = JZNw7iugawR5LR9XpNnkPg==
MD5 (openmsx-0.3.1.zip) = hYt51ErqbeXhXZ0UOehsww==
MD5 (opensfx-0.2.3.zip) = NgW4LyQVNQDIoYBORCAWig==
MD5 (openttd-1.0.3-source.tar.bz2) = z/YMYkkTpJHtPJFHToRXIg==
RMD160 (opengfx-0.2.4.tar.bz2) = ztaRDqmWQ28GYIN7Syq9QAGjjg8=
RMD160 (openmsx-0.3.1.zip) = jv8kbonkT2PKSA6azvlKHaX6gdI=
RMD160 (opensfx-0.2.3.zip) = QmtkG1opVWWY2KMDO0xNxbmGMM4=
RMD160 (openttd-1.0.3-source.tar.bz2) = zwv65zhMllp1XPaVdVs1BDaZGWQ=
SHA1 (opengfx-0.2.4.tar.bz2) = pFlmcX3fiFBZIYYSQLhdcieVej4=
SHA1 (openmsx-0.3.1.zip) = 6cQgOSO7nJdKxniGvQC3CQZYuWE=
SHA1 (opensfx-0.2.3.zip) = NoSA9iewVjr4DKckaVh1pKqJjbM=
SHA1 (openttd-1.0.3-source.tar.bz2) = CpxybUhCiN84gGfO7RFMUvsGgtY=
SHA256 (opengfx-0.2.4.tar.bz2) = KxhcLe0erl0YGyhzEXxzKew3U/JWB7b8UBiP3GGtASc=
SHA256 (openmsx-0.3.1.zip) = kuKTronxOtZ59DGF6D+4H7jK1H/mP0rz09n5VRMEYPU=
SHA256 (opensfx-0.2.3.zip) = aDG2UbPci0lAJvcneYmh11eWG2fBe3XTwuCXRR91rwI=
SHA256 (openttd-1.0.3-source.tar.bz2) = 9S8jgcZ43gJNJu5GXIIDMj6zSEMAxNwYLA1oxDnujFc=
SIZE (opengfx-0.2.4.tar.bz2) = 3490228
SIZE (openmsx-0.3.1.zip) = 136981
SIZE (opensfx-0.2.3.zip) = 11359588
SIZE (openttd-1.0.3-source.tar.bz2) = 5395672

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-Makefile_in,v 1.1 2008/06/19 20:40:04 mk Exp $
--- Makefile.in.orig Sat Jun 14 17:04:56 2008
+++ Makefile.in Sat Jun 14 17:06:01 2008
@@ -264,11 +264,9 @@ install: bundle
$(Q)install -d "$(INSTALL_DATA_DIR)/gm"
$(Q)install -d "$(INSTALL_DATA_DIR)/data"
$(Q)install -d "$(INSTALL_DATA_DIR)/lang"
- $(Q)install -d "$(INSTALL_DATA_DIR)/docs"
$(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)"
$(Q)install -m 644 "$(BUNDLE_DIR)/lang/"* "$(INSTALL_DATA_DIR)/lang"
$(Q)install -m 644 "$(BUNDLE_DIR)/data/"* "$(INSTALL_DATA_DIR)/data"
- $(Q)install -m 644 "$(BUNDLE_DIR)/docs/"* "$(INSTALL_DATA_DIR)/docs"
$(Q)install -m 644 "$(BUNDLE_DIR)/media/"* "$(INSTALL_ICON_DIR)"
$(Q)cp -R "$(BUNDLE_DIR)/scenario" "$(INSTALL_DATA_DIR)"
endif # OSXAPP

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-config_lib,v 1.1 2008/06/19 20:40:04 mk Exp $
--- config.lib.orig Fri Jun 13 21:24:03 2008
+++ config.lib Fri Jun 13 21:28:19 2008
@@ -26,8 +26,8 @@ set_default() {
revision=""
config_log="config.log"
prefix_dir="/usr/local"
- binary_dir="games"
- data_dir="share/games/openttd"
+ binary_dir="bin"
+ data_dir="share/openttd"
icon_dir="share/pixmaps"
personal_dir="1"
shared_dir="1"

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-src_fileio_cpp,v 1.1 2010/09/19 18:52:08 jasper Exp $
--- src/fileio.cpp.orig Mon Mar 15 18:52:39 2010
+++ src/fileio.cpp Tue Apr 6 06:00:41 2010
@@ -29,6 +29,7 @@
#endif
#include <sys/stat.h>
#include <algorithm>
+#include <unistd.h>
/*************************************************/
/* FILE IO ROUTINES ******************************/

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_music_extmidi_cpp,v 1.1 2010/09/19 18:52:08 jasper Exp $
--- src/music/extmidi.cpp.orig Sat Feb 20 16:10:58 2010
+++ src/music/extmidi.cpp Tue Apr 6 06:00:41 2010
@@ -26,7 +26,7 @@
#include <errno.h>
#ifndef EXTERNAL_PLAYER
-#define EXTERNAL_PLAYER "timidity"
+#define EXTERNAL_PLAYER "midiplay"
#endif
static FMusicDriver_ExtMidi iFMusicDriver_ExtMidi;

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-src_settings_cpp,v 1.1 2008/06/19 20:40:04 mk Exp $
--- src/settings.cpp.orig Fri Jun 13 20:09:13 2008
+++ src/settings.cpp Fri Jun 13 20:10:45 2008
@@ -1253,7 +1253,7 @@ static int32 ConvertLandscape(const char *value)
/* End - Callback Functions */
#ifndef EXTERNAL_PLAYER
-#define EXTERNAL_PLAYER "timidity"
+#define EXTERNAL_PLAYER "midiplay"
#endif
static const SettingDesc _music_settings[] = {
@@ -1262,7 +1262,7 @@ static const SettingDesc _music_settings[] = {
SDT_VAR(MusicFileSettings, effect_vol, SLE_UINT8, S, 0, 128, 0, 100, 1, STR_NULL, NULL),
SDT_LIST(MusicFileSettings, custom_1, SLE_UINT8, S, 0, NULL, STR_NULL, NULL),
SDT_LIST(MusicFileSettings, custom_2, SLE_UINT8, S, 0, NULL, STR_NULL, NULL),
- SDT_BOOL(MusicFileSettings, playing, S, 0, true, STR_NULL, NULL),
+ SDT_BOOL(MusicFileSettings, playing, S, 0, false, STR_NULL, NULL),
SDT_BOOL(MusicFileSettings, shuffle, S, 0, false, STR_NULL, NULL),
SDT_STR(MusicFileSettings, extmidi, SLE_STRB, S, 0, EXTERNAL_PLAYER, STR_NULL, NULL),
SDT_END()

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_table_settings_h,v 1.1 2010/09/19 18:52:08 jasper Exp $
--- src/table/settings.h.orig Thu Jan 28 21:47:25 2010
+++ src/table/settings.h Thu Jan 28 21:48:00 2010
@@ -224,7 +224,7 @@ static const SettingDesc _music_settings[] = {
SDT_VAR(MusicFileSettings, effect_vol, SLE_UINT8, S, 0, 127, 0, 127, 1, STR_NULL, NULL),
SDT_LIST(MusicFileSettings, custom_1, SLE_UINT8, S, 0, NULL, STR_NULL, NULL),
SDT_LIST(MusicFileSettings, custom_2, SLE_UINT8, S, 0, NULL, STR_NULL, NULL),
- SDT_BOOL(MusicFileSettings, playing, S, 0, true, STR_NULL, NULL),
+ SDT_BOOL(MusicFileSettings, playing, S, 0, false, STR_NULL, NULL),
SDT_BOOL(MusicFileSettings, shuffle, S, 0, false, STR_NULL, NULL),
SDT_END()
};

View File

@ -1,3 +1,4 @@
OpenTTD is modeled after the original Transport Tycoon game by Chris
Sawyer and enhances the game experience dramatically. Many features were
inspired by TTDPatch while others are original.
OpenTTD is an open source clone of the Microprose game "Transport
Tycoon Deluxe", a popular game originally written by Chris Sawyer.
It attempts to mimic the original game as closely as possible while
extending it with new features.

View File

@ -1,4 +1,15 @@
OpenTTD requires the original version of Transport Tycoon Deluxe data
files in order to function. Data files and music files should be placed
in ${PREFIX}/share/openttd/data and ${PREFIX}/share/openttd/gm
respectively.
OpenTTD comes with free data and music. However, if you prefer to
play with the original Transport Tycoon Deluxe data files you can
copy the following files from either the DOS or Windows versions
into ${PREFIX}/share/openttd/data:
- sample.cat
- trg1r.grf or TRG1.GRF
- trgcr.grf or TRGC.GRF
- trghr.grf or TRGH.GRF
- trgir.grf or TRGI.GRF
- trgtr.grf or TRGT.GRF
If you want the original Transport Tycoon Deluxe music, copy the
contents of the gm/ folder from the Windows version of Transport
Tycoon Deluxe to ${PREFIX}/share/openttd/gm. The music from the DOS
and original Transport Tycoon versions does not work.

View File

@ -1,10 +1,10 @@
@comment $OpenBSD: PLIST,v 1.4 2008/06/19 20:40:04 mk Exp $
@comment $OpenBSD: PLIST,v 1.5 2010/09/19 18:52:08 jasper Exp $
@bin bin/openttd
@man man/man6/openttd.6.gz
share/applications/openttd.desktop
share/doc/openttd/
share/doc/openttd/32bpp.txt
share/doc/openttd/HOWTO_compile_lang_files.txt
share/doc/openttd/Manual.txt
share/doc/openttd/OSX_install_instructions.txt
share/doc/openttd/Readme_OS2.txt
share/doc/openttd/Readme_Windows_MSVC.txt
share/doc/openttd/elrail.svg
@ -14,27 +14,104 @@ share/doc/openttd/landscape.html
share/doc/openttd/landscape_externals.html
share/doc/openttd/landscape_grid.html
share/doc/openttd/multiplayer.txt
share/doc/openttd/obg_format.txt
share/doc/openttd/obm_format.txt
share/doc/openttd/obs_format.txt
share/doc/openttd/openttd.6
share/doc/openttd/ottd-colour-palette.gif
share/doc/openttd/ottd-colourtext-palette.png
share/doc/openttd/tileh.png
share/examples/openttd/
share/examples/openttd/autoexec.scr.example
share/examples/openttd/game_start.scr.example
share/examples/openttd/on_client.scr.example
share/examples/openttd/on_dedicated.scr.example
share/examples/openttd/on_server.scr.example
share/examples/openttd/on_server_connect.scr.example
share/examples/openttd/pre_dedicated.scr.example
share/examples/openttd/pre_server.scr.example
share/examples/openttd/readme.txt
share/icons/
share/icons/hicolor/
share/icons/hicolor/128x128/
share/icons/hicolor/128x128/apps/
share/icons/hicolor/128x128/apps/openttd.png
share/icons/hicolor/16x16/
share/icons/hicolor/16x16/apps/
share/icons/hicolor/16x16/apps/openttd.png
share/icons/hicolor/256x256/
share/icons/hicolor/256x256/apps/
share/icons/hicolor/256x256/apps/openttd.png
share/icons/hicolor/32x32/
share/icons/hicolor/32x32/apps/
share/icons/hicolor/32x32/apps/openttd.png
share/icons/hicolor/48x48/
share/icons/hicolor/48x48/apps/
share/icons/hicolor/48x48/apps/openttd.png
share/icons/hicolor/64x64/
share/icons/hicolor/64x64/apps/
share/icons/hicolor/64x64/apps/openttd.png
share/openttd/
share/openttd/ai/
share/openttd/ai/compat_0.7.nut
share/openttd/ai/compat_1.0.nut
share/openttd/data/
share/openttd/data/generictrams_v0.4.grf
share/openttd/data/no_sound.obs
share/openttd/data/ogfx1_base.grf
share/openttd/data/ogfxc_arctic.grf
share/openttd/data/ogfxe_extra.grf
share/openttd/data/ogfxh_tropical.grf
share/openttd/data/ogfxi_logos.grf
share/openttd/data/ogfxt_toyland.grf
share/openttd/data/opengfx.obg
share/openttd/data/opensfx.cat
share/openttd/data/opensfx.obs
share/openttd/data/openttdd.grf
share/openttd/data/openttdw.grf
share/openttd/data/opntitle.dat
share/openttd/data/orig_dos.obg
share/openttd/data/orig_dos.obs
share/openttd/data/orig_dos_de.obg
share/openttd/data/orig_win.obg
share/openttd/data/orig_win.obs
share/openttd/gm/
share/openttd/gm/5432gone_redfarn.mid
share/openttd/gm/be_sharp_bw_redfarn.mid
share/openttd/gm/big_man_boogie_redfarn.mid
share/openttd/gm/boogi_marabi_redfarn.mid
share/openttd/gm/busy_schedule.mid
share/openttd/gm/careless_perc_redfarn.mid
share/openttd/gm/chemistry_lab.mid
share/openttd/gm/chuggachugga.mid
share/openttd/gm/city_blues_redfarn.mid
share/openttd/gm/coconut_run2.mid
share/openttd/gm/flying_scotsman.mid
share/openttd/gm/harp_harmony.mid
share/openttd/gm/linns_basket.mid
share/openttd/gm/midnight_snow_run.mid
share/openttd/gm/mighty_giant_run.mid
share/openttd/gm/modern_motion.mid
share/openttd/gm/moo_redfarn.mid
share/openttd/gm/mosey_along_redfarn.mid
share/openttd/gm/no_music.obm
share/openttd/gm/no_work_song_redfarn.mid
share/openttd/gm/openmsx.obm
share/openttd/gm/orig_win.obm
share/openttd/gm/relax_song.mid
share/openttd/gm/run_for_your_life.mid
share/openttd/gm/say_what_redfarn.mid
share/openttd/gm/slow_neasy_redfarn.mid
share/openttd/gm/the_fast_route.mid
share/openttd/gm/the_hobo_redfarn.mid
share/openttd/gm/train_filled_with_cash.mid
share/openttd/gm/ttsong_iii_imuh3.mid
share/openttd/gm/ttsong_iv_imuh3.mid
share/openttd/gm/tttheme2.mid
share/openttd/gm/ultimate_run.mid
share/openttd/gm/wood_whistles.mid
share/openttd/lang/
share/openttd/lang/afrikaans.lng
share/openttd/lang/arabic_egypt.lng
share/openttd/lang/brazilian_portuguese.lng
share/openttd/lang/bulgarian.lng
share/openttd/lang/catalan.lng
@ -50,20 +127,26 @@ share/openttd/lang/finnish.lng
share/openttd/lang/french.lng
share/openttd/lang/galician.lng
share/openttd/lang/german.lng
share/openttd/lang/greek.lng
share/openttd/lang/hebrew.lng
share/openttd/lang/hungarian.lng
share/openttd/lang/icelandic.lng
share/openttd/lang/indonesian.lng
share/openttd/lang/irish.lng
share/openttd/lang/italian.lng
share/openttd/lang/japanese.lng
share/openttd/lang/korean.lng
share/openttd/lang/latvian.lng
share/openttd/lang/lithuanian.lng
share/openttd/lang/luxembourgish.lng
share/openttd/lang/malay.lng
share/openttd/lang/norwegian_bokmal.lng
share/openttd/lang/norwegian_nynorsk.lng
share/openttd/lang/origveh.lng
share/openttd/lang/piglatin.lng
share/openttd/lang/polish.lng
share/openttd/lang/portuguese.lng
share/openttd/lang/romanian.lng
share/openttd/lang/russian.lng
share/openttd/lang/serbian.lng
share/openttd/lang/simplified_chinese.lng
share/openttd/lang/slovak.lng
share/openttd/lang/slovenian.lng
@ -72,8 +155,9 @@ share/openttd/lang/swedish.lng
share/openttd/lang/traditional_chinese.lng
share/openttd/lang/turkish.lng
share/openttd/lang/ukrainian.lng
share/openttd/lang/vietnamese.lng
share/openttd/lang/welsh.lng
share/openttd/media/
share/openttd/media/mainicon.ico
share/openttd/media/openttd.128.png
share/openttd/media/openttd.16.png
share/openttd/media/openttd.256.png
@ -83,11 +167,23 @@ share/openttd/media/openttd.32.xpm
share/openttd/media/openttd.48.png
share/openttd/media/openttd.64.png
share/openttd/media/openttd.64.xpm
share/openttd/media/openttd.desktop
share/openttd/media/openttd.desktop.in
share/openttd/media/openttd.desktop.install
share/openttd/media/openttd.desktop.translation.awk
share/openttd/media/openttd.ico
share/openttd/media/palette.act
share/openttd/scenario/
share/openttd/scenario/heightmap/
share/openttd/media/openttd.svg
share/openttd/scripts/
share/openttd/scripts/autoexec.scr.example
share/openttd/scripts/game_start.scr.example
share/openttd/scripts/on_client.scr.example
share/openttd/scripts/on_dedicated.scr.example
share/openttd/scripts/on_server.scr.example
share/openttd/scripts/on_server_connect.scr.example
share/openttd/scripts/pre_dedicated.scr.example
share/openttd/scripts/pre_server.scr.example
share/openttd/scripts/readme.txt
share/pixmaps/
share/pixmaps/openttd.32.bmp
share/pixmaps/openttd.32.xpm
share/pixmaps/openttd.64.png
@exec %D/bin/update-desktop-database
@unexec-delete %D/bin/update-desktop-database