summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMunzir Taha2023-05-25 15:24:50 +0300
committerMunzir Taha2023-05-25 15:24:50 +0300
commit0e6216a5ee0c2702fe985e84bddc324609a4f040 (patch)
treeac90aaa1d652640e290edc2401c1338aa28d06fe
parenta7eef2a9f8cd0641ddfc59b69d6c891f58214325 (diff)
downloadaur-chessx.tar.gz
Upstream update patched
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD15
-rw-r--r--chessx.patch116
3 files changed, 130 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 618e4f30b6b2..bace050aa98f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = chessx
pkgdesc = Cross-platform chess database and PGN viewer
- pkgver = 1.5.8
- pkgrel = 2
+ pkgver = 1.6.0
+ pkgrel = 1
url = http://chessx.sourceforge.net
arch = x86_64
license = GPL2
@@ -9,7 +9,9 @@ pkgbase = chessx
depends = qt5-svg
depends = qt5-speech
conflicts = chessx-svn
- source = https://sourceforge.net/projects/chessx/files/chessx/1.5.8/chessx-1.5.8.tgz
- sha256sums = 7affad2b50872c5b7f46f9b3c8f559d9cd27c5f470c1bf647bbb939a6ed111a3
+ source = https://sourceforge.net/projects/chessx/files/chessx/1.6.0/chessx-1.6.0.tgz
+ source = chessx.patch
+ sha256sums = efa60e7b55a907ebdd12810a1931de69624ba42544e11a3262ed562f2dc3c618
+ sha256sums = ed2464acb0547596017c38be8a4531206e3ff15d28b4f68d96ed26b0ffde3154
pkgname = chessx
diff --git a/PKGBUILD b/PKGBUILD
index 9d8b40d5170b..6a5824d2e21e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer: Munzir Taha <munzirtaha@gmail.com>
pkgname=chessx
-pkgver=1.5.8
-pkgrel=2
+pkgver=1.6.0
+pkgrel=1
pkgdesc="Cross-platform chess database and PGN viewer"
arch=(x86_64)
url=http://chessx.sourceforge.net
@@ -10,13 +10,14 @@ license=(GPL2)
depends=(qt5-svg qt5-speech)
makedepends=(qt5-tools)
conflicts=($pkgname-svn)
-source=("https://sourceforge.net/projects/$pkgname/files/$pkgname/$pkgver/$pkgname-$pkgver.tgz")
-sha256sums=('7affad2b50872c5b7f46f9b3c8f559d9cd27c5f470c1bf647bbb939a6ed111a3')
+source=("https://sourceforge.net/projects/$pkgname/files/$pkgname/$pkgver/$pkgname-$pkgver.tgz"
+ "chessx.patch")
+sha256sums=('efa60e7b55a907ebdd12810a1931de69624ba42544e11a3262ed562f2dc3c618'
+ 'ed2464acb0547596017c38be8a4531206e3ff15d28b4f68d96ed26b0ffde3154')
prepare() {
- cd $pkgname-$pkgver
- sed -i '/QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);/a\
- QCoreApplication::setAttribute(Qt::AA_DontUseNativeDialogs);' src/gui/main.cpp
+ cd "$srcdir"
+ patch --forward --strip=1 --input="${srcdir}/chessx.patch"
}
build() {
diff --git a/chessx.patch b/chessx.patch
new file mode 100644
index 000000000000..0b9fe890d9be
--- /dev/null
+++ b/chessx.patch
@@ -0,0 +1,116 @@
+diff --unified --recursive --text chessx-1.6.0.orig/chessx-1.6.0/src/dialogs/preferences.cpp chessx-1.6.0.new/chessx-1.6.0/src/dialogs/preferences.cpp
+--- chessx-1.6.0.orig/chessx-1.6.0/src/dialogs/preferences.cpp 2023-05-08 23:22:12.000000000 +0300
++++ chessx-1.6.0.new/chessx-1.6.0/src/dialogs/preferences.cpp 2023-05-25 14:07:01.102444724 +0300
+@@ -667,11 +669,6 @@
+
+ #if defined(USE_SOUND) || defined(USE_SPEECH)
+ ui.cbSoundOn->setCurrentIndex(AppSettings->getValue("Move").toInt());
+-
+- QStringList voiceNames = ChessXSettings::availableVoices(lang);
+- ui.cbVoice->addItems(voiceNames);
+-
+- ui.cbVoice->setCurrentText(AppSettings->getValue("Voice").toString());
+ ui.volume->setValue(AppSettings->getValue("Volume").toInt());
+ ui.cbScreenReader->setChecked(AppSettings->getValue("ScreenReader").toBool());
+ ui.cbMoveSound->setChecked(AppSettings->getValue("MoveSound").toBool());
+@@ -679,11 +676,16 @@
+ ui.delayReadAhead->setValue(AppSettings->getValue("DelayReadAhead").toInt());
+
+ #ifdef USE_SPEECH
++ QStringList voiceNames = ChessXSettings::availableVoices(lang);
++ ui.cbVoice->addItems(voiceNames);
++ ui.cbVoice->setCurrentText(AppSettings->getValue("Voice").toString());
+ if (!QTextToSpeech::availableEngines().count())
+ {
++ ui.cbVoice->setEnabled(false);
+ ui.cbScreenReader->setChecked(false);
+ ui.plyReadAhead->setEnabled(false);
+ ui.delayReadAhead->setEnabled(false);
++ ui.cbScreenReader->setEnabled(false);
+ }
+ #endif
+
+diff --unified --recursive --text chessx-1.6.0.orig/chessx-1.6.0/src/gui/chessxsettings.cpp chessx-1.6.0.new/chessx-1.6.0/src/gui/chessxsettings.cpp
+--- chessx-1.6.0.orig/chessx-1.6.0/src/gui/chessxsettings.cpp 2023-05-08 23:22:12.000000000 +0300
++++ chessx-1.6.0.new/chessx-1.6.0/src/gui/chessxsettings.cpp 2023-05-25 13:59:13.477536676 +0300
+@@ -19,7 +19,9 @@
+ #include <QWidget>
+ #include <QMainWindow>
+ #include <QSplitter>
++#ifdef USE_SPEECH
+ #include <QTextToSpeech>
++#endif
+ #include <QLayout>
+
+ using namespace chessx;
+@@ -161,9 +163,9 @@
+ return valid;
+ }
+
++#ifdef USE_SPEECH
+ void ChessXSettings::configureSpeech(QTextToSpeech* speech)
+ {
+-#ifdef USE_SPEECH
+ speech->setLocale(ChessXSettings::locale());
+
+ QVector<QVoice> voices = speech->availableVoices();
+@@ -180,8 +182,8 @@
+ break;
+ }
+ }
+-#endif
+ }
++#endif
+
+ QLocale ChessXSettings::locale()
+ {
+@@ -190,10 +192,11 @@
+ return cxLocale;
+ }
+
++#ifdef USE_SPEECH
+ QStringList ChessXSettings::availableVoices(QString lang)
+ {
+ QStringList list;
+-#ifdef USE_SPEECH
++
+ QLocale cxLocale(lang);
+
+ QTextToSpeech* speech = new QTextToSpeech();
+@@ -204,9 +207,10 @@
+ for (const QVoice &voice : qAsConst(voices)) {
+ list << voice.name();
+ }
+-#endif
++
+ return list;
+ }
++#endif
+
+ void ChessXSettings::setLayout(const QWidget* w)
+ {
+diff --unified --recursive --text chessx-1.6.0.orig/chessx-1.6.0/src/gui/chessxsettings.h chessx-1.6.0.new/chessx-1.6.0/src/gui/chessxsettings.h
+--- chessx-1.6.0.orig/chessx-1.6.0/src/gui/chessxsettings.h 2023-05-08 23:22:12.000000000 +0300
++++ chessx-1.6.0.new/chessx-1.6.0/src/gui/chessxsettings.h 2023-05-25 13:59:08.350853518 +0300
+@@ -5,7 +5,10 @@
+ #include <QStringList>
+ #include <QLocale>
+
++#ifdef USE_SPEECH
+ class QTextToSpeech;
++#endif
++
+ class Widget;
+
+ class ChessXSettings : public Settings
+diff --unified --recursive --text chessx-1.6.0.orig/chessx-1.6.0/src/gui/main.cpp chessx-1.6.0.new/chessx-1.6.0/src/gui/main.cpp
+--- chessx-1.6.0.orig/chessx-1.6.0/src/gui/main.cpp 2023-05-08 23:22:12.000000000 +0300
++++ chessx-1.6.0.new/chessx-1.6.0/src/gui/main.cpp 2023-05-25 14:00:52.787860196 +0300
+@@ -98,6 +98,7 @@
+ #if QT_VERSION < 0x060000
+ QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); // HiDPI support
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // Windows Surface Book
++ QCoreApplication::setAttribute(Qt::AA_DontUseNativeDialogs);
+ #endif
+
+ QApplication app(argc, argv);