1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 14:57:35 +00:00

Ports: Update freeciv to version 3.0.8

This commit also removes a logging patch, as these changes have now
been upstreamed.
This commit is contained in:
Tim Ledbetter 2023-08-01 20:23:37 +01:00 committed by Jelle Raaijmakers
parent 0be4a3b635
commit f24aab662f
4 changed files with 3 additions and 61 deletions

View file

@ -1,11 +1,11 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=freeciv
version=3.0.0-beta2
version=3.0.8
useconfigure=true
use_fresh_config_sub=true
config_sub_paths=("bootstrap/config.sub")
configopts=("--enable-client=sdl2" "--enable-fcmp=no")
files="http://files.freeciv.org/beta/freeciv-${version}.tar.xz freeciv-${version}.tar.xz 9f44dc28068b239c18bda68192ddb27622030880f8ab9c17f777eac28391269e"
files="http://files.freeciv.org/stable/freeciv-${version}.tar.xz freeciv-${version}.tar.xz 3b5aa32f628890be1741c3ac942cee82c79c065f8db6baff18d734a5c0e776d4"
depends=("SDL2" "SDL2_image" "SDL2_mixer" "SDL2_ttf" "SDL2_gfx" "zstd" "libicu" "xz" "gettext" "curl")
launcher_name=Freeciv
launcher_category=Games

View file

@ -1,51 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Gunnar Beutner <gbeutner@serenityos.org>
Date: Fri, 4 Jun 2021 23:20:55 +0200
Subject: [PATCH] Log to /dev/null if the log file doesn't exist
---
client/connectdlg_common.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/client/connectdlg_common.c b/client/connectdlg_common.c
index 0afef96..d931378 100644
--- a/client/connectdlg_common.c
+++ b/client/connectdlg_common.c
@@ -302,6 +302,7 @@ bool client_start_server(void)
char dbg_lvl_buf[32]; /* Do not move this inside the block where it gets filled,
* it's needed via the argv[x] pointer later on, so must
* remain in scope. */
+ bool log_to_dev_null = FALSE;
/* Set up the command-line parameters. */
fc_snprintf(port_buf, sizeof(port_buf), "%d", internal_server_port);
@@ -376,16 +377,21 @@ bool client_start_server(void)
fclose(stdout);
fclose(stderr);
- /* FIXME: include the port to avoid duplication? */
- if (logfile) {
+ if (!logfile) {
+ log_to_dev_null = TRUE;
+ fd = open("/dev/null", O_WRONLY);
+ } else {
+ /* FIXME: include the port to avoid duplication? */
fd = open(logfile, O_WRONLY | O_CREAT | O_APPEND, 0644);
+ }
- if (fd != 1) {
- dup2(fd, 1);
- }
- if (fd != 2) {
- dup2(fd, 2);
- }
+ if (fd != 1) {
+ dup2(fd, 1);
+ }
+ if (fd != 2) {
+ dup2(fd, 2);
+ }
+ if (!log_to_dev_null) {
fchmod(1, 0644);
}

View file

@ -1,7 +0,0 @@
# Patches for freeciv on SerenityOS
## `0001-Log-to-dev-null-if-the-log-file-doesn-t-exist.patch`
Log to /dev/null if the log file doesn't exist