summaryrefslogtreecommitdiffstats
path: root/games/freeorion
diff options
context:
space:
mode:
Diffstat (limited to 'games/freeorion')
-rw-r--r--games/freeorion/compilefix.diff36
-rw-r--r--games/freeorion/freeorion.SlackBuild24
-rw-r--r--games/freeorion/freeorion.info8
-rw-r--r--games/freeorion/ftb.patch103
4 files changed, 124 insertions, 47 deletions
diff --git a/games/freeorion/compilefix.diff b/games/freeorion/compilefix.diff
deleted file mode 100644
index c4c207a520..0000000000
--- a/games/freeorion/compilefix.diff
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -Naur freeorion-0.4.8/parse/ConditionParser.h freeorion-0.4.8.patched/parse/ConditionParser.h
---- freeorion-0.4.8/parse/ConditionParser.h 2018-08-23 05:41:14.000000000 -0400
-+++ freeorion-0.4.8.patched/parse/ConditionParser.h 2021-02-17 04:34:17.063751926 -0500
-@@ -1,6 +1,7 @@
- #ifndef _ConditionParser_h_
- #define _ConditionParser_h_
-
-+#include "../universe/ValueRef.h"
- #include "Lexer.h"
- #include "ParseImpl.h"
- #include "ValueRefParser.h"
-diff -Naur freeorion-0.4.8/server/ServerApp.cpp freeorion-0.4.8.patched/server/ServerApp.cpp
---- freeorion-0.4.8/server/ServerApp.cpp 2018-08-23 05:41:14.000000000 -0400
-+++ freeorion-0.4.8.patched/server/ServerApp.cpp 2021-02-17 16:33:47.472827568 -0500
-@@ -1715,7 +1715,7 @@
- // make a link to new connection
- m_player_empire_ids[player_connection->PlayerID()] = empire.first;
-
-- const OrderSet dummy;
-+ OrderSet dummy;
- const OrderSet& orders = orders_it->second ? *orders_it->second : dummy;
-
- auto player_info_map = GetPlayerInfoMap();
-diff -Naur freeorion-0.4.8/universe/Universe.h freeorion-0.4.8.patched/universe/Universe.h
---- freeorion-0.4.8/universe/Universe.h 2018-08-23 05:41:14.000000000 -0400
-+++ freeorion-0.4.8.patched/universe/Universe.h 2021-02-17 04:03:51.908917840 -0500
-@@ -3,7 +3,8 @@
-
-
- #include "EnumsFwd.h"
--#include "ValueRefFwd.h"
-+#include "ValueRef.h"
-+#include "Condition.h"
- #include "ObjectMap.h"
- #include "UniverseObject.h"
- #include "../util/Pending.h"
diff --git a/games/freeorion/freeorion.SlackBuild b/games/freeorion/freeorion.SlackBuild
index 550b76c64c..d410122213 100644
--- a/games/freeorion/freeorion.SlackBuild
+++ b/games/freeorion/freeorion.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for freeorion
@@ -26,10 +26,13 @@
# have no idea how this build passed QA, since it was broken all
# along.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=freeorion
-VERSION=${VERSION:-0.4.8}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-0.4.10.1}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -39,7 +42,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -73,12 +83,12 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p0 < $CWD/ftb.patch
+
# tell cmake to use clang
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
-patch -p1 < $CWD/compilefix.diff
-
mkdir -p build
cd build
cmake \
@@ -104,4 +114,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/games/freeorion/freeorion.info b/games/freeorion/freeorion.info
index 6796385b79..14f4c641bc 100644
--- a/games/freeorion/freeorion.info
+++ b/games/freeorion/freeorion.info
@@ -1,10 +1,10 @@
PRGNAM="freeorion"
-VERSION="0.4.8"
+VERSION="0.4.10.1"
HOMEPAGE="http://www.freeorion.org"
-DOWNLOAD="https://github.com/freeorion/freeorion/archive/v0.4.8/freeorion-0.4.8.tar.gz"
-MD5SUM="df605a8b6c4de264f2319610dea99dbe"
+DOWNLOAD="https://github.com/freeorion/freeorion/archive/v0.4.10.1/freeorion-0.4.10.1.tar.gz"
+MD5SUM="6c1f5a2508bb60a6503709b355246488"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="SDL2 OpenAL"
+REQUIRES=""
MAINTAINER="Dimitris Zlatanidis"
EMAIL="d.zlatanidis@gmail.com"
diff --git a/games/freeorion/ftb.patch b/games/freeorion/ftb.patch
new file mode 100644
index 0000000000..5b888eca76
--- /dev/null
+++ b/games/freeorion/ftb.patch
@@ -0,0 +1,103 @@
+--- UI/CombatReport/GraphicalSummary.cpp 2021-07-10 14:11:25.281161865 -0500
++++ UI/CombatReport/GraphicalSummary.cpp 2021-07-10 14:11:34.010981701 -0500
+@@ -409,91 +409,6 @@
+ m_y_axis_label->MoveTo(GG::Pt(-m_y_axis_label->MinUsableSize().x / 2 - AXIS_WIDTH, Height()/2 - m_y_axis_label->Height()/2));
+ }
+
+- void DrawArrow(GG::Pt begin, GG::Pt end) {
+- double head_width = 5.0;
+- // A vector (math) of the arrow we wish to draw
+- GG::Pt direction = end - begin;
+- double length = sqrt(1.0*(Value(direction.x)*Value(direction.x) +
+- Value(direction.y)*Value(direction.y)));
+- if (length == 0) {
+- return;
+- }
+-
+- // The point in the main line of the arrow,
+- // paraller to which the head ends
+- // \.
+- // \.
+- // --------h-->
+- // /.
+- // /.
+- // h is at the handle
+- GG::Pt handle;
+- // How much to move off the handle to get to
+- // the end point of one of the head lines
+- GG::X delta_x;
+- GG::Y delta_y;
+-
+- if (direction.x != 0 && direction.y != 0) {
+- // In a skewed arrow we need
+- // a bit of geometry to figure out the head
+- double x = Value(direction.x);
+- double y = Value(direction.y);
+- double normalizer = head_width / sqrt(1 + x*x / (y*y));
+- delta_x = GG::X(normalizer);
+- delta_y = GG::Y(- x / y * normalizer);
+-
+- handle = end - GG::Pt((head_width / length) * direction.x, (head_width / length) * direction.y);
+- } else if (direction.x == 0) {
+- // Vertical arrow
+- handle = end;
+- handle.y -= boost::math::sign(Value(direction.y))*GG::Y(head_width);
+- delta_x = GG::X(head_width);
+- delta_y = GG::Y0;
+- } else {
+- //horizontal arrow
+- handle = end;
+- handle.x -= boost::math::sign(Value(direction.x)) * GG::X(head_width);
+- delta_x = GG::X0;
+- delta_y = GG::Y(head_width);
+- }
+-
+- GG::Pt left_head = handle;
+- GG::Pt right_head = handle;
+-
+- left_head.x += delta_x;
+- left_head.y += delta_y;
+- // The other line is on the opposite side of the handle
+- right_head.x -= delta_x;
+- right_head.y -= delta_y;
+-
+- GG::glColor(GG::CLR_WHITE);
+- glLineWidth(2);
+- glDisable(GL_TEXTURE_2D);
+-
+- GG::GL2DVertexBuffer verts;
+- verts.reserve(6);
+- verts.store(Value(begin.x), Value(begin.y));
+- verts.store(Value(end.x), Value(end.y));
+- verts.store(Value(end.x), Value(end.y));
+- verts.store(Value(left_head.x), Value(left_head.y));
+- verts.store(Value(end.x), Value(end.y));
+- verts.store(Value(right_head.x),Value(right_head.y));
+- verts.activate();
+-
+- glDrawArrays(GL_LINES, 0, verts.size());
+-
+- glEnable(GL_TEXTURE_2D);
+- }
+-
+- void Render() override {
+- // Draw the axes outside th3e client area
+- GG::Pt begin(ClientUpperLeft().x - AXIS_WIDTH/2, ClientLowerRight().y + AXIS_HEIGHT/2);
+- GG::Pt x_end(ClientLowerRight().x, begin.y);
+- GG::Pt y_end(begin.x, ClientUpperLeft().y);
+- DrawArrow(begin, x_end);
+- DrawArrow(begin, y_end);
+- }
+-
+ void SizeMove(const GG::Pt& ul, const GG::Pt& lr) override {
+ GG::Wnd::SizeMove(ul, lr);
+ DoLayout();
+--- universe/Conditions.cpp 2021-07-10 14:11:05.049579392 -0500
++++ universe/Conditions.cpp 2021-07-10 14:13:39.582389758 -0500
+@@ -1,5 +1,6 @@
+ #include "Conditions.h"
+
++#include <cfloat>
+ #include "../util/Logger.h"
+ #include "../util/Random.h"
+ #include "../util/i18n.h"