diff options
author | James Le Cuirot <chewi@gentoo.org> | 2018-03-25 14:47:25 +0100 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2018-03-25 17:33:05 +0100 |
commit | eb3ca553bf3b86a2d4890837b6f32f24641d41c0 (patch) | |
tree | 512df188f7eca3a4fcd2a2cd57e98e872d454cff | |
parent | games-action/trine-bin: Renamed to games-action/trine (diff) | |
download | gentoo-eb3ca553bf3b86a2d4890837b6f32f24641d41c0.tar.gz gentoo-eb3ca553bf3b86a2d4890837b6f32f24641d41c0.tar.bz2 gentoo-eb3ca553bf3b86a2d4890837b6f32f24641d41c0.zip |
games-action/trine: Fix dependencies, cleanup, launcher USE flag
I did a bad job of unbundling the libraries before.
This adds a compatibility symlink now that the package has been
renamed from trine-bin.
Adds missing icon cache handling.
Closes: https://bugs.gentoo.org/364293
Package-Manager: Portage-2.3.24, Repoman-2.3.6
-rw-r--r-- | games-action/trine/metadata.xml | 11 | ||||
-rw-r--r-- | games-action/trine/trine-1.08-r2.ebuild | 77 | ||||
-rw-r--r-- | games-action/trine/trine-1.08-r3.ebuild | 97 |
3 files changed, 104 insertions, 81 deletions
diff --git a/games-action/trine/metadata.xml b/games-action/trine/metadata.xml index 78274e0fa550..b26a6baa4124 100644 --- a/games-action/trine/metadata.xml +++ b/games-action/trine/metadata.xml @@ -1,8 +1,11 @@ <?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> + <use> + <flag name="launcher">Install GTK+ launcher</flag> + </use> </pkgmetadata> diff --git a/games-action/trine/trine-1.08-r2.ebuild b/games-action/trine/trine-1.08-r2.ebuild deleted file mode 100644 index 99503c9efac8..000000000000 --- a/games-action/trine/trine-1.08-r2.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit desktop eutils unpacker - -DESCRIPTION="A physics-based action game with character-dependent solutions to challenges" -HOMEPAGE="http://trine-thegame.com/" -SRC_URI="TrineUpdate4.64.run" - -LICENSE="frozenbyte-eula" -SLOT="0" -KEYWORDS="-* ~amd64 ~x86" -RESTRICT="fetch strip" - -DEPEND=" - app-admin/chrpath - app-arch/unzip -" - -RDEPEND=" - dev-libs/glib:2 - dev-libs/libx86 - gnome-base/libglade:2.0 - media-libs/libogg - media-libs/libpng:1.2 - >=media-libs/libsdl-1.2[opengl,sound,video] - >=media-libs/libvorbis-1.3 - >=media-libs/openal-1.15 - >=media-libs/tiff-3.9:3 - >=sys-devel/gcc-4.3.0 - >=sys-libs/glibc-2.4 - virtual/jpeg:62 - x11-libs/gtk+:2 -" - -S="${WORKDIR}" -d="/opt/${PN}" -QA_PREBUILT="*" - -pkg_nofetch() { - einfo "Fetch ${SRC_URI} and put it into ${DISTDIR}" - einfo "See http://www.humblebundle.com/ for more info." -} - -src_unpack() { - unpack_zip ${A} -} - -src_prepare() { - default - rm -v lib*/lib{gcc_s,jpeg,m,ogg,openal,png*,rt,SDL*,selinux,stdc++,tiff,vorbis*}.* || die - chrpath --replace "${EPREFIX}${d}"/lib trine-{bin,launcher}$(usex x86 32 64) || die -} - -src_install() { - local b bb - local sfx=$(usex x86 32 64) - - doicon Trine.xpm - for b in bin launcher ; do - bb="trine-${b}" - exeinto ${d} - newexe ${bb}${sfx} ${bb} - make_wrapper ${bb} "./${bb}" "${d}" - make_desktop_entry ${bb} "Trine ${b}" Trine - done - - exeinto ${d}/lib - doexe lib${sfx}/* - - insinto ${d} - doins -r binds config data dev profiles *.fbz *.glade trine-logo.png - - dodoc Trine_Manual_linux.pdf Trine_updates.txt -} diff --git a/games-action/trine/trine-1.08-r3.ebuild b/games-action/trine/trine-1.08-r3.ebuild new file mode 100644 index 000000000000..f9b9673cdd45 --- /dev/null +++ b/games-action/trine/trine-1.08-r3.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit desktop eutils gnome2-utils unpacker + +DESCRIPTION="A physics-based action game with character-dependent solutions to challenges" +HOMEPAGE="https://www.frozenbyte.com/games/trine-enchanted-edition" +SRC_URI="TrineUpdate4.64.run" +LICENSE="frozenbyte-eula" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="+launcher" +RESTRICT="bindist fetch strip" + +QA_PREBUILT="opt/${PN}/${PN}* + opt/${PN}/lib/*" + +DEPEND=" + app-admin/chrpath + app-arch/unzip +" + +RDEPEND=" + media-gfx/nvidia-cg-toolkit + >=media-libs/libsdl-1.2[opengl,video] + >=media-libs/sdl-image-1.2 + >=media-libs/sdl-ttf-2.0 + >=media-libs/libvorbis-1.3 + >=media-libs/openal-1.15 + >=sys-devel/gcc-4.3.0 + >=sys-libs/glibc-2.4 + sys-libs/zlib + x11-libs/gtk+:2 + launcher? ( + dev-libs/glib:2 + gnome-base/libglade:2.0 + )" + +S="${WORKDIR}" +dir="/opt/${PN}" + +pkg_nofetch() { + einfo "Fetch ${SRC_URI} and put it into your distfiles directory." + einfo "It is no longer available to purchase but you can still download it" + einfo "from https://www.humblebundle.com if you bought it previously." + einfo "Otherwise install ${CATEGORY}/trine-enchanted-edition instead." +} + +src_unpack() { + unpack_zip ${A} +} + +src_prepare() { + default + use launcher || rm -v lib*/lib{boost*,icu*}.* || die + rm -v lib*/lib{Cg*,direct*,fusion*,gcc_s,jpeg,m,ogg,openal,png*,rt,SDL*,selinux,stdc++,tiff,vga,vorbis*}.* || die + chrpath --replace "${EPREFIX}${dir}"/lib trine-{bin,launcher}$(usex x86 32 64) || die +} + +src_install() { + local sfx=$(usex x86 32 64) + + insinto "${dir}" + doins -r binds config data dev profiles *.fbz *.glade trine-logo.png + + exeinto "${dir}/lib" + doexe lib${sfx}/* + + exeinto "${dir}" + newexe trine-bin${sfx} ${PN} + + make_wrapper ${PN} ./${PN} "${dir}" + make_desktop_entry ${PN} "Trine" + + # Compatibility with trine-bin. + dosym ${PN} /usr/bin/${PN}-bin + + if use launcher ; then + exeinto "${dir}" + newexe trine-launcher${sfx} ${PN}-launcher + + dosym {"../..${dir}",/usr/bin}/${PN}-launcher + make_desktop_entry ${PN}-launcher "Trine (launcher)" + + # Launcher binary has hardcoded the game path. + dosym ${PN} "${dir}"/${PN}-bin + fi + + newicon -s 512 Trine.xpm ${PN}.xpm + dodoc Trine_Manual_linux.pdf Trine_updates.txt +} + +pkg_preinst() { gnome2_icon_savelist; } +pkg_postinst() { gnome2_icon_cache_update; } +pkg_postrm() { gnome2_icon_cache_update; } |