summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games-puzzle/sgt-puzzles/Manifest2
-rw-r--r--games-puzzle/sgt-puzzles/metadata.xml17
-rw-r--r--games-puzzle/sgt-puzzles/sgt-puzzles-20160315.ebuild107
-rw-r--r--games-puzzle/sgt-puzzles/sgt-puzzles-99999999.ebuild77
4 files changed, 167 insertions, 36 deletions
diff --git a/games-puzzle/sgt-puzzles/Manifest b/games-puzzle/sgt-puzzles/Manifest
index 46566bc96e42..7754d2cabfdb 100644
--- a/games-puzzle/sgt-puzzles/Manifest
+++ b/games-puzzle/sgt-puzzles/Manifest
@@ -1 +1,3 @@
+DIST puzzles-20160315.c0bc13c.tar.gz 2838135 SHA256 fc557d3a1021a1e56ae63589d08788a8ccdfa1772e4c74cbbade5fefcf4e691f SHA512 9317ab26605982d5a97cec57596bd3e75cb1cb93b2bc14f6f295cf3950a759b21c5262e3eb04a3c3cda1d3d1cf4ff9477ee7fac9d310558567714e8e1cfc3496 WHIRLPOOL 7cc52ecabbfda7f71c64c02cc4ca434a20e637e25754d00b3f397318d0dd120aaf7ea19faafbb7eee259b7c2ca91e8e396d7667e4b1fa7fc6a153f15a69fb52f
DIST puzzles-r9861.tar.gz 3255388 SHA256 cc08ffd96c20dfe249d6db0e97f32608e8c52da9ca00a0e8d7d67fd4a474c3a2 SHA512 fc8abf5912e7ecdf5c5166c6b8f354e5f6dc8c42d646ffeae812c3cea21496f9ff03671268453a32c3246d1c94dfaba83628bf65ebeb645b3deb208ee3045ba1 WHIRLPOOL 1f91bc25d5c8dbf531d71eb3783169477834c232810f529cf682d69a121688584af7dc51b00c380e85dfee3119f9644d2f741f4c9f9dfc2054bc72fa5dd88de5
+DIST sgt-puzzles-icons-20160315.tar.xz 715536 SHA256 9ddc1b6d02b3c3358a9bc6b17c7070650f794cf5f650f25b2ac7e5def6674447 SHA512 2fe2c02984eb8c36ac6fb4195be7895b336b84f40ce8baeb23dc8a32aca9937ccf1d33050b4da3cfba3c87e124ecbdd940ee4e990b37eabe8e2af897c2e23b57 WHIRLPOOL 17bdadc9519320bc88af27f2db7a9c243f04d80e524db51ad9398831185e2c66f2430006c324fa7d5b70ce156cb9df93d9405216053b32101b5f56035a60f6ac
diff --git a/games-puzzle/sgt-puzzles/metadata.xml b/games-puzzle/sgt-puzzles/metadata.xml
index 78274e0fa550..b5380df3abf1 100644
--- a/games-puzzle/sgt-puzzles/metadata.xml
+++ b/games-puzzle/sgt-puzzles/metadata.xml
@@ -1,8 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>games@gentoo.org</email>
- <name>Gentoo Games Project</name>
-</maintainer>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>NP-Hardass@gentoo.org</email>
+ <name>NP-Hardass</name>
+ <description>Co-maintainer; CC on all bugs</description>
+ </maintainer>
+ <use>
+ <flag name="gtk3">Use x11-libs/gtk+:3 instead of x11-libs/gtk+:2</flag>
+ <flag name="icons">Use Gentoo packaged icons instead of bundled icons</flag>
+ </use>
</pkgmetadata>
diff --git a/games-puzzle/sgt-puzzles/sgt-puzzles-20160315.ebuild b/games-puzzle/sgt-puzzles/sgt-puzzles-20160315.ebuild
new file mode 100644
index 000000000000..6f1a68daa7aa
--- /dev/null
+++ b/games-puzzle/sgt-puzzles/sgt-puzzles-20160315.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils gnome2-utils toolchain-funcs games autotools
+
+if [[ ${PV} == "99999999" ]] ; then
+ EGIT_REPO_URI="git://git.tartarus.org/simon/puzzles.git"
+ inherit git-r3
+ SRC_URI=""
+ KEYWORDS=""
+else
+ MAGIC=c0bc13c
+ SRC_URI="http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-${PV}.${MAGIC}.tar.gz"
+ S=${WORKDIR}/puzzles-${PV}.${MAGIC}
+ KEYWORDS="~amd64 ~x86"
+fi
+
+GENTOO_ICONS="20160315"
+SRC_URI="${SRC_URI}
+ https://dev.gentoo.org/~np-hardass/distfiles/${PN}/${PN}-icons-${GENTOO_ICONS}.tar.xz
+"
+
+DESCRIPTION="Simon Tatham's Portable Puzzle Collection"
+HOMEPAGE="http://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="doc gtk3 icons"
+
+RDEPEND="
+ !gtk3? ( x11-libs/gtk+:2 )
+ gtk3? ( x11-libs/gtk+:3 )
+"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ virtual/pkgconfig
+ doc? ( >=app-doc/halibut-1.0 )"
+
+src_unpack() {
+ [[ ${PV} == "99999999" ]] && git-r3_src_unpack
+ unpack ${A}
+}
+
+src_prepare() {
+ sed -i \
+ -e 's/-O2 -Wall -Werror -ansi -pedantic -g//' \
+ -e "s/libstr =/libstr = '\$(LDFLAGS) ' ./" \
+ mkfiles.pl || die
+ ./mkfiles.pl || die
+ eautoreconf
+
+ # Import icons from latest Gentoo tarball
+ if [[ ${PV} == "99999999" ]] || use icons; then
+ cp -R ../${PN}-icons/icons . || die
+ fi
+}
+
+src_configure() {
+ econf --with-gtk=$(usex gtk3 3 2)
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+ if use doc ; then
+ halibut --text --html --info --pdf --ps puzzles.but || die
+ fi
+}
+
+src_install() {
+ dodir "${GAMES_BINDIR}"
+ emake DESTDIR="${D}" bindir="${GAMES_BINDIR}" install
+ dodoc README
+
+ local file name
+ for file in *.R ; do
+ [[ ${file} == "nullgame.R" ]] && continue
+ name=$(awk -F: '/exe:/ { print $3 }' "${file}")
+ file=${file%.R}
+ newicon -s 48 icons/${file}-48d24.png ${PN}-${file}.png
+ make_desktop_entry "${GAMES_BINDIR}/${file}" "${name}" "${PN}-${file}"
+ done
+
+ if use doc ; then
+ dohtml *.html
+ doinfo puzzles.info{,-1,-2,-3}
+ dodoc puzzles.pdf puzzles.ps puzzles.txt
+ fi
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-puzzle/sgt-puzzles/sgt-puzzles-99999999.ebuild b/games-puzzle/sgt-puzzles/sgt-puzzles-99999999.ebuild
index 8012c5d43060..6f1a68daa7aa 100644
--- a/games-puzzle/sgt-puzzles/sgt-puzzles-99999999.ebuild
+++ b/games-puzzle/sgt-puzzles/sgt-puzzles-99999999.ebuild
@@ -1,49 +1,67 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
-inherit eutils gnome2-utils toolchain-funcs games
+
+inherit eutils gnome2-utils toolchain-funcs games autotools
+
if [[ ${PV} == "99999999" ]] ; then
EGIT_REPO_URI="git://git.tartarus.org/simon/puzzles.git"
- inherit autotools git-r3
+ inherit git-r3
SRC_URI=""
KEYWORDS=""
else
- SRC_URI="http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-r${PV}.tar.gz"
- S=${WORKDIR}/puzzles-r${PV}
+ MAGIC=c0bc13c
+ SRC_URI="http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-${PV}.${MAGIC}.tar.gz"
+ S=${WORKDIR}/puzzles-${PV}.${MAGIC}
KEYWORDS="~amd64 ~x86"
fi
+GENTOO_ICONS="20160315"
+SRC_URI="${SRC_URI}
+ https://dev.gentoo.org/~np-hardass/distfiles/${PN}/${PN}-icons-${GENTOO_ICONS}.tar.xz
+"
+
DESCRIPTION="Simon Tatham's Portable Puzzle Collection"
HOMEPAGE="http://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
LICENSE="MIT"
SLOT="0"
-IUSE="doc"
+IUSE="doc gtk3 icons"
-RDEPEND="x11-libs/gtk+:2"
+RDEPEND="
+ !gtk3? ( x11-libs/gtk+:2 )
+ gtk3? ( x11-libs/gtk+:3 )
+"
DEPEND="${RDEPEND}
dev-lang/perl
virtual/pkgconfig
doc? ( >=app-doc/halibut-1.0 )"
+src_unpack() {
+ [[ ${PV} == "99999999" ]] && git-r3_src_unpack
+ unpack ${A}
+}
+
src_prepare() {
- if [[ ${PV} == "99999999" ]] ; then
- sed -i \
- -e 's/-O2 -Wall -Werror -ansi -pedantic -g//' \
- -e "s/libstr =/libstr = '\$(LDFLAGS) ' ./" \
- mkfiles.pl || die
- ./mkfiles.pl || die
- eautoreconf
- else
- sed -i \
- -e 's:= -O2 -Wall -Werror -ansi -pedantic -g:= $(CPPFLAGS):' \
- -e '/LDFLAGS/s:=:=$(LDFLAGS) :' \
- Makefile || die
+ sed -i \
+ -e 's/-O2 -Wall -Werror -ansi -pedantic -g//' \
+ -e "s/libstr =/libstr = '\$(LDFLAGS) ' ./" \
+ mkfiles.pl || die
+ ./mkfiles.pl || die
+ eautoreconf
+
+ # Import icons from latest Gentoo tarball
+ if [[ ${PV} == "99999999" ]] || use icons; then
+ cp -R ../${PN}-icons/icons . || die
fi
}
+src_configure() {
+ econf --with-gtk=$(usex gtk3 3 2)
+}
+
src_compile() {
emake CC="$(tc-getCC)"
if use doc ; then
@@ -53,7 +71,7 @@ src_compile() {
src_install() {
dodir "${GAMES_BINDIR}"
- emake DESTDIR="${D}" gamesdir="${GAMES_BINDIR}" install
+ emake DESTDIR="${D}" bindir="${GAMES_BINDIR}" install
dodoc README
local file name
@@ -61,19 +79,14 @@ src_install() {
[[ ${file} == "nullgame.R" ]] && continue
name=$(awk -F: '/exe:/ { print $3 }' "${file}")
file=${file%.R}
- if [[ ${PV} -lt 99999999 ]] ; then
- newicon -s 48 icons/${file}-48d24.png ${PN}-${file}.png
- make_desktop_entry "${GAMES_BINDIR}/${file}" "${name}" "${PN}-${file}"
- else
- # No icons with the live version
- make_desktop_entry "${GAMES_BINDIR}/${file}" "${name}"
- fi
+ newicon -s 48 icons/${file}-48d24.png ${PN}-${file}.png
+ make_desktop_entry "${GAMES_BINDIR}/${file}" "${name}" "${PN}-${file}"
done
if use doc ; then
dohtml *.html
- doinfo puzzles.info
- dodoc puzzles.pdf puzzles.ps puzzles.txt puzzles.chm
+ doinfo puzzles.info{,-1,-2,-3}
+ dodoc puzzles.pdf puzzles.ps puzzles.txt
fi
prepgamesdirs
@@ -81,14 +94,14 @@ src_install() {
pkg_preinst() {
games_pkg_preinst
- [[ ${PV} -lt 99999999 ]] && gnome2_icon_savelist
+ gnome2_icon_savelist
}
pkg_postinst() {
games_pkg_postinst
- [[ ${PV} -lt 99999999 ]] && gnome2_icon_cache_update
+ gnome2_icon_cache_update
}
pkg_postrm() {
- [[ ${PV} -lt 99999999 ]] && gnome2_icon_cache_update
+ gnome2_icon_cache_update
}