summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-rw-r--r--pcr/perl-encode-jis2k/PKGBUILD12
-rw-r--r--pcr/perl-encode-jis2k/fix_enc2xs_path.patch35
2 files changed, 43 insertions, 4 deletions
diff --git a/pcr/perl-encode-jis2k/PKGBUILD b/pcr/perl-encode-jis2k/PKGBUILD
index 58339f3bf..a0f863505 100644
--- a/pcr/perl-encode-jis2k/PKGBUILD
+++ b/pcr/perl-encode-jis2k/PKGBUILD
@@ -1,8 +1,9 @@
# Contributor (Arch): Andreas Wagner <Andreas dot Wagner at em dot uni-frankfurt dot de>
-# Contributor : Márcio Silva <coadde@parabola.nu>
+# Contributor: Márcio Silva <coadde@parabola.nu>
+# Contributor: André Silva <emulatorman@parabola.nu>
pkgname=perl-encode-jis2k
-pkgver=0.02
+pkgver=0.03
pkgrel=1
pkgdesc="Encode::JIS2K - JIS X 0212 (aka JIS 2000) Encodings"
arch=('any')
@@ -10,10 +11,12 @@ url="http://search.cpan.org/~dankogai/Encode-JIS2K"
license=('GPL1')
depends=('perl')
options=(!emptydirs !zipman)
-source=("http://search.cpan.org/CPAN/authors/id/D/DA/DANKOGAI/Encode-JIS2K-$pkgver.tar.gz")
+source=("http://search.cpan.org/CPAN/authors/id/D/DA/DANKOGAI/Encode-JIS2K-$pkgver.tar.gz"
+ 'fix_enc2xs_path.patch')
build() {
cd "$srcdir/Encode-JIS2K-$pkgver"
+ patch -Np1 -i ../fix_enc2xs_path.patch
PERL_MM_USE_DEFAULT=1 perl Makefile.PL
make
}
@@ -23,4 +26,5 @@ package() {
make DESTDIR=$pkgdir install
}
-md5sums=('00e73ee943fb2f882b00b7b61e4c9db1')
+md5sums=('60539471aa408a2b793cd45a6ce651db'
+ '47f4abc7d2ffb5699244cc1b7500a682')
diff --git a/pcr/perl-encode-jis2k/fix_enc2xs_path.patch b/pcr/perl-encode-jis2k/fix_enc2xs_path.patch
new file mode 100644
index 000000000..b5f5aedde
--- /dev/null
+++ b/pcr/perl-encode-jis2k/fix_enc2xs_path.patch
@@ -0,0 +1,35 @@
+diff -Nut Encode-JIS2K-0.03.orig/Makefile.PL Encode-JIS2K-0.03/Makefile.PL
+--- Encode-JIS2K-0.03.orig/Makefile.PL 2015-06-05 00:58:02.000000000 -0300
++++ Encode-JIS2K-0.03/Makefile.PL 2016-01-03 18:58:25.861672309 -0300
+@@ -17,21 +17,14 @@
+ );
+
+
+-# from perlvar
+-use Config; # first appeared in 5.00307
+-my $secure_perl_path = $Config{perlpath};
+-if ($^O ne 'VMS') {
+- my $secure_perl_path .= $Config{_exe}
+- unless $secure_perl_path =~ m/$Config{_exe}$/i;
+-}
+-die "can't determine path to the perl I'm running under"
+- unless ($secure_perl_path);
+-use File::Basename qw(dirname);
+-my $dpath = dirname $secure_perl_path;
+ my ($enc2xs, $encode_h) = ();
+-my $enc2xs_fpath = File::Spec->catfile($dpath, 'enc2xs');
+-$enc2xs = $enc2xs_fpath
+- if (-x $enc2xs_fpath);
++PATHLOOP:
++for my $d (split /:/, $ENV{PATH}){
++ for my $f (qw/enc2xs enc2xs5.7.3/){
++ my $path = File::Spec->catfile($d, $f);
++ -x $path and $enc2xs = $path and last PATHLOOP;
++ }
++}
+ $enc2xs or die "enc2xs not found!";
+ print "enc2xs is $enc2xs\n";
+ my %encode_h = ();
+Common subdirectories: Encode-JIS2K-0.03.orig/lib and Encode-JIS2K-0.03/lib
+Common subdirectories: Encode-JIS2K-0.03.orig/t and Encode-JIS2K-0.03/t
+Common subdirectories: Encode-JIS2K-0.03.orig/ucm and Encode-JIS2K-0.03/ucm