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)
This commit is contained in:
Adrien Destugues
2014-09-25 22:29:26 +02:00
parent ecbab95934
commit b9c8ccbcee
3 changed files with 51 additions and 28 deletions

View File

@@ -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 \

View File

@@ -1,27 +0,0 @@
From 0d2515090adbf1ed589046047727ce9a088c0db2 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
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

View File

@@ -0,0 +1,49 @@
From 727ce994cb9751567f132ae8339f80ae9167ab1e Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
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 <pulkomandy@gmail.com>
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 <SupportDefs.h>
#include <unistd.h>
+ #include <strings.h> // strcasecmp and strncasecmp live here.
#define _GNU_SOURCE
#define TROUBLED_INTS
#elif defined(__NDS__)
--
1.8.3.4