Search in ${PREFIX}/share too. Noticed because p5-File-MimeInfo was

warning (falsely) about shared-mime-info not being installed and
failing to assign sane types. Fixes at least that problem, and
possibly others. Bump PKGREVISION.
This commit is contained in:
schmonz 2013-02-16 22:14:40 +00:00
parent fbe8595bc4
commit 420d5b1c75
5 changed files with 59 additions and 3 deletions

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.14 2012/10/31 11:18:09 asau Exp $
# $NetBSD: Makefile,v 1.15 2013/02/16 22:14:40 schmonz Exp $
DISTNAME= File-BaseDir-0.03
PKGNAME= p5-${DISTNAME}
PKGREVISION= 4
PKGREVISION= 5
CATEGORIES= devel perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=File/}
@ -13,6 +13,13 @@ LICENSE= ${PERL5_LICENSE}
PKG_INSTALLATION_TYPES= overwrite pkgviews
SHAREDIR= ${PREFIX}/share
SHAREDIR_SPLIT= ${SHAREDIR:S/\// /g}
SUBST_CLASSES+= paths
SUBST_STAGE.paths= post-configure
SUBST_FILES.paths= lib/File/BaseDir.pm t/01_vars.t t/03_OO.t
SUBST_SED.paths= -e 's|@SHAREDIR_SPLIT@|${SHAREDIR_SPLIT}|g'
PERL5_MODULE_TYPE= Module::Build
PERL5_PACKLIST= auto/File/BaseDir/.packlist

View file

@ -1,5 +1,8 @@
$NetBSD: distinfo,v 1.3 2007/11/29 16:00:40 wiz Exp $
$NetBSD: distinfo,v 1.4 2013/02/16 22:14:41 schmonz Exp $
SHA1 (File-BaseDir-0.03.tar.gz) = 901f56c06fd3b4a105bd24b8790ba95337d9aea7
RMD160 (File-BaseDir-0.03.tar.gz) = 8ca2e29a57fe65c58c04f9f205247831f16a0c39
Size (File-BaseDir-0.03.tar.gz) = 6065 bytes
SHA1 (patch-lib_File_BaseDir.pm) = 2374434a67b8d0c935a4cdab6d3c31bd8a71ac5e
SHA1 (patch-t_01__vars.t) = 8f0273889bd698a5b066384dd5ccd89cf3a11338
SHA1 (patch-t_03__OO.t) = c3a20a26417a1d833c4d462a12b1e01d3127121c

View file

@ -0,0 +1,14 @@
$NetBSD: patch-lib_File_BaseDir.pm,v 1.1 2013/02/16 22:14:41 schmonz Exp $
Look in pkgsrc's sharedir, too.
--- lib/File/BaseDir.pm.orig 2007-10-24 19:57:22.000000000 +0000
+++ lib/File/BaseDir.pm
@@ -41,6 +41,7 @@ unless ($home) {
# Set defaults
our $xdg_data_home = File::Spec->catdir($home, qw/.local share/);
our @xdg_data_dirs = (
+ File::Spec->catdir($rootdir, qw/@SHAREDIR_SPLIT@/),
File::Spec->catdir($rootdir, qw/usr local share/),
File::Spec->catdir($rootdir, qw/usr share/),
);

View file

@ -0,0 +1,16 @@
$NetBSD: patch-t_01__vars.t,v 1.1 2013/02/16 22:14:41 schmonz Exp $
Look in pkgsrc's sharedir, too.
--- t/01_vars.t.orig 2007-10-24 19:57:22.000000000 +0000
+++ t/01_vars.t
@@ -29,7 +29,8 @@ ok( xdg_data_home() eq 'test123', 'xdg_d
$ENV{XDG_DATA_DIRS} = '';
is_deeply( [xdg_data_dirs()],
- [ File::Spec->catdir($rootdir, qw/usr local share/),
+ [ File::Spec->catdir($rootdir, qw/@SHAREDIR_SPLIT@/),
+ File::Spec->catdir($rootdir, qw/usr local share/),
File::Spec->catdir($rootdir, qw/usr share/) ],
'xdg_data_dirs default');
$ENV{XDG_DATA_DIRS} = './t:foo:bar';

View file

@ -0,0 +1,16 @@
$NetBSD: patch-t_03__OO.t,v 1.1 2013/02/16 22:14:42 schmonz Exp $
Look in pkgsrc's sharedir, too.
--- t/03_OO.t.orig 2007-10-24 19:57:22.000000000 +0000
+++ t/03_OO.t
@@ -10,7 +10,8 @@ is(ref($conf), 'File::BaseDir', 'OO cons
$ENV{XDG_DATA_DIRS} = '';
is_deeply( [$conf->xdg_data_dirs()],
- [ File::Spec->catdir($rootdir, qw/usr local share/),
+ [ File::Spec->catdir($rootdir, qw/@SHAREDIR_SPLIT@/),
+ File::Spec->catdir($rootdir, qw/usr local share/),
File::Spec->catdir($rootdir, qw/usr share/) ],
'xdg_data_dirs default - OO');