Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add generic perl recipes #302

Merged
merged 2 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions generic/generic_perl-1.23.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
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
some_other_perl_package
vendor_perl
"

BUILD_REQUIRES="
haiku_devel
# Guideline: Don't add requirements other than configure and build requirements here.
# Makefile.PL may print warnings about missing runtime 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()
{
# Explanation: "make install" would create a "perllocal.pod" file which isn't wanted for
# packages. Using "make pure_install" avoids that.
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
}
63 changes: 63 additions & 0 deletions generic/generic_perl_module_build-1.23.recipe
Original file line number Diff line number Diff line change
@@ -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
some_other_perl_package
vendor_perl
"

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
}
61 changes: 61 additions & 0 deletions generic/generic_perl_xs-1.23.recipe
Original file line number Diff line number Diff line change
@@ -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
}
Loading