File: no-Dir-Self.patch

package info (click to toggle)
libdbix-class-encodedcolumn-perl 0.00011-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 312 kB
  • sloc: perl: 2,396; sql: 36; makefile: 2
file content (91 lines) | stat: -rw-r--r-- 2,305 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
From: Ansgar Burchardt <ansgar@43-1.org>
Date: Fri, 30 Apr 2010 20:31:08 +0900
Origin: vendor
Forwarded: not-needed
Subject: Remove build-dep on Dir::Self by including the relevant method.

The function __DIR__ is taken from Dir::Self 0.10 which has the following
copyright information:

  Copyright (C) 2007, 2008 by Lukas Mai

  This library is free software; you can redistribute it and/or modify it under
  the same terms as Perl itself, either Perl version 5.8.8 or, at your option,
  any later version of Perl 5 you may have available.

--- libdbix-class-encodedcolumn-perl.orig/t/bcrypt.t
+++ libdbix-class-encodedcolumn-perl/t/bcrypt.t
@@ -3,9 +3,15 @@
 use warnings;
 use Test::More;
 
-use Dir::Self;
 use File::Spec;
 use File::Temp 'tempdir';
+
+sub __DIR__ () {
+  my $level = shift || 0;
+  my $file = (caller $level)[1];
+  File::Spec->rel2abs(join '', (File::Spec->splitpath($file))[0, 1])
+}
+
 use lib File::Spec->catdir(__DIR__, 'lib');
 
 BEGIN {
--- libdbix-class-encodedcolumn-perl.orig/t/digest_sha.t
+++ libdbix-class-encodedcolumn-perl/t/digest_sha.t
@@ -3,9 +3,15 @@
 use warnings;
 use Test::More;
 
-use Dir::Self;
 use File::Spec;
 use File::Temp 'tempdir';
+
+sub __DIR__ () {
+  my $level = shift || 0;
+  my $file = (caller $level)[1];
+  File::Spec->rel2abs(join '', (File::Spec->splitpath($file))[0, 1])
+}
+
 use lib File::Spec->catdir(__DIR__, 'lib');
 
 use DigestTest::Schema;
--- libdbix-class-encodedcolumn-perl.orig/t/open_pgp.t
+++ libdbix-class-encodedcolumn-perl/t/open_pgp.t
@@ -3,9 +3,15 @@
 use warnings;
 use Test::More;
 
-use Dir::Self;
 use File::Spec;
 use File::Temp 'tempdir';
+
+sub __DIR__ () {
+  my $level = shift || 0;
+  my $file = (caller $level)[1];
+  File::Spec->rel2abs(join '', (File::Spec->splitpath($file))[0, 1])
+}
+
 use lib File::Spec->catdir(__DIR__, 'lib');
 use DigestTest::Schema;
 
--- libdbix-class-encodedcolumn-perl.orig/t/whirlpool.t
+++ libdbix-class-encodedcolumn-perl/t/whirlpool.t
@@ -3,9 +3,15 @@
 use warnings;
 use Test::More;
 
-use Dir::Self;
 use File::Spec;
 use File::Temp 'tempdir';
+
+sub __DIR__ () {
+  my $level = shift || 0;
+  my $file = (caller $level)[1];
+  File::Spec->rel2abs(join '', (File::Spec->splitpath($file))[0, 1])
+}
+
 use lib File::Spec->catdir(__DIR__, 'lib');
 use DigestTest::Schema;