extutils_libbuilder: new perl module recipe

This is another build time dependency of Text::BibTeX.
This commit is contained in:
Joachim Mairböck
2025-01-05 11:26:44 +01:00
parent 0bf539b6c1
commit 94207468e3
2 changed files with 85 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
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="
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() {
./Build test
}

View File

@@ -0,0 +1,24 @@
From e9827c7fd56b1f46940a5dea073c6ca002a59bb6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
Date: Sat, 4 Jan 2025 19:58:34 +0100
Subject: Haiku support in test
diff --git a/t/01-simple.t b/t/01-simple.t
index 6b7e7ac..361bfdc 100644
--- a/t/01-simple.t
+++ b/t/01-simple.t
@@ -71,6 +71,10 @@ elsif ($^O =~ /aix/i) {
my $oldlibpath = $ENV{LIBPATH} || '/lib:/usr/lib';
$ENV{LIBPATH} = ".:$oldlibpath";
}
+elsif ($^O =~ /haiku/i) {
+ my $oldlibpath = $ENV{LIBRARY_PATH} || '/boot/system/lib:/boot/system/lib/x86';
+ $ENV{LIBRARY_PATH} = ".:$oldlibpath";
+}
my $P;
$P = "./" unless $^O =~ /mswin32/i;
--
2.45.2