KNights: add recipe

This commit is contained in:
Gerasim Troeglazov
2021-01-02 21:54:45 +10:00
parent 0274cde02a
commit d69b1e6d8f
2 changed files with 216 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
resource app_flags B_SINGLE_LAUNCH;
resource app_version {
major = @MAJOR@,
middle = @MIDDLE@,
minor = @MINOR@,
variety = B_APPV_FINAL,
internal = 0,
short_info = "KNights",
long_info = "@LONG_INFO@"
};
resource app_signature "@APP_SIGNATURE@";
resource("QT:QPA_FLAGS") "Q_KILL_ON_EXIT";
resource vector_icon {
$"6E6369660703C87137040026020012023A927F3AA7A8BAD2363ABBBA48D1654A"
$"C6440000FFFF0086020006023AB37FBCC000BCC000BAB37F470AF24910EA00CE"
$"BEE5FFF1F1F103C6C3C7050004006806060AFEFF07BFADB52BBFADB52BBFADB5"
$"2BB9CFB52BB50DBFCBB50DB9ECB50DBFCBB50DBFCBB50DBFCBB50DC5A9BFADCA"
$"6BB9CFCA6BBFADCA6BBFADCA6BBFADCA6BC58BCA6BCA4DBFCBCA4DC5A9CA4DBF"
$"CBCA4DBFCBCA4DBFCBCA4DB9ECBFADB52BC58BB52BBFADB52BB52B0208CA4CBF"
$"87CA4CBF87CA4DBF9ECA4EBFCBCA4EBFB4CA4EC5AEBFAECA6BC591CA6BB9CBCA"
$"6BB50EBFCBB50EC5AEB50EBFB4B50FBF87B50FBF9EB533C54ABFAEC9E3B9E2C9"
$"E3C57AC9E3CA4CBF87CA28C54ACA4CBF87CA4CBF87CA4CBF87CA4CBF87020BC6"
$"83BB7FC683BB7FC533BB5FC293BB1FC3E3BB3FBFE5BD5DBA87C1DBBD36BF9CBC"
$"69C3CBC02CC7AABE4B4FBFE5C839BF55C957BF9DC8C8BF7DC987BFCBC9E8BFA4"
$"C9B8C0B8C9CCC292C993C1A5C9B0C506C88AC716C6E5C8C8C597C266CA7FC91E"
$"C449C673C933C9C4C317CA4CBF87CA39C0FBC909BE2FC683BB7FC7C6BCD7C683"
$"BB7F0216BDF22CBDF22CBDF22CBFC3B99BBFA5B8F2BFC3B99BC683BB7FC35BB8"
$"78C5FBBB7FC4EBBB7FC573BB7FC4EBBB7FC92BBFBFC918BE1CC918BFB4C81BBF"
$"37C866BF57C81BBF37C859C3D6C91FC18EC6E8C691C047C94FC437C8F3BF39C9"
$"68BF37C94FC047C94FBF37C83FBF37C61FBF37C72FBF92C61FC047C61FBFEDC6"
$"1FC047C597C047C487C047C50FC1FBC472C023BF37C265C062C023BF37BD09C1"
$"6ABEB6C138BD09C16ABAD0C20BBCD6C322BA45C1C0BA9EC004BA12C0CBBAC2BF"
$"CFBB0CBF65BAE7BF9ABB0CBF65BD7BBAF7BC78BBFABD7BBAF7BD7BB84FBE03B9"
$"5FBD7BB84FBE47B91BBE15B8C2BE47B91BBDF2B7C7BE24B7F9BDF2B7C7BDF22C"
$"BDF22CBDF22C0206C6BEC61FC6BEC61FC43C50BF37C61FC1B9C61FBF37C64DBF"
$"36C6A8BF36C67AC18CC6A8C637C6A9C3E2C6A8C6A5C63CC6BE50C675C66DC6BE"
$"50C6BEC61FC6BE50C6BEC61F0206C7F4C487C7F4C487C5734CC0474CC2C94CC0"
$"47C4B5C047C510C047C4E2C2B8C510C798C510C528C510C7EBC494C7F4C487C7"
$"C6C4CEC7F4C487C7F4C487C7F4C487C7F4C487080A060100023F799900000000"
$"00003C9999472B444AAAC70A05010012400859000000000000400000B466CF00"
$"000001178722040A00010002401CCB000000000000401332C09453C0687C0A01"
$"010102401CCB000000000000401332C09453C0687C0A02010202401CCB000000"
$"000000401332C09453C0687C0A03010302401CCB000000000000401332C09453"
$"C0687C0A04010402401CCB000000000000401332C09453C0687C0A0401050240"
$"1CCB000000000000401332C09453C0687C"
};

View File

@@ -0,0 +1,163 @@
SUMMARY="Chess board program"
DESCRIPTION="KNights is a chess game. As a player, your goal is to defeat your opponent by checkmating their king.
Features:
* Local play between two players on the same computer
* Play against any computer program that supports the XBoard protocol
* Play on the Free Internet Chess Server (FICS)
* Watching two computer engines play against each other
* Support for legal move checking
* Markers for possible moves, opponents last move and sources of check
* Board borders and site notations
* Complete time control, with Plasma-styled clocks
* Several themes, with the possibility of downloading new ones from within the program
* Animated moves (configurable)
* Views for playing on a chess server, including a seek graph, text console, and chat widget
* Option to undo and redo moves
* Graphic interface for making and receiving offers from remote players
* Support for the UCI protocol (used by Stockfish, Chessbase, and many others)
* Support for saving and loading Portable game notation (PGN) files
* Use of Jovie, the KDE text-to-speak program, to speak opponents moves
* Ability to control the program via a D-Bus interface"
HOMEPAGE="https://apps.kde.org/en/knights"
COPYRIGHT="2010-2020 KDE Organisation"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://download.kde.org/stable/release-service/$portVersion/src/knights-$portVersion.tar.xz"
CHECKSUM_SHA256="0b3787ca018f221eb6182953ea4f2c2c573e4231e4dfae2582405574bdde576a"
SOURCE_DIR="knights-$portVersion"
ADDITIONAL_FILES="knights.rdef.in"
ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
knights$secondaryArchSuffix = $portVersion
app:KNights$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
cmd:gnuchess
cmd:stockfish
lib:libKF5Archive$secondaryArchSuffix
lib:libKF5Auth$secondaryArchSuffix
lib:libKF5Bookmarks$secondaryArchSuffix
lib:libKF5Codecs$secondaryArchSuffix
lib:libKF5Completion$secondaryArchSuffix
lib:libKF5ConfigCore$secondaryArchSuffix
lib:libKF5ConfigGui$secondaryArchSuffix
lib:libKF5ConfigWidgets$secondaryArchSuffix
lib:libKF5CoreAddons$secondaryArchSuffix
lib:libKF5Crash$secondaryArchSuffix
lib:libKF5DBusAddons$secondaryArchSuffix
lib:libKF5GuiAddons$secondaryArchSuffix
lib:libKF5I18n$secondaryArchSuffix
lib:libKF5IconThemes$secondaryArchSuffix
lib:libKF5ItemViews$secondaryArchSuffix
lib:libKF5KDEGames$secondaryArchSuffix
lib:libKF5Package$secondaryArchSuffix
lib:libKF5Plasma$secondaryArchSuffix
lib:libKF5Plotting$secondaryArchSuffix
lib:libKF5Service$secondaryArchSuffix
lib:libKF5Solid$secondaryArchSuffix
lib:libKF5SonnetUi$secondaryArchSuffix
lib:libKF5TextEditor$secondaryArchSuffix
lib:libKF5TextWidgets$secondaryArchSuffix
lib:libKF5Wallet$secondaryArchSuffix
lib:libKF5WidgetsAddons$secondaryArchSuffix
lib:libKF5WindowSystem$secondaryArchSuffix
lib:libKF5XmlGui$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5DBus$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libQt5Xml$secondaryArchSuffix
lib:libssp$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
extra_cmake_modules$secondaryArchSuffix >= 5.77
devel:libKF5Archive$secondaryArchSuffix
devel:libKF5Auth$secondaryArchSuffix
devel:libKF5Bookmarks$secondaryArchSuffix
devel:libKF5Codecs$secondaryArchSuffix
devel:libKF5Completion$secondaryArchSuffix
devel:libKF5ConfigCore$secondaryArchSuffix
devel:libKF5ConfigWidgets$secondaryArchSuffix
devel:libKF5CoreAddons$secondaryArchSuffix
devel:libKF5Crash$secondaryArchSuffix
devel:libKF5DBusAddons$secondaryArchSuffix
devel:libKF5DocTools$secondaryArchSuffix
devel:libKF5GuiAddons$secondaryArchSuffix
devel:libKF5I18n$secondaryArchSuffix
devel:libKF5IconThemes$secondaryArchSuffix
devel:libKF5ItemModels$secondaryArchSuffix
devel:libKF5ItemViews$secondaryArchSuffix
devel:libKF5JobWidgets$secondaryArchSuffix
devel:libKF5KDEGames$secondaryArchSuffix
devel:libKF5KIOCore$secondaryArchSuffix
devel:libKF5Package$secondaryArchSuffix
devel:libKF5Plasma$secondaryArchSuffix
devel:libKF5Plotting$secondaryArchSuffix
devel:libKF5Service$secondaryArchSuffix
devel:libKF5Solid$secondaryArchSuffix
devel:libKF5SonnetUi$secondaryArchSuffix
devel:libKF5TextEditor$secondaryArchSuffix
devel:libKF5TextWidgets$secondaryArchSuffix
devel:libKF5Wallet$secondaryArchSuffix
devel:libKF5WidgetsAddons$secondaryArchSuffix
devel:libKF5WindowSystem$secondaryArchSuffix
devel:libKF5XmlGui$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix >= 5.15
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:lrelease$secondaryArchSuffix >= 5
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
# disable docs generation
sed -e '/add_subdirectory(doc)/ s/^#*/#/' -i CMakeLists.txt
sed -e '/kdoctools_install(po)/ s/^#*/#/' -i CMakeLists.txt
mkdir -p build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=$appsDir \
-DCMAKE_INSTALL_DATADIR=$dataDir \
-DCMAKE_INSTALL_DATAROOTDIR=$dataDir \
-DSHARE_INSTALL_PREFIX=$dataDir \
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake
make $jobArgs
}
INSTALL()
{
cd build
make install
mv $appsDir/bin/knights $appsDir/KNights
rm -rf $appsDir/bin
local APP_SIGNATURE="application/x-vnd.kde-knights"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/knights.rdef.in > knights.rdef
addResourcesToBinaries knights.rdef $appsDir/KNights
addAppDeskbarSymlink $appsDir/KNights
}