Skip to content

Commit

Permalink
games/chessx: Update to 1.6.0.
Browse files Browse the repository at this point in the history
* Volunteer to be a maintainer
* Do not include obsolete i18n: see
  https://sourceforge.net/p/chessx/wiki/HOWTO%20Translate/
* Point to the proper license file
* Fix bug preventing compilation if USE_SPEECH is not defined

Changelog: https://github.com/Isarhamster/chessx/blob/master/ChangeLog.md#may-2023-version-160

PR:		271348
  • Loading branch information
Alexey Vyskubov authored and clausecker committed May 11, 2023
1 parent c30e441 commit d40f8ca
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 52 deletions.
21 changes: 15 additions & 6 deletions games/chessx/Makefile
@@ -1,15 +1,14 @@
PORTNAME= chessx
PORTVERSION= 1.5.7
PORTREVISION= 1
DISTVERSION= 1.6.0
CATEGORIES= games
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/beta
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${DISTVERSION}

MAINTAINER= ports@FreeBSD.org
MAINTAINER= alexey@pentode.fi
COMMENT= Qt 5 chess database application
WWW= https://chessx.sourceforge.io/

LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
LICENSE_FILE= ${WRKSRC}/COPYING.md

USES= compiler:c++11-lang desktop-file-utils gl gmake qmake qt:5 tar:tgz
USE_GL= gl
Expand All @@ -18,7 +17,11 @@ USE_QT= concurrent core gui multimedia network opengl printsupport svg \

PLIST_FILES= bin/chessx \
share/applications/chessx.desktop \
share/pixmaps/chessx.png
share/pixmaps/chessx.png \
share/metainfo/io.sourceforge.ChessX.metainfo.xml \
share/icons/hicolor/128x128/apps/chessx.png \
share/icons/hicolor/32x32/apps/chessx-32.png \
share/icons/hicolor/64x64/apps/chessx-64.png

OPTIONS_DEFINE= CRAFTY STOCKFISH

Expand All @@ -31,4 +34,10 @@ STOCKFISH_RUN_DEPENDS= stockfish:games/stockfish
post-configure:
( cd ${BUILD_WRKSRC} && ${LRELEASE} ${WRKSRC}/${PORTNAME}.pro )

# the FIND command works around a bug in FreeBSD 12.4 strip(1) which
# leaves junk files when attempting to strip a file of unrecognised format.
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/chessx
${FIND} ${STAGEDIR}${PREFIX} -name 'ecp.????????' -delete

