From 5d75466825f61b102787d8c5ee453470c69de063 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 12 Jan 2014 18:37:58 +0100 Subject: [PATCH] OpenTTD: add 1.3.3 recipe, remove older non-recipe. --- games-simulation/openttd/openttd-1.2.3.recipe | 32 -------- games-simulation/openttd/openttd-1.3.3.recipe | 79 +++++++++++++++++++ .../openttd/patches/openttd-1.3.3.patchset | 27 +++++++ 3 files changed, 106 insertions(+), 32 deletions(-) delete mode 100644 games-simulation/openttd/openttd-1.2.3.recipe create mode 100644 games-simulation/openttd/openttd-1.3.3.recipe create mode 100644 games-simulation/openttd/patches/openttd-1.3.3.patchset diff --git a/games-simulation/openttd/openttd-1.2.3.recipe b/games-simulation/openttd/openttd-1.2.3.recipe deleted file mode 100644 index 4f92f7b00..000000000 --- a/games-simulation/openttd/openttd-1.2.3.recipe +++ /dev/null @@ -1,32 +0,0 @@ -DESCRIPTION="OpenTTD is a clone of Transport Tycoon Deluxe" -MESSAGE="This port requires gcc4. You require game graphics/sound files to use this port" -HOMEPAGE="http://www.openttd.org" -SRC_URI="http://binaries.openttd.org/releases/1.2.3/openttd-1.2.3-source.tar.xz" -CHECKSUM_MD5="e1cf40f7c29f8f4b3e96c21626db241d" -REVISION="1" -STATUS_HAIKU="unstable" -DEPEND="media-libs/libsdl, - zlib, - xz-utils, - pkgconfig, - lzo" - -BUILD() -{ - cd openttd-1.2.3 - ./configure --prefix=`finddir B_COMMON_DIRECTORY` - make -} - -INSTALL() -{ - cd openttd-1.2.3 - make install - cp -R bundle /boot/apps - mv /boot/apps/bundle /boot/apps/OpenTTD\ 1.2.3 -} - -# no TEST script available - -COPYRIGHT="2005-2013 OpenTTD Team" -LICENSE="GNU GPL v2" diff --git a/games-simulation/openttd/openttd-1.3.3.recipe b/games-simulation/openttd/openttd-1.3.3.recipe new file mode 100644 index 000000000..a8ca3d275 --- /dev/null +++ b/games-simulation/openttd/openttd-1.3.3.recipe @@ -0,0 +1,79 @@ +SUMMARY="OpenTTD is a clone of Transport Tycoon Deluxe" +DESCRIPTION=" +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. +" +HOMEPAGE="http://www.openttd.org" +SRC_URI="http://binaries.openttd.org/releases/$portVersion/openttd-$portVersion-source.tar.xz" +CHECKSUM_MD5="97855877328d61d6c01833c8748a5b96" +REVISION="1" +ARCHITECTURES="x86" +if [ $effectiveTargetArchitecture != x86_gcc2 ]; then + # x86_gcc2 is fine as primary target architecture as long as we're building + # for a different secondary architecture. + ARCHITECTURES="$ARCHITECTURES x86_gcc2" +fi +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + openttd = $portVersion + " + +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + lib:libsdl$secondaryArchSuffix + lib:libz$secondaryArchSuffix + lib:liblzma$secondaryArchSuffix + lib:liblzo2$secondaryArchSuffix + + openttd_gfx + openttd_snd + openttd_msx + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + devel:libsdl$secondaryArchSuffix + devel:libz$secondaryArchSuffix + devel:liblzma$secondaryArchSuffix + devel:liblzo2$secondaryArchSuffix + " + +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:git + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +PATCHES="openttd-$portVersion.patchset" +BUILD() +{ + export includeDir=/system/$relativeIncludeDir + # Non-autotools script, can't use runConfigure. + ./configure --prefix=$prefix --binary-dir=$relativeAppsDir \ + --data-dir=$relativeDataDir/openttd --doc-dir=$relativeDocDir/openttd \ + --man-dir=$relativeManDir --icon-dir=trash --menu-dir=trash + make +} + +INSTALL() +{ + make install + # The install script leaves some mess all around, let's clean it up... + rm -r $prefix/trash + rm -r $prefix/16x16 + rm -r $prefix/32x32 + rm -r $prefix/48x48 + rm -r $prefix/64x64 + rm -r $prefix/128x128 + rm -r $prefix/256x256 + + addAppDeskbarSymlink $appsDir/openttd "Transport Tycoon Deluxe" +} + +# no TEST script available + +COPYRIGHT="2005-2013 OpenTTD Team" +LICENSE="GNU GPL v2" diff --git a/games-simulation/openttd/patches/openttd-1.3.3.patchset b/games-simulation/openttd/patches/openttd-1.3.3.patchset new file mode 100644 index 000000000..174dbc4c0 --- /dev/null +++ b/games-simulation/openttd/patches/openttd-1.3.3.patchset @@ -0,0 +1,27 @@ +From 0d2515090adbf1ed589046047727ce9a088c0db2 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 12 Jan 2014 18:36:42 +0100 +Subject: Hack to avoid hardcoded library search path. + +Makes it possible to find zlib when building as an hybrid package. + +diff --git a/config.lib b/config.lib +index 2dc14a8..215705d 100644 +--- a/config.lib ++++ b/config.lib +@@ -2597,10 +2597,10 @@ detect_library() { + fi + fi + if [ -z "$res" ] && [ "$os" = "HAIKU" ]; then +- eval "$2=`ls -1 /boot/common/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`" ++ eval "$2=`ls -1 $includeDir/$4*.h 2>/dev/null | egrep \"\/$5\$\"`" + eval "res=\$$2" + if [ -z "$res" ]; then +- log 2 " trying /boot/common/include/$4$5... no" ++ log 2 " trying $includeDir/$4$5... no" + fi + fi + +-- +1.8.3.4 +