From 80b8c28b260ff3b6eacd604537db1e175aac1128 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Thu, 23 Oct 2008 04:29:56 +0000 Subject: Version bump per bug 233929. Package-Manager: portage-2.2_rc12/cvs/Linux 2.6.27-rc6-00521-gcdbf87e x86_64 --- games-simulation/openttd/ChangeLog | 8 +- games-simulation/openttd/Manifest | 7 +- games-simulation/openttd/files/install.patch | 115 +++++++++++++++++++ games-simulation/openttd/files/libiconv.patch | 49 ++++++++ games-simulation/openttd/files/menu_name.patch | 15 +++ games-simulation/openttd/openttd-0.6.3.ebuild | 153 +++++++++++++++++++++++++ 6 files changed, 345 insertions(+), 2 deletions(-) create mode 100644 games-simulation/openttd/files/install.patch create mode 100644 games-simulation/openttd/files/libiconv.patch create mode 100644 games-simulation/openttd/files/menu_name.patch create mode 100644 games-simulation/openttd/openttd-0.6.3.ebuild (limited to 'games-simulation/openttd') diff --git a/games-simulation/openttd/ChangeLog b/games-simulation/openttd/ChangeLog index 19960441f12d..c76f216248e6 100644 --- a/games-simulation/openttd/ChangeLog +++ b/games-simulation/openttd/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for games-simulation/openttd # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-simulation/openttd/ChangeLog,v 1.61 2008/10/23 04:04:29 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-simulation/openttd/ChangeLog,v 1.62 2008/10/23 04:29:56 robbat2 Exp $ + +*openttd-0.6.3 (23 Oct 2008) + + 23 Oct 2008; Robin H. Johnson +files/install.patch, + +files/libiconv.patch, +files/menu_name.patch, +openttd-0.6.3.ebuild: + Version bump per bug 233929. 23 Oct 2008; Robin H. Johnson metadata.xml: Missing USE descriptions. diff --git a/games-simulation/openttd/Manifest b/games-simulation/openttd/Manifest index b96eeed1ff1e..85ab3403f0a7 100644 --- a/games-simulation/openttd/Manifest +++ b/games-simulation/openttd/Manifest @@ -1,9 +1,14 @@ +AUX install.patch 5471 RMD160 3db7bbfcf7b1e8da872263d24184220296f2d982 SHA1 3d1fab46598dc8c20558dad18488e6b5f08352c2 SHA256 02b3ff940a49ad59e24846b6488a81e01828260cd33c4f620262e3d009fc2043 +AUX libiconv.patch 1461 RMD160 8122de4e7a15f877c3948ee23231376640b7bde0 SHA1 651dd41c29ed0b260c4a7056950b8f346025bcae SHA256 38208cd0c32bbc367356620f9f2e4452b2004d59496ac8fb05dc165aea307c16 +AUX menu_name.patch 439 RMD160 eab4d7d23fdea12c4589b5735d22a7bccfa38376 SHA1 513ab0ccc9d75fd118030d88659a731f55c7fe8b SHA256 8b5a9c0cc3d804dee0cc6f7a8298f69370951593cec2b2644ee1bc8c4a0b3b52 AUX openttd.initd 529 RMD160 ff9fdf7a787ae3d08ec4dbef1b1b37eee12d1ccd SHA1 f833206fc430c6e7afec76c39e97af0f7ec6578a SHA256 a16e5c64a073d0b7e7092bb906b7f064414870a8607bebce16b4b08cff7f4112 DIST openttd-0.4.8-scenarios.tar.bz2 5000799 RMD160 a6c2fa9f81e4e4628adb9c3932dec46ab4789777 SHA1 88b3caff739fbf7bd4eb143ae97925556e813ce4 SHA256 61788035bd78a3c0e393d5992432c37e0b6036d19a960543f26d43a46e39e6ca DIST openttd-0.5.0-scenarios.tar.bz2 917117 RMD160 f6ea4a4004bb0c90de9283a92b14da4bd99bc33c SHA1 965fc34bbe9998741ea07531772c9673b33aab99 SHA256 c89e652aca1a9ad9f0f4936dd99cd8a9c96f4c53450990ff87d87483f8e74a31 DIST openttd-0.5.2-source.tar.bz2 3034368 RMD160 77528fa6d558787cfc1349d821041f005f3262ab SHA1 8c801cd92038741dbb1327c1688a69b3a939e054 SHA256 c5a1753f32a87293130347eb440bd9e76ebf0299db5d6a19059ca4d52407d4b1 DIST openttd-0.5.3-source.tar.bz2 3043644 RMD160 99a19d648652dd84952dd619c0d4b11c1b8d135d SHA1 ed23b5de67e597b6a96eccca26495369591f1ebc SHA256 68270beaf39e763c98c9dd0c11bffd25106736b1cf5f6015a2b1dbf67c24ccf8 +DIST openttd-0.6.3-source.tar.bz2 4609714 RMD160 ab1f2ae17cbc97c2ebc4eceb1496bc708e6d83d4 SHA1 5fb359789fae9b03550da268973fb1238ddf224c SHA256 2d60e8a08768a9c81f37e699df6890c12d53f4d56b5562724c3a9ffa302c7197 EBUILD openttd-0.5.2.ebuild 5665 RMD160 6dcb3bd2d574077aece233170f69431798857319 SHA1 9d6acc6be4a3a9b0e0d62197e96f33538c9ee7ba SHA256 ea190aca5c1ca082301d03522df7aa0ee8c6f81b9c9afd6b6ac8be6f0a8d5a8e EBUILD openttd-0.5.3.ebuild 5925 RMD160 f8f1364268d90108a6110c94d177097b05c59e39 SHA1 57e0383940062cd4cdfe69ea582f2be045a0263a SHA256 a066a76d7f4c4420345b729fe98accb654e32ca3ca8d2454ed7ac2c10078866a -MISC ChangeLog 8166 RMD160 f763d6fce38094cc7337775def72289945f0ce00 SHA1 68f720bf860240d070ac69d3241d5b30eb738165 SHA256 152405730066e0036a65bf2e664df7905cda869108ee3a67672af79bbd9c526c +EBUILD openttd-0.6.3.ebuild 4208 RMD160 d9bcbabba44328658133e32b2557875d68b2d1a7 SHA1 471d262c389b1b81b7476ae3118604758e57c7f8 SHA256 bcbbb2ae22cfad915327d7b3ed66315b22d2d972322544e71a6a8680b497f971 +MISC ChangeLog 8375 RMD160 4c8855c5a3a709451d67a16937df00d5d36c49c7 SHA1 0c530d838c917078c90a1e4a4b694cb917469c71 SHA256 4d197bcf88fb36f71396092120cb6a2f98a10943d7061307b7b3c9fecb734996 MISC metadata.xml 307 RMD160 83f20da47827470c3f19c6849fc14217b47389a7 SHA1 ca4ccf0fe4b5abf21a994189f9d689e8a2616128 SHA256 ab66512663eaf8f6d321f0efb9643951f9dab6fda5d8789d1cb83eb6cc82e8e7 diff --git a/games-simulation/openttd/files/install.patch b/games-simulation/openttd/files/install.patch new file mode 100644 index 000000000000..17f479c30e35 --- /dev/null +++ b/games-simulation/openttd/files/install.patch @@ -0,0 +1,115 @@ +Index: Makefile.in +=================================================================== +--- Makefile.in (revision 14474) ++++ Makefile.in (working copy) +@@ -28,6 +28,7 @@ + INSTALL_ICON_THEME_DIR = "$(INSTALL_DIR)/$(ICON_THEME_DIR)" + INSTALL_DATA_DIR = "$(INSTALL_DIR)/"!!DATA_DIR!! + INSTALL_DOC_DIR = "$(INSTALL_DIR)/"!!DOC_DIR!! ++BINARY_NAME = !!BINARY_NAME!! + TTD = !!TTD!! + TTDS = $(SRC_DIRS:%=%/$(TTD)) + OS = !!OS!! +Index: Makefile.bundle.in +=================================================================== +--- Makefile.bundle.in (revision 14474) ++++ Makefile.bundle.in (working copy) +@@ -139,35 +140,41 @@ + $(Q)install -d "$(INSTALL_DATA_DIR)/data" + $(Q)install -d "$(INSTALL_DATA_DIR)/lang" + $(Q)install -d "$(INSTALL_DOC_DIR)" +- $(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)" ++ifeq ($(TTD), openttd.exe) ++ $(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)/${BINARY_NAME}.exe" ++else ++ $(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)/${BINARY_NAME}" ++endif + $(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_DOC_DIR)" +- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.xpm" "$(INSTALL_ICON_DIR)" ++ $(Q)install -m 644 "$(BUNDLE_DIR)/"*.txt "$(INSTALL_DOC_DIR)" ++ $(Q)install -m 644 "$(BUNDLE_DIR)/COPYING" "$(INSTALL_DOC_DIR)" ++ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.xpm" "$(INSTALL_ICON_DIR)/${BINARY_NAME}.32.xpm" + ifdef ICON_THEME_DIR + $(Q)install -d "$(INSTALL_ICON_THEME_DIR)" + $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/16x16/apps" +- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.16.png" "$(INSTALL_ICON_THEME_DIR)/16x16/apps" ++ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.16.png" "$(INSTALL_ICON_THEME_DIR)/16x16/apps/${BINARY_NAME}.png" + $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/32x32/apps" +- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.png" "$(INSTALL_ICON_THEME_DIR)/32x32/apps" ++ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.png" "$(INSTALL_ICON_THEME_DIR)/32x32/apps/${BINARY_NAME}.png" + $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/48x48/apps" +- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.48.png" "$(INSTALL_ICON_THEME_DIR)/48x48/apps" ++ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.48.png" "$(INSTALL_ICON_THEME_DIR)/48x48/apps/${BINARY_NAME}.png" + $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/64x64/apps" +- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.64.png" "$(INSTALL_ICON_THEME_DIR)/64x64/apps" ++ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.64.png" "$(INSTALL_ICON_THEME_DIR)/64x64/apps/${BINARY_NAME}.png" + $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/128x128/apps" +- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.128.png" "$(INSTALL_ICON_THEME_DIR)/128x128/apps" ++ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.128.png" "$(INSTALL_ICON_THEME_DIR)/128x128/apps/${BINARY_NAME}.png" + $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/256x256/apps" +- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.256.png" "$(INSTALL_ICON_THEME_DIR)/256x256/apps" ++ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.256.png" "$(INSTALL_ICON_THEME_DIR)/256x256/apps/${BINARY_NAME}.png" + else + $(Q)install -m 644 "$(BUNDLE_DIR)/media/"*.png "$(INSTALL_ICON_DIR)" + endif + ifdef MAN_DIR + $(Q)install -d "$(INSTALL_MAN_DIR)" +- $(Q)install -m 644 "$(BUNDLE_DIR)/man/openttd.6.gz" "$(INSTALL_MAN_DIR)" ++ $(Q)install -m 644 "$(BUNDLE_DIR)/man/openttd.6.gz" "$(INSTALL_MAN_DIR)/${BINARY_NAME}.6.gz" + endif + ifdef MENU_DIR + $(Q)install -d "$(INSTALL_MENU_DIR)" +- $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.desktop" "$(INSTALL_MENU_DIR)" ++ $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.desktop" "$(INSTALL_MENU_DIR)/${BINARY_NAME}.desktop" + endif + $(Q)cp -R "$(BUNDLE_DIR)/scenario" "$(INSTALL_DATA_DIR)" + endif # OSXAPP +Index: config.lib +=================================================================== +--- config.lib (revision 14474) ++++ config.lib (working copy) +@@ -37,6 +37,7 @@ + man_dir="1" + menu_dir="1" + menu_group="Game;" ++ binary_name="openttd" + enable_debug="0" + enable_desync_debug="0" + enable_profiling="0" +@@ -100,6 +101,7 @@ + shared_dir + install_dir + menu_group ++ binary_name + enable_debug + enable_desync_debug + enable_profiling +@@ -213,6 +215,9 @@ + --menu-dir=*) menu_dir="$optarg";; + --without-menu-entry) menu_dir="";; + ++ --binary-name) prevp_p="binary_name";; ++ --binary-name=*) binary_name="$optarg";; ++ + --man-dir) prevp_p="man_dir";; + --man-dir=*) man_dir="$optarg";; + +@@ -2298,6 +2303,7 @@ + s#!!PERSONAL_DIR!!#$personal_dir#g; + s#!!SHARED_DIR!!#$shared_dir#g; + s#!!INSTALL_DIR!!#$install_dir#g; ++ s#!!BINARY_NAME!!#$binary_name#g; + s#!!STRGEN!!#$STRGEN#g; + s#!!ENDIAN_CHECK!!#$ENDIAN_CHECK#g; + s#!!ENDIAN_FORCE!!#$endian#g; +@@ -2507,6 +2513,8 @@ + echo " [$shared_dir]" + echo " --install-dir=dir specifies the root to install to." + echo " Useful to install into jails [$install_dir]" ++ echo " --binary-name the name used for the binary, icons," ++ echo " desktop file, etc. when installing [openttd]" + echo "" + echo "Features and packages:" + echo " --enable-debug[=LVL] enable debug-mode (LVL=[0123], 0 is release)" diff --git a/games-simulation/openttd/files/libiconv.patch b/games-simulation/openttd/files/libiconv.patch new file mode 100644 index 000000000000..9e56ab314b21 --- /dev/null +++ b/games-simulation/openttd/files/libiconv.patch @@ -0,0 +1,49 @@ +Index: config.lib +=================================================================== +--- config.lib (revision 14474) ++++ config.lib (working copy) +@@ -1225,10 +1225,12 @@ + + if [ "$with_iconv" != "0" ]; then + CFLAGS="$CFLAGS -DWITH_ICONV" +- LIBS="$LIBS -liconv" +- if [ "$with_iconv" != "2" ]; then +- CFLAGS="$CFLAGS -I$with_iconv/include" +- LIBS="$LIBS -L$with_iconv/lib" ++ if [ "$link_to_iconv" = "yes" ]; then ++ LIBS="$LIBS -liconv" ++ if [ "$with_iconv" != "2" ]; then ++ CFLAGS="$CFLAGS -I$with_iconv/include" ++ LIBS="$LIBS -L$with_iconv/lib" ++ fi + fi + + if [ "$have_broken_iconv" != "no" ]; then +@@ -2161,6 +2163,27 @@ + log 2 " exit code $ret" + if [ "$ret" = "0" ]; then have_broken_iconv="no"; else have_broken_iconv="yes"; fi + log 1 "checking if iconv has non-const inbuf... $have_broken_iconv" ++ ++ cat > tmp.iconv.cpp << EOF ++#include "src/stdafx.h" ++#include ++int main() { ++ static char buf[1024]; ++ iconv_t convd = 0; ++ char *inbuf = ""; ++ char *outbuf = buf; ++ size_t outlen = 1023; ++ size_t inlen = 0; ++ return iconv(convd, &inbuf, &inlen, &outbuf, &outlen); ++} ++EOF ++ execute="$cxx_host $CFLAGS tmp.iconv.cpp -o tmp.iconv -DTESTING 2>&1" ++ eval $execute >&/dev/null ++ ret=$? ++ log 2 "executing $execute" ++ log 2 " exit code $ret" ++ if [ "$ret" = "0" ]; then link_to_iconv="no"; else link_to_iconv="yes"; fi ++ log 1 "checking whether to link to iconv... $link_to_iconv" + rm -f tmp.iconv tmp.iconv.cpp + } + diff --git a/games-simulation/openttd/files/menu_name.patch b/games-simulation/openttd/files/menu_name.patch new file mode 100644 index 000000000000..c0e3c0f9b14b --- /dev/null +++ b/games-simulation/openttd/files/menu_name.patch @@ -0,0 +1,15 @@ +Index: media/openttd.desktop.in +=================================================================== +--- media/openttd.desktop.in (revision 14471) ++++ media/openttd.desktop.in (working copy) +@@ -4,9 +4,8 @@ + Encoding=UTF-8 + Type=Application + Version=1.1 + Name=OpenTTD +-GenericName=A clone of Transport Tycoon Deluxe +-Comment=A business simulation game ++Comment=A clone of Transport Tycoon Deluxe + Icon=openttd + Exec=!!TTD!! + Terminal=false diff --git a/games-simulation/openttd/openttd-0.6.3.ebuild b/games-simulation/openttd/openttd-0.6.3.ebuild new file mode 100644 index 000000000000..0f3611f29588 --- /dev/null +++ b/games-simulation/openttd/openttd-0.6.3.ebuild @@ -0,0 +1,153 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-simulation/openttd/openttd-0.6.3.ebuild,v 1.1 2008/10/23 04:29:56 robbat2 Exp $ + +EAPI="2" + +inherit games + +MY_P=${P/_rc/-RC} + +DESCRIPTION="OpenTTD is a clone of Transport Tycoon Deluxe" +HOMEPAGE="http://www.openttd.org/" +SRC_URI="http://binaries.openttd.org/releases/${PV}/${MY_P}-source.tar.bz2" +SCENARIOS="0.4.8 0.5.0" +for scenario in ${SCENARIOS}; do + SRC_URI="${SRC_URI} scenarios? ( + http://binaries.openttd.org/scenarios/${PN}-${scenario}-scenarios.tar.bz2 )" +done + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="alsa debug dedicated iconv +png scenarios timidity +truetype +zlib" + +DEPEND="!dedicated? ( + media-libs/libsdl[X] + truetype? ( + media-libs/fontconfig + media-libs/freetype:2 + ) + ) + iconv? ( virtual/libiconv ) + png? ( media-libs/libpng ) + zlib? ( sys-libs/zlib )" +RDEPEND="${DEPEND} + !dedicated? ( + timidity? ( media-sound/timidity++ ) + !timidity? ( alsa? ( media-sound/alsa-utils ) ) + )" + +S=${WORKDIR}/${MY_P} + +src_unpack() { + unpack ${MY_P}-source.tar.bz2 + + if use scenarios ; then + cd "${S}"/bin/scenario/ + for scenario in ${SCENARIOS}; do + unpack ${PN}-${scenario}-scenarios.tar.bz2 + done + fi + + cd "${S}" + epatch "${FILESDIR}/libiconv.patch" + epatch "${FILESDIR}/install.patch" + epatch "${FILESDIR}/menu_name.patch" +} + +src_configure() { + local myopts="" + use debug && myopts="${myopts} --enable-debug=3" + if use dedicated; then + myopts="${myopts} --enable-dedicated " + else + myopts="${myopts} --with-sdl $(use_with truetype freetype) + $(use_with truetype fontconfig)" + if ! use timidity; then + use alsa && myopts="${myopts} --with-midi=/usr/bin/aplaymidi" + fi + fi + # configure is a hand-written sh-script, so econf will not work + ./configure --disable-strip \ + --prefix-dir=/usr \ + --binary-dir=games/bin \ + --data-dir=share/games/${PN} \ + --install-dir="${D}" \ + --doc-dir=share/doc/${P} \ + --menu-group="Game;Simulation;" \ + $(use_with iconv) \ + $(use_with png) \ + $(use_with zlib) \ + ${myopts} \ + || die "configure failed" +} + +src_compile() { + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + if use scenarios ; then + insinto "${GAMES_DATADIR}"/${PN}/scenario + doins bin/scenario/*.scn || die "doins failed (scenario)" + doins bin/scenario/*/*.scn || die "doins failed (scenario)" + fi + + prepgamesdirs +} + +pkg_postinst() { + games_pkg_postinst + + elog + elog "In order to play, you must copy the following 6 files from " + elog "a version of TTD to ${GAMES_DATADIR}/${PN}/data/." + elog + elog "From the WINDOWS version you need: " + elog " sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf" + elog "OR from the DOS version you need: " + elog " SAMPLE.CAT TRG1.GRF TRGC.GRF TRGH.GRF TRGI.GRF TRGT.GRF" + elog + elog "File names are case sensitive so make sure they are " + elog "correct for whichever version you have." + elog + + if use scenarios ; then + elog "Scenarios are installed into:" + elog "${GAMES_DATADIR}/${PN}/scenario," + elog "you will have to symlink them to ~/.openttd/scenario in order" + elog "to use them." + elog "Example:" + elog " ln -s ${GAMES_DATADIR}/${PN}/scenario ~/.openttd/scenario" + elog + fi + + if use dedicated ; then + ewarn "Warning: The init script will kill all running openttd" + ewarn "processes when run, including any running client sessions!" + else + if use timidity || use alsa ; then + elog "If you want music, you must copy the gm/ directory to" + elog "${GAMES_DATADIR}/${PN}/" + elog "You can enable MIDI by running:" + elog " openttd -m extmidi" + elog + if use timidity ; then + elog "You also need soundfonts for timidity, if you don't" + elog "know what that is, do:" + elog + elog "emerge media-sound/timidity-eawpatches" + else + elog "You have emerged with 'aplaymidi' for playing MIDI." + elog "You have to set the environment variable ALSA_OUTPUT_PORTS." + elog "Available ports can be listed by using 'aplaymidi -l'." + fi + else + elog "timidity and/or alsa not in USE so music will not be played during the game." + fi + elog + fi +} -- cgit v1.2.3-65-gdbad