From b9c8ccbceed2b85c1ae464bd9ebd310fee5de8c1 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 25 Sep 2014 22:29:26 +0200 Subject: [PATCH] OpenTTD: update to 1.4.3. * Fix for strings.h * Force -O1 as using -O2 makes gcc enter an infinite loop (also on 1.3.3) --- ...nttd-1.3.3.recipe => openttd-1.4.3.recipe} | 3 +- .../openttd/patches/openttd-1.3.3.patchset | 27 ---------- .../openttd/patches/openttd-1.4.3.patchset | 49 +++++++++++++++++++ 3 files changed, 51 insertions(+), 28 deletions(-) rename games-simulation/openttd/{openttd-1.3.3.recipe => openttd-1.4.3.recipe} (95%) delete mode 100644 games-simulation/openttd/patches/openttd-1.3.3.patchset create mode 100644 games-simulation/openttd/patches/openttd-1.4.3.patchset diff --git a/games-simulation/openttd/openttd-1.3.3.recipe b/games-simulation/openttd/openttd-1.4.3.recipe similarity index 95% rename from games-simulation/openttd/openttd-1.3.3.recipe rename to games-simulation/openttd/openttd-1.4.3.recipe index 3e0b35ebd..0bcd0ac7f 100644 --- a/games-simulation/openttd/openttd-1.3.3.recipe +++ b/games-simulation/openttd/openttd-1.4.3.recipe @@ -6,7 +6,7 @@ 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_SHA256="6991ed2c0170481800c3a92a1b43546821a658de91d3ac7efe868588387eca5d" +CHECKSUM_SHA256="11bcbbddb9864d69f1bca11966ece9abfc28973151e6dd73ceadff89ebdf63dd" REVISION="2" ARCHITECTURES="x86" if [ $effectiveTargetArchitecture != x86_gcc2 ]; then @@ -52,6 +52,7 @@ PATCHES="openttd-$portVersion.patchset" BUILD() { export includeDir=/system/$relativeIncludeDir + export CFLAGS=-O1 # Non-autotools script, can't use runConfigure. ./configure --prefix=$prefix --binary-dir=$relativeAppsDir \ --data-dir=$relativeDataDir/openttd --doc-dir=$relativeDocDir/openttd \ diff --git a/games-simulation/openttd/patches/openttd-1.3.3.patchset b/games-simulation/openttd/patches/openttd-1.3.3.patchset deleted file mode 100644 index 174dbc4c0..000000000 --- a/games-simulation/openttd/patches/openttd-1.3.3.patchset +++ /dev/null @@ -1,27 +0,0 @@ -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 - diff --git a/games-simulation/openttd/patches/openttd-1.4.3.patchset b/games-simulation/openttd/patches/openttd-1.4.3.patchset new file mode 100644 index 000000000..dea5a967c --- /dev/null +++ b/games-simulation/openttd/patches/openttd-1.4.3.patchset @@ -0,0 +1,49 @@ +From 727ce994cb9751567f132ae8339f80ae9167ab1e 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 a8c3699..4624349 100644 +--- a/config.lib ++++ b/config.lib +@@ -2637,10 +2637,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 + + +From e40a47458e1fd8ad9d3c1c18f4ce1bd52c54633f Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Thu, 25 Sep 2014 22:15:20 +0200 +Subject: strings.h fix. + + +diff --git a/src/stdafx.h b/src/stdafx.h +index 8c23b64..d431b8d 100644 +--- a/src/stdafx.h ++++ b/src/stdafx.h +@@ -19,6 +19,7 @@ + #if defined(__BEOS__) || defined(__HAIKU__) + #include + #include ++ #include // strcasecmp and strncasecmp live here. + #define _GNU_SOURCE + #define TROUBLED_INTS + #elif defined(__NDS__) +-- +1.8.3.4 +