[arch-commits] Commit in gcompris-qt/trunk (4 files)
Evangelos Foutras
foutrelis at archlinux.org
Sun Aug 13 06:20:12 UTC 2017
Date: Sunday, August 13, 2017 @ 06:20:11
Author: foutrelis
Revision: 250026
upgpkg: gcompris-qt 0.80-1
New upstream release.
Modified:
gcompris-qt/trunk/PKGBUILD
Deleted:
gcompris-qt/trunk/0001-chess-Qt-bug-in-5.8-with-do-while-loop-https-bugrepo.patch
gcompris-qt/trunk/0002-chess-Qt-bug-in-5.8-with-do-while-loop-https-bugrepo.patch
gcompris-qt/trunk/0003-chess-allow-to-move-again-the-same-piece-after-undo.patch
-----------------------------------------------------------------+
0001-chess-Qt-bug-in-5.8-with-do-while-loop-https-bugrepo.patch | 83 -------
0002-chess-Qt-bug-in-5.8-with-do-while-loop-https-bugrepo.patch | 117 ----------
0003-chess-allow-to-move-again-the-same-piece-after-undo.patch | 36 ---
PKGBUILD | 19 -
4 files changed, 4 insertions(+), 251 deletions(-)
Deleted: 0001-chess-Qt-bug-in-5.8-with-do-while-loop-https-bugrepo.patch
===================================================================
--- 0001-chess-Qt-bug-in-5.8-with-do-while-loop-https-bugrepo.patch 2017-08-13 06:00:03 UTC (rev 250025)
+++ 0001-chess-Qt-bug-in-5.8-with-do-while-loop-https-bugrepo.patch 2017-08-13 06:20:11 UTC (rev 250026)
@@ -1,83 +0,0 @@
-From 36606b617776ea0c87dac48834e440930d1d881a Mon Sep 17 00:00:00 2001
-From: Johnny Jazeix <jazeix at gmail.com>
-Date: Sat, 18 Feb 2017 19:39:02 +0100
-Subject: [PATCH 1/3] chess, Qt bug in 5.8 with do-while loop
- (https://bugreports.qt.io/browse/QTBUG-59012)
-
----
- src/activities/chess/engine.js | 28 ++++++++++++++++++----------
- 1 file changed, 18 insertions(+), 10 deletions(-)
-
-diff --git a/src/activities/chess/engine.js b/src/activities/chess/engine.js
-index 9a8a48d6..12330306 100644
---- a/src/activities/chess/engine.js
-+++ b/src/activities/chess/engine.js
-@@ -581,11 +581,14 @@ function p4_check_check(state, colour){
- /*find the king. The pieces list updates from the end,
- * so the last-most king is correctly placed.*/
- var pieces = state.pieces[colour];
-- var p;
- var i = pieces.length;
-- do {
-- p = pieces[--i];
-- } while (p[0] != (P4_KING | colour));
-+ var king = P4_KING | colour
-+ // can't do-while loop: https://bugreports.qt.io/browse/QTBUG-59012
-+ var val = king-1
-+ while (val !== king) {
-+ var p = pieces[--i];
-+ val = p[0]
-+ };
- var s = p[1];
- var other_colour = 1 - colour;
- var dir = 10 - 20 * colour;
-@@ -614,19 +617,26 @@ function p4_check_check(state, colour){
- var m = diagonal_moves[i];
- var e = s;
- var E;
-- do {
-+ // can't do-while loop: https://bugreports.qt.io/browse/QTBUG-59012
-+ e += m;
-+ E = board[e];
-+ while (!E) {
- e += m;
- E = board[e];
-- } while (!E);
-+ }
- if((E & diag_mask) == diag_slider)
- return true;
-
- m = grid_moves[i];
- e = s;
-- do {
-+ // can't do-while loop: https://bugreports.qt.io/browse/QTBUG-59012
-+ e += m;
-+ E = board[e];
-+ while (!E) {
- e += m;
- E = board[e];
-- } while (!E);
-+ }
-+
- if((E & grid_mask) == grid_slider)
- return true;
- }
-@@ -984,7 +994,6 @@ function p4_move(state, s, e, promotion){
-
- /*Try the move, and see what the response is.*/
- var changes = p4_make_move(state, s, e, promotion);
--
- /*is it check? */
- if (p4_check_check(state, colour)){
- p4_unmake_move(state, changes);
-@@ -997,7 +1006,6 @@ function p4_move(state, s, e, promotion){
-
- state.enpassant = changes.ep;
- state.history.push([s, e, promotion]);
--
- /*draw timeout: 50 moves without pawn move or capture is a draw */
- if (changes.E || changes.ep_position){
- state.draw_timeout = 0;
---
-2.12.2
-
Deleted: 0002-chess-Qt-bug-in-5.8-with-do-while-loop-https-bugrepo.patch
===================================================================
--- 0002-chess-Qt-bug-in-5.8-with-do-while-loop-https-bugrepo.patch 2017-08-13 06:00:03 UTC (rev 250025)
+++ 0002-chess-Qt-bug-in-5.8-with-do-while-loop-https-bugrepo.patch 2017-08-13 06:20:11 UTC (rev 250026)
@@ -1,117 +0,0 @@
-From 1e5cfe5a94c94c7a9c207971d9ebbae401ab796b Mon Sep 17 00:00:00 2001
-From: Johnny Jazeix <jazeix at gmail.com>
-Date: Sat, 18 Feb 2017 20:58:10 +0100
-Subject: [PATCH 2/3] chess, Qt bug in 5.8 with do-while loop
- (https://bugreports.qt.io/browse/QTBUG-59012)
-
----
- src/activities/chess/engine.js | 49 +++++++++++++++++++++++++++++++-----------
- 1 file changed, 36 insertions(+), 13 deletions(-)
-
-diff --git a/src/activities/chess/engine.js b/src/activities/chess/engine.js
-index 12330306..adcc0663 100644
---- a/src/activities/chess/engine.js
-+++ b/src/activities/chess/engine.js
-@@ -420,7 +420,17 @@ function p4_parse(state, colour, ep, score) {
- for(i=0;i<mlen;){ //goeth thru list of moves
- var m = moves[i++];
- e=s;
-- do {
-+ // can't do-while loop: https://bugreports.qt.io/browse/QTBUG-59012
-+ e+=m;
-+ E=board[e];
-+ if(!E){
-+ movelist.push([weight + values[E] + weight_lut[e], s, e]);
-+ }
-+ else if((E&17)==other_colour){
-+ captures.push([weight + values[E] + weight_lut[e] + all_weights[E][e], s, e]);
-+ }
-+
-+ while(!E) {
- e+=m;
- E=board[e];
- if(!E){
-@@ -429,7 +439,7 @@ function p4_parse(state, colour, ep, score) {
- else if((E&17)==other_colour){
- captures.push([weight + values[E] + weight_lut[e] + all_weights[E][e], s, e]);
- }
-- }while(!E);
-+ }
- }
- }
- }
-@@ -527,26 +537,35 @@ function p4_check_castling(board, s, colour, dir, side){
- for(p = s; p < s + 3; p++){
- //bishops, rooks, queens
- e = p;
-- do{
-+ // can't do-while loop: https://bugreports.qt.io/browse/QTBUG-59012
-+ e += dir;
-+ E=board[e];
-+ while (! E) {
- e += dir;
- E=board[e];
-- } while (! E);
-+ }
- if((E & grid_mask) == grid_slider)
- return 0;
- e = p;
- var delta = dir - 1;
-- do{
-+ // can't do-while loop: https://bugreports.qt.io/browse/QTBUG-59012
-+ e += delta;
-+ E=board[e];
-+ while (!E) {
- e += delta;
- E=board[e];
-- } while (! E);
-+ }
- if((E & diag_mask) == diag_slider)
- return 0;
- e = p;
- delta += 2;
-- do{
-+ // can't do-while loop: https://bugreports.qt.io/browse/QTBUG-59012
-+ e += delta;
-+ E=board[e];
-+ while(! E) {
- e += delta;
- E=board[e];
-- } while (! E);
-+ }
- if((E & diag_mask) == diag_slider)
- return 0;
- /*knights on row 7. (row 6 is handled below)*/
-@@ -566,10 +585,13 @@ function p4_check_castling(board, s, colour, dir, side){
- * Same side check is impossible, because the castling rook is there
- */
- e = (side < 0) ? s + 2 : s;
-- do {
-+ // can't do-while loop: https://bugreports.qt.io/browse/QTBUG-59012
-+ e -= side;
-+ E=board[e];
-+ while (! E) {
- e -= side;
- E=board[e];
-- } while (! E);
-+ }
- if((E & grid_mask) == grid_slider)
- return 0;
-
-@@ -1572,9 +1594,10 @@ function p4_random_int(state, top){
- mask |= mask >>> 4;
- mask |= mask >>> 8;
- mask |= mask >>> 16;
-- var r;
-- do{
-+ // can't do-while loop: https://bugreports.qt.io/browse/QTBUG-59012
-+ var r = top + 1;
-+ while(r >= top)
- r = p4_random31(state) & mask;
-- } while (r >= top);
-+
- return r;
- }
---
-2.12.2
-
Deleted: 0003-chess-allow-to-move-again-the-same-piece-after-undo.patch
===================================================================
--- 0003-chess-allow-to-move-again-the-same-piece-after-undo.patch 2017-08-13 06:00:03 UTC (rev 250025)
+++ 0003-chess-allow-to-move-again-the-same-piece-after-undo.patch 2017-08-13 06:20:11 UTC (rev 250026)
@@ -1,36 +0,0 @@
-From 1073a282e797efb28695aaec69204b2dd59288ab Mon Sep 17 00:00:00 2001
-From: Johnny Jazeix <jazeix at gmail.com>
-Date: Sat, 18 Feb 2017 22:38:08 +0100
-Subject: [PATCH 3/3] chess, allow to move again the same piece after undo
-
----
- src/activities/chess/chess.js | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/activities/chess/chess.js b/src/activities/chess/chess.js
-index 3b9b7b41..1fde004b 100644
---- a/src/activities/chess/chess.js
-+++ b/src/activities/chess/chess.js
-@@ -238,6 +238,8 @@ function undo() {
- redo_stack.push(state.history[state.moveno - 1])
- state.jump_to_moveno(state.moveno - 1)
- }
-+ // without it, you can't move again the same piece
-+ Engine.p4_prepare(state)
- items.redo_stack = redo_stack
- refresh()
- items.positions = [] // Force a model reload
-@@ -311,8 +313,9 @@ function clearAcceptMove() {
- function showPossibleMoves(from) {
- var result = Engine.p4_parse(state, state.to_play, 0, 0)
- clearAcceptMove()
-+ var fromEngine = viewPosToEngine(from)
- for(var i=0; i < result.length; ++i) {
-- if(viewPosToEngine(from) == result[i][1]) {
-+ if(fromEngine == result[i][1]) {
- var pos = engineToViewPos(result[i][2])
- items.squares.getSquareAt(pos)['acceptMove'] = true
- }
---
-2.12.2
-
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-08-13 06:00:03 UTC (rev 250025)
+++ PKGBUILD 2017-08-13 06:20:11 UTC (rev 250026)
@@ -3,8 +3,8 @@
# Contributor: Jose Riha <jose1711 gmail com>
pkgname=gcompris-qt
-pkgver=0.70
-pkgrel=3
+pkgver=0.80
+pkgrel=1
pkgdesc="Educational software suite comprising of numerous activities for children aged 2 to 10"
arch=('i686' 'x86_64')
url="http://gcompris.net/"
@@ -14,23 +14,12 @@
'hicolor-icon-theme')
makedepends=('cmake' 'extra-cmake-modules' 'qt5-tools' 'kdoctools')
replaces=('gcompris' 'gcompris-data')
-source=(http://gcompris.net/download/qt/src/$pkgname-$pkgver.tar.xz
- 0001-chess-Qt-bug-in-5.8-with-do-while-loop-https-bugrepo.patch
- 0002-chess-Qt-bug-in-5.8-with-do-while-loop-https-bugrepo.patch
- 0003-chess-allow-to-move-again-the-same-piece-after-undo.patch)
-sha256sums=('8a475ac354dad320dee1c1f6835fb1bb36ef91fe157870bda3562c5e1b8a2707'
- 'd9788a7c9df61be76a1ac47186fbfe565b4c66d7cbae769e11dba3401b28a05d'
- 'bdf09a6b11204d9e2c97e56b1bff64b0faa65f2ce46c840a35262c5e7b86acee'
- 'b5cb2dfe1f6103488afdf1196216b27b503a9b4724212c502dad75ea2f46f8a8')
+source=(http://gcompris.net/download/qt/src/$pkgname-$pkgver.tar.xz)
+sha256sums=('ddfad320a5170f4061b8dc55815e4bf344aa87ba6e6a4bdff597b99ec3f7b494')
prepare() {
cd $pkgname-$pkgver
mkdir build
-
- # Fix bugs in the chess activity
- patch -Np1 -i ../0001-chess-Qt-bug-in-5.8-with-do-while-loop-https-bugrepo.patch
- patch -Np1 -i ../0002-chess-Qt-bug-in-5.8-with-do-while-loop-https-bugrepo.patch
- patch -Np1 -i ../0003-chess-allow-to-move-again-the-same-piece-after-undo.patch
}
build() {
More information about the arch-commits
mailing list