summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2024-04-16 09:34:40 +0000
committerPatrick Lauer <patrick@gentoo.org>2024-04-16 09:34:47 +0000
commitffb01fc79670979ed0fca19a99d015d59e6ca1ea (patch)
treef7d5c545e1660789e5fecf8cd077fe9cabdd2020 /games-board
parentgames-board/scid: enable py3.12 (diff)
downloadgentoo-ffb01fc79670979ed0fca19a99d015d59e6ca1ea.tar.gz
gentoo-ffb01fc79670979ed0fca19a99d015d59e6ca1ea.tar.bz2
gentoo-ffb01fc79670979ed0fca19a99d015d59e6ca1ea.zip
games-board/scid: add 5.0.2
Signed-off-by: Patrick Lauer <patrick@gentoo.org>
Diffstat (limited to 'games-board')
-rw-r--r--games-board/scid/Manifest1
-rw-r--r--games-board/scid/scid-5.0.2.ebuild94
2 files changed, 95 insertions, 0 deletions
diff --git a/games-board/scid/Manifest b/games-board/scid/Manifest
index 03d47a9060b8..7c855cca0ffb 100644
--- a/games-board/scid/Manifest
+++ b/games-board/scid/Manifest
@@ -1,2 +1,3 @@
DIST scid-4.7.0_x64_linux.tar.gz 129771457 BLAKE2B 65ad7b58685a498954ebcf5216287216e2d2805bf0379784195b096c9eb04b333a8bbfb6c020c321b66c63d7bad2cfba724750b4d26f8172f620047219f98a73 SHA512 c9fb6f19741d60fe4952c643240f7e2eaa476eab35379c0a053b35217fe7a4b9ecfbc68edc45df4c9a2354babe8e0ddd2211db014d5396ce9bbb59db531c1179
+DIST scid-5.0.2.zip 15661705 BLAKE2B 7d514d0e83b34a873e3c375fc14b83b76df30d7051139a230e82feb21ec7a53308b63a5b5f2ce336443a743014a4f2830dae6bfb9c116b66645aa61d6a67ef6f SHA512 0ccf3833ddc942e0577b5316089019098ba903ecbce011e83e0bf30efcf45fb48bdceb1309160c65bb0fc69696301b00df8d777e860bf31efa44e4aa330e2477
DIST scid-code-4.7.0.zip 15782104 BLAKE2B f1b927a1b23478d2e27a098e2ec99acb9a2061c373686cfcfa14ac219a1dce47468c3e46b3fe786655792177c86180bbe8e1dc91927b3ad2a80ea9b0bdb17fd3 SHA512 3c43fb8877da4a8dda9c99b1b856fe3f3840c7013041d53c31c8411ecf2e9ccbaf3b7c098e35cb23f5d0d7cac6b7514ca3bfb719fcbc111f5e1ef07f765f2708
diff --git a/games-board/scid/scid-5.0.2.ebuild b/games-board/scid/scid-5.0.2.ebuild
new file mode 100644
index 000000000000..1680f2fe64f6
--- /dev/null
+++ b/games-board/scid/scid-5.0.2.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+inherit cmake desktop optfeature python-single-r1
+
+DESCRIPTION="Shane's Chess Information Database"
+HOMEPAGE="https://scid.sourceforge.net/"
+SRC_URI="https://sourceforge.net/projects/scid/files/Scid/Scid%205.0/${PN}_src_${PV}.zip/download -> ${P}.zip"
+
+#S="${WORKDIR}/${PN}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="scripts test"
+REQUIRED_USE="scripts? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+ dev-lang/tcl:=
+ dev-lang/tk"
+RDEPEND="
+ ${COMMON_DEPEND}
+ dev-tcltk/tkimg
+ scripts? ( ${PYTHON_DEPS} )"
+DEPEND="
+ ${COMMON_DEPEND}
+ test? ( dev-cpp/gtest )"
+BDEPEND="
+ app-arch/unzip
+ scripts? ( ${PYTHON_DEPS} )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.6.2-pgnfix-python3.patch
+ "${FILESDIR}"/${PN}-4.7.0-tcl-start-path.patch
+)
+
+HTML_DOCS=( help/. )
+
+pkg_setup() {
+ use scripts && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ if use scripts; then
+ python_fix_shebang scripts/pgnfix.py
+
+ # cmake build doesn't use "tkscid" anymore but scripts still do
+ sed -i s/tkscid/scid/ scripts/*.tcl || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=off
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr/share
+ -DGTEST=$(usex test)
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ "${BUILD_DIR}"/gtest/scid_tests || die
+}
+
+src_install() {
+ cmake_src_install
+
+ dobin "${BUILD_DIR}"/{phalanx-scid,scid}
+
+ if use scripts; then
+ local script
+ # install same set of scripts as pre-cmake
+ for script in pgnfix.py {sc_{epgn,spell,eco,import},scidpgn,spliteco,spf2spi}.tcl sc_remote.tk; do
+ newbin scripts/${script} ${script%.*}
+ done
+ fi
+
+ newicon resources/svg/scid_app.svg scid.svg
+ make_desktop_entry scid Scid
+
+ # delete re-located files
+ rm -r "${ED}"/usr/share/{bin,scid/{scid,scripts}} || die
+}
+
+pkg_postinst() {
+ optfeature "speech support" dev-tcltk/snack
+}