1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils gnome2-utils toolchain-funcs autotools
8 if [[ ${PV} == "99999999" ]] ; then
10 EGIT_REPO_URI="git://git.tartarus.org/simon/puzzles.git"
11 GENTOO_ICONS="20160315"
12 SRC_URI="https://dev.gentoo.org/~np-hardass/distfiles/${PN}/${PN}-icons-${GENTOO_ICONS}.tar.xz"
16 SRC_URI="https://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-${PV}.${MAGIC}.tar.gz"
17 S=${WORKDIR}/puzzles-${PV}.${MAGIC}
18 KEYWORDS="~amd64 ~x86"
21 DESCRIPTION="Simon Tatham's Portable Puzzle Collection"
22 HOMEPAGE="https://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
29 !gtk3? ( x11-libs/gtk+:2 )
30 gtk3? ( x11-libs/gtk+:3 )"
32 RDEPEND="${COMMON_DEPEND}
33 x11-misc/xdg-utils" # Used by builtin help patch
35 DEPEND="${COMMON_DEPEND}
38 doc? ( >=app-doc/halibut-1.2 )"
40 PATCHES=( "${FILESDIR}/${PN}-20161207-builtin-help.patch" )
44 if [[ ${PV} == "99999999" ]]; then
53 -e 's/-O2 -Wall -Werror -ansi -pedantic -g//' \
54 -e "s/libstr =/libstr = '\$(LDFLAGS) ' ./" \
59 # Import icons from latest Gentoo tarball for live
60 if [[ ${PV} == "99999999" ]]; then
61 cp -R ../${PN}-icons/icons . || die
67 --program-prefix="${PN}_" \
68 --with-gtk=$(usex gtk3 3 2)
72 emake CC="$(tc-getCC)"
74 halibut --text --html --info --pdf --ps puzzles.but || die
83 [[ ${file} == "nullgame.R" ]] && continue
84 name=$(awk -F: '/exe:/ { print $3 }' "${file}")
86 newicon -s 48 icons/${file}-48d24.png ${PN}_${file}.png
87 make_desktop_entry "${PN}_${file}" "${name}" "${PN}_${file}" "Game;LogicGame;X-${PN};"
91 DOCS=( puzzles.{pdf,ps,txt} )
94 doinfo puzzles.info{,-1,-2,-3}
97 insinto /etc/xdg/menus/applications-merged
98 doins "${FILESDIR}/${PN}.menu"
99 insinto /usr/share/desktop-directories
100 doins "${FILESDIR}/${PN}.directory"
108 gnome2_icon_cache_update
112 gnome2_icon_cache_update