mirror of
https://github.com/archlinux-jerry/pkgbuilds
synced 2024-11-26 07:50:40 +08:00
update: openttd to 1.11.2
This commit is contained in:
parent
753997e2e4
commit
ae657ed53e
2 changed files with 41 additions and 45 deletions
|
@ -1,6 +1,6 @@
|
||||||
From 441bc1d6f41caccd1c5735b119b99f394f5f8847 Mon Sep 17 00:00:00 2001
|
From ccfdbfbd45518592a9aba969467fc02f80e4de16 Mon Sep 17 00:00:00 2001
|
||||||
From: Jerry <isjerryxiao@outlook.com>
|
From: Jerry <isjerryxiao@outlook.com>
|
||||||
Date: Sun, 26 Apr 2020 20:40:46 +0800
|
Date: Fri, 6 Aug 2021 09:41:13 +0800
|
||||||
Subject: [PATCH] change network server
|
Subject: [PATCH] change network server
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -10,35 +10,35 @@ Subject: [PATCH] change network server
|
||||||
3 files changed, 40 insertions(+), 3 deletions(-)
|
3 files changed, 40 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
|
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
|
||||||
index 6308c1447..068f33dc5 100644
|
index ab9e7e12e..68fc9c9de 100644
|
||||||
--- a/src/company_cmd.cpp
|
--- a/src/company_cmd.cpp
|
||||||
+++ b/src/company_cmd.cpp
|
+++ b/src/company_cmd.cpp
|
||||||
@@ -208,7 +208,7 @@ bool CheckCompanyHasMoney(CommandCost &cost)
|
@@ -211,7 +211,7 @@ bool CheckCompanyHasMoney(CommandCost &cost)
|
||||||
* @param c Company to pay the bill.
|
* @param c Company to pay the bill.
|
||||||
* @param cost Money to pay.
|
* @param cost Money to pay.
|
||||||
*/
|
*/
|
||||||
-static void SubtractMoneyFromAnyCompany(Company *c, CommandCost cost)
|
-static void SubtractMoneyFromAnyCompany(Company *c, const CommandCost &cost)
|
||||||
+void SubtractMoneyFromAnyCompany(Company *c, CommandCost cost)
|
+void SubtractMoneyFromAnyCompany(Company *c, const CommandCost &cost)
|
||||||
{
|
{
|
||||||
if (cost.GetCost() == 0) return;
|
if (cost.GetCost() == 0) return;
|
||||||
assert(cost.GetExpensesType() != INVALID_EXPENSES);
|
assert(cost.GetExpensesType() != INVALID_EXPENSES);
|
||||||
diff --git a/src/company_func.h b/src/company_func.h
|
diff --git a/src/company_func.h b/src/company_func.h
|
||||||
index cec611004..d2758ecd0 100644
|
index 01f585910..d55b20e01 100644
|
||||||
--- a/src/company_func.h
|
--- a/src/company_func.h
|
||||||
+++ b/src/company_func.h
|
+++ b/src/company_func.h
|
||||||
@@ -26,6 +26,7 @@ void UpdateLandscapingLimits();
|
@@ -25,6 +25,7 @@ void CompanyAdminBankrupt(CompanyID company_id);
|
||||||
|
void UpdateLandscapingLimits();
|
||||||
|
|
||||||
bool CheckCompanyHasMoney(CommandCost &cost);
|
bool CheckCompanyHasMoney(CommandCost &cost);
|
||||||
void SubtractMoneyFromCompany(CommandCost cost);
|
+void SubtractMoneyFromAnyCompany(Company *c, const CommandCost &cost);
|
||||||
+void SubtractMoneyFromAnyCompany(Company *c, CommandCost cost);
|
void SubtractMoneyFromCompany(const CommandCost& cost);
|
||||||
void SubtractMoneyFromCompanyFract(CompanyID company, CommandCost cost);
|
void SubtractMoneyFromCompanyFract(CompanyID company, const CommandCost& cost);
|
||||||
CommandCost CheckOwnership(Owner owner, TileIndex tile = 0);
|
CommandCost CheckOwnership(Owner owner, TileIndex tile = 0);
|
||||||
CommandCost CheckTileOwnership(TileIndex tile);
|
|
||||||
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
|
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
|
||||||
index c82c51cfd..24df26d7e 100644
|
index 6660486fe..b20f95543 100644
|
||||||
--- a/src/network/network_server.cpp
|
--- a/src/network/network_server.cpp
|
||||||
+++ b/src/network/network_server.cpp
|
+++ b/src/network/network_server.cpp
|
||||||
@@ -1447,11 +1447,47 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_RCON(Packet *p)
|
@@ -1483,11 +1483,47 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_RCON(Packet *p)
|
||||||
char pass[NETWORK_PASSWORD_LENGTH];
|
char pass[NETWORK_PASSWORD_LENGTH];
|
||||||
char command[NETWORK_RCONCOMMAND_LENGTH];
|
char command[NETWORK_RCONCOMMAND_LENGTH];
|
||||||
|
|
||||||
|
@ -89,5 +89,5 @@ index c82c51cfd..24df26d7e 100644
|
||||||
DEBUG(net, 0, "[rcon] wrong password from client-id %d", this->client_id);
|
DEBUG(net, 0, "[rcon] wrong password from client-id %d", this->client_id);
|
||||||
return NETWORK_RECV_STATUS_OKAY;
|
return NETWORK_RECV_STATUS_OKAY;
|
||||||
--
|
--
|
||||||
2.28.0
|
2.32.0
|
||||||
|
|
||||||
|
|
|
@ -1,46 +1,42 @@
|
||||||
# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
|
# Maintainer: Laurent Carlier <lordheavym@gmail.com>
|
||||||
|
# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
|
||||||
|
# Contributor: Vesa Kaihlavirta <vegai@iki.fi>
|
||||||
|
|
||||||
pkgname=openttd
|
pkgname=openttd
|
||||||
pkgver=1.10.3
|
pkgver=1.11.2
|
||||||
pkgrel=1
|
pkgrel=5
|
||||||
pkgdesc='An engine for running Transport Tycoon Deluxe.'
|
pkgdesc='Engine for running Transport Tycoon Deluxe'
|
||||||
arch=('x86_64')
|
arch=(x86_64)
|
||||||
url='https://www.openttd.org'
|
url='https://www.openttd.org'
|
||||||
license=('GPL')
|
license=(GPL)
|
||||||
depends=('libpng' 'sdl2' 'icu' 'fontconfig' 'lzo' 'hicolor-icon-theme' 'desktop-file-utils' 'xz' 'fluidsynth')
|
depends=(fluidsynth fontconfig hicolor-icon-theme libpng)
|
||||||
|
makedepends=(cmake ninja)
|
||||||
optdepends=('openttd-opengfx: free graphics'
|
optdepends=('openttd-opengfx: free graphics'
|
||||||
'openttd-opensfx: free soundset')
|
'openttd-opensfx: free soundset')
|
||||||
source=("https://proxy.binaries.openttd.org/openttd-releases/${pkgver}/${pkgname}-${pkgver}-source.tar.xz"
|
source=("https://proxy.binaries.openttd.org/openttd-releases/$pkgver/$pkgname-$pkgver-source.tar.xz"
|
||||||
"0001-change-network-server.patch")
|
"0001-change-network-server.patch")
|
||||||
sha512sums=('d1cd535e8e49f0ac147704341287af1b16bde6725fd9152dd36dcb780559b400da8bb31c4e8eb665a0d11e9b1f5bf8a96be0f97f7a85bd967eec534fdd3dd0d4'
|
b2sums=('c71fd98a480566aede29f84afbd100b6d0dfa80311860907a7287d2d5bed74bd492c2b1012cd83f45fe68d60fb0c2378e1384530a84c28bd7fbd907b45110491'
|
||||||
'86e8eb8cf85996171f0516d2052e745ec13081cc96e8786832868c0e5190e8f08f569892ebd0076259bd6717d77236bb45f21097234cc3723153816db9b3197d')
|
'0f704bfbec2b37accaf13d139fc1e9e8dc30c03f3530bfa43b05dcd125c0f4c61c0747372fa80f85dee896fff1c69dbeab6c0e5bd780f196c6b512221eae327c')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
|
sed -i '/sse/d;/SSE/d' $pkgname-$pkgver/CMakeLists.txt
|
||||||
cd ${pkgname}-${pkgver}
|
cd ${pkgname}-${pkgver}
|
||||||
patch -p1 -i ../0001-change-network-server.patch
|
patch -p1 -i ../0001-change-network-server.patch
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd ${pkgname}-${pkgver}
|
cmake \
|
||||||
|
-B build \
|
||||||
# http://site.icu-project.org/download/61#TOC-Migration-Issues
|
-D CMAKE_BUILD_TYPE=Release \
|
||||||
CXXFLAGS+=' -DU_USING_ICU_NAMESPACE=1'
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
||||||
|
-D CMAKE_INSTALL_BINDIR=bin \
|
||||||
./configure \
|
-D CMAKE_INSTALL_DATADIR=/usr/share \
|
||||||
--prefix-dir=/usr \
|
-G Ninja \
|
||||||
--binary-name=${pkgname} \
|
-S $pkgname-$pkgver
|
||||||
--binary-dir=bin \
|
ninja -C build
|
||||||
--data-dir=share/${pkgname} \
|
cd build
|
||||||
--install-dir="${pkgdir}" \
|
|
||||||
--doc-dir=share/doc/${pkgname} \
|
|
||||||
--with-fluidsynth \
|
|
||||||
--menu-name="OpenTTD"
|
|
||||||
|
|
||||||
make
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd ${pkgname}-${pkgver}
|
DESTDIR="$pkgdir" ninja -C build install
|
||||||
|
|
||||||
make install
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue