summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradam <adam>2010-12-08 17:47:50 +0000
committeradam <adam>2010-12-08 17:47:50 +0000
commit4ffe5b5cdf41d17b38648997a4944ea8f0224d55 (patch)
tree998e7e7c2e7a4338c30136cc1f49180ade6dad86
parent32e1ef59bae8ab36e897b742d1b0c816fb8b3244 (diff)
downloadpkgsrc-4ffe5b5cdf41d17b38648997a4944ea8f0224d55.tar.gz
Changes 1.0.5:
* Fix: Reading (very) recently freed memory [CVE-2010-4168] * Fix: Default service interval for ships/aircraft got switched * Fix: Size of sort buttons for save/load and build vehicle list gui could be too small * Fix: [NewGRF] Crash when disabling static NewGRFs (when joining/starting a server) * Fix: Upper limit for snowline was too low * Fix: Wrong (maximum) value shown for generation seed in the in-game console * Fix: [Windows] Make sure to be upgraded openttd is not running when installing * Fix: Under some circumstances the file handle of the downloaded savegame would not be closed, and validity of the handled was not checked in all cases * Fix: [NewGRF] Crash when getting an industry ID at an offset that uses some 'old' style industry tile
-rw-r--r--games/openttd/DESCR4
-rw-r--r--games/openttd/MESSAGE16
-rw-r--r--games/openttd/Makefile51
-rw-r--r--games/openttd/PLIST47
-rw-r--r--games/openttd/distinfo11
-rw-r--r--games/openttd/options.mk42
-rw-r--r--games/openttd/patches/patch-aa22
-rw-r--r--games/openttd/patches/patch-ab15
-rw-r--r--games/openttd/patches/patch-string_func.h20
9 files changed, 95 insertions, 133 deletions
diff --git a/games/openttd/DESCR b/games/openttd/DESCR
index c454889c1f7..5462a0f15cf 100644
--- a/games/openttd/DESCR
+++ b/games/openttd/DESCR
@@ -1 +1,3 @@
-Open source clone of Transport Tycoon Deluxe.
+OpenTTD is an open source simulation game based upon the popular Microprose
+game "Transport Tycoon Deluxe", written by Chris Sawyer. It attempts to mimic
+the original game as closely as possible while extending it with new features.
diff --git a/games/openttd/MESSAGE b/games/openttd/MESSAGE
index 56cc59c43d1..786447ccf34 100644
--- a/games/openttd/MESSAGE
+++ b/games/openttd/MESSAGE
@@ -1,19 +1,13 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.3 2008/04/07 19:44:19 tnn Exp $
+$NetBSD: MESSAGE,v 1.4 2010/12/08 17:47:50 adam Exp $
To run openttd you need data files provided by the original Transport
-Tycoon Deluxe.
-
-The following files should be copied to ${PREFIX}/share/openttd/data
-in order to play:
+Tycoon Deluxe, or free data files avaialable in games/openttd-data package.
+In order to play, the following files should be copied from the original TTD
+to ${PREFIX}/share/openttd/data:
sample.cat
- trg1r.grf
- trgcr.grf
- trghr.grf
- trgir.grf
- trgtr.grf
-
+ trg1r.grf, trgcr.grf, trghr.grf, trgir.grf, trgtr.grf
All *.gm files should be copied to ${PREFIX}/share/openttd/gm
in order to play original MIDI music.
diff --git a/games/openttd/Makefile b/games/openttd/Makefile
index 76b00a70301..ecf346e2030 100644
--- a/games/openttd/Makefile
+++ b/games/openttd/Makefile
@@ -1,49 +1,56 @@
-# $NetBSD: Makefile,v 1.35 2010/06/13 22:44:22 wiz Exp $
+# $NetBSD: Makefile,v 1.36 2010/12/08 17:47:50 adam Exp $
-DISTNAME= openttd-0.7.2-source
+DISTNAME= openttd-1.0.5-source
PKGNAME= ${DISTNAME:S/-source//}
-PKGREVISION= 1
CATEGORIES= games x11
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=openttd/}
+MASTER_SITES= http://binaries.openttd.org/releases/${PKGVERSION_NOREV}/
+EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.openttd.org/
COMMENT= Open source clone of Transport Tycoon Deluxe
-EXTRACT_SUFX= .tar.bz2
+LICENSE= gnu-gpl-v2
-HAS_CONFIGURE= yes
-USE_LANGUAGES+= c c++
-USE_TOOLS+= gmake pkg-config
+PKG_DESTDIR_SUPPORT= user-destdir
-# Setting the below results in binaries looking in ${DESTDIR} for datafiles
-# CONFIGURE_ARGS+= --prefix-dir=${DESTDIR}${PREFIX}
-# PKG_DESTDIR_SUPPORT= user-destdir
+WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
+USE_LANGUAGES= c c++
+USE_TOOLS+= gmake pkg-config
+BUILD_DEFS+= VARBASE
+BUILD_TARGET= bundle
+HAS_CONFIGURE= yes
CONFIGURE_ARGS+= --prefix-dir=${PREFIX}
CONFIGURE_ARGS+= --binary-dir=bin
CONFIGURE_ARGS+= --data-dir=share/openttd
+CONFIGURE_ARGS+= --doc-dir=share/doc/openttd
+CONFIGURE_ARGS+= --icon-theme-dir=share/icons/hicolor
+CONFIGURE_ARGS+= --install-dir=${DESTDIR}
CONFIGURE_ARGS+= --man-dir=${PKGMANDIR}/man6
+CONFIGURE_ARGS+= --menu-dir=share/applications
+CONFIGURE_ARGS+= --personal-dir=.openttd
+CONFIGURE_ARGS+= --shared-dir=${VARBASE}/games/openttd
.include "../../mk/bsd.prefs.mk"
+
.if (${OPSYS} == "DragonFly")
CONFIGURE_ARGS+= --os=FREEBSD
.endif
-# disable custom assert for Mac OS X (XXX: still needed?)
-CFLAGS+= -DNDEBUG=1
-
-WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
-BUILD_TARGET= bundle
-
-post-install:
- rm -rf ${FAKEHOMEDIR}/.openttd
-
-.include "options.mk"
+.if (${OPSYS} == "Darwin")
+CONFIGURE_ARGS+= --with-cocoa
+CONFIGURE_ARGS+= --without-application-bundle
+CONFIGURE_ARGS+= --without-osx-sysroot
+.else
+.include "../../devel/SDL/buildlink3.mk"
+.endif
+.include "../../archivers/lzo/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
.include "../../fonts/fontconfig/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
-.include "../../devel/SDL/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../textproc/icu/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/games/openttd/PLIST b/games/openttd/PLIST
index 7c9f19bb49e..4efb172b4cd 100644
--- a/games/openttd/PLIST
+++ b/games/openttd/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.15 2009/09/22 12:02:36 ahoka Exp $
+@comment $NetBSD: PLIST,v 1.16 2010/12/08 17:47:50 adam Exp $
bin/openttd
man/man6/openttd.6
share/applications/openttd.desktop
@@ -8,6 +8,8 @@ share/doc/openttd/changelog.txt
share/doc/openttd/known-bugs.txt
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/readme.txt
share/icons/hicolor/128x128/apps/openttd.png
share/icons/hicolor/16x16/apps/openttd.png
@@ -15,42 +17,22 @@ share/icons/hicolor/256x256/apps/openttd.png
share/icons/hicolor/32x32/apps/openttd.png
share/icons/hicolor/48x48/apps/openttd.png
share/icons/hicolor/64x64/apps/openttd.png
+share/openttd/ai/compat_0.7.nut
+share/openttd/ai/compat_1.0.nut
+share/openttd/data/no_sound.obs
share/openttd/data/openttdd.grf
share/openttd/data/openttdw.grf
share/openttd/data/opntitle.dat
-${PLIST.ttd-data}share/openttd/data/sample.cat
-${PLIST.ttd-data}share/openttd/data/trg1r.grf
-${PLIST.ttd-data}share/openttd/data/trgcr.grf
-${PLIST.ttd-data}share/openttd/data/trghr.grf
-${PLIST.ttd-data}share/openttd/data/trgir.grf
-${PLIST.ttd-data}share/openttd/data/trgtr.grf
-${PLIST.ttd-data}share/openttd/gm/gm_tt00.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt01.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt02.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt03.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt04.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt05.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt06.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt07.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt08.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt09.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt10.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt11.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt12.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt13.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt14.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt15.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt16.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt17.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt18.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt19.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt20.gm
-${PLIST.ttd-data}share/openttd/gm/gm_tt21.gm
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/no_music.obm
+share/openttd/gm/orig_win.obm
share/openttd/lang/afrikaans.lng
share/openttd/lang/arabic_egypt.lng
+share/openttd/lang/belarusian.lng
share/openttd/lang/brazilian_portuguese.lng
share/openttd/lang/bulgarian.lng
share/openttd/lang/catalan.lng
@@ -66,19 +48,21 @@ 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/piglatin.lng
share/openttd/lang/polish.lng
share/openttd/lang/portuguese.lng
share/openttd/lang/romanian.lng
@@ -92,6 +76,7 @@ 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/scripts/autoexec.scr.example
share/openttd/scripts/game_start.scr.example
@@ -103,5 +88,3 @@ share/openttd/scripts/pre_dedicated.scr.example
share/openttd/scripts/pre_server.scr.example
share/openttd/scripts/readme.txt
share/pixmaps/openttd.32.xpm
-@pkgdir share/openttd/data
-@pkgdir share/openttd/gm
diff --git a/games/openttd/distinfo b/games/openttd/distinfo
index 827220c7b64..1f179e95eec 100644
--- a/games/openttd/distinfo
+++ b/games/openttd/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.15 2009/09/22 12:02:36 ahoka Exp $
+$NetBSD: distinfo,v 1.16 2010/12/08 17:47:50 adam Exp $
-SHA1 (openttd-0.7.2-source.tar.bz2) = d020a2e371c2317e43b248964742483229d35b87
-RMD160 (openttd-0.7.2-source.tar.bz2) = da1c95310988c1f58d3d0a2e35aa57e6d323b985
-Size (openttd-0.7.2-source.tar.bz2) = 4874252 bytes
-SHA1 (patch-string_func.h) = e238acd9df0ac49a04f8ca9200a975da2f338d6b
+SHA1 (openttd-1.0.5-source.tar.bz2) = 2e0cfa2d6e4c4bc1235a60de39961728bb727eb8
+RMD160 (openttd-1.0.5-source.tar.bz2) = 8d723e8efeb6de9860b62cf835fa3db09a7848cd
+Size (openttd-1.0.5-source.tar.bz2) = 5684796 bytes
+SHA1 (patch-aa) = ad42a8eac1268b00641715c825d505b480e9a234
+SHA1 (patch-ab) = 40ff3d0b0837ca5660ff136b60e8531e1f0a1cc0
diff --git a/games/openttd/options.mk b/games/openttd/options.mk
deleted file mode 100644
index f6eacb44af1..00000000000
--- a/games/openttd/options.mk
+++ /dev/null
@@ -1,42 +0,0 @@
-# $NetBSD: options.mk,v 1.4 2008/04/12 22:43:01 jlam Exp $
-
-.include "../../mk/bsd.prefs.mk"
-
-PKG_OPTIONS_VAR= PKG_OPTIONS.openttd
-PKG_SUPPORTED_OPTIONS= ttd-data
-PKG_SUGGESTED_OPTIONS= # empty
-
-.include "../../mk/bsd.options.mk"
-
-PLIST_VARS+= ttd-data
-
-.if !empty(PKG_OPTIONS:Mttd-data)
-PLIST.ttd-data= yes
-LICENSE= ttd-pseudolicense
-RESTRICTED= No redistribution allowed
-NO_BIN_ON_CDROM= ${RESTRICTED}
-NO_BIN_ON_FTP= ${RESTRICTED}
-NO_SRC_ON_CDROM= ${RESTRICTED}
-NO_SRC_ON_FTP= ${RESTRICTED}
-
-DATAFILES= sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf
-GMFILES= 00 01 02 03 04 05 06 07 08 09 10
-GMFILES+= 11 12 13 14 15 16 17 18 19 20 21
-GMFILES:= ${GMFILES:C/^/gm_tt/g:C/$/.gm/g}
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
- ${DATAFILES:C/^/ttd\//g} ${GMFILES:C/^/ttd\//g}
-
-DATA_DIR= ${DESTDIR}${PREFIX}/share/openttd
-
-post-extract: post-extract-ttd-data
-post-extract-ttd-data: .PHONY
- ${RUN} for f in ${DATAFILES} ${GMFILES}; do \
- cp ${DISTDIR}/ttd/$$f ${WRKDIR}; done
-
-post-install: post-install-ttd-data
-post-install-ttd-data: .PHONY
- ${RUN} for f in ${DATAFILES}; do \
- ${INSTALL_DATA} ${WRKDIR}/$$f ${DATA_DIR}/data; done
- ${RUN} for f in ${GMFILES}; do \
- ${INSTALL_DATA} ${WRKDIR}/$$f ${DATA_DIR}/gm; done
-.endif
diff --git a/games/openttd/patches/patch-aa b/games/openttd/patches/patch-aa
new file mode 100644
index 00000000000..5a22289373d
--- /dev/null
+++ b/games/openttd/patches/patch-aa
@@ -0,0 +1,22 @@
+$NetBSD: patch-aa,v 1.9 2010/12/08 17:47:50 adam Exp $
+
+--- config.lib.orig 2010-11-20 20:25:53.000000000 +0000
++++ config.lib
+@@ -1241,7 +1241,7 @@ make_cflags_and_ldflags() {
+ OBJS_SUBDIR="release"
+ if [ "$os" = "OSX" ]; then
+ # these compilerflags makes the app run as fast as possible without making the app unstable. It works on G3 or newer
+- CFLAGS="-O3 -funroll-loops -fsched-interblock -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-jumps-max-skip=15 -falign-loops-max-skip=15 -mdynamic-no-pic $CFLAGS"
++ CFLAGS="-mdynamic-no-pic $CFLAGS"
+ else
+ if [ "$os" = "MORPHOS" ]; then
+ CFLAGS="-I/gg/os-include -noixemul -fstrict-aliasing -fexpensive-optimizations -mcpu=604 -fno-inline -mstring -mmultiple $CFLAGS"
+@@ -2304,7 +2304,7 @@ detect_library() {
+ if [ -z "$res" ]; then
+ log 2 " trying /usr/local/include/$4$5... no"
+ fi
+- if [ -z "$res" ] && [ "$os" = "NETBSD" ]; then
++ if [ -z "$res" ]; then
+ eval "$2=`ls -1 /usr/pkg/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`"
+ eval "res=\$$2"
+ if [ -z "$res" ]; then
diff --git a/games/openttd/patches/patch-ab b/games/openttd/patches/patch-ab
new file mode 100644
index 00000000000..eea31faa707
--- /dev/null
+++ b/games/openttd/patches/patch-ab
@@ -0,0 +1,15 @@
+$NetBSD: patch-ab,v 1.6 2010/12/08 17:47:50 adam Exp $
+
+--- Makefile.lang.in.orig 2010-02-05 16:20:04.000000000 +0000
++++ Makefile.lang.in
+@@ -13,8 +13,8 @@ BIN_DIR = !!BIN_DIR!!
+ LANGS_SRC = $(shell ls $(LANG_DIR)/*.txt)
+ LANGS = $(LANGS_SRC:$(LANG_DIR)/%.txt=%.lng)
+ CXX_BUILD = !!CXX_BUILD!!
+-CFLAGS_BUILD = !!CFLAGS_BUILD!!
+-LDFLAGS_BUILD = !!LDFLAGS_BUILD!!
++CFLAGS_BUILD = !!CFLAGS!! !!CFLAGS_BUILD!!
++LDFLAGS_BUILD = !!LDFLAGS!! !!LDFLAGS_BUILD!!
+ STRGEN_FLAGS = !!STRGEN_FLAGS!!
+ STAGE = !!STAGE!!
+ LANG_SUPPRESS = !!LANG_SUPPRESS!!
diff --git a/games/openttd/patches/patch-string_func.h b/games/openttd/patches/patch-string_func.h
deleted file mode 100644
index 8460ed81eef..00000000000
--- a/games/openttd/patches/patch-string_func.h
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-string_func.h,v 1.1 2009/09/22 12:02:36 ahoka Exp $
-
---- src/string_func.h.orig 2009-05-10 23:33:55.000000000 +0200
-+++ src/string_func.h
-@@ -239,13 +239,13 @@ static inline bool IsWhitespace(WChar c)
- ;
- }
-
--#ifndef _GNU_SOURCE
-+#if !defined(_GNU_SOURCE) && (defined(__NetBSD_Version__) && __NetBSD_Version__ < 500000000)
- /* strndup is a GNU extension */
- char *strndup(const char *s, size_t len);
- #endif /* !_GNU_SOURCE */
-
- /* strcasestr is available for _GNU_SOURCE, BSD and some Apple */
--#if defined(_GNU_SOURCE) || (defined(__BSD_VISIBLE) && __BSD_VISIBLE) || (defined(__APPLE__) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)))
-+#if defined(_GNU_SOURCE) || (defined(__BSD_VISIBLE) && __BSD_VISIBLE) || (defined(__APPLE__) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))) || defined(_NETBSD_SOURCE)
- # undef DEFINE_STRCASESTR
- #else
- # define DEFINE_STRCASESTR