From 49f390191f74a6c211c1410823e5936bb7b36a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= Date: Sun, 27 Oct 2024 18:00:22 +0100 Subject: [PATCH] file_sharedir_install: new perl module recipe --- .../file_sharedir_install-0.14.recipe | 57 +++++++++++++++++++ .../file_sharedir_install-0.14.patchset | 23 ++++++++ 2 files changed, 80 insertions(+) create mode 100644 dev-perl/file_sharedir_install/file_sharedir_install-0.14.recipe create mode 100644 dev-perl/file_sharedir_install/patches/file_sharedir_install-0.14.patchset diff --git a/dev-perl/file_sharedir_install/file_sharedir_install-0.14.recipe b/dev-perl/file_sharedir_install/file_sharedir_install-0.14.recipe new file mode 100644 index 000000000..134c992b7 --- /dev/null +++ b/dev-perl/file_sharedir_install/file_sharedir_install-0.14.recipe @@ -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 +} diff --git a/dev-perl/file_sharedir_install/patches/file_sharedir_install-0.14.patchset b/dev-perl/file_sharedir_install/patches/file_sharedir_install-0.14.patchset new file mode 100644 index 000000000..a8aa3bae7 --- /dev/null +++ b/dev-perl/file_sharedir_install/patches/file_sharedir_install-0.14.patchset @@ -0,0 +1,23 @@ +From 76e2eb376618956ac3e54505d49a2f4018f73d3d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= +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 +