[gentoo-commits] repo/gentoo:master commit in: games-strategy/hedgewars/files/, games-strategy/hedgewars/

2025-05-21 Thread Sam James
commit: 7fce35a8390b2f7d2b5d1695c43eeedaa7523987
Author: Alexander Tsoy  tsoy  me>
AuthorDate: Tue Apr 29 13:47:48 2025 +
Commit: Sam James  gentoo  org>
CommitDate: Wed May 21 21:36:32 2025 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fce35a8

games-strategy/hedgewars: various fixes

* Fix build with clang-15.
* Fix build with ffmpeg-6.
* Fix SDL dependencies: png and opengl are required.
* Fix ffmpeg dependency: it is actually not suported when building with
  pas2c. Also make it optional via USE-flag.
* Allow building with fpc on 32-bit arches instead of pas2c+clang.
  Alignment bug has been fixed in fpc long time ago.
* Introduce pas2c USE-flag to still allow building with pas2c+clang.
* Rename appdata to metainfo.

Closes: https://bugs.gentoo.org/750515
Signed-off-by: Alexander Tsoy  tsoy.me>
Part-of: https://github.com/gentoo/gentoo/pull/41844
Closes: https://github.com/gentoo/gentoo/pull/41844
Signed-off-by: Sam James  gentoo.org>

 .../hedgewars/files/hedgewars-1.0.2-clang-15.patch |  21 +
 .../hedgewars/files/hedgewars-1.0.2-ffmpeg-6.patch | 455 +
 .../files/hedgewars-1.0.2-glext-prototypes.patch   |  14 +
 .../hedgewars/files/hedgewars-1.0.2-metainfo.patch |  32 ++
 .../files/hedgewars-1.0.2-respect-cc.patch |  37 ++
 games-strategy/hedgewars/hedgewars-1.0.2-r1.ebuild | 124 ++
 games-strategy/hedgewars/metadata.xml  |   2 +
 7 files changed, 685 insertions(+)

diff --git a/games-strategy/hedgewars/files/hedgewars-1.0.2-clang-15.patch 
b/games-strategy/hedgewars/files/hedgewars-1.0.2-clang-15.patch
new file mode 100644
index ..46cf26724341
--- /dev/null
+++ b/games-strategy/hedgewars/files/hedgewars-1.0.2-clang-15.patch
@@ -0,0 +1,21 @@
+
+# HG changeset patch
+# User LocutusOfBorg
+# Date 1663951667 14400
+# Node ID 6cb7330113d8960151c1f5db396859c539079e34
+# Parent  1878d95d6e15a655a4fa06848987b5c032c8c692
+Fix clang-15 compile error
+
+diff -r 1878d95d6e15 -r 6cb7330113d8 project_files/hwc/rtl/sysutils.c
+--- a/project_files/hwc/rtl/sysutils.c Fri Sep 23 02:45:49 2022 +0300
 b/project_files/hwc/rtl/sysutils.c Fri Sep 23 12:47:47 2022 -0400
