mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-12-17 07:28:38 +00:00
py3.13 is only used by optional scripts with no tests (the package has tests, but they are unrelated to python), at a glance they do not appear broken but hard to say (not properly tested). ...except pgnfix which may possibly(?) be broken with both 3.12 and 3.13, would need to recheck with 3.11 and test with an actual pgn input file. That script also need a patch to work with python3 at all, arguably we should probably just skip it at this point. Also, for some reason 5.0.2 had re-gained py3.9 despite it wasn't in 4.7.0, so dropping that as well. Closes: https://bugs.gentoo.org/952479 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
100 lines
2 KiB
Bash
100 lines
2 KiB
Bash
# Copyright 1999-2025 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
PYTHON_COMPAT=( python3_{10..13} )
|
|
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
|
|
"
|
|
|
|
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
|
|
"${FILESDIR}"/${PN}-4.7.0-system-gtest.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
|
|
}
|