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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc394961b9c5c7b753be80e81edd7df5bb773c04
4
- data.tar.gz: fff28069b2d58659e0d6ae207fb32235a2c99976
3
+ metadata.gz: c3374cb2706d901742ac84b7c62047aee7c51d47
4
+ data.tar.gz: c099f7dd9fd7bc805eacbe1db79e2c6ddd03fb9c
5
5
  SHA512:
6
- metadata.gz: 9f551038adbbea7c36eef98365b7fbc4d35274c9cdf58654e0d59158106bf50344289c1a4040b64e13429f1f4b95e10cabb0116e3cdc2a7f2d8e19a2271b02e6
7
- data.tar.gz: 1ac937357cffc96fe3d94048fe71bc14c79b346a1eb510fd66c2d8d8fd5e6c773bdc43f73b9981c5cb7d320d0540381bb526d691c6554339955933234123344e
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 BoostRecipe < MiniPortile
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
- boost_recipe = BoostRecipe.new('boost', '1.60.0')
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
- openssl_recipe = OpenSSLRecipe.new('openssl', '1.0.2f')
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 = "http://codeload.github.com/arvidn/libtorrent/tar.gz/libtorrent-#{libtorrent_recipe.version.gsub('.', '_')}"
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 = [libtorrent_recipe, boost_recipe, openssl_recipe]
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
 
@@ -1,3 +1,3 @@
1
1
  class VideoTorrentInfo
2
- VERSION = '0.1.24'
2
+ VERSION = '0.1.25'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: video-torrent-info
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.24
4
+ version: 0.1.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Tatarsky