rake-compiler 1.1.2 → 1.1.6

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
  SHA256:
3
- metadata.gz: 83d5f854b75073d4180da9ece3502bb86995335a52e8b59a83212ec70b08206d
4
- data.tar.gz: cd2840623dd94c1377ad5c9304e19fc37907af1e4f5fb3cb8ce3011e80e9729e
3
+ metadata.gz: caf70af8b4cadce86d509ce209540e29eb74ad29c1774c2941671b285d805b2b
4
+ data.tar.gz: 0fedb5d1269d3e6b4cdfa22b4e587f2a39465adf1f43d536a20e55b32fca045a
5
5
  SHA512:
6
- metadata.gz: 02e09a4a2ee0fb199d54f6f063225be7a731abb7752b2cdd3eb05f409b0bac16c0dc32c5222b4167b3a4b39507093ce5fd6a1e3eb5012c5d77233423ecabbb3b
7
- data.tar.gz: ff48af6c3b541170420f5c3351ab328052219fb906052d7813923975c231245c8613f212ce7e6e88ff63ccb8d0f5191a5a03935c382b53885db4e7d858800f8f
6
+ metadata.gz: b8311e1465dcb310b9cf4623785358572ed510ce81ebd3bcea463ee1fb9fa0c912b642db4467adb5c4ecef462a934562c3551bb7b81e296ce5872374095e760b
7
+ data.tar.gz: 69bbd41d23b832b735d97ecb709dbb5a28c8a7ffeafcfb6b0615fce44c1ad1cb4702742bc1971baaaefde78dcd47408ba311b24c0456ef64ae53fe7c7542fd6e
data/History.md CHANGED
@@ -1,3 +1,26 @@
1
+ ### 1.1.6 / 2021-12-12
2
+
3
+ * Fixes:
4
+ * Fix a regression bug that `Symbol` can't be used for `name` of `Rake::ExtensionTask.new`.
5
+
6
+ ### 1.1.5 / 2021-12-12
7
+
8
+ * Fixes:
9
+ * Fix a regression bug that wrong install location is used when name that includes `/` is specified to `Rake::ExtensionTask.new`.
10
+ [#196](https://github.com/rake-compiler/rake-compiler/issues/196) [Reported by konsolebox]
11
+
12
+ ### 1.1.4 / 2021-12-11
13
+
14
+ * Fixes:
15
+ * Fix a regression bug that installed gem can't be found on cross compile.
16
+ [#195](https://github.com/rake-compiler/rake-compiler/issues/195) [Reported by Mike Dalessio]
17
+
18
+ ### 1.1.3 / 2021-12-08
19
+
20
+ * Fixes:
21
+ * Fix a regression bug that wrong install location is used.
22
+ [#194](https://github.com/rake-compiler/rake-compiler/issues/194) [Reported by Andrew Kane]
23
+
1
24
  ### 1.1.2 / 2021-12-07
2
25
 
3
26
  * Changes:
@@ -40,6 +40,9 @@ module Rake
40
40
  @tmp_dir = 'tmp'
41
41
  @ext_dir = "ext/#{@name}"
42
42
  @lib_dir = 'lib'
43
+ if @name and File.dirname(@name.to_s) != "."
44
+ @lib_dir += "/#{File.dirname(@name.to_s)}"
45
+ end
43
46
  @config_options = []
44
47
  @extra_options = ARGV.select { |i| i =~ /\A--?/ }
45
48
  end
@@ -109,9 +109,6 @@ module Rake
109
109
  # lib_path
110
110
  lib_path = lib_dir
111
111
 
112
- lib_binary_path = "#{lib_path}/#{binary_path}"
113
- lib_binary_dir_path = File.dirname(lib_binary_path)
114
-
115
112
  # tmp_path
116
113
  tmp_path = "#{@tmp_dir}/#{platf}/#{@name}/#{ruby_ver}"
117
114
  stage_path = "#{@tmp_dir}/#{platf}/stage"
@@ -131,7 +128,7 @@ module Rake
131
128
  # directories we need
132
129
  directory tmp_path
133
130
  directory tmp_binary_dir_path
134
- directory lib_binary_dir_path
131
+ directory lib_path
135
132
  directory stage_binary_dir_path
136
133
 
137
134
  directory File.dirname(siteconf_path)
@@ -150,10 +147,10 @@ module Rake
150
147
 
151
148
  # copy binary from temporary location to final lib
152
149
  # tmp/extension_name/extension_name.{so,bundle} => lib/
153
- task "copy:#{@name}:#{platf}:#{ruby_ver}" => [lib_binary_dir_path, tmp_binary_path, "#{tmp_path}/Makefile"] do
150
+ task "copy:#{@name}:#{platf}:#{ruby_ver}" => [lib_path, tmp_binary_path, "#{tmp_path}/Makefile"] do
154
151
  # install in lib for native platform only
155
152
  unless for_platform
156
- sh "#{make} install", chdir: tmp_path
153
+ sh "#{make} install target_prefix=", chdir: tmp_path
157
154
  end
158
155
  end
159
156
  # copy binary from temporary location to staging directory
@@ -237,7 +234,7 @@ Java extension should be preferred.
237
234
  # platform matches the indicated one.
238
235
  if platf == RUBY_PLATFORM then
239
236
  # ensure file is always copied
240
- file "#{lib_path}/#{binary_path}" => ["copy:#{name}:#{platf}:#{ruby_ver}"]
237
+ file "#{lib_path}/#{File.basename(binary_path)}" => ["copy:#{name}:#{platf}:#{ruby_ver}"]
241
238
 
242
239
  task "compile:#{@name}" => ["compile:#{@name}:#{platf}"]
243
240
  task "compile" => ["compile:#{platf}"]
@@ -416,8 +413,21 @@ Java extension should be preferred.
416
413
  # genearte fake.rb for different ruby versions
417
414
  file "#{tmp_path}/fake.rb" => [rbconfig_file] do |t|
418
415
  File.open(t.name, 'w') do |f|
419
- f.write fake_rb(for_platform, ruby_ver)
420
- f.write File.read(t.prerequisites.first)
416
+ # Keep the original RbConfig::CONFIG["ENABLE_SHARED"] to use
417
+ # the same RubyGems extension directory. See also
418
+ # Gem::BasicSpecificaion#extenions_dir and
419
+ # Gem.extension_api_version.
420
+ #
421
+ # if RbConfig::CONFIG["ENABLE_SHARED"] == "no"
422
+ # "extensions/x86_64-linux/2.5.0-static"
423
+ # else
424
+ # "extensions/x86_64-linux/2.5.0"
425
+ # end
426
+ f.puts("require 'rbconfig'")
427
+ f.puts("original_enable_shared = RbConfig::CONFIG['ENABLE_SHARED']")
428
+ f.puts(fake_rb(for_platform, ruby_ver))
429
+ f.puts(File.read(t.prerequisites.first))
430
+ f.puts("RbConfig::CONFIG['ENABLE_SHARED'] = original_enable_shared")
421
431
  end
422
432
  end
423
433
 
@@ -455,7 +465,7 @@ Java extension should be preferred.
455
465
  end
456
466
 
457
467
  # FIXME: targeting multiple platforms copies the file twice
458
- file "#{lib_path}/#{binary(for_platform)}" => ["copy:#{@name}:#{for_platform}:#{ruby_ver}"]
468
+ file "#{lib_path}/#{File.basename(binary(for_platform))}" => ["copy:#{@name}:#{for_platform}:#{ruby_ver}"]
459
469
 
460
470
  # if everything for native task is in place
461
471
  if @gem_spec && @gem_spec.platform == 'ruby' then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-compiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-12-07 00:00:00.000000000 Z
12
+ date: 2021-12-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake