diff options
Diffstat (limited to 'games-board/scid')
-rw-r--r-- | games-board/scid/Manifest | 8 | ||||
-rw-r--r-- | games-board/scid/files/scid-4.6.2-gentoo.patch | 127 | ||||
-rw-r--r-- | games-board/scid/files/scid-4.6.2-pgnfix-python3.patch | 98 | ||||
-rw-r--r-- | games-board/scid/files/scid-4.7.0-system-gtest.patch | 16 | ||||
-rw-r--r-- | games-board/scid/files/scid-4.7.0-tcl-start-path.patch | 7 | ||||
-rw-r--r-- | games-board/scid/metadata.xml | 6 | ||||
-rw-r--r-- | games-board/scid/scid-4.6.2-r1.ebuild | 98 | ||||
-rw-r--r-- | games-board/scid/scid-4.7.0-r1.ebuild | 106 | ||||
-rw-r--r-- | games-board/scid/scid-5.0.2.ebuild | 94 |
9 files changed, 329 insertions, 231 deletions
diff --git a/games-board/scid/Manifest b/games-board/scid/Manifest index a3af0578eb8d..7c855cca0ffb 100644 --- a/games-board/scid/Manifest +++ b/games-board/scid/Manifest @@ -1,5 +1,3 @@ -DIST photos.zip 1007488 BLAKE2B 8b0f9b0402d9102bda4cfe1333cafdf048592004b2b8cb7f8f085eacc10b6b89811afd39c3d849a4f6288ad63145fc760e60bcd70867ae339459a451c537cbf3 SHA512 c04fc810b457d4dbd9a9cfaac90feaa8c32a2abee05e28a79042ae81cb01e8580e2a1cf0abeff230ec2928da883f862b8901d679cb1448fd9ca0923323fbddd6 -DIST ratings.zip 969347 BLAKE2B 47d050f7c0e00e96aa0371db7f328e699cd0e34eafa3652664f00df7fe08b98adc4197c5235303d6df2c5bcf7ea568c753d23ac5fffe3616de6db9dae21a31a3 SHA512 9b2a7280a7e72e2b464cc3da6be82ec9825b11d3c7e2219ab03a711c69f185f7d954eb3acdd441bff210e9296613df79a7e147a2ccbb4ed37b50af762abbd243 -DIST scid-4.6.2.zip 9768139 BLAKE2B 8e9baf2fe67c3566111f23ead005cba34d32f986afbaaed2117dc46aab65190dd8675df721c6fff3e7c5f338a07d7b787265dee63480141258625f6b6f54ec6d SHA512 d33f730857362dfefe55aaf395b0fc42087e190743ed63072128509fc6ac33791a4c2f67f89f03ec39170660fc6b7a6804fea084b383cf97cbb21661ce0569b2 -DIST scidlet40k.zip 242632 BLAKE2B a16c5a3c04f721a40221db33f9ff7192dba724203ff81a61286903c2f4ab8a33b442503882550a7a59ab0a0e6d735a74b3f34bf9dd89f9677f2b7a8b8082d398 SHA512 e8cb4ca276ca94378f224fad972b0659f3e8159668fa395dcae4be1de6cdd9d29082fdddba393bbea6c909bab4f388042ea05c7dff41edf850d731bc7479850d -DIST spelling.zip 3147998 BLAKE2B 40b33e0c5fab487247af13b0e3fa22d91b17cfb1dbc7d3fafd080db306700e684b30bf46a7222dd7ae16dc1407239973be8de1ee619b31cbcb373684a7f1487c SHA512 394a8835f23336b6f4bebe4e33ab9f64ffa505e9d9bb984de82396e671df0b57b088aab28c5cf648c1a11bc28370b431cb6db54765ac4ab6056a707276ba8f42 +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/files/scid-4.6.2-gentoo.patch b/games-board/scid/files/scid-4.6.2-gentoo.patch deleted file mode 100644 index 6afd56b5badf..000000000000 --- a/games-board/scid/files/scid-4.6.2-gentoo.patch +++ /dev/null @@ -1,127 +0,0 @@ ---- scid-4.6.1.orig/engines/togaII1.2.1a/src/Makefile -+++ scid-4.6.1/engines/togaII1.2.1a/src/Makefile -@@ -18,23 +18,16 @@ -
- # general
-
--CXX = g++
--CXXFLAGS = -pipe -Wall
--LDFLAGS = -lm
-
- # C++
-
--CXXFLAGS += -fno-exceptions -fno-rtti
-
- # optimisation
-
--CXXFLAGS += -O3 -fstrict-aliasing
--CXXFLAGS += -fomit-frame-pointer
- # CXXFLAGS += -march=athlon-xp # SELECT ME
-
- # strip
-
--LDFLAGS += -s
-
- # dependencies
-
---- scid-4.6.1.orig/Makefile.conf -+++ scid-4.6.1/Makefile.conf -@@ -157,32 +157,32 @@ - install: $(INSTALL) - - install_scid: all_scid -- install -m 755 -d "$(SHAREDIR)" -- install -m 755 -d "$(BINDIR)" -- install -m 755 $(SCRIPTS) $(EXECS) "$(BINDIR)" -- rm -f "$(BINDIR)/scid" -- @echo "#!/bin/sh" > "$(BINDIR)/scid" -- @echo 'exec "$(BINDIR)/tkscid" "$(SHAREDIR)/tcl/start.tcl" "$$@"' >> "$(BINDIR)/scid" -- chmod 755 "$(BINDIR)/scid" -- chmod +x "$(BINDIR)/scid" -- install -m 644 -p scid.eco "$(SHAREDIR)" -- install -m 755 -d "$(SHAREDIR)/books" -- install -m 666 ./books/*.* "$(SHAREDIR)/books/" -- install -m 755 -d "$(SHAREDIR)/bases" -- if test -d ./bases; then install -m 666 ./bases/*.* "$(SHAREDIR)/bases/" ; fi -- install -m 755 -d "$(SHAREDIR)/html" -- cp -r ./html/* "$(SHAREDIR)/html/" -- install -m 755 -d "$(SHAREDIR)/img/" -- cp -r ./img/* "$(SHAREDIR)/img/" -- install -m 755 -d "$(SHAREDIR)/tcl/" -- cp -r ./tcl/* "$(SHAREDIR)/tcl/" -+ install -m 755 -d "$(DESTDIR)$(SHAREDIR)" -+ install -m 755 -d "$(DESTDIR)$(BINDIR)" -+ install -m 755 $(SCRIPTS) $(EXECS) "$(DESTDIR)$(BINDIR)" -+ rm -f "$(DESTDIR)$(BINDIR)/scid" -+ @echo "#!/bin/sh" > "$(DESTDIR)$(BINDIR)/scid" -+ @echo 'exec "$(BINDIR)/tkscid" "$(SHAREDIR)/tcl/start.tcl" "$$@"' >> "$(DESTDIR)$(BINDIR)/scid" -+ chmod 755 "$(DESTDIR)$(BINDIR)/scid" -+ chmod +x "$(DESTDIR)$(BINDIR)/scid" -+ install -m 644 -p scid.eco "$(DESTDIR)$(SHAREDIR)" -+ install -m 755 -d "$(DESTDIR)$(SHAREDIR)/books" -+ install -m 666 ./books/*.* "$(DESTDIR)$(SHAREDIR)/books/" -+ install -m 755 -d "$(DESTDIR)$(SHAREDIR)/bases" -+ if test -d ./bases; then install -m 666 ./bases/*.* "$(DESTDIR)$(SHAREDIR)/bases/" ; fi -+ install -m 755 -d "$(DESTDIR)$(SHAREDIR)/html" -+ cp -r ./html/* "$(DESTDIR)$(SHAREDIR)/html/" -+ install -m 755 -d "$(DESTDIR)$(SHAREDIR)/img/" -+ cp -r ./img/* "$(DESTDIR)$(SHAREDIR)/img/" -+ install -m 755 -d "$(DESTDIR)$(SHAREDIR)/tcl/" -+ cp -r ./tcl/* "$(DESTDIR)$(SHAREDIR)/tcl/" - - install_engines: all_engines -- install -m 755 -d "$(SHAREDIR)/engines" -- install -m 755 -d "$(SHAREDIR)/engines/phalanx-scid" -- install ./engines/phalanx-scid/phalanx-scid "$(SHAREDIR)/engines/phalanx-scid" -- install -m 755 -d "$(SHAREDIR)/engines/togaII1.2.1a" -- install ./engines/togaII1.2.1a/src/togaII "$(SHAREDIR)/engines/togaII1.2.1a/" -+ install -m 755 -d "$(DESTDIR)$(SHAREDIR)/engines" -+ install -m 755 -d "$(DESTDIR)$(SHAREDIR)/engines/phalanx-scid" -+ install ./engines/phalanx-scid/phalanx-scid "$(DESTDIR)$(SHAREDIR)/engines/phalanx-scid" -+ install -m 755 -d "$(DESTDIR)$(SHAREDIR)/engines/togaII1.2.1a" -+ install ./engines/togaII1.2.1a/src/togaII "$(DESTDIR)$(SHAREDIR)/engines/togaII1.2.1a/" - - install_mac: all - install -m 755 -d dist/Scid.app/Contents/MacOS ---- scid-4.6.1.orig/tcl/options.tcl -+++ scid-4.6.1/tcl/options.tcl -@@ -598,7 +598,7 @@ - } - - ### Audio move announcement options: --set ::utils::sound::soundFolder [file nativename [file join $::scidExeDir sounds]] -+set ::utils::sound::soundFolder "@GENTOO_DATADIR@/sounds" - set ::utils::sound::announceNew 0 - set ::utils::sound::announceForward 0 - set ::utils::sound::announceBack 0 -@@ -607,7 +607,7 @@ - if {$windowsOS} { - set spellCheckFile [file join $scidExeDir "spelling.ssp"] - } else { -- set spellCheckFile "/usr/local/share/scid/spelling.ssp" -+ set spellCheckFile "@GENTOO_DATADIR@/spelling.ssp" - } - - # book configuration ---- scid-4.6.1.orig/tcl/start.tcl -+++ scid-4.6.1/tcl/start.tcl -@@ -93,7 +93,7 @@ - - # scidShareDir, scidImgDir, scidTclDir, scidBooksDir, scidBasesDir, ecoFile: - # Location of Scid resources -- set scidShareDir [file normalize [file join $scidExeDir "../share/scid"]] -+ set scidShareDir "@GENTOO_DATADIR@" - if {! [file isdirectory $::scidShareDir]} { - set scidShareDir $::scidExeDir - } ---- scid-4.6.1.orig/tcl/utils/sound.tcl -+++ scid-4.6.1/tcl/utils/sound.tcl -@@ -43,7 +43,7 @@ - variable soundFolder - - set hasSound 1 -- if {[catch {package require snack 2.0}]} { -+ if {[catch {package require snack}]} { - if {$::windowsOS} { - catch { - set ::utils::sound::pipe [open "| scidsnd.exe" "r+"] diff --git a/games-board/scid/files/scid-4.6.2-pgnfix-python3.patch b/games-board/scid/files/scid-4.6.2-pgnfix-python3.patch new file mode 100644 index 000000000000..264849c0eb30 --- /dev/null +++ b/games-board/scid/files/scid-4.6.2-pgnfix-python3.patch @@ -0,0 +1,98 @@ +https://sourceforge.net/p/scid/patches/8/ +--- a/scripts/pgnfix.py ++++ b/scripts/pgnfix.py +@@ -12,7 +12,6 @@ + # put in the Site or Event field, and move them to the Date field. + + import sys +-import string + import re + + if len(sys.argv) < 2: +@@ -69,16 +68,16 @@ + if match: + full = match.group(0) + last, first = match.groups() +- first = string.strip(first) +- full = string.strip(full) +- last = string.strip(last) ++ first = str.strip(first) ++ full = str.strip(full) ++ last = str.strip(last) + if first: + for name in (full, last, + last + " " + first, + last + ", " + first[0], + last + " " + first[0]): +- name = string.lower(name) +- if spelling.has_key(name): ++ name = str.lower(name) ++ if name in spelling: + del spelling[name] + else: + spelling[name] = full +@@ -107,16 +106,16 @@ + if error: + out = sys.stderr + error = 0 +- out.write(string.join(current, "")) ++ out.write("".join(current)) + current = [] + bad_lines = [] + else: + if headers: + for field, value in specials.items(): +- if not headers.has_key(field): ++ if not field in headers: + headers[field] = value + for field in order: +- if headers.has_key(field): ++ if field in headers: + current.append('[%s "%s"]\n' % (field, headers[field])) + del headers[field] + for field, value in headers.items(): +@@ -172,7 +171,7 @@ + specials["Date"] = "%04d.%02d.%02d" % (year, month, day) + value = re.sub("\(?([0-9]+)/([0-9]+)/([0-9]+)\)?", "", value) + +- value = string.strip(value) ++ value = str.strip(value) + + if field in ("White", "Black"): + name = re.sub("[MW][0-9]{5}", "", value) +@@ -193,21 +192,21 @@ + name = re.sub("_", " ", name) + name = re.sub("\.", "", name) + name = re.sub("([A-Za-z])([0-9])", "\\1 \\2", name) +- name = string.strip(name) ++ name = str.strip(name) + name = re.sub("^([A-Z]+?)\s*([A-Z][a-z].+)", "\\2, \\1", + name) + + name = re.sub(",\s*([GI]M)?$", "", name) + +- name = string.strip(name) +- t = string.lower(name) ++ name = str.strip(name) ++ t = str.lower(name) + +- if spelling.has_key(t): ++ if t in spelling: + name = spelling[t] + + headers[field] = name + +- elif not bogus.has_key(field) or not re.search(bogus[field], value): ++ elif not field in bogus or not re.search(bogus[field], value): + headers[field] = value + + if current: +@@ -215,7 +214,7 @@ + if error: + out = sys.stderr + error = 0 +- out.write(string.join(current, "")) ++ out.write("".join(current)) + current = [] + bad_lines = [] + diff --git a/games-board/scid/files/scid-4.7.0-system-gtest.patch b/games-board/scid/files/scid-4.7.0-system-gtest.patch new file mode 100644 index 000000000000..4e4a38cdc934 --- /dev/null +++ b/games-board/scid/files/scid-4.7.0-system-gtest.patch @@ -0,0 +1,16 @@ +--- a/gtest/CMakeLists.txt ++++ b/gtest/CMakeLists.txt +@@ -19,8 +19,3 @@ + # googletest +-if(NOT IS_DIRECTORY "${CMAKE_BINARY_DIR}/googletest") +- find_package(Git) +- execute_process(COMMAND ${GIT_EXECUTABLE} clone https://github.com/google/googletest.git) +-endif() +-set(gtest_force_shared_crt ON CACHE BOOL "Always use msvcrt.dll") +-add_subdirectory(${CMAKE_BINARY_DIR}/googletest ${CMAKE_BINARY_DIR}/googletest/Build EXCLUDE_FROM_ALL) ++find_package(GTest REQUIRED) + +@@ -48,2 +43,2 @@ + target_compile_definitions(scid_tests PRIVATE -DSCID_TESTDIR=\"${CMAKE_CURRENT_LIST_DIR}/\") +-target_link_libraries(scid_tests PRIVATE scid_base gtest_main) ++target_link_libraries(scid_tests PRIVATE scid_base ${GTEST_BOTH_LIBRARIES}) diff --git a/games-board/scid/files/scid-4.7.0-tcl-start-path.patch b/games-board/scid/files/scid-4.7.0-tcl-start-path.patch new file mode 100644 index 000000000000..361700d7bc84 --- /dev/null +++ b/games-board/scid/files/scid-4.7.0-tcl-start-path.patch @@ -0,0 +1,7 @@ +--- a/src/ui_tcltk.h ++++ b/src/ui_tcltk.h +@@ -59,3 +59,3 @@ + else dirname += 1; +- strcpy (dirname, "tcl/start.tcl"); ++ strcpy (dirname, "../share/scid/tcl/start.tcl"); + if (0 != Tcl_Access(sourceFileName, 4)) { diff --git a/games-board/scid/metadata.xml b/games-board/scid/metadata.xml index 2e8ed33ebd1b..a1736cbc30a5 100644 --- a/games-board/scid/metadata.xml +++ b/games-board/scid/metadata.xml @@ -1,10 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>games@gentoo.org</email> <name>Gentoo Games Project</name> </maintainer> + <use> + <flag name="photos">Install collection of player photos (large)</flag> + <flag name="scripts">Install additional python and tcl utility scripts</flag> + </use> <upstream> <remote-id type="sourceforge">scid</remote-id> </upstream> diff --git a/games-board/scid/scid-4.6.2-r1.ebuild b/games-board/scid/scid-4.6.2-r1.ebuild deleted file mode 100644 index f31b6be08e89..000000000000 --- a/games-board/scid/scid-4.6.2-r1.ebuild +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -PYTHON_COMPAT=( python2_7 ) -inherit eutils toolchain-funcs gnome2-utils python-any-r1 - -DESCRIPTION="a free chess database application" -HOMEPAGE="http://scid.sourceforge.net/" -SRC_URI="mirror://sourceforge/scid/${P}.zip - mirror://sourceforge/scid/spelling.zip - mirror://sourceforge/scid/ratings.zip - mirror://sourceforge/scid/photos.zip - mirror://sourceforge/scid/scidlet40k.zip" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -CDEPEND="dev-lang/tk:0 - dev-tcltk/tkimg - >=sys-libs/zlib-1.1.3" -RDEPEND="${CDEPEND} - !games-board/chessdb" -DEPEND="${CDEPEND} - ${PYTHON_DEPS} - app-arch/unzip" - -pkg_setup() { - python-any-r1_pkg_setup -} - -src_unpack() { - default - mv scid-src ${P} || die -} - -PATCHES=( - "${FILESDIR}"/${P}-gentoo.patch -) - -src_prepare() { - default - edos2unix engines/togaII1.2.1a/src/Makefile - sed -i \ - -e "s:@GENTOO_DATADIR@:/usr/share/${PN}:" \ - tcl/start.tcl || die - sed -i \ - -e "/COMPILE.*testzlib/s:\$var(COMPILE):$(tc-getCXX):" \ - configure || die - gzip ../ratings.ssp || die - python_fix_shebang . -} - -src_configure() { - # configure is not an autotools script - ./configure \ - COMPILE="$(tc-getCXX)" \ - LINK="$(tc-getCXX) ${CXXFLAGS} ${LDFLAGS}" \ - CC="$(tc-getCC)" \ - OPTIMIZE="${CXXFLAGS}" \ - TCL_INCLUDE="" \ - BINDIR="/usr/bin" \ - SHAREDIR="/usr/share/${PN}" || die -} - -src_compile() { - emake all_scid -} - -src_install() { - emake DESTDIR="${D}" install_scid - insinto /usr/share/${PN} - doins -r sounds - - dodoc ChangeLog TODO help/*.html - - newicon -s scalable svg/scid_app.svg ${PN}.svg - make_desktop_entry scid Scid - - doins ../spelling.ssp ../ratings.ssp.gz ../*.spf - newins ../scidlet40k.sbk scidlet.sbk -} - -pkg_preinst() { - gnome2_icon_savelist -} - -pkg_postinst() { - gnome2_icon_cache_update - elog "To enable speech, emerge dev-tcltk/snack" - elog "To enable Xfcc support, emerge dev-tcltk/tdom" -} - -pkg_postrm() { - gnome2_icon_cache_update -} diff --git a/games-board/scid/scid-4.7.0-r1.ebuild b/games-board/scid/scid-4.7.0-r1.ebuild new file mode 100644 index 000000000000..2d2932211729 --- /dev/null +++ b/games-board/scid/scid-4.7.0-r1.ebuild @@ -0,0 +1,106 @@ +# 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=" + mirror://sourceforge/scid/${PN}-code-${PV}.zip + mirror://sourceforge/scid/${P}_x64_linux.tar.gz" +S="${WORKDIR}/${PN}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="photos 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}"/${P}-system-gtest.patch + "${FILESDIR}"/${P}-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,scidlet} + + 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 + + insinto /usr/share/scid + doins scid{,_es,_fr}.eco "${WORKDIR}"/${P}/spelling.ssp + use photos && doins -r "${WORKDIR}"/${P}/photos + + 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 + + if [[ ${REPLACING_VERSIONS} ]] && ver_test ${REPLACING_VERSIONS} -lt 4.7; then + elog + elog "Warning: this version uses ~/.scid4.7 and is incompatible with older ~/.scid" + elog + fi +} 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 +} |