Browse Source

lang/perl-www-curl: Update 100-perl-www-curl_disable_curl-config_hack.patch

Signed-off-by: Marcel Denia <naoir@gmx.net>
Marcel Denia 10 years ago
parent
commit
2613af4b1d

+ 71
- 8
lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch View File

@@ -1,11 +1,74 @@
1
---- WWW-Curl-4.00.config/Makefile.PL	2008-04-21 23:18:39.000000000 +0200
2
-+++ WWW-Curl-4.00/Makefile.PL	2008-04-21 23:18:52.000000000 +0200
3
-@@ -11,7 +11,7 @@
4
- no_index		directory => 'template';
1
+--- a/Makefile.PL
2
++++ b/Makefile.PL
3
+@@ -12,31 +12,31 @@ no_index		directory => 'template';
4
+ repository		'http://github.com/szbalint/WWW--Curl';
5 5
  # This is a hack. If you have libcurl installed, just specify curl.h below
6 6
  # and comment out this line.
7
--requires_external_bin	'curl-config';
8
-+#requires_external_bin	'curl-config';
7
+-if ($^O ne 'MSWin32') {
8
+-    if (!$ENV{CURL_CONFIG}) {
9
+-	    requires_external_bin	'curl-config';
10
+-    }
11
+-} else {
12
+-	print	"Sorry, no automated install is available on Windows,\n".
13
+-		"please see the README.Win32 file on instructions for a manual install.\n";
14
+-	exit(0);
15
+-}
16
+-
17
+-my $curl_config = $ENV{CURL_CONFIG} || 'curl-config';
18
+-
19
+-my $vernum = `${curl_config} --vernum`; chomp $vernum;
20
+-my $version = `${curl_config} --version`; chomp $version; 
21
+-
22
+-my $minimum_ver = hex("070a08");
23
+-
24
+-if ($vernum && hex($vernum) <= $minimum_ver) {
25
+-	print	"Your currently installed libcurl version - $version - is too old.\n".
26
+-		"This module doesn't seek compatibility with versions older than 7.10.8\n".
27
+-		"Proceed manually if you know what you're doing.\n";
28
+-	exit(0);
29
+-}
30
+-
31
+-print "The version is $version\n";
32
++#if ($^O ne 'MSWin32') {
33
++#    if (!$ENV{CURL_CONFIG}) {
34
++#	    requires_external_bin	'curl-config';
35
++#    }
36
++#} else {
37
++#	print	"Sorry, no automated install is available on Windows,\n".
38
++#		"please see the README.Win32 file on instructions for a manual install.\n";
39
++#	exit(0);
40
++#}
41
++#
42
++#my $curl_config = $ENV{CURL_CONFIG} || 'curl-config';
43
++#
44
++#my $vernum = `${curl_config} --vernum`; chomp $vernum;
45
++#my $version = `${curl_config} --version`; chomp $version; 
46
++#
47
++#my $minimum_ver = hex("070a08");
48
++#
49
++#if ($vernum && hex($vernum) <= $minimum_ver) {
50
++#	print	"Your currently installed libcurl version - $version - is too old.\n".
51
++#		"This module doesn't seek compatibility with versions older than 7.10.8\n".
52
++#		"Proceed manually if you know what you're doing.\n";
53
++#	exit(0);
54
++#}
55
++#
56
++#print "The version is $version\n";
9 57
  
10
- # This utility helper generates the constants function from curl.h
11
- # It is normally only used by the maintainer, but if you're curl is older
58
+ my @includes = qw();
59
+ my ($cflags,$lflags, $ldflags) = ('','','');
60
+@@ -58,10 +58,10 @@ if ($^O ne 'MSWin32') {
61
+ # Get curl to tell us where it is, if we can.
62
+ #
63
+ 
64
+-if ($^O ne 'MSWin32') {
65
+-	$cflags = `${curl_config} --cflags`;
66
+-	$lflags = `${curl_config} --libs`;
67
+-}
68
++#if ($^O ne 'MSWin32') {
69
++#	$cflags = `${curl_config} --cflags`;
70
++#	$lflags = `${curl_config} --libs`;
71
++#}
72
+ 
73
+ # can't find link flags, make some guesses
74
+ if (!defined($lflags)) {