games-puzzle/world-of-goo-demo: Use Slackbuilds mirror, EAPI 7
authorJames Le Cuirot <chewi@gentoo.org>
Tue, 28 Apr 2020 22:23:30 +0000 (23:23 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Tue, 28 Apr 2020 22:32:54 +0000 (23:32 +0100)
I tried to add USE=bundled-libs but the ancient Vorbis libraries clash
with system Vorbis libraries pulled in via PulseAudio.

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
games-puzzle/world-of-goo-demo/world-of-goo-demo-1.41-r2.ebuild [deleted file]
games-puzzle/world-of-goo-demo/world-of-goo-demo-1.41-r3.ebuild [new file with mode: 0644]

diff --git a/games-puzzle/world-of-goo-demo/world-of-goo-demo-1.41-r2.ebuild b/games-puzzle/world-of-goo-demo/world-of-goo-demo-1.41-r2.ebuild
deleted file mode 100644 (file)
index 83b418f..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit eutils
-
-DESCRIPTION="A puzzle game with a strong emphasis on physics"
-HOMEPAGE="http://2dboy.com/"
-
-if [[ ${PN} == *-demo ]] ; then
-       MY_PN="WorldOfGooDemo"
-       SRC_URI="${MY_PN}.${PV}.tar.gz"
-else
-       MY_PN="WorldOfGoo"
-       SRC_URI="${MY_PN}Setup.${PV}.tar.gz"
-fi
-
-LICENSE="2dboy-EULA"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-RESTRICT="bindist fetch strip"
-
-RDEPEND="
-       media-libs/libsdl[sound,opengl,video]
-       media-libs/sdl-mixer[vorbis]
-       sys-libs/glibc
-       virtual/opengl
-       virtual/glu
-       >=sys-devel/gcc-3.4
-"
-DEPEND=""
-
-S="${WORKDIR}/${MY_PN}"
-dir="/opt/${PN}"
-
-QA_PREBUILT="
-       ${dir:1}/${MY_PN%Demo}.bin32
-       ${dir:1}/${MY_PN%Demo}.bin64
-"
-
-pkg_nofetch() {
-       if [[ ${PN} == *-demo ]] ; then
-               elog "To download the demo, visit http://worldofgoo.com/dl2.php?lk=demo"
-               elog "and download ${A} and place it into your DISTDIR directory."
-       else
-               elog "Download ${A} from ${HOMEPAGE} and place it into your DISTDIR directory."
-       fi
-}
-
-src_install() {
-       exeinto "${dir}"
-       doexe ${MY_PN%Demo}*
-
-       make_wrapper ${PN} "${dir}"/${MY_PN%Demo}
-
-       insinto "${dir}"
-       doins -r icons properties res
-       newicon icons/scalable.svg ${PN}.svg
-
-       if [[ ${PN} == *-demo ]] ; then
-               make_desktop_entry ${PN} "World of Goo (Demo)"
-       else
-               make_desktop_entry ${PN} "World of Goo"
-       fi
-
-       dodoc linux-issues.txt
-       HTML_DOCS="readme.html" einstalldocs
-}
diff --git a/games-puzzle/world-of-goo-demo/world-of-goo-demo-1.41-r3.ebuild b/games-puzzle/world-of-goo-demo/world-of-goo-demo-1.41-r3.ebuild
new file mode 100644 (file)
index 0000000..c25a883
--- /dev/null
@@ -0,0 +1,52 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop eutils xdg
+
+MY_PN="WorldOfGooDemo"
+
+DESCRIPTION="A puzzle game with a strong emphasis on physics (demo version)"
+HOMEPAGE="https://2dboy.com/"
+SRC_URI="mirror://sourceforge/slackbuildsdirectlinks/worldofgoo/${MY_PN}.${PV}.tar.gz"
+
+LICENSE="2dboy-EULA"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="bindist mirror strip"
+
+RDEPEND="
+       media-libs/libsdl[opengl,sound,video]
+       media-libs/sdl-mixer[vorbis]
+       >=sys-devel/gcc-3.4
+       sys-libs/glibc
+       virtual/opengl
+       virtual/glu
+"
+
+dir="/opt/${PN}"
+S="${WORKDIR}/${MY_PN}"
+QA_PREBUILT="${dir#/}/*"
+
+src_install() {
+       exeinto "${dir}"
+       newexe ${MY_PN%Demo}.bin$(usex amd64 64 32) ${MY_PN%Demo}.bin
+       make_wrapper ${PN} ./${MY_PN%Demo}.bin "${dir}"
+
+       insinto "${dir}"
+       doins -r icons/ properties/ res/
+
+       local icon size
+       for icon in icons/*.{png,svg}; do
+               size=${icon##*/}
+               size=${size%%[x.]*}
+               newicon -s "${size}" "${icon}" "${PN}.${icon##*.}"
+       done
+
+       make_desktop_entry ${PN} "World of Goo (Demo)"
+
+       dodoc linux-issues.txt
+       docinto html
+       dodoc readme.html
+}