games-puzzle/world-of-goo-hb: Various improvements following split
authorJames Le Cuirot <chewi@gentoo.org>
Tue, 28 Apr 2020 22:19:21 +0000 (23:19 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Tue, 28 Apr 2020 22:32:47 +0000 (23:32 +0100)
* app-arch/unzip is BDEPEND, not DEPEND.
* Use unpacker and xdg eclasses.
* libsdl2[alsa] is not specifically needed.
* virtual/glu is no longer needed.
* Clarify pkg_nofetch text.
* Use rpath rather than LD_LIBRARY_PATH.
* Swap wrapper for symlink.

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
games-puzzle/world-of-goo-hb/world-of-goo-hb-1.53.ebuild

index e9b72ddc39b5500034186cd06f2c292220824b49..f08ef5823bf23aebc9fb352cd8a432b8807b04c7 100644 (file)
@@ -3,58 +3,62 @@
 
 EAPI=7
 
-inherit desktop eutils         # eutils for make_wrapper()
+inherit desktop unpacker xdg
 
 MY_PN="WorldOfGoo"
 
-DESCRIPTION="A puzzle game with a strong emphasis on physics (HumbleBundle edition)"
-HOMEPAGE="http://2dboy.com/"
+DESCRIPTION="A puzzle game with a strong emphasis on physics (Humble Bundle edition)"
+HOMEPAGE="https://2dboy.com/"
 SRC_URI="${MY_PN}.Linux.${PV}.sh"
 
 LICENSE="2dboy-EULA"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE="bundled-libs"
-RESTRICT="fetch bindist strip bundled-libs? ( splitdebug )"
+RESTRICT="bindist fetch strip bundled-libs? ( splitdebug )"
 
-DEPEND="app-arch/unzip"
-RDEPEND="!bundled-libs? (
-               media-libs/libsdl2[alsa,sound,opengl,video]
+BDEPEND="app-arch/unzip"
+
+RDEPEND="
+       !bundled-libs? (
+               media-libs/libsdl2[opengl,sound,video]
                media-libs/sdl2-mixer[vorbis]
        )
+       >=sys-devel/gcc-3.4
        sys-libs/glibc
        virtual/opengl
-       virtual/glu
-       >=sys-devel/gcc-3.4
        !games-puzzle/world-of-goo
-       !games-puzzle/world-of-goo-gog"
+       !games-puzzle/world-of-goo-gog
+"
 
 dir="/opt/${PN%-*}"
-
-QA_PREBUILT="${dir:1}/${MY_PN}.bin.x86
-       ${dir:1}/${MY_PN}.bin.x86_64"
+S="${WORKDIR}"
+QA_PREBUILT="${dir#/}/*"
 
 pkg_nofetch() {
-       elog "Download ${A} from www.humblebundle.com"
-       elog "and place it in your DISTDIR directory."
+       elog "If you bought directly from 2DBOY then download ${A} from:"
+       elog "  https://2dboy.com/ReceptionistBot/orderLookup.php"
+       elog
+       elog "Otherwise please buy and download ${A} from:"
+       elog "  https://www.humblebundle.com/store/product/worldofgoo"
+       elog
+       elog "Then move it to your distfiles directory."
 }
 
 src_unpack() {
-       unzip -d "${S}" "${DISTDIR}/${A}"
+       unpack_zip ${A}
 }
 
 src_install() {
        exeinto "${dir}"
-       doexe data/x86$(usex amd64 _64)/${MY_PN}.bin.x86$(usex amd64 _64)
-
-       make_wrapper ${PN%-*} "${dir}"/${MY_PN}.bin.x86$(usex amd64 _64) \
-               $(use bundled-libs && (printf '"%s" "%s/lib%s"' "${dir}" "${dir}" $(usex amd64 64) || die))
+       newexe data/x86$(usex amd64 _64)/${MY_PN}.bin.x86$(usex amd64 _64) ${MY_PN}.bin
+       dosym "../..${dir}"/${MY_PN}.bin /usr/bin/${PN%-*}
 
        insinto "${dir}"
-       doins -r data/noarch/game
-       use bundled-libs && doins -r data/x86$(usex amd64 _64)/lib$(usex amd64 64)
-       newicon data/noarch/game/gooicon.png ${PN%-*}.png
+       doins -r data/noarch/game/
+       use bundled-libs && doins -r data/x86$(usex amd64 _64)/lib$(usex amd64 64)/
 
+       newicon -s 256 data/noarch/game/gooicon.png ${PN%-*}.png
        make_desktop_entry ${PN%-*} "World of Goo" ${PN%-*}
 
        docinto html