Files
haikuports/dev-perl/extutils_libbuilder/extutils_libbuilder-0.08.recipe
Joachim Mairböck a068cc26b9 config_autoconf, extutils_libbuilder: fix tests on x86_gcc2
haikuporter runs in a gcc2 environment when not building secondaryArch packages
on x86_gcc2, so some additional environment changes are needed so that gcc-x86
actually works.
2025-01-05 15:23:00 +01:00

67 lines
1.5 KiB
Bash

SUMMARY="A tool to build C libraries"
DESCRIPTION="Some Perl modules need to ship C libraries together with their Perl code. Although \
there are mechanisms to compile and link (or glue) C code in your Perl programs, there isn't a \
clear method to compile standard, self-contained C libraries.
This module main goal is to help in that task."
HOMEPAGE="https://metacpan.org/pod/ExtUtils::LibBuilder"
COPYRIGHT="2010 Alberto Simoes"
LICENSE="Artistic"
REVISION="1"
SOURCE_URI="https://cpan.metacpan.org/authors/id/A/AM/AMBS/ExtUtils-LibBuilder-$portVersion.tar.gz"
CHECKSUM_SHA256="c51171e06de53039f0bca1d97a6471ec37941ff59e8a3d1cb170ebdd2573b5d2"
SOURCE_DIR="ExtUtils-LibBuilder-$portVersion"
PATCHES="extutils_libbuilder-$portVersion.patchset"
ARCHITECTURES="any"
PROVIDES="
extutils_libbuilder = $portVersion
"
REQUIRES="
haiku
vendor_perl
"
BUILD_REQUIRES="
haiku_devel
module_build
"
BUILD_PREREQUIRES="
cmd:perl
"
if [ "$targetArchitecture" = x86_gcc2 ]; then
TEST_REQUIRES="
haiku_x86_devel
cmd:gcc_x86
"
else
TEST_REQUIRES="
cmd:gcc
"
fi
BUILD()
{
perl Build.PL --prefix=$prefix --installdirs=vendor
./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() {
if [ "$targetArchitecture" = x86_gcc2 ]; then
export CC=gcc-x86
export LD=gcc-x86
fi
./Build test
}