mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
tie_cycle: new perl module recipe
This commit is contained in:
57
dev-perl/tie_cycle/tie_cycle-1.229.recipe
Normal file
57
dev-perl/tie_cycle/tie_cycle-1.229.recipe
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user