summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Timo Gurr <tgurr@exherbo.org> 2018-09-24 19:39:11 +0200
committerAvatar Timo Gurr <tgurr@exherbo.org> 2018-09-24 20:07:06 +0200
commit299935ebf8edfdd3af4a43d5e44f5b37bf5256b3 (patch)
tree593df7b1982c1ed41601a4fbde541584985d544f
parent74da9c7ebfc9896a23fdb594aeb5afb04e5f63b4 (diff)
downloadgames-master.tar.gz
games-master.tar.xz
scid: version bump to 4.6.4HEADmaster
Was broken before, now requires tkimg to be resurrected.
-rw-r--r--packages/games-board/scid/files/scid-4.5.2-build-fixes.patch164
-rw-r--r--packages/games-board/scid/files/scid-4.6.4-build-fixes.patch76
-rw-r--r--packages/games-board/scid/scid-4.6.4.exheres-0 (renamed from packages/games-board/scid/scid-4.5.2.exheres-0)52
3 files changed, 113 insertions, 179 deletions
diff --git a/packages/games-board/scid/files/scid-4.5.2-build-fixes.patch b/packages/games-board/scid/files/scid-4.5.2-build-fixes.patch
deleted file mode 100644
index ec23ebf..0000000
--- a/packages/games-board/scid/files/scid-4.5.2-build-fixes.patch
+++ /dev/null
@@ -1,164 +0,0 @@
-Source: Gentoo
-Upstream: Not sent yet (TODO, probably needs some cleaning up first)
-Reason: Various build fixes
-
---- engines/togaII1.2.1a/src/Makefile.old 2012-05-06 20:56:56.190522872 +0200
-+++ engines/togaII1.2.1a/src/Makefile 2012-05-06 20:58:20.995568403 +0200
-@@ -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
-
---- tcl/utils/sound.tcl.old 2012-05-06 21:05:31.475342861 +0200
-+++ tcl/utils/sound.tcl 2012-05-06 21:06:07.066843851 +0200
-@@ -41,7 +41,7 @@
- variable soundFolder
-
- ::splash::add "Setting up audio move announcement..."
-- if {[catch {package require snack 2.0}]} {
-+ if {[catch {package require snack}]} {
- set hasSnackPackage 0
- ::splash::add " Move speech disabled - Snack sound package not found"
- return
---- Makefile.conf.old 2013-11-28 06:58:08.000000000 +0100
-+++ Makefile.conf 2014-04-18 00:17:05.783340379 +0200
-@@ -193,7 +193,7 @@
- # Small extra programs. Most are written in Tcl using tkscid, but
- # a few contributed ones may be in Python or other languages.
- #
--SCRIPTS= sc_addmove sc_epgn sc_spell sc_eco sc_import sc_remote sc_tree scidpgn pgnfix spliteco spf2spi
-+SCRIPTS= sc_addmove sc_epgn sc_spell sc_eco sc_import sc_remote sc_tree scidpgn pgnfix eco2pgn spliteco spf2spi
-
- ####################
-
-@@ -218,25 +218,25 @@
- install: $(INSTALL)
-
- install_scid: all_scid
-- install -m 755 -d $(SHAREDIR)
-- install -m 755 -d $(BINDIR)
-- install -m 755 scid $(SCRIPTS) $(EXECS) $(BINDIR)
-- 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 "$(DESTDIR)$(SHAREDIR)"
-+ install -m 755 -d "$(DESTDIR)$(BINDIR)"
-+ install -m 755 scid $(SCRIPTS) $(EXECS) "$(DESTDIR)$(BINDIR)"
-+ 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_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
-@@ -288,25 +288,25 @@
- hdiutil create -fs "HFS+" -volname Scid -srcfolder dist "Scid $(SCID_VERSION) (`sw_vers -productName` `sw_vers -productVersion` `uname -p`).dmg"
-
- uninstall:
-- rm -rf $(SHAREDIR)/engines
-- rm -rf $(SHAREDIR)/books
-- rm -rf $(SHAREDIR)/bases
-- rm -rf $(SHAREDIR)/data/
-- rm -f $(SHAREDIR)/data/scid.eco
-- rm -f $(BINDIR)/scid $(BINDIR)/sc_addmove $(BINDIR)/sc_epgn
-- rm -f $(BINDIR)/sc_spell $(BINDIR)/sc_eco $(BINDIR)/sc_import
-- rm -f $(BINDIR)/sc_remote $(BINDIR)/sc_tree $(BINDIR)/scidpgn
-- rm -f $(BINDIR)/pgnfix $(BINDIR)/spliteco
-- rm -f $(BINDIR)/pgnscid $(BINDIR)/tkscid
-- rm -f $(BINDIR)/scmerge $(BINDIR)/scidlet
-- rm -rf $(SHAREDIR)/html
-+ rm -rf "$(DESTDIR)$(SHAREDIR)/engines"
-+ rm -rf "$(DESTDIR)$(SHAREDIR)/books"
-+ rm -rf "$(DESTDIR)$(SHAREDIR)/bases"
-+ rm -rf "$(DESTDIR)$(SHAREDIR)/data/"
-+ rm -f "$(DESTDIR)$(SHAREDIR)/data/scid.eco"
-+ rm -f "$(DESTDIR)$(BINDIR)/scid $(BINDIR)/sc_addmove" "$(DESTDIR)$(BINDIR)/sc_epgn"
-+ rm -f "$(DESTDIR)$(BINDIR)/sc_spell" "$(DESTDIR)$(BINDIR)/sc_eco" "$(DESTDIR)$(BINDIR)/sc_import"
-+ rm -f "$(DESTDIR)$(BINDIR)/sc_remote" "$(DESTDIR)$(BINDIR)/sc_tree" "$(DESTDIR)$(BINDIR)/scidpgn"
-+ rm -f "$(DESTDIR)$(BINDIR)/pgnfix" "$(DESTDIR)$(BINDIR)/spliteco"
-+ rm -f "$(DESTDIR)$(BINDIR)/pgnscid" "$(DESTDIR)$(BINDIR)/tkscid"
-+ rm -f "$(DESTDIR)$(BINDIR)/scmerge" "$(DESTDIR)$(BINDIR)/scidlet"
-+ rm -rf "$(DESTDIR)$(SHAREDIR)/html"
-
- ### To remove Scid files placed in the BINDIR and SHAREDIR directories,
- # type "make distclean".
- #
- distclean:
-- cd $(BINDIR) && rm -f $(EXECS) $(SCRIPTS)
-- -rm -f $(SHAREDIR)/scid.eco
-+ cd $(DESTDIR)$(BINDIR) && rm -f "$(EXECS)" "$(SCRIPTS)"
-+ -rm -f "$(DESTDIR)$(SHAREDIR)/scid.eco"
-
- ### To remove object and executable files: type "make clean".
- #
---- tcl/start.tcl.old 2013-11-28 06:58:08.000000000 +0100
-+++ tcl/start.tcl 2014-04-18 00:37:25.796397765 +0200
-@@ -186,7 +186,7 @@
-
- # scidShareDir, scidImgDir, scidBooksDir, scidBasesDir, ecoFile:
- # Location of Scid resources
-- set scidShareDir [file normalize [file join $scidExeDir "../share/scid"]]
-+ set scidShareDir "@GAMES_DATADIR@"
- if {! [file isdirectory $::scidShareDir]} {
- set scidShareDir $::scidExeDir
- }
-@@ -849,7 +849,7 @@
-
- ### Audio move announcement options:
-
--set ::utils::sound::soundFolder [file nativename [file join $::scidExeDir sounds]]
-+set ::utils::sound::soundFolder "@GAMES_DATADIR@/sounds"
- set ::utils::sound::announceNew 0
- set ::utils::sound::announceForward 0
- set ::utils::sound::announceBack 0
-@@ -858,7 +858,7 @@
- if {$windowsOS} {
- set spellCheckFile [file join $scidDataDir "spelling.ssp"]
- } else {
-- set spellCheckFile "/usr/local/share/scid/spelling.ssp"
-+ set spellCheckFile "@GAMES_DATADIR@/spelling.ssp"
- }
-
- # book configuration
diff --git a/packages/games-board/scid/files/scid-4.6.4-build-fixes.patch b/packages/games-board/scid/files/scid-4.6.4-build-fixes.patch
new file mode 100644
index 0000000..254fb51
--- /dev/null
+++ b/packages/games-board/scid/files/scid-4.6.4-build-fixes.patch
@@ -0,0 +1,76 @@
+Source: Gentoo
+Upstream: No
+Reason: Build fixes
+
+diff -Naur scid-4.6.4/engines/togaII1.2.1a/src/Makefile scid-4.6.4.new/engines/togaII1.2.1a/src/Makefile
+--- scid-4.6.4/engines/togaII1.2.1a/src/Makefile 2016-08-01 14:39:16.000000000 +0200
++++ scid-4.6.4.new/engines/togaII1.2.1a/src/Makefile 2018-09-24 18:31:53.014483736 +0200
+@@ -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
+
+diff -Naur scid-4.6.4/tcl/options.tcl scid-4.6.4.new/tcl/options.tcl
+--- scid-4.6.4/tcl/options.tcl 2016-08-01 14:39:16.000000000 +0200
++++ scid-4.6.4.new/tcl/options.tcl 2018-09-24 18:33:58.477480890 +0200
+@@ -603,7 +603,7 @@
+ }
+
+ ### Audio move announcement options:
+-set ::utils::sound::soundFolder [file nativename [file join $::scidExeDir sounds]]
++set ::utils::sound::soundFolder "@GAMES_DATADIR@/sounds"
+ set ::utils::sound::announceNew 0
+ set ::utils::sound::announceForward 0
+ set ::utils::sound::announceBack 0
+@@ -612,7 +612,7 @@
+ if {$windowsOS} {
+ set spellCheckFile [file join $scidExeDir "spelling.ssp"]
+ } else {
+- set spellCheckFile "/usr/local/share/scid/spelling.ssp"
++ set spellCheckFile "@GAMES_DATADIR@/spelling.ssp"
+ }
+
+ # book configuration
+diff -Naur scid-4.6.4/tcl/start.tcl scid-4.6.4.new/tcl/start.tcl
+--- scid-4.6.4/tcl/start.tcl 2016-08-01 14:39:16.000000000 +0200
++++ scid-4.6.4.new/tcl/start.tcl 2018-09-24 18:35:42.779485713 +0200
+@@ -94,7 +94,7 @@
+
+ # scidShareDir, scidImgDir, scidTclDir, scidBooksDir, scidBasesDir, ecoFile:
+ # Location of Scid resources
+- set scidShareDir [file normalize [file join $scidExeDir "../share/scid"]]
++ set scidShareDir "@GAMES_DATADIR@"
+ if {! [file isdirectory $::scidShareDir]} {
+ set scidShareDir $::scidExeDir
+ }
+diff -Naur scid-4.6.4/tcl/utils/sound.tcl scid-4.6.4.new/tcl/utils/sound.tcl
+--- scid-4.6.4/tcl/utils/sound.tcl 2016-08-01 14:39:16.000000000 +0200
++++ scid-4.6.4.new/tcl/utils/sound.tcl 2018-09-24 18:35:10.619483607 +0200
+@@ -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/packages/games-board/scid/scid-4.5.2.exheres-0 b/packages/games-board/scid/scid-4.6.4.exheres-0
index cfbb7d6..d904de7 100644
--- a/packages/games-board/scid/scid-4.5.2.exheres-0
+++ b/packages/games-board/scid/scid-4.6.4.exheres-0
@@ -3,7 +3,7 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-require game gtk-icon-cache sourceforge [ suffix=zip project=scid pn=Scid ]
+require game sourceforge [ suffix=zip ]
SUMMARY="Shane's Chess Information Database"
DOWNLOADS+="
@@ -13,43 +13,45 @@ DOWNLOADS+="
mirror://sourceforge/scid/scidlet40k.zip
"
+BUGS_TO="alip@exherbo.org"
+
LICENCES="GPL-2"
SLOT="0"
PLATFORMS="~amd64"
MYOPTIONS=""
# TODO:
-# - Scid can make use of tkimg and snack.
+# - Scid can make use of snack.
# - Some scripts need python.
DEPENDENCIES="
build+run:
dev-lang/tk
+ dev-tcl/tkimg
"
-BUGS_TO="alip@exherbo.org"
-
-DEFAULT_SRC_PREPARE_PATCHES=( -p0 "${FILES}"/${PNV}-build-fixes.patch )
-
-# Pff...
-WORK="${WORKBASE}"/${PN}-code-dd495411672b5a6360d046f0aeec310fe691fe1d
+DEFAULT_SRC_PREPARE_PATCHES=(
+ "${FILES}"/${PN}-4.6.4-build-fixes.patch
+)
src_prepare() {
- edo sed -i -e 's/\r//' engines/togaII1.2.1a/src/Makefile
default
- edo sed -i \
- -e "s:@GAMES_DATADIR@:/var/lib/games/${PN}:" \
- tcl/start.tcl src/scidlet.cpp
+ edo sed \
+ -e "s:@GAMES_DATADIR@:/var/lib/games/${PN}:" \
+ -i tcl/{options,start}.tcl
+
edo gzip ../ratings.ssp
}
src_configure() {
# configure is not an autotools script
- edo ./configure CC="${CC}" \
- COMPILE="${CXX}" LINK="${CXX} ${CXXFLAGS} ${LDFLAGS}" \
+ edo ./configure \
+ CC="${CC}" \
+ COMPILE="${CXX}" \
+ LINK="${CXX} ${CXXFLAGS} ${LDFLAGS}" \
OPTIMIZE="${CXXFLAGS}" \
TCL_INCLUDE='' \
- BINDIR='/usr/bin' \
+ BINDIR="/usr/$(exhost --target)/bin" \
SHAREDIR="/var/lib/games/${PN}"
}
@@ -61,11 +63,31 @@ src_install() {
emake DESTDIR="${IMAGE}" install_scid
emagicdocs
+ # install icon
+ insinto /usr/share/icons/hicolor/scalable/apps
+ newins svg/scid_app.svg ${PN}.svg
+
insinto /var/lib/games/${PN}
doins -r sounds
edo cd ..
doins spelling.ssp ratings.ssp.gz *.spf
+ newins scidlet40k.sbk scidlet.sbk
keepdir /var/lib/games/${PN}/bases
+
+ # install desktop file
+ insinto /usr/share/applications
+ hereins ${PN,,}.desktop <<EOF
+[Desktop Entry]
+Name=Scid
+Version=1.1
+Exec=${PN}
+Comment=A Free Chess Database Application
+Icon=${PN}.svg
+Type=Application
+Terminal=false
+StartupNotify=true
+Categories=Game;BoardGame;
+EOF
}