parse_recdescent: new perl module recipe

This commit is contained in:
Joachim Mairböck
2025-01-04 15:08:08 +01:00
parent a76b33c876
commit d46412a2ce

View File

@@ -0,0 +1,59 @@
SUMMARY="Generate Recursive-Descent Parsers"
DESCRIPTION="Parse::RecDescent incrementally generates top-down recursive-descent text parsers \
from simple yacc-like grammar specifications. It provides:
* Regular expressions or literal strings as terminals (tokens),
* Multiple (non-contiguous) productions for any rule,
* Repeated and optional subrules within productions,
* Full access to Perl within actions specified as part of the grammar,
* Simple automated error reporting during parser generation and parsing,
* The ability to commit to, uncommit to, or reject particular productions during a parse,
* The ability to pass data up and down the parse tree (\"down\" via subrule argument lists, \
\"up\" via subrule return values)
* Incremental extension of the parsing grammar (even during a parse),
* Precompilation of parser objects,
* User-definable reduce-reduce conflict resolution via \"scoring\" of matching productions."
HOMEPAGE="https://metacpan.org/pod/Parse::RecDescent"
COPYRIGHT="1997-2007, Damian Conway"
LICENSE="Artistic"
REVISION="1"
SOURCE_URI="https://cpan.metacpan.org/authors/id/J/JT/JTBRAUN/Parse-RecDescent-$portVersion.tar.gz"
CHECKSUM_SHA256="1943336a4cb54f1788a733f0827c0c55db4310d5eae15e542639c9dd85656e37"
SOURCE_DIR="Parse-RecDescent-$portVersion"
ARCHITECTURES="any"
PROVIDES="
parse_recdescent = $portVersion
"
REQUIRES="
haiku
vendor_perl
"
BUILD_REQUIRES="
haiku_devel
module_build
"
BUILD_PREREQUIRES="
cmd:perl
"
BUILD()
{
perl Build.PL --prefix=$prefix
./Build
}
INSTALL()
{
./Build 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() {
./Build test
}