video-torrent-info 0.1.24 → 0.1.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/torrent_client/extconf.rb +45 -34
- data/lib/video_torrent_info/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3374cb2706d901742ac84b7c62047aee7c51d47
|
4
|
+
data.tar.gz: c099f7dd9fd7bc805eacbe1db79e2c6ddd03fb9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b3eff4df138e92ede44db090cc0ccb801242d6c75a466b9800ceafb8e3aaa5a98e0d19c4cbfc9bf0f4e6c0f750331fb51ae25d4dc92416d1a73261881878b67
|
7
|
+
data.tar.gz: 8b6b4b9bdf0a94638e6a1695416de9be980cfdb485fc1d9b633780b1ebb893e534ff9edf1e6576b281c3f9c13696f2e7c742893ca7ab7db53ebedd544bd973ac
|
@@ -3,11 +3,32 @@ require 'mkmf-rice'
|
|
3
3
|
require 'fileutils'
|
4
4
|
gem 'mini_portile2'
|
5
5
|
require 'mini_portile2'
|
6
|
+
module Net
|
7
|
+
class HTTP
|
8
|
+
alias old_initialize initialize
|
9
|
+
def initialize(*args)
|
10
|
+
old_initialize(*args)
|
11
|
+
@read_timeout = 3 * 60
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
6
15
|
$CXXFLAGS = '' if $CXXFLAGS.nil?
|
7
16
|
$CPPFLAGS << ' -Wno-unused-result -Wno-deprecated-declarations -Wno-sign-compare -Wno-unused-variable'
|
8
17
|
message "Using mini_portile version #{MiniPortile::VERSION}\n"
|
9
18
|
|
10
|
-
class
|
19
|
+
class MyRecipe < MiniPortile
|
20
|
+
def download_file_http(url, full_path, count = 3)
|
21
|
+
filename = File.basename(full_path)
|
22
|
+
message "Downloading %s from %s\n" % [filename, url]
|
23
|
+
with_tempfile(filename, full_path) do |temp_file|
|
24
|
+
OpenURI.open_uri(url, 'rb') do |io|
|
25
|
+
temp_file << io.read
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
class BoostRecipe < MyRecipe
|
11
32
|
def configure
|
12
33
|
return if configured?
|
13
34
|
|
@@ -28,18 +49,7 @@ class BoostRecipe < MiniPortile
|
|
28
49
|
end
|
29
50
|
end
|
30
51
|
|
31
|
-
|
32
|
-
file = "http://downloads.sourceforge.net/project/boost/boost/#{boost_recipe.version}/boost_#{boost_recipe.version.gsub('.', '_')}.tar.gz"
|
33
|
-
message "Boost source url #{file}\n"
|
34
|
-
boost_recipe.files = [file]
|
35
|
-
checkpoint = ".#{boost_recipe.name}-#{boost_recipe.version}.installed"
|
36
|
-
unless File.exist?(checkpoint)
|
37
|
-
boost_recipe.cook
|
38
|
-
FileUtils.touch(checkpoint)
|
39
|
-
end
|
40
|
-
boost_recipe.activate
|
41
|
-
|
42
|
-
class OpenSSLRecipe < MiniPortile
|
52
|
+
class OpenSSLRecipe < MyRecipe
|
43
53
|
def configure
|
44
54
|
return if configured?
|
45
55
|
|
@@ -64,18 +74,7 @@ class OpenSSLRecipe < MiniPortile
|
|
64
74
|
end
|
65
75
|
end
|
66
76
|
|
67
|
-
|
68
|
-
file = "https://www.openssl.org/source/openssl-#{openssl_recipe.version}.tar.gz"
|
69
|
-
message "OpenSSL source url #{file}\n"
|
70
|
-
openssl_recipe.files = [file]
|
71
|
-
checkpoint = ".#{openssl_recipe.name}-#{openssl_recipe.version}.installed"
|
72
|
-
unless File.exist?(checkpoint)
|
73
|
-
openssl_recipe.cook
|
74
|
-
FileUtils.touch(checkpoint)
|
75
|
-
end
|
76
|
-
openssl_recipe.activate
|
77
|
-
|
78
|
-
class LibtorrentRecipe < MiniPortile
|
77
|
+
class LibtorrentRecipe < MyRecipe
|
79
78
|
def configure
|
80
79
|
return if configured?
|
81
80
|
|
@@ -86,23 +85,35 @@ class LibtorrentRecipe < MiniPortile
|
|
86
85
|
end
|
87
86
|
end
|
88
87
|
|
88
|
+
boost_recipe = BoostRecipe.new('boost', '1.60.0')
|
89
|
+
file = "http://downloads.sourceforge.net/project/boost/boost/#{boost_recipe.version}/boost_#{boost_recipe.version.gsub('.', '_')}.tar.gz"
|
90
|
+
boost_recipe.files = [file]
|
91
|
+
|
92
|
+
openssl_recipe = OpenSSLRecipe.new('openssl', '1.0.2f')
|
93
|
+
file = "https://www.openssl.org/source/openssl-#{openssl_recipe.version}.tar.gz"
|
94
|
+
openssl_recipe.files = [file]
|
95
|
+
|
89
96
|
libtorrent_recipe = LibtorrentRecipe.new('libtorrent', '1.0.8')
|
90
|
-
file = "
|
91
|
-
message "Libtorrent source url #{file}\n"
|
97
|
+
file = "https://codeload.github.com/arvidn/libtorrent/tar.gz/libtorrent-#{libtorrent_recipe.version.gsub('.', '_')}"
|
92
98
|
libtorrent_recipe.files = [file]
|
93
99
|
libtorrent_recipe.configure_options = %W[
|
94
100
|
--enable-dht
|
95
101
|
--with-openssl=#{openssl_recipe.path}
|
96
102
|
--with-boost-libdir=#{boost_recipe.path}/lib
|
97
103
|
]
|
98
|
-
checkpoint = ".#{libtorrent_recipe.name}-#{libtorrent_recipe.version}.installed"
|
99
|
-
unless File.exist?(checkpoint)
|
100
|
-
libtorrent_recipe.cook
|
101
|
-
FileUtils.touch(checkpoint)
|
102
|
-
end
|
103
|
-
libtorrent_recipe.activate
|
104
104
|
|
105
|
-
recipes = [
|
105
|
+
recipes = [boost_recipe, openssl_recipe, libtorrent_recipe]
|
106
|
+
|
107
|
+
recipes.each { |r| r.download }
|
108
|
+
|
109
|
+
recipes.each do |r|
|
110
|
+
checkpoint = ".#{r.name}-#{r.version}.installed"
|
111
|
+
unless File.exist?(checkpoint)
|
112
|
+
r.cook
|
113
|
+
FileUtils.touch(checkpoint)
|
114
|
+
end
|
115
|
+
r.activate
|
116
|
+
end
|
106
117
|
|
107
118
|
$LDFLAGS << " -Wl,-rpath,#{recipes.map { |r| r.path + '/lib'}.join(':')}"
|
108
119
|
|