From 3e1a9b34158bf3bfff23f3dbf63a442c677ed456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= Date: Sun, 12 Jan 2025 21:30:54 +0100 Subject: [PATCH] tie_cycle: new perl module recipe --- dev-perl/tie_cycle/tie_cycle-1.229.recipe | 57 +++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 dev-perl/tie_cycle/tie_cycle-1.229.recipe diff --git a/dev-perl/tie_cycle/tie_cycle-1.229.recipe b/dev-perl/tie_cycle/tie_cycle-1.229.recipe new file mode 100644 index 000000000..b1ffb8cff --- /dev/null +++ b/dev-perl/tie_cycle/tie_cycle-1.229.recipe @@ -0,0 +1,57 @@ +SUMMARY="Cycle through a list of values via a scalar" +DESCRIPTION="You use Tie::Cycle to go through a list over and over again. Once you get to the end \ +of the list, you go back to the beginning. You don't have to worry about any of this since the \ +magic of tie does that for you. +The tie takes an array reference as its third argument. The tie should succeed unless the \ +argument is not an array reference. Previous versions required you to use an array that had more \ +than one element (what's the pointing of looping otherwise?), but I've removed that restriction \ +since the number of elements you want to use may change depending on the situation. +During the tie, this module makes a shallow copy of the array reference. If the array reference \ +contains references, and those references are changed after the tie, the elements of the cycle \ +will change as well. See the included test.pl script for an example of this effect." +HOMEPAGE="https://metacpan.org/pod/Tie::Cycle" +COPYRIGHT="2000-2025, brian d foy" +LICENSE="Artistic v2.0" +REVISION="1" +SOURCE_URI="https://cpan.metacpan.org/authors/id/B/BR/BRIANDFOY/Tie-Cycle-$portVersion.tar.gz" +CHECKSUM_SHA256="052bd15d9da1cf0eacbece5bf58c349c21fbf80929cf777d31d236c1dbe26838" +SOURCE_DIR="Tie-Cycle-$portVersion" + +ARCHITECTURES="any" + +PROVIDES=" + tie_cycle = $portVersion + " +REQUIRES=" + haiku + vendor_perl + " + +BUILD_REQUIRES=" + haiku_devel + " +BUILD_PREREQUIRES=" + cmd:make + cmd:perl + " + +BUILD() +{ + perl Makefile.PL PREFIX=$prefix + make +} + +INSTALL() +{ + make pure_install + + # remove architecture-specific files + cd $prefix + rm -r $(perl -V:vendorarch | cut -d\' -f2 | cut -d/ -f5-) + # cut extracts the quoted string and strips the prefix (which is perl's and not ours) +} + +TEST() +{ + make test +}