diff options
Diffstat (limited to 'games-util/umodpack')
-rw-r--r-- | games-util/umodpack/Manifest | 3 | ||||
-rw-r--r-- | games-util/umodpack/files/umodpack-fixes.patch | 138 | ||||
-rw-r--r-- | games-util/umodpack/umodpack-0.5_beta16-r2.ebuild | 46 | ||||
-rw-r--r-- | games-util/umodpack/umodpack-0.5_beta16-r3.ebuild | 56 |
4 files changed, 196 insertions, 47 deletions
diff --git a/games-util/umodpack/Manifest b/games-util/umodpack/Manifest index 88f4fb7cc9ba..a879c7200512 100644 --- a/games-util/umodpack/Manifest +++ b/games-util/umodpack/Manifest @@ -1,3 +1,4 @@ +AUX umodpack-fixes.patch 4206 BLAKE2B 905d5813a079b9cc7b7fab7e2cff2206bcca992873e04ea2b450fda2b3425561af1bd1b4dd23f8e0c55f8beb3345adacde5d67b063265333aabb9aa6121847a7 SHA512 cfd9864e310818af23955a85eae4c9ec481d6aeb788a006bb35c30501341f2fed56347935aba128b1578c68a95a9a98335a67a0298447cd235790aec16117423 DIST umodpack-0.5b16-allinone.tar.gz 3605080 BLAKE2B 718208835f318c85305f266a23f9fa5c2966031924d4d4e3a5cdee649afaee64ed5ac753e630ef6783a49581b932a44d8b0dafa3e97603eb1706190f3c7e10d5 SHA512 3678507c7aec30043f50f5519935e2d5eb7471b5e0692ba8b27c506bdd7a067fdb055e6731a6bffb04bb3008020c889f3486624a1466a77e0eab3e5139003ff0 -EBUILD umodpack-0.5_beta16-r2.ebuild 968 BLAKE2B 23eaa1f37092fd58f7b01f8f3c9549f7b5e80ec20be6910cc91e803896fc8b7bfd95372c3c6da02473ae27df2c973f72c35879d7f2dfb88b34acfdddf8a5e1fa SHA512 e97de8824e672d0a6812868133cee06b3452a35f595b88a0f9fea06f2fd7a96b0d557a7081cda9d16283855d1cc76b33eb6607a6dabb664989b7817950943b41 +EBUILD umodpack-0.5_beta16-r3.ebuild 1096 BLAKE2B 3852870eedf03fd1d24b4e6c528e0c312af7bd3ea24db631bb144de8d6371449838dcf3b554978082fc50c18fc1b9984e8da277eccc98dec1e14f6d966a08c22 SHA512 a243fd25b14841f8ca672990ac38444762787a18617959f264b6ec16304a3ea325b71fb947f3744c44522760a26926f875a3bf589d58f806258092efc0d2ed06 MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 diff --git a/games-util/umodpack/files/umodpack-fixes.patch b/games-util/umodpack/files/umodpack-fixes.patch new file mode 100644 index 000000000000..13bcad6c9ea9 --- /dev/null +++ b/games-util/umodpack/files/umodpack-fixes.patch @@ -0,0 +1,138 @@ +diff -Naur a/Config-Ini-1.06/test.pl b/Config-Ini-1.06/test.pl +--- a/Config-Ini-1.06/test.pl 2020-04-05 21:08:14.033277147 +0100 ++++ b/Config-Ini-1.06/test.pl 2020-04-05 21:08:04.576074986 +0100 +@@ -11,9 +11,9 @@ + + ######################### End of black magic. + +-use POSIX qw(tmpnam); +-do { $tmpfile = tmpnam() } until open TMPFILE, ">$tmpfile"; +-print TMPFILE <<EOT; ++use File::Temp qw(tempfile); ++( $tmpfh, $tmpfile ) = tempfile(UNLINK => 0); ++print $tmpfh <<EOT; + [Setup] + MasterProduct=UnrealTournament + Group=UnrealTournament +@@ -56,7 +56,7 @@ + ServerActors = IpServer.UdpServerUplinkMaster\\ + ServerAddress=master.mplayer.com MasterServerPort = 27900 + EOT +-close TMPFILE; ++close $tmpfh; + + # constructor + $ini = new Config::Ini($tmpfile); +@@ -165,11 +165,11 @@ + + # save function + $ini->save; +-open TMPFILE, "<$tmpfile"; ++open $tmpfh, "<$tmpfile"; + undef $/; +-$wholefile = <TMPFILE>; ++$wholefile = <$tmpfh>; + $/ = "\n"; +-close TMPFILE; ++close $tmpfh; + $shouldbe = <<EOT; + [Setup] + MasterProduct=UnrealTournament +@@ -232,7 +232,7 @@ + print "ok 17\n"; + } else { print "not ok 17\n"; } + +-do { $tmpfile = tmpnam() } until open TMPFILE, ">$tmpfile"; ++( $tmpfh, $tmpfile ) = tempfile(UNLINK => 0); + $ini->save($tmpfile); + + # test decoder +@@ -254,8 +254,8 @@ + unlink $tmpfile; + + # test comment delimiter +-do { $tmpfile = tmpnam() } until open TMPFILE, ">$tmpfile"; +-print TMPFILE <<EOT; ++( $tmpfh, $tmpfile ) = tempfile(UNLINK => 0); ++print $tmpfh <<EOT; + [Options] + Configured=1 + GSversion=550 +@@ -272,7 +272,7 @@ + [DEQData] + Winlist=t123;218 praivi;215 ptsk;209 + EOT +-close TMPFILE; ++close $tmpfh; + undef $ini; + $ini = new Config::Ini($tmpfile, -commentdelim => '#'); + +diff -Naur a/Makefile.PL b/Makefile.PL +--- a/Makefile.PL 2001-01-18 16:20:37.000000000 +0000 ++++ b/Makefile.PL 2020-04-05 21:08:32.335668386 +0100 +@@ -11,7 +11,6 @@ + 'PREREQ_PM' => { + 'Config::Ini' => 1.06, + 'Archive::Zip' => 0.07, +- 'Tk' => 800.020, + }, +- 'EXE_FILES' => [qw(umod xumod)], ++ 'EXE_FILES' => [qw(umod)], + ); +diff -Naur a/umod b/umod +--- a/umod 2020-04-05 21:08:14.033277147 +0100 ++++ b/umod 2020-04-05 21:08:04.576074986 +0100 +@@ -17,7 +17,8 @@ + use FileHandle; + use File::Find; + use Getopt::Long; +-use POSIX qw(tmpnam SEEK_END); ++use POSIX qw(SEEK_END); ++use File::Temp qw(tempfile); + use strict; + + =pod +@@ -520,7 +521,7 @@ + if( $filename =~ /\.zip$/i ) { + + my( $tmpFile, $fh ); +- do { $tmpFile = tmpnam(); } until $fh = new FileHandle( $tmpFile, 'w' ); ++ ( $fh, $tmpFile ) = tempfile(UNLINK => 0); + + my( $zipFile ) = new Archive::Zip; + if( $zipFile->read( $filename ) != AZ_OK ) { +diff -Naur a/Umod.pm b/Umod.pm +--- a/Umod.pm 2020-04-05 21:08:14.033277147 +0100 ++++ b/Umod.pm 2020-04-05 21:08:04.576074986 +0100 +@@ -400,22 +400,22 @@ + if( $ini->exists( ['Setup', 'Requires'] ) ) { + foreach my $requirement ( $ini->get( ['Setup', 'Requires'], + -mapping => 'multiple' ) ) { +- my( %hash ); +- %hash->{product} = $ini->get( [$requirement, 'Product'], ++ my( $hash ); ++ $hash->{product} = $ini->get( [$requirement, 'Product'], + -mapping => 'single' ); +- %hash->{version} = $ini->get( [$requirement, 'Version'], ++ $hash->{version} = $ini->get( [$requirement, 'Version'], + -mapping => 'single' ); +- %hash->{localproduct} = $ini->get( [$requirement, 'LocalProduct'], ++ $hash->{localproduct} = $ini->get( [$requirement, 'LocalProduct'], + -mapping => 'single' ); +- %hash->{producturl} = $ini->get( [$requirement, 'ProductURL'], ++ $hash->{producturl} = $ini->get( [$requirement, 'ProductURL'], + -mapping => 'single' ); +- %hash->{versionurl} = $ini->get( [$requirement, 'VersionURL'], ++ $hash->{versionurl} = $ini->get( [$requirement, 'VersionURL'], + -mapping => 'single' ); +- %hash->{developer} = $ini->get( [$requirement, 'Developer'], ++ $hash->{developer} = $ini->get( [$requirement, 'Developer'], + -mapping => 'single' ); +- %hash->{developerurl} = $ini->get( [$requirement, 'DeveloperURL'], ++ $hash->{developerurl} = $ini->get( [$requirement, 'DeveloperURL'], + -mapping => 'single' ); +- push( @requirements, \%hash ); ++ push( @requirements, \$hash ); + } + } + diff --git a/games-util/umodpack/umodpack-0.5_beta16-r2.ebuild b/games-util/umodpack/umodpack-0.5_beta16-r2.ebuild deleted file mode 100644 index 772fe6487292..000000000000 --- a/games-util/umodpack/umodpack-0.5_beta16-r2.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit perl-module toolchain-funcs - -MY_P=${P/_beta/b} -DESCRIPTION="portable and useful [un]packer for Unreal Tournament's Umod files" -HOMEPAGE="http://www.oldunreal.com/wiki/index.php?title=UmodPack" -SRC_URI="mirror://gentoo/${MY_P}-allinone.tar.gz" - -LICENSE="Artistic" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="tk" - -DEPEND="virtual/perl-IO-Compress - dev-perl/Archive-Zip - dev-perl/Tie-IxHash - tk? ( dev-perl/Tk )" -RDEPEND=${DEPEND} - -S=${WORKDIR}/${MY_P} -SRC_TEST="do parallel" - -src_prepare() { - # remove the stupid perl modules since we already installed em - rm -rf {Archive-Zip,Compress-Zlib,Tie-IxHash,Tk}* || die -} - -src_compile() { - perl-module_src_compile - - cd umr-0.3 || die - emake DEBUG=0 CFLAGS="${CFLAGS}" CC="$(tc-getCC)" -} - -src_install() { - mydoc="Changes" - perl-module_src_install - dobin umod umr-0.3/umr - if use tk ; then - dobin xumod - fi -} diff --git a/games-util/umodpack/umodpack-0.5_beta16-r3.ebuild b/games-util/umodpack/umodpack-0.5_beta16-r3.ebuild new file mode 100644 index 000000000000..d87d9347c4f7 --- /dev/null +++ b/games-util/umodpack/umodpack-0.5_beta16-r3.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit perl-module toolchain-funcs + +MY_P="${P/_beta/b}" +DESCRIPTION="Portable (un)packer for Unreal Tournament's Umod files" +HOMEPAGE="http://www.oldunreal.com/wiki/index.php?title=UmodPack" +SRC_URI="mirror://gentoo/${MY_P}-allinone.tar.gz" + +LICENSE="Artistic" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="virtual/perl-IO-Compress + dev-perl/Archive-Zip + dev-perl/Tie-IxHash" + +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" +PATCHES=( "${FILESDIR}"/${PN}-fixes.patch ) +DIST_TEST="do" + +src_prepare() { + default + + # Remove bundled Perl modules. + rm -rf {Archive-Zip,Compress-Zlib,Tie-IxHash,Tk}* || die +} + +src_compile() { + perl-module_src_compile + + cd umr-* || die + emake DEBUG=0 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" +} + +src_test() { + local line + perl-module_src_test | while read line; do + cat <<< "${line}" + [[ ${line} =~ ^not\ ok\ [0-9] ]] && die "test failed" + done +} + +src_install() { + perl-module_src_install + + cd umr-* || die + dobin umr + newdoc README README-umr + newdoc TODO TODO-umr +} |