From 4ffc7d2161f06f139686c251220e51850c652659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= Date: Sat, 26 Oct 2024 12:44:35 +0200 Subject: [PATCH] add generic perl recipes --- generic/generic_perl-1.23.recipe | 71 +++++++++++++++++++ generic/generic_perl_module_build-1.23.recipe | 63 ++++++++++++++++ generic/generic_perl_xs-1.23.recipe | 61 ++++++++++++++++ 3 files changed, 195 insertions(+) create mode 100644 generic/generic_perl-1.23.recipe create mode 100644 generic/generic_perl_module_build-1.23.recipe create mode 100644 generic/generic_perl_xs-1.23.recipe diff --git a/generic/generic_perl-1.23.recipe b/generic/generic_perl-1.23.recipe new file mode 100644 index 0000000..6086585 --- /dev/null +++ b/generic/generic_perl-1.23.recipe @@ -0,0 +1,71 @@ +SUMMARY="Short description of ProjectX" +DESCRIPTION="Long ProjectX description. +Spanning several paragraphs, maybe + - containing + - bullet points etc. +You can also have really long lines that do not fit in 100 characters and use a backslash to \ +wrap the line." +HOMEPAGE="https://metacpan.org/pod/Project::X" +COPYRIGHT="2014 Developer name + 2016 Another developer's name" +LICENSE="MIT + GNU GPL v2" +REVISION="1" +SOURCE_URI="https://cpan.metacpan.org/authors/id/A/AU/AUTHOR/Project-X-$portVersion.tar.gz" +CHECKSUM_SHA256="000000000000000000000000000000000" +SOURCE_DIR="Project-X-$portVersion" +PATCHES="project_x-$portVersion.patchset" +ADDITIONAL_FILES="projectx.rdef" + +ARCHITECTURES="any" + +PROVIDES=" + project_x = $portVersion + cmd:projectx = $portVersion # only some packages provide commands + " +REQUIRES=" + haiku + vendor_perl + some_other_perl_package + " + +BUILD_REQUIRES=" + haiku_devel + # Guideline: Don't add requirements other than configure and build requirements here. + # Makefile.PL may print warnings about missing dependencies, but they aren't required at + # build time. Runtime requirements should be added to REQUIRES and TEST_REQUIRES instead. + " +BUILD_PREREQUIRES=" + cmd:make + cmd:perl + " + +TEST_REQUIRES=" + some_other_perl_package + some_test_requirement + " + +BUILD() +{ + perl Makefile.PL PREFIX=$prefix + make +} + +INSTALL() +{ + make pure_install + + # remove architecture-specific files + # Explanation: Otherwise, this wouldn't be a valid "any" package. Only .packlist and other + # unneeded files should be removed. If there is anything else in the vendorarch directory + # (i.e. lib/perl5/vendor_perl/$perlVersion/$perlArch), make the package architecture-dependent + # instead (see generic_perl_xs.recipe). + 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 +} diff --git a/generic/generic_perl_module_build-1.23.recipe b/generic/generic_perl_module_build-1.23.recipe new file mode 100644 index 0000000..93bc817 --- /dev/null +++ b/generic/generic_perl_module_build-1.23.recipe @@ -0,0 +1,63 @@ +SUMMARY="Short description of ProjectX" +DESCRIPTION="Long ProjectX description. +Spanning several paragraphs, maybe + - containing + - bullet points etc. +You can also have really long lines that do not fit in 100 characters and use a backslash to \ +wrap the line." +HOMEPAGE="https://metacpan.org/pod/Project::X" +COPYRIGHT="2014 Developer name + 2016 Another developer's name" +LICENSE="MIT + GNU GPL v2" +REVISION="1" +SOURCE_URI="https://cpan.metacpan.org/authors/id/A/AU/AUTHOR/Project-X-$portVersion.tar.gz" +CHECKSUM_SHA256="000000000000000000000000000000000" +SOURCE_DIR="Project-X-$portVersion" +PATCHES="project_x-$portVersion.patchset" +ADDITIONAL_FILES="projectx.rdef" + +ARCHITECTURES="any" + +PROVIDES=" + project_x = $portVersion + " +REQUIRES=" + haiku + vendor_perl + some_other_perl_package + " + +BUILD_REQUIRES=" + haiku_devel + module_build + " +BUILD_PREREQUIRES=" + cmd:perl + " + +TEST_REQUIRES=" + some_other_perl_package + some_test_requirement + " + +BUILD() +{ + perl Build.PL --installdirs vendor --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 +} diff --git a/generic/generic_perl_xs-1.23.recipe b/generic/generic_perl_xs-1.23.recipe new file mode 100644 index 0000000..088a463 --- /dev/null +++ b/generic/generic_perl_xs-1.23.recipe @@ -0,0 +1,61 @@ +SUMMARY="Short description of ProjectX" +DESCRIPTION="Long ProjectX description. +Spanning several paragraphs, maybe + - containing + - bullet points etc. +You can also have really long lines that do not fit in 100 characters and use a backslash to \ +wrap the line." +HOMEPAGE="https://metacpan.org/pod/Project::X::XS" +COPYRIGHT="2014 Developer name + 2016 Another developer's name" +LICENSE="MIT + GNU GPL v2" +REVISION="1" +SOURCE_URI="https://cpan.metacpan.org/authors/id/A/AU/AUTHOR/Project-X-XS-$portVersion.tar.gz" +CHECKSUM_SHA256="000000000000000000000000000000000" +SOURCE_DIR="Project-X-XS-$portVersion" +PATCHES="project_x_xs-$portVersion.patchset" +ADDITIONAL_FILES="projectx.rdef" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + project_x_xs$secondaryArchSuffix = $portVersion + " +if [ -n "$secondaryArchSuffix" ]; then + PROVIDES+=" + project_x_xs = $portVersion + " +fi +REQUIRES=" + haiku$secondaryArchSuffix + vendor_perl + lib:libfoo$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libfoo$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:perl + " + +BUILD() +{ + perl Makefile.PL PREFIX=$prefix + make +} + +INSTALL() +{ + make pure_install +} + +TEST() +{ + make test +}