find locale under share/locale. discussed with author a while ago.

This commit is contained in:
steven 2007-06-27 20:33:14 +00:00
parent 23b0d3e329
commit 107ab5068c
2 changed files with 31 additions and 2 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.1.1.1 2007/05/19 10:09:27 steven Exp $
# $OpenBSD: Makefile,v 1.2 2007/06/27 20:33:14 steven Exp $
COMMENT= "internationalization library written in Perl"
V= 1.16
DISTNAME= libintl-perl-${V}
PKGNAME= p5-libintl-${V}
PKGNAME= p5-libintl-${V}p0
CATEGORIES= devel
MODULES= cpan
CPAN_AUTHOR= GUIDO
@ -15,4 +15,7 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
post-install:
rm -f ${PREFIX}/${P5SITE}/Locale/*.orig
.include <bsd.port.mk>

View File

@ -0,0 +1,26 @@
$OpenBSD: patch-lib_Locale_TextDomain_pm,v 1.1 2007/06/27 20:33:14 steven Exp $
--- lib/Locale/TextDomain.pm.orig Wed Jun 27 18:22:44 2007
+++ lib/Locale/TextDomain.pm Wed Jun 27 18:27:12 2007
@@ -95,8 +95,7 @@ BEGIN {
# Add default search directories, but only if they exist.
for my $dir (qw (/usr/share/locale /usr/local/share/locale)) {
if (-d $dir) {
- @default_dirs = ($dir);
- last;
+ push @default_dirs, $dir;
}
}
}
@@ -221,8 +220,10 @@ sub import
# Remember that we still have to bind that textdomain to
# a directory.
unless (exists $bound_dirs{$textdomain}) {
- @search_dirs = map $_ . '/LocaleData', @INC, @default_dirs
- unless @search_dirs;
+ unless (@search_dirs) {
+ @search_dirs = map $_ . '/LocaleData', @INC;
+ push @search_dirs, @default_dirs;
+ }
$bound_dirs{$textdomain} = \@search_dirs;
}