mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
file_sharedir_install: new perl module recipe
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
SUMMARY="Install shared files"
|
||||
DESCRIPTION="File::ShareDir::Install allows you to install read-only data files from a \
|
||||
distribution. It is a companion module to File::ShareDir, which allows you to locate these files \
|
||||
after installation.
|
||||
It is a port of Module::Install::Share to ExtUtils::MakeMaker with the improvement of only \
|
||||
installing the files you want; .svn, .git and other source-control junk will be ignored.
|
||||
Please note that this module installs read-only data files; empty directories will be ignored."
|
||||
HOMEPAGE="https://metacpan.org/pod/File::ShareDir::Install"
|
||||
COPYRIGHT="2009 by Philip Gwyn"
|
||||
LICENSE="Artistic"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://cpan.metacpan.org/authors/id/E/ET/ETHER/File-ShareDir-Install-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="8f9533b198f2d4a9a5288cbc7d224f7679ad05a7a8573745599789428bc5aea0"
|
||||
SOURCE_DIR="File-ShareDir-Install-$portVersion"
|
||||
PATCHES="file_sharedir_install-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
file_sharedir_install = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
vendor_perl
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:make
|
||||
cmd:perl
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
perl Makefile.PL PREFIX=$prefix
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make 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()
|
||||
{
|
||||
unset HAIKU_USE_VENDOR_DIRECTORIES
|
||||
# the makefile tests should use site directories
|
||||
|
||||
make test
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
From 76e2eb376618956ac3e54505d49a2f4018f73d3d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
|
||||
Date: Sun, 27 Oct 2024 17:51:32 +0100
|
||||
Subject: fix makefile tests
|
||||
|
||||
The SITEPREFIX contains 'non-packaged' on Haiku.
|
||||
|
||||
diff --git a/t/10_makefile.t b/t/10_makefile.t
|
||||
index 7c3bf07..3d45253 100644
|
||||
--- a/t/10_makefile.t
|
||||
+++ b/t/10_makefile.t
|
||||
@@ -82,7 +82,7 @@ unless( $content =~ m(INSTALLSITELIB = (.+)) ) {
|
||||
}
|
||||
else {
|
||||
$TOP = "$1/auto/share";
|
||||
- $TOP =~ s/\$\(SITEPREFIX\)/troot-$$/;
|
||||
+ $TOP =~ s/\$\(SITEPREFIX\)/troot-$$\/non-packaged/;
|
||||
ok( -f "$TOP/dist/File-ShareDir-Install/honk", "Copied to blib for dist - regular file" );
|
||||
ok( -f "$TOP/dist/File-ShareDir-Install/hello world", "Copied to blib for dist - file with spaces" );
|
||||
ok( -f "$TOP/dist/File-ShareDir-Install/#hello", "Copied to blib for dist - file with special char" );
|
||||
--
|
||||
2.45.2
|
||||
|
||||
Reference in New Issue
Block a user