+@@ -83,7 +83,7 @@
+ // Semi-dummy implementation of FormatDateTime
+ string255 fpcrtl_formatDateTime(string255 FormatStr, TDateTime DateTime)
+ {
+-string255 buffer = STRINIT(FormatStr.str);
++string255 buffer = FormatStr;
+ time_t rawtime;
+ struct tm* my_tm;
+ 
+

diff --git a/games-strategy/hedgewars/files/hedgewars-1.0.2-ffmpeg-6.patch 
b/games-strategy/hedgewars/files/hedgewars-1.0.2-ffmpeg-6.patch
new file mode 100644
index ..6214bc6c72e1
--- /dev/null
+++ b/games-strategy/hedgewars/files/hedgewars-1.0.2-ffmpeg-6.patch
@@ -0,0 +1,455 @@
+
+# HG changeset patch
+# User Pekka Ristola 
+# Date 1738001285 -3600
+# Node ID dbdb98dafd804263cc271628433015bd59b8adeb
+# Parent  b68e513d14160683f8c8d4b85031b12af3fac45b
+Add support for ffmpeg 6.0
+- Use the new send_frame/receive_packet API for encoding
+- Use the new channel layout API for audio
+- Fix audio recording
+  - Copy codec parameters to the stream parameters
+  - Set correct pts for audio frames
+- Read audio samples from file directly to the refcounted AVFrame buffer 
instead of the `g_pSamples` buffer
+- Use global AVPackets allocated with `av_packet_alloc`
+- Stop trying to write more audio frames when `WriteAudioFrame` fails with a 
negative error code
+- Fix segfault with `g_pContainer->url`. The field has to be allocated with 
`av_malloc` before writing to it. It's set to `NULL` by default.
+- Properly free allocations with `avcodec_free_context` and 
`avformat_free_context`
+
+diff -r b68e513d1416 -r dbdb98dafd80 hedgewars/avwrapper/avwrapper.c
+--- a/hedgewars/avwrapper/avwrapper.c  Mon Jan 13 11:39:58 2025 +0100
 b/hedgewars/avwrapper/avwrapper.c  Mon Jan 27 19:08:05 2025 +0100
+@@ -42,15 +42,19 @@
+ #define UNUSED(x) (void)(x)
+ 
+ static AVFormatContext* g_pContainer;
+-static AVOutputFormat* g_pFormat;
++static const AVOutputFormat* g_pFormat;
+ static AVStream* g_pAStream;
+ static AVStream* g_pVStream;
+ static AVFrame* g_pAFrame;
+ static AVFrame* g_pVFrame;
+-static AVCodec* g_pACodec;
+-static AVCodec* g_pVCodec;
++static const AVCodec* g_pACodec;
++static const AVCodec* g_pVCodec;
+ static AVCodecContext* g_pAudio;
+ static AVCodecContext* g_pVideo;
++#if LIBAVCODEC_VERSION_MAJOR >= 58
++static AVPacket* g_pAPacket;
++static AVPacket* g_pVPacket;
++#endif
+ 
+ static int g_Width, g_Height;
+ static uint32_t g_Frequency, g_Channels;
+@@ -58,8 +62,13 @@
+ static AVRational g_Framerate;
+ 
+ static FILE* g_pSoundFile;
++#if LIBAVUTIL_VERSION_MAJOR < 53
+ static int16_t* g_pSamples;
++#endif
+ static int g_NumSamples;
++#if LIBAVCODEC_VERSION_MAJOR >= 53
++static int64_t g_NextAudioPts;
++#endif
+ 
+ 
+ // compatibility section
+@@ -93,6 +102,8 @@
+ if (pkt->duration > 0)
+ pkt->duration = av_rescale_q(pkt->duration, ctb, stb);
+ }
++
++#defi

[gentoo-commits] repo/gentoo:master commit in: games-strategy/hedgewars/files/, games-strategy/hedgewars/

2023-04-30 Thread Andreas Sturmlechner
commit: 310835392951b46ecfb1e5fa32d4278007cd0b5f
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sat Apr 29 22:41:53 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sun Apr 30 07:53:41 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31083539

games-strategy/hedgewars: drop 1.0.0-r100

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 games-strategy/hedgewars/Manifest  |   1 -
 .../files/hedgewars-1.0.0-cmake-3.24.patch | 122 -
 .../hedgewars/files/hedgewars-1.0.0-fpc-3.2.patch  |  23 
 .../hedgewars/hedgewars-1.0.0-r100.ebuild  | 100 -
 4 files changed, 246 deletions(-)

diff --git a/games-strategy/hedgewars/Manifest 
b/games-strategy/hedgewars/Manifest
index d4427c98fb17..bc34a580880e 100644
--- a/games-strategy/hedgewars/Manifest
+++ b/games-strategy/hedgewars/Manifest
@@ -1,2 +1 @@
-DIST hedgewars-src-1.0.0.tar.bz2 177668452 BLAKE2B 
cbd99a4403b911023fb4a522ed1ed04272f07705321585b0e7a8f56785ef11bf8c654df95016b0af94f603c387f73804cbd95e13a92e875990adf5fec149e334
 SHA512 
9aeb904550239040a878a0e7ae5006aa4d824124b61d813b9e6f6dfe1bd1c8f5fe395e0fd6e58d685ef1259abd4669e03b985be129c620be15f6e5ad82519ec2
 DIST hedgewars-src-1.0.2.tar.bz2 177564706 BLAKE2B 
3644209cc42443b845d6a4497ba6ca8f34ffe249b99ac0ca26e5fcb5e86a0e705389e3b6db75d16b671cd2c899cecef2b6065d1755dfaab0860a6eb4c6ddb099
 SHA512 
dc79cc48eee305d8dd2b64fcbfe598d48f8aec918d9065a6af4aef9be4e4940ad858836fc6bda46e02128b80dbba8c443a4f8a702a16b0ac969f8d0a0e080502

diff --git a/games-strategy/hedgewars/files/hedgewars-1.0.0-cmake-3.24.patch 
b/games-strategy/hedgewars/files/hedgewars-1.0.0-cmake-3.24.patch
deleted file mode 100644
index 7c76e4854f50..
--- a/games-strategy/hedgewars/files/hedgewars-1.0.0-cmake-3.24.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-Description: Cherry-pick change 42f7e397894c5132b4706f478e62ce5d648119c1 into 
our custom embedded version
-Author: Gianfranco Costamagna 
-Forwarded: irc
-Last-Update: 2022-08-05
-
 hedgewars-1.0.0.orig/cmake_modules/CMakeSystemSpecificInformation.cmake
