forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
games-puzzle/sgt-puzzles: Version bump to 20160315
Adds support for GTK3. Adds flag to use icons packaged by NP-Hardass instead of bundled to bypass buggy colors in bundled icons. These repackaged icons are used regardless for the live ebuild as it does not ship with icons. Package-Manager: portage-2.2.26
- Loading branch information
1 parent
deaf172
commit 28b5997
Showing
4 changed files
with
167 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>[email protected]</email> | ||
<name>Gentoo Games Project</name> | ||
</maintainer> | ||
<maintainer type="project"> | ||
<email>[email protected]</email> | ||
<name>Gentoo Games Project</name> | ||
</maintainer> | ||
<maintainer type="person"> | ||
<email>[email protected]</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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters