From: Nick Bowler Date: Tue, 22 Jun 2021 01:40:36 +0000 (-0400) Subject: games-strategy/uplink: Update to work with latest gentoo repo. X-Git-Url: https://git.draconx.ca/gitweb/gentoo-draconx.git/commitdiff_plain/dcb0875c7aecd0c63aacee7578b97ec4a238f2e6 games-strategy/uplink: Update to work with latest gentoo repo. Due to removal of games.eclass and the older libtiff slots, this package needs some love. We can still unbundle libtiff but a small patch is required to tweak stack allocation. --- diff --git a/games-strategy/uplink/Manifest b/games-strategy/uplink/Manifest index abd7b9c..45405ea 100644 --- a/games-strategy/uplink/Manifest +++ b/games-strategy/uplink/Manifest @@ -1,3 +1,4 @@ -DIST uplink_1.6-1_amd64.tar.gz 22848679 SHA256 6a3cdcbc86b2f1a254c3ae340847e4e0d56a6c7524f4814499c3463b575a09e0 SHA512 b1c174209f4c2ea1d09fad251073c2fac7cb6f0eba3a1ab53095a336226f5196bbedcbb3f3ba10b4a15037483f2ed21a6c306ecc79039c4ac0a91bc4838e5ef0 WHIRLPOOL fe453c6b0be7f243c9a4ee4f1cf0c9a0e589d08b66bf5a7058d166d706ebbd8f4497b68e6cd78ffc1ff44882e7b79c02b47676b45903f0b505b37b4e2f2fbb2d -DIST uplink_1.6-1_i386.tar.gz 22897824 SHA256 6ea785fcb58cd943a0d36d64824c3df6652a52b6e133026ac9e32761f41be8e8 SHA512 1d351ae359087746655a5a678f7df38ba9a2735fc5d17439917030732bf87427e77891e85392c7ec0a6228e3dab53fea1a4ca7d02b54f9d59e12911190d9ab53 WHIRLPOOL beeec7a7a6125aee846b81bdc36f0a442178607bb1800ee6bde5bdddfc8c32b6588ff9eb00936772a85208f1d7490f8e5071a0e8ea4e82a26ad4cb80f6e3f81a -EBUILD uplink-1.6-r1.ebuild 1404 SHA256 4def199e524e6374a9f5b85fc5da6630fc72eddb12ece6f119c6a8364477e128 SHA512 168e178ec4e65f7d4016609500dc0926243e463a8e35183e721b4d7e73d234cc1421ad7f268e886ae7a2b7d9b07b0b6980919f3f32533d662b4f82d18f165e7b WHIRLPOOL cf135016f152ac713e8155ddedc584abd0361c63e77dd65192f7405af37b56b0758a162e31d799e88e0658fbd48d0a39d032c56f78dd8e5fcc778560fee5f4e9 +AUX uplink.bin.x86_64.libtiff_compat.vcdiff 128 BLAKE2B 135da33dbd8a3f9f3e0b150eb61b4bcfe15c1444471c04ff564c36467882aad0e47b434dd10a8a29231c312890d9cd5fa8e3ecd1bc39bf31ece932336357782a SHA512 b6308395b6d11024c6f72289d1577b97ffb529a694caff62ff1652669cca3a5272ca402c531a1ce2efd12a1085c646c9fd8a91798f82c54e6e6cbde3cabfb113 +DIST uplink_1.6-1_amd64.tar.gz 22848679 BLAKE2B f230245dc7d8c2b31ac24d76822bfe48015a9cdc2bf6dc29846adf6de0f01628439edca5907e9d7d24c202c5a7f8186f8cdf33ea5c150efbab488f5253989e3e SHA512 b1c174209f4c2ea1d09fad251073c2fac7cb6f0eba3a1ab53095a336226f5196bbedcbb3f3ba10b4a15037483f2ed21a6c306ecc79039c4ac0a91bc4838e5ef0 +DIST uplink_1.6-1_i386.tar.gz 22897824 BLAKE2B f6a55ef1d836bb39cf56f9abdb488fa85b2107876711c517dac4d4f9bbfd5677e6f34f7b083ea640ca5fd6dfa222640130445e2614e6a6328576e3fe845c98c2 SHA512 1d351ae359087746655a5a678f7df38ba9a2735fc5d17439917030732bf87427e77891e85392c7ec0a6228e3dab53fea1a4ca7d02b54f9d59e12911190d9ab53 +EBUILD uplink-1.6-r2.ebuild 2020 BLAKE2B c5fe40e02a2e104b7dab87821cebdb7de29b4ea054687c6f7aaeef2b30e3f5231910fd3a7ea50318d84c7b36e6d4c9fae1930b609bfae14abc1850ca286140d4 SHA512 00ecb59fae95868b7e409a9942023f99e1a92b76b1c2135e18225f9bf835f7c656b8ef4998ea047342f53988b1b615f0a9e8115628e89bbc94eee3bf6e7218b6 diff --git a/games-strategy/uplink/files/uplink.bin.x86_64.libtiff_compat.vcdiff b/games-strategy/uplink/files/uplink.bin.x86_64.libtiff_compat.vcdiff new file mode 100644 index 0000000..38fdbc8 Binary files /dev/null and b/games-strategy/uplink/files/uplink.bin.x86_64.libtiff_compat.vcdiff differ diff --git a/games-strategy/uplink/uplink-1.6-r1.ebuild b/games-strategy/uplink/uplink-1.6-r2.ebuild similarity index 52% rename from games-strategy/uplink/uplink-1.6-r1.ebuild rename to games-strategy/uplink/uplink-1.6-r2.ebuild index ab69670..fffde44 100644 --- a/games-strategy/uplink/uplink-1.6-r1.ebuild +++ b/games-strategy/uplink/uplink-1.6-r2.ebuild @@ -1,10 +1,11 @@ -# Copyright © 2011, 2015 Nick Bowler -# License GPLv3+: GNU General Public License version 3 or later. +# Copyright © 2011, 2015, 2021 Nick Bowler +# License GPLv3+: GNU General Public License version 3 or any later version. +# This is free software: you are free to change and redistribute it. # There is NO WARRANTY, to the extent permitted by law. -EAPI=5 +EAPI=7 -inherit games +inherit desktop wrapper xdg-utils MY_P=${PN}_${PV}-1 @@ -15,16 +16,17 @@ SRC_URI="amd64? ( ${MY_P}_amd64.tar.gz ) RESTRICT="fetch" LICENSE="uplink" -KEYWORDS="~amd64 ~x86" +KEYWORDS="-* ~amd64 -x86" # needs libtiff.so.5 patch for x86 SLOT="0" -DEPEND="dev-util/patchelf" +BDEPEND="dev-util/patchelf + dev-util/xdelta:3" RDEPEND="media-libs/libsdl[opengl] media-libs/sdl-mixer[mikmod] media-libs/freetype:2 - media-libs/tiff:3" + >=media-libs/tiff-4.0.9" -src_unpack() { +src_unpack () { local root unpack $A @@ -36,7 +38,25 @@ src_unpack() { mv "$root" "$P" || die } -src_compile() { +src_prepare () { + local exe binpatches=( + # Adjust stack allocation size to work with libtiff.so.5 + libtiff_compat + ) + + use amd64 && exe=uplink.bin.x86_64 + use x86 && exe=uplink.bin.x86 + + for f in "${binpatches[@]}"; do + patch=$exe.$f.vcdiff + einfo "Applying $patch" + xdelta3 -fds "$exe" "$FILESDIR/$patch" "$exe" || die + done + + default +} + +src_compile () { local useless_libs="libjpeg.so.62 libmikmod.so.2 libz.so.1" local exe @@ -45,12 +65,13 @@ src_compile() { test -n "$exe" || die "unsupported architecture" for lib in $useless_libs; do + einfo "Removing unused library $lib" patchelf --remove-needed "$lib" "$exe" || die done } -src_install() { - local dir=$GAMES_PREFIX_OPT/$PN +src_install () { + local dir=/opt/uplink-$PV local exe insinto "$dir" @@ -63,11 +84,17 @@ src_install() { exeinto "$dir" doexe "$exe" - doicon uplink.png + doicon -s 32x32 uplink.png make_desktop_entry "$PN" Uplink uplink - games_make_wrapper "$PN" "$dir/$exe" + make_wrapper "$PN" "$dir/$exe" dodoc *.txt +} + +pkg_postinst () { + xdg_icon_cache_update +} - prepgamesdirs +pkg_postrm () { + pkg_postinst }