.include <bsd.port.mk>
6 changes: 3 additions & 3 deletions games/chessx/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1641324910
SHA256 (chessx-1.5.7.tgz) = c1a7483b788dbe3f0b808cc4c474e6797c579d6388f9588badd84097367bf49c
SIZE (chessx-1.5.7.tgz) = 3861310
TIMESTAMP = 1683708876
SHA256 (chessx-1.6.0.tgz) = efa60e7b55a907ebdd12810a1931de69624ba42544e11a3262ed562f2dc3c618
SIZE (chessx-1.6.0.tgz) = 8252976
80 changes: 37 additions & 43 deletions games/chessx/files/patch-chessx.pro
@@ -1,48 +1,42 @@
--- chessx.pro.orig 2021-09-17 10:33:08 UTC
--- chessx.pro.orig 2023-05-08 20:22:12 UTC
+++ chessx.pro
@@ -534,24 +534,30 @@ lc0 {
QMAKE_BUNDLE_DATA += LC0_ENGINE_LIB
}
@@ -67,18 +67,26 @@ unix|!macx {
BINDIR = $$PREFIX/bin
DATADIR = $$PREFIX/share

- INSTALLS += appdata desktop icons binfiles
+ INSTALLS += appdata desktop icons32 icons64 icons128 pixmaps binfiles

+unix:!macx {
+ target.path = $$PREFIX/bin
+ pixmaps.path = $$PREFIX/share/pixmaps
+ pixmaps.files = data/images/chessx.png
+ desktop.path = $$PREFIX/share/applications
+ desktop.files = unix/chessx.desktop
+ INSTALLS += target desktop pixmaps
+}
appdata.files = unix/io.sourceforge.ChessX.metainfo.xml
appdata.path = $$DATADIR/metainfo
+
RESOURCES = \
resources.qrc translations.qrc
desktop.files = unix/chessx.desktop
desktop.path = $$DATADIR/applications

- icons.path = $$DATADIR/icons/hicolor
- icons.commands = install -Dm644 data/images/chessx.png $${icons.path}/128x128/apps/chessx.png; \
- install -Dm644 data/images/chessx-32.png $${icons.path}/32x32/apps/chessx.png; \
- install -Dm644 data/images/chessx-64.png $${icons.path}/64x64/apps/chessx.png;
+ icons32.files = data/images/chessx-32.png
+ icons32.path = $$DATADIR/icons/hicolor/32x32/apps

-TRANSLATIONS = i18n/chessx_de.ts
-
-#\
-# i18n/chessx_da.ts \
-# i18n/chessx_fr.ts \
-# i18n/chessx_it.ts \
-# i18n/chessx_cz.ts \
-# i18n/chessx_ru.ts \
-# i18n/chessx_es.ts
-
-# i18n/chessx_nl.ts \
-# i18n/chessx_pl.ts \
-# i18n/chessx_pt_BR.ts \
-# i18n/chessx_ro.ts \
-# i18n/chessx_zh.ts
+TRANSLATIONS = i18n/chessx_de.ts \
+ i18n/chessx_da.ts \
+ i18n/chessx_fr.ts \
+ i18n/chessx_it.ts \
+ i18n/chessx_cz.ts \
+ i18n/chessx_ru.ts \
+ i18n/chessx_es.ts \
+ i18n/chessx_nl.ts \
+ i18n/chessx_pl.ts \
+ i18n/chessx_pt_BR.ts \
+ i18n/chessx_ro.ts \
+ i18n/chessx_zh.ts
+ icons64.path = $$DATADIR/icons/hicolor/64x64/apps
+ icons64.files = data/images/chessx-64.png
+
+ icons128.path = $$DATADIR/icons/hicolor/128x128/apps
+ icons128.files = data/images/chessx.png
+
+ pixmaps.path = $$PREFIX/share/pixmaps
+ pixmaps.files = data/images/chessx.png
+
binfiles.files = release/chessx
binfiles.path = $$BINDIR
}
@@ -532,6 +540,7 @@ win32 {
INCLUDEPATH += $$[QT_INSTALL_HEADERS]/QtZlib
win32-g++:LIBS += -lz
}
+

isEmpty(QMAKE_LRELEASE) {
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
UI_DIR = src/generated
MOC_DIR = src/generated
16 changes: 16 additions & 0 deletions games/chessx/files/patch-src_gui_chessxsettings.cpp
@@ -0,0 +1,16 @@
--- src/gui/chessxsettings.cpp.orig 2023-05-08 20:22:12 UTC
+++ src/gui/chessxsettings.cpp
@@ -19,11 +19,11 @@
#include <QWidget>
#include <QMainWindow>
#include <QSplitter>
+#ifdef USE_SPEECH
#include <QTextToSpeech>
+#endif
#include <QLayout>
-
using namespace chessx;
-
#if defined(_MSC_VER) && defined(_DEBUG)
#define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )
#define new DEBUG_NEW
19 changes: 19 additions & 0 deletions games/chessx/files/patch-src_gui_chessxsettings.h
@@ -0,0 +1,19 @@
--- src/gui/chessxsettings.h.orig 2023-05-08 20:22:12 UTC
+++ src/gui/chessxsettings.h
@@ -13,16 +13,11 @@ class ChessXSettings : public Settings
public:
ChessXSettings();
ChessXSettings(const QString &fileName);
-
virtual bool layout(QWidget* w);
virtual void setLayout(const QWidget* w);
-
static QLocale locale(); // Get the locale based upon current settings
-#ifdef USE_SPEECH
static QStringList availableVoices(QString lang); // Get the list of voices based upon selected locale
static void configureSpeech(QTextToSpeech* speech);
-#endif
-
protected:
virtual void initWidgetValues(QMap<QString, QVariant>& map) const;
};

0 comments on commit d40f8ca

Please sign in to comment.