mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
extutils_installpaths: new perl module recipe
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
SUMMARY="Build.PL install path logic made easy"
|
||||
DESCRIPTION="This module tries to make install path resolution as easy as possible.
|
||||
When you want to install a module, it needs to figure out where to install things. The nutshell \
|
||||
version of how this works is that default installation locations are determined from \
|
||||
ExtUtils::Config, and they may be individually overridden by using the install_path attribute. An \
|
||||
install_base attribute lets you specify an alternative installation root like /home/foo and \
|
||||
prefix does something similar in a rather different (and more complicated) way. destdir lets you \
|
||||
specify a temporary installation directory like /tmp/install in case you want to create \
|
||||
bundled-up installable packages.
|
||||
The following types are supported by default.
|
||||
* lib
|
||||
Usually pure-Perl module files ending in .pm or .pod.
|
||||
* arch
|
||||
\"Architecture-dependent\" module files, usually produced by compiling XS, Inline, or similar \
|
||||
code.
|
||||
* script
|
||||
Programs written in pure Perl. In order to improve reuse, you may want to make these as small \
|
||||
as possible - put the code into modules whenever possible.
|
||||
* bin
|
||||
\"Architecture-dependent\" executable programs, i.e. compiled C code or something. Pretty rare \
|
||||
to see this in a perl distribution, but it happens.
|
||||
* bindoc
|
||||
Documentation for the stuff in script and bin. Usually generated from the POD in those files. \
|
||||
Under Unix, these are manual pages belonging to the 'man1' category. Unless explicitly set, this \
|
||||
is only available on platforms supporting manpages.
|
||||
* libdoc
|
||||
Documentation for the stuff in lib and arch. This is usually generated from the POD in .pm and \
|
||||
.pod files. Under Unix, these are manual pages belonging to the 'man3' category. Unless \
|
||||
explicitly set, this is only available on platforms supporting manpages.
|
||||
* binhtml
|
||||
This is the same as bindoc above, but applies to HTML documents. Unless explicitly set, this is \
|
||||
only available when perl was configured to do so.
|
||||
* libhtml
|
||||
This is the same as libdoc above, but applies to HTML documents. Unless explicitly set, this is \
|
||||
only available when perl was configured to do so."
|
||||
HOMEPAGE="https://metacpan.org/pod/ExtUtils::InstallPaths"
|
||||
COPYRIGHT="2011 by Ken Williams, Leon Timmermans"
|
||||
LICENSE="Artistic"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-InstallPaths-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="ae65d20cc3c7e14b3cd790915c84510f82dfb37a4c9b88aa74b2e843af417d01"
|
||||
SOURCE_DIR="ExtUtils-InstallPaths-$portVersion"
|
||||
PATCHES="extutils_installpaths-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
extutils_installpaths = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
extutils_config
|
||||
vendor_perl
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:make
|
||||
cmd:perl
|
||||
"
|
||||
|
||||
TEST_REQUIRES="
|
||||
extutils_config
|
||||
"
|
||||
|
||||
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() {
|
||||
make test
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
From 93916d9b99cd61bd57050d7e720a373341c00306 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
|
||||
Date: Sat, 25 Jan 2025 20:12:21 +0100
|
||||
Subject: Add support for HAIKU_USE_VENDOR_DIRECTORIES
|
||||
|
||||
|
||||
diff --git a/lib/ExtUtils/InstallPaths.pm b/lib/ExtUtils/InstallPaths.pm
|
||||
index dd276a0..86ed286 100644
|
||||
--- a/lib/ExtUtils/InstallPaths.pm
|
||||
+++ b/lib/ExtUtils/InstallPaths.pm
|
||||
@@ -12,7 +12,7 @@ my %complex_accessors = map { $_ => 1 } qw/prefix_relpaths install_sets/;
|
||||
my %hash_accessors = map { $_ => 1 } qw/install_path install_base_relpaths original_prefix /;
|
||||
|
||||
my %defaults = (
|
||||
- installdirs => 'site',
|
||||
+ installdirs => $ENV{'HAIKU_USE_VENDOR_DIRECTORIES'} ? 'vendor' : 'site',
|
||||
install_base => undef,
|
||||
prefix => undef,
|
||||
verbose => 0,
|
||||
--
|
||||
2.45.2
|
||||
|
||||
Reference in New Issue
Block a user