-+++ hedgewars-1.0.0/cmake_modules/CMakeSystemSpecificInformation.cmake
-@@ -1,70 +1,6 @@
--# XXX Emscripten:
--# This file is copied as-is from the CMake source tree. Due to how CMake
--# platform toolchain files work, we must have a copy of this file located
--# relative to Emscripten platform toolchain file, or file inclusion order
--# in cmGlobalGenerator::EnableLanguage will not find Emscripten.cmake
--# toolchain file, and as a result, it is not possible to set the default
--# compilation output suffix to .js, and as a consequence the script
--# check_function_exists() will not function properly (it will try to
--# build to wrong file suffix)
--
--# CMake - Cross Platform Makefile Generator
--# Copyright 2000-2014 Kitware, Inc.
--# Copyright 2000-2011 Insight Software Consortium
--# All rights reserved.
--
--# Redistribution and use in source and binary forms, with or without
--# modification, are permitted provided that the following conditions
--# are met:
--
--# * Redistributions of source code must retain the above copyright
--#   notice, this list of conditions and the following disclaimer.
--
--# * Redistributions in binary form must reproduce the above copyright
--#   notice, this list of conditions and the following disclaimer in the
--#   documentation and/or other materials provided with the distribution.
--
--# * Neither the names of Kitware, Inc., the Insight Software Consortium,
--#   nor the names of their contributors may be used to endorse or promote
--#   products derived from this software without specific prior written
--#   permission.
--
--# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
--# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
--# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
--# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
--# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
--# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
--# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
--# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
--# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
--# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
--# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--
--# 
--
--
--# The above copyright and license notice applies to distributions of
--# CMake in source and binary form.  Some source files contain additional
--# notices of original copyright by their contributors; see each source
--# for details.  Third-party software packages supplied with CMake under
--# compatible licenses provide their own copyright notices documented in
--# correspo

[gentoo-commits] repo/gentoo:master commit in: games-strategy/hedgewars/files/, games-strategy/hedgewars/

2021-06-23 Thread David Seifert
commit: b0760c366be204811b3a330a8807b92289a7b3c8
Author: David Seifert  gentoo  org>
AuthorDate: Wed Jun 23 10:22:16 2021 +
Commit: David Seifert  gentoo  org>
CommitDate: Wed Jun 23 10:22:16 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0760c36

games-strategy/hedgewars: Add patch for fpc 3.2 ICE

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: David Seifert  gentoo.org>

 .../hedgewars/files/hedgewars-1.0.0-fpc-3.2.patch  | 23 ++
 .../hedgewars/hedgewars-1.0.0-r100.ebuild  |  2 ++
 2 files changed, 25 insertions(+)

diff --git a/games-strategy/hedgewars/files/hedgewars-1.0.0-fpc-3.2.patch 
b/games-strategy/hedgewars/files/hedgewars-1.0.0-fpc-3.2.patch
new file mode 100644
index 000..b04dd0b69fa
--- /dev/null
+++ b/games-strategy/hedgewars/files/hedgewars-1.0.0-fpc-3.2.patch
@@ -0,0 +1,23 @@
+
+# HG changeset patch
+# User alfadur
+# Date 1597053413 -10800
+# Node ID 6832dab555aefa6ef2830d9452a9a88c89299e85
+# Parent  eee2b3eff91dec595a7cb486bcfd97036520e971
+workaround for FPC 3.2.0 ICE
+
+diff -r eee2b3eff91d -r 6832dab555ae hedgewars/uWorld.pas
+--- a/hedgewars/uWorld.pas Sun Aug 09 14:43:02 2020 +0200
 b/hedgewars/uWorld.pas Mon Aug 10 12:56:53 2020 +0300
+@@ -1168,8 +1168,8 @@
+ procedure ShiftWorld(Dir: LongInt); inline;
+ begin
+ preShiftWorldDx:= WorldDx;
+-WorldDx:= WorldDx + LongInt(Dir * LongInt(playWidth));
+-
++Dir := Dir * LongInt(playWidth);
++WorldDx:= WorldDx + Dir;
+ end;
+ 
+ procedure UnshiftWorld(); inline;
+

diff --git a/games-strategy/hedgewars/hedgewars-1.0.0-r100.ebuild 
b/games-strategy/hedgewars/hedgewars-1.0.0-r100.ebuild
index 7f1d4b6f7c5..766ec2014dc 100644
--- a/games-strategy/hedgewars/hedgewars-1.0.0-r100.ebuild
+++ b/games-strategy/hedgewars/hedgewars-1.0.0-r100.ebuild
@@ -54,6 +54,8 @@ BDEPEND="
 PATCHES=(
"${FILESDIR}/${P}-qt-5.15.patch"
"${FILESDIR}/${PN}-1.0.0-cmake_lua_version.patch"
+   # http://hg.hedgewars.org/hedgewars/rev/6832dab555ae
+   "${FILESDIR}/${PN}-1.0.0-fpc-3.2.patch"
 )
 
 S="${WORKDIR}"/${MY_P}



[gentoo-commits] repo/gentoo:master commit in: games-strategy/hedgewars/files/, games-strategy/hedgewars/

2020-04-18 Thread Andreas Sturmlechner
commit: daad0d62a5dcc35a25bf697707c78ae87890b4dd
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sat Apr 18 19:28:01 2020 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Apr 18 19:32:48 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=daad0d62

games-strategy/hedgewars: Fix build with Qt 5.15

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 games-strategy/hedgewars/files/hedgewars-1.0.0-qt-5.15.patch | 10 ++
 games-strategy/hedgewars/hedgewars-1.0.0-r1.ebuild   |  2 ++
 2 files changed, 12 insertions(+)

diff --git a/games-strategy/hedgewars/files/hedgewars-1.0.0-qt-5.15.patch 
b/games-strategy/hedgewars/files/hedgewars-1.0.0-qt-5.15.patch
new file mode 100644
index 000..228b31ecf1a
--- /dev/null
+++ b/games-strategy/hedgewars/files/hedgewars-1.0.0-qt-5.15.patch
@@ -0,0 +1,10 @@
+--- a/QTfrontend/ui/page/pagegamestats.cpp 2019-07-30 18:58:48.0 
+0200
 b/QTfrontend/ui/page/pagegamestats.cpp 2020-04-18 21:20:30.097454801 
+0200
+@@ -21,6 +21,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ 
+ #include "pagegamestats.h"

diff --git a/games-strategy/hedgewars/hedgewars-1.0.0-r1.ebuild 
b/games-strategy/hedgewars/hedgewars-1.0.0-r1.ebuild
index 55c30fdbc7b..b904224542e 100644
--- a/games-strategy/hedgewars/hedgewars-1.0.0-r1.ebuild
+++ b/games-strategy/hedgewars/hedgewars-1.0.0-r1.ebuild
@@ -66,6 +66,8 @@ BDEPEND="
dev-haskell/parsec
)"
 
+PATCHES=( "${FILESDIR}/${P}-qt-5.15.patch" )
+
 S="${WORKDIR}"/${MY_P}
 
 src_configure() {



[gentoo-commits] repo/gentoo:master commit in: games-strategy/hedgewars/files/, games-strategy/hedgewars/

2019-10-18 Thread James Le Cuirot
commit: 6ad4cd876224d1f588a427c2d103889e538ddc66
Author: James Le Cuirot  gentoo  org>
AuthorDate: Fri Oct 18 22:09:22 2019 +
Commit: James Le Cuirot  gentoo  org>
CommitDate: Fri Oct 18 22:09:22 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ad4cd87

games-strategy/hedgewars: Drop old 0.9.25

Package-Manager: Portage-2.3.77, Repoman-2.3.17
Signed-off-by: James Le Cuirot  gentoo.org>

 games-strategy/hedgewars/Manifest  |   2 -
 .../files/hedgewars-0.9.22-rpath-fix.patch |   9 --
 games-strategy/hedgewars/hedgewars-0.9.25.ebuild   | 111 -
 3 files changed, 122 deletions(-)

diff --git a/games-strategy/hedgewars/Manifest 
b/games-strategy/hedgewars/Manifest
index 83790d60101..71168ed483b 100644
--- a/games-strategy/hedgewars/Manifest
+++ b/games-strategy/hedgewars/Manifest
@@ -1,3 +1 @@
-DIST hedgewars-src-0.9.25.tar.bz2 175276967 BLAKE2B 
8f0779ca05ffbf18f607716bbec03bf0d6633cd6c3594bcb94b78ba606ed8c36d418d7b5456574cc0a08489e143d2390ed7ebcc8637e7987231ba04c0d5b5331
 SHA512 
956c21a7203586485e885f98fa4eccdc2fd34b50c0f817c1f6f610af1b4f341a5bb32bb8e0ace13f78ce2fb79a48934b89c1b56459a411c07a1809041968
 DIST hedgewars-src-1.0.0.tar.bz2 177668452 BLAKE2B 
cbd99a4403b911023fb4a522ed1ed04272f07705321585b0e7a8f56785ef11bf8c654df95016b0af94f603c387f73804cbd95e13a92e875990adf5fec149e334
 SHA512 
9aeb904550239040a878a0e7ae5006aa4d824124b61d813b9e6f6dfe1bd1c8f5fe395e0fd6e58d685ef1259abd4669e03b985be129c620be15f6e5ad82519ec2
-DIST hedgewars_0.9.23-dfsg-2.debian.tar.xz 77488 BLAKE2B 
5de6fa2ad91f1346f679d07b3b445bd119d2cdd3c715ace20fc36abe726330ccf9a9b69ec56c58cfca4cc6256ff248b0cc0b0e27caf2a79df0f1662ea7727e8e
 SHA512 
03680446930279178ddff85a87fc27b7c26ad6d850c8f26571517ebbd6dff296db216da6b56d4bd55c659786bc5c76e2b67a63052ee38e150655e60c08f7c491

diff --git a/games-strategy/hedgewars/files/hedgewars-0.9.22-rpath-fix.patch 
b/games-strategy/hedgewars/files/hedgewars-0.9.22-rpath-fix.patch
deleted file mode 100644
index 881c0d3217d..000
--- a/games-strategy/hedgewars/files/hedgewars-0.9.22-rpath-fix.patch
+++ /dev/null
@@ -1,9 +0,0 @@
 a/cmake_modules/paths.cmake2015-12-02 15:02:38.0 +0100
-+++ b/cmake_modules/paths.cmake2015-12-02 15:15:24.729980850 +0100
-@@ -67,5 +67,5 @@ else(APPLE AND NOT (${CMAKE_INSTALL_PREF
- # - the third one is the full path of the system dir
- #source http://www.cmake.org/pipermail/cmake/2008-January/019290.html
- #skip this if the install prefix is the standard one
--set(CMAKE_INSTALL_RPATH 
"$ORIGIN/../${target_library_install_dir}/:$ORIGIN/:${CMAKE_INSTALL_PREFIX}/${target_library_install_dir}/")
-+#set(CMAKE_INSTALL_RPATH 
"$ORIGIN/../${target_library_install_dir}/:$ORIGIN/:${CMAKE_INSTALL_PREFIX}/${target_library_install_dir}/")
- endif(APPLE)

diff --git a/games-strategy/hedgewars/hedgewars-0.9.25.ebuild 
b/games-strategy/hedgewars/hedgewars-0.9.25.ebuild
deleted file mode 100644
index c98f3a05e5d..000
--- a/games-strategy/hedgewars/hedgewars-0.9.25.ebuild
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_MAKEFILE_GENERATOR=emake
-inherit cmake-utils xdg-utils
-
-MY_P=${PN}-src-${PV}
-DEB_PATCH_VER=2
-
-DESCRIPTION="A turn-based strategy, artillery, action and comedy game"
-HOMEPAGE="https://www.hedgewars.org/";
-SRC_URI="https://www.hedgewars.org/download/releases/${MY_P}.tar.bz2
-   
mirror://debian/pool/main/h/${PN}/${PN}_0.9.23-dfsg-${DEB_PATCH_VER}.debian.tar.xz"
-
-LICENSE="GPL-2 Apache-2.0 FDL-1.3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="libav server"
-
-QA_FLAGS_IGNORED="/usr/bin/hwengine" # pascal sucks
-QA_PRESTRIPPED="/usr/bin/hwengine" # pascal sucks
-
-# qtcore:5= - depends on private header
-DEPEND="
-   >=dev-games/physfs-3.0.1
-   dev-lang/lua:0=
-   dev-qt/qtcore:5=
-   dev-qt/qtgui:5
-   dev-qt/qtnetwork:5
-   dev-qt/qtwidgets:5
-   media-libs/libpng:0=
-   media-libs/libsdl2:=
-   media-libs/sdl2-image:=
-   media-libs/sdl2-mixer:=[vorbis]
-   media-libs/sdl2-net:=
-   media-libs/sdl2-ttf:=
-   sys-libs/zlib
-   !x86? (
-   libav? ( media-video/libav:= )
-   !libav? ( media-video/ffmpeg:= )
-   )"
-RDEPEND="${DEPEND}
-   app-arch/xz-utils
-   >=media-fonts/dejavu-2.28
-   media-fonts/wqy-zenhei"
-BDEPEND="
-   dev-qt/linguist-tools:5
-   server? (
-   >=dev-lang/ghc-6.10
-   dev-haskell/entropy
-   dev-haskell/hslogger
-   >=dev-haskell/mtl-2
-   >=dev-haskell/network-2.3
-   dev-haskell/random
-   dev-haskell/regex-tdfa
-   dev-haskell/sandi
-   dev-haskell/sha
-   dev-haskell/vector
-   dev-haskell/utf8-string
-   dev-haskell/yaml
-   >=dev-haskell/z

[gentoo-commits] repo/gentoo:master commit in: games-strategy/hedgewars/files/, games-strategy/hedgewars/

2018-03-29 Thread Andreas Sturmlechner
commit: 2bc30a2ca0454d4c93ae8e7b88775b14dbe36841
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Thu Mar 29 18:36:21 2018 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Thu Mar 29 18:56:40 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2bc30a2c

games-strategy/hedgewars: Fix settings saving w/ Qt-5.9

Thanks-to: Quentin R.  retornaz.com>
Closes: https://bugs.gentoo.org/651810
Package-Manager: Portage-2.3.26, Repoman-2.3.7

 .../files/hedgewars-0.9.23-settings-saving.patch   | 134 +
 .../hedgewars/hedgewars-0.9.23-r3.ebuild   |  94 +++
 2 files changed, 228 insertions(+)

diff --git 
a/games-strategy/hedgewars/files/hedgewars-0.9.23-settings-saving.patch 
b/games-strategy/hedgewars/files/hedgewars-0.9.23-settings-saving.patch
new file mode 100644
index 000..3997ac37649
--- /dev/null
+++ b/games-strategy/hedgewars/files/hedgewars-0.9.23-settings-saving.patch
@@ -0,0 +1,134 @@
+From f8e302e5ac5033c1b7ac5d83d6d8df3f15eb6178 Mon Sep 17 00:00:00 2001
+From: Wuzzy 
+Date: Tue, 27 Mar 2018 17:32:23 +0200
+Subject: [PATCH] Fix team files and settings not saving properly, and remove
+ FileEngine stuff from DLC
+
+This is done by using absolute paths and removing physfs://
+---
+ QTfrontend/game.cpp |  4 ++--
+ QTfrontend/team.cpp | 10 +-
+ QTfrontend/ui/page/pagedata.cpp |  6 --
+ QTfrontend/util/DataManager.cpp |  4 ++--
+ 4 files changed, 9 insertions(+), 15 deletions(-)
+
+diff --git a/QTfrontend/game.cpp b/QTfrontend/game.cpp
+index 224c38350..f071ef734 100644
+--- a/QTfrontend/game.cpp
 b/QTfrontend/game.cpp
+@@ -536,7 +536,7 @@ void HWGame::abort()
+ void HWGame::sendCampaignVar(const QByteArray &varToSend)
+ {
+ QString varToFind = QString::fromUtf8(varToSend);
+-QSettings teamfile(QString("physfs://Teams/%1.hwt").arg(campaignTeam), 
QSettings::IniFormat, 0);
++QSettings teamfile(QString(cfgdir->absolutePath() + 
"/Teams/%1.hwt").arg(campaignTeam), QSettings::IniFormat, 0);
+ teamfile.setIniCodec("UTF-8");
+ QString varValue = teamfile.value("Campaign " + campaign + "/" + 
varToFind, "").toString();
+ QByteArray command;
+@@ -553,7 +553,7 @@ void HWGame::writeCampaignVar(const QByteArray & varVal)
+ QString varToWrite = QString::fromUtf8(varVal.left(i));
+ QString varValue = QString::fromUtf8(varVal.mid(i + 1));
+ 
+-QSettings teamfile(QString("physfs://Teams/%1.hwt").arg(campaignTeam), 
QSettings::IniFormat, 0);
++QSettings teamfile(QString(cfgdir->absolutePath() + 
"/Teams/%1.hwt").arg(campaignTeam), QSettings::IniFormat, 0);
+ teamfile.setIniCodec("UTF-8");
+ teamfile.setValue("Campaign " + campaign + "/" + varToWrite, varValue);
+ }
+diff --git a/QTfrontend/team.cpp b/QTfrontend/team.cpp
+index 0586e622a..740697b7f 100644
+--- a/QTfrontend/team.cpp
 b/QTfrontend/team.cpp
+@@ -171,7 +171,7 @@ HWTeam & HWTeam::operator = (const HWTeam & other)
+ 
+ bool HWTeam::loadFromFile()
+ {
+-QSettings 
teamfile(QString("physfs://Teams/%1.hwt").arg(DataManager::safeFileName(m_name)),
 QSettings::IniFormat, 0);
++QSettings teamfile(QString(cfgdir->absolutePath() + 
"/Teams/%1.hwt").arg(DataManager::safeFileName(m_name)), QSettings::IniFormat, 
0);
+ teamfile.setIniCodec("UTF-8");
+ m_name = teamfile.value("Team/Name", m_name).toString();
+ m_grave = teamfile.value("Team/Grave", "Statue").toString();
+@@ -204,7 +204,7 @@ bool HWTeam::loadFromFile()
+ 
+ bool HWTeam::fileExists()
+ {
+-QFile 
f(QString("physfs://Teams/%1.hwt").arg(DataManager::safeFileName(m_name)));
++QFile f(QString(cfgdir->absolutePath() + 
"/Teams/%1.hwt").arg(DataManager::safeFileName(m_name)));
+ return f.exists();
+ }
+ 
+@@ -220,7 +220,7 @@ bool HWTeam::deleteFile()
+ {
+ if(m_isNetTeam)
+ return false;
+-QFile 
cfgfile(QString("physfs://Teams/%1.hwt").arg(DataManager::safeFileName(m_name)));
++QFile cfgfile(QString(cfgdir->absolutePath() + 
"/Teams/%1.hwt").arg(DataManager::safeFileName(m_name)));
+ cfgfile.remove();
+ return true;
+ }
+@@ -229,12 +229,12 @@ bool HWTeam::saveToFile()
+ {
+ if (OldTeamName != m_name)
+ {
+-QFile 
cfgfile(QString("physfs://Teams/%1.hwt").arg(DataManager::safeFileName(OldTeamName)));
++QFile cfgfile(QString(cfgdir->absolutePath() + 
"/Teams/%1.hwt").arg(DataManager::safeFileName(OldTeamName)));
+ cfgfile.remove();
+ OldTeamName = m_name;
+ }
+ 
+-QString fileName = 
QString("physfs://Teams/%1.hwt").arg(DataManager::safeFileName(m_name));
++QString fileName = QString(cfgdir->absolutePath() + 
"/Teams/%1.hwt").arg(DataManager::safeFileName(m_name));
+ DataManager::ensureFileExists(fileName);
+ QSettings teamfile(fileName, QSettings::IniFormat, 0);
+ teamfile.setIniCodec("UTF-8");
+diff --git a/QTfrontend/ui/page/pagedata.cpp b/QTfrontend/ui/page/pagedata.cpp
+index ccdea5ac4..cc7d17b2a 100644
+---

[gentoo-commits] repo/gentoo:master commit in: games-strategy/hedgewars/files/, games-strategy/hedgewars/

2018-02-27 Thread Andreas Sturmlechner
commit: ff32834e66f881415549ae94747b5382cf2463ad
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Tue Feb 27 20:53:26 2018 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Tue Feb 27 21:05:46 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff32834e

games-strategy/hedgewars: Add upstream patch to build w/ Qt5

See also:
https://issues.hedgewars.org/show_bug.cgi?id=159
https://hg.hedgewars.org/hedgewars/log?rev=branch(qt5transition)

Bug: https://bugs.gentoo.org/645504
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../hedgewars/files/hedgewars-0.9.23-qt5-1.patch   |  87 
 .../hedgewars/files/hedgewars-0.9.23-qt5-2.patch   | 477 +
 .../hedgewars/hedgewars-0.9.23-r1.ebuild   |  92 
 3 files changed, 656 insertions(+)

diff --git a/games-strategy/hedgewars/files/hedgewars-0.9.23-qt5-1.patch 
b/games-strategy/hedgewars/files/hedgewars-0.9.23-qt5-1.patch
new file mode 100644
index 000..ec96bd8ef45
--- /dev/null
+++ b/games-strategy/hedgewars/files/hedgewars-0.9.23-qt5-1.patch
@@ -0,0 +1,87 @@
+
+# HG changeset patch
+# User unc0rr
+# Date 1516824334 -3600
+# Node ID 8869b5256720f0378bf9d5edc68ecb7e1f376039
+# Parent  856570ddd409bec11645c90b5a92fb79c5f2a4e1
+Configure for Qt5
+
+diff -r 856570ddd409 -r 8869b5256720 QTfrontend/CMakeLists.txt
+--- a/QTfrontend/CMakeLists.txtMon Jan 15 12:15:56 2018 -0500
 b/QTfrontend/CMakeLists.txtWed Jan 24 21:05:34 2018 +0100
+@@ -1,24 +1,6 @@
+-# Configure for Qt4
+-set(QT_MIN_VERSION "4.7.0")
+-include(CheckLibraryExists)
++find_package(Qt5 COMPONENTS Core Gui Network Svg Xml OpenGL)
+ 
+-set(QT_USE_QTCORE TRUE)
+-set(QT_USE_QTGUI TRUE)
+-set(QT_USE_QTNETWORK TRUE)
+-set(QT_USE_QTSVG FALSE)
+-set(QT_USE_QTXML FALSE)
+-set(QT_USE_QTOPENGL FALSE)
+-set(QT_USE_QTMAIN TRUE)
+-
+-find_package(Qt4 REQUIRED)
+-include(${QT_USE_FILE})
+-
+-# https://bugreports.qt-project.org/browse/QTBUG-17333
+-if(APPLE AND
+-   ${QTVERSION} VERSION_GREATER "4.7.0" AND
+-   ${QTVERSION} VERSION_LESS "4.7.4")
+-   message(FATAL_ERROR "This version of Qt is known *not* to work, please 
update or use a lower version")
+-endif()
++include(CheckLibraryExists)
+ 
+ find_package(SDL2 REQUIRED)
+ find_package(SDL2_mixer 2 REQUIRED) #audio in SDLInteraction
+@@ -159,9 +141,9 @@
+ endif()
+ endif()
+ 
+-qt4_add_resources(hwfr_rez_src ${hwfr_rez})
++qt5_add_resources(hwfr_rez_src ${hwfr_rez})
+ 
+-qt4_wrap_cpp(hwfr_moc_srcs ${hwfr_moc_hdrs})
++qt5_wrap_cpp(hwfr_moc_srcs ${hwfr_moc_hdrs})
+ 
+ 
+ if(APPLE)
+@@ -198,14 +180,14 @@
+ 
+ list(APPEND HW_LINK_LIBS
+ physfs physlayer
+-${QT_LIBRARIES}
++Qt5::Core Qt5::Gui Qt5::Network Qt5::Svg Qt5::Xml Qt5::OpenGL
+ )
+ 
+ list(APPEND HW_LINK_LIBS
+ ${SDL2_LIBRARY}
+ ${SDL2_MIXER_LIBRARIES}
+ )
+-
++
+ if(WIN32 AND NOT UNIX)
+ if(NOT SDL2_LIBRARY)
+ list(APPEND HW_LINK_LIBS SDL2)
+diff -r 856570ddd409 -r 8869b5256720 share/hedgewars/Data/Locale/CMakeLists.txt
+--- a/share/hedgewars/Data/Locale/CMakeLists.txt   Mon Jan 15 12:15:56 
2018 -0500
 b/share/hedgewars/Data/Locale/CMakeLists.txt   Wed Jan 24 21:05:34 
2018 +0100
+@@ -1,5 +1,4 @@
+-find_package(Qt4 REQUIRED)
+-include(${QT_USE_FILE})
++find_package(Qt5 COMPONENTS LinguistTools)
+ 
+ file(GLOB txttrans2 ??.txt)
+ file(GLOB txttrans5 ?.txt)
+@@ -9,7 +8,7 @@
+ file(GLOB campaignfiles campaigns_*.txt)
+ file(GLOB tipfiles tips_*.xml)
+ 
+-QT4_ADD_TRANSLATION(QM ${tsfiles})
++QT5_ADD_TRANSLATION(QM ${tsfiles})
+ 
+ add_custom_target (release-translation ALL
+ DEPENDS ${QM}
+

diff --git a/games-strategy/hedgewars/files/hedgewars-0.9.23-qt5-2.patch 
b/games-strategy/hedgewars/files/hedgewars-0.9.23-qt5-2.patch
new file mode 100644
index 000..eb4e465f009
--- /dev/null
+++ b/games-strategy/hedgewars/files/hedgewars-0.9.23-qt5-2.patch
@@ -0,0 +1,477 @@
+
+# HG changeset patch
+# User unc0rr
+# Date 1516828810 -3600
+# Node ID fc47fc4af6bd6f399035923453cd85c8f50146f7
+# Parent  8869b5256720f0378bf9d5edc68ecb7e1f376039
+Finish porting. Seems to work, but no thorough testing has been performed
+
+diff -r 8869b5256720 -r fc47fc4af6bd QTfrontend/CMakeLists.txt
+--- a/QTfrontend/CMakeLists.txtWed Jan 24 21:05:34 2018 +0100
 b/QTfrontend/CMakeLists.txtWed Jan 24 22:20:10 2018 +0100
+@@ -1,5 +1,7 @@
+ find_package(Qt5 COMPONENTS Core Gui Network Svg Xml OpenGL)
+ 
++include_directories(${Qt5Core_PRIVATE_INCLUDE_DIRS})
++
+ include(CheckLibraryExists)
+ 
+ find_package(SDL2 REQUIRED)
+diff -r 8869b5256720 -r fc47fc4af6bd QTfrontend/main.cpp
+--- a/QTfrontend/main.cpp  Wed Jan 24 21:05:34 2018 +0100
 b/QTfrontend/main.cpp  Wed Jan 24 22:20:10 2018 +0100
+@@ -20,7 +20,6 @@
+ 
+ #include 
+ #include 
+-#include 
+ #include 
+ #include 
+ #include 
+@@ -252,7 +251,7 @@
+ splash.show();
+ #endif
+ 
+-app.setStyle(new QPlastiqueStyle());
++//app.setStyle(new QPlastiqueStyle());
+ 
+ QDa