pg 1.2.1-x86-mingw32 → 1.2.2-x86-mingw32

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: a9228035f544e9042496c0ffe406ab2bc0edb840ae539924a56d8b4cab851a3b
4
- data.tar.gz: 4661f4c7af9637e0578a2dd9aee77cd7b146cdc1c0aff863eb08686294f07bc8
3
+ metadata.gz: 73ab023018287f33e6d3faef329668b0b4cc417a532e124c0355c594399ae57d
4
+ data.tar.gz: b542513c0980f85ed064b29ecb254836ec803196894aa91cbe251753adfb81f0
5
5
  SHA512:
6
- metadata.gz: b71ff29ea7a9be361dae356a6029b4e621896a3ccc5ae768d7237b0936f6d76e4f329c089b6f1c98fdedea19b58fed2a675277ecdb38c6a2103fd2eb1375a8d7
7
- data.tar.gz: 64f2020d656bea09d85313201c2e730f26821fe6b06a5b124892f4c7cc4e076adbf14a52741ad47c7729bcad71863fe84718b6b30cc68793cfa163799532f5cf
6
+ metadata.gz: c6b9a0fd727f3a95161033422d36d5c2df797bb2bd59cf019527f488c5aefeeadc13f869b43ce90db334d16a6f2efcfe39b3ddb40a8b28963f8c04c0a6a21661
7
+ data.tar.gz: 1bf56c2e593aafa085b5d8e46780d6dcf21a38431834c6b2be03dbe2b021142f77744ad0b3e02d5b2498edfb5e35254521c8d46407c1939e964726287d29ec61
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,10 @@
1
+ == v1.2.2 [2020-01-06] Michael Granger <ged@FaerieMUD.org>
2
+
3
+ Enhancements:
4
+
5
+ - Add a binary gem for Ruby 2.7.
6
+
7
+
1
8
  == v1.2.1 [2020-01-02] Michael Granger <ged@FaerieMUD.org>
2
9
 
3
10
  Enhancements:
data/Rakefile CHANGED
@@ -35,6 +35,8 @@ TEST_DIRECTORY = BASEDIR + "tmp_test_specs"
35
35
 
36
36
  CLOBBER.include( TEST_DIRECTORY.to_s )
37
37
  CLEAN.include( PKGDIR.to_s, TMPDIR.to_s )
38
+ CLEAN.include "lib/*/libpq.dll"
39
+ CLEAN.include "lib/pg_ext.*"
38
40
 
39
41
  # Set up Hoe plugins
40
42
  Hoe.plugin :mercurial
@@ -61,7 +63,7 @@ $hoespec = Hoe.spec 'pg' do
61
63
  self.developer 'Lars Kanis', 'lars@greiz-reinsdorf.de'
62
64
 
63
65
  self.dependency 'rake-compiler', '~> 1.0', :developer
64
- self.dependency 'rake-compiler-dock', ['~> 0.7.0'], :developer
66
+ self.dependency 'rake-compiler-dock', ['~> 1.0'], :developer
65
67
  self.dependency 'hoe-deveiate', '~> 0.9', :developer
66
68
  self.dependency 'hoe-bundler', '~> 1.0', :developer
67
69
  self.dependency 'rspec', '~> 3.5', :developer
@@ -129,7 +131,7 @@ Rake::ExtensionTask.new do |ext|
129
131
 
130
132
  # Add libpq.dll to windows binary gemspec
131
133
  ext.cross_compiling do |spec|
132
- spec.files << "lib/libpq.dll"
134
+ spec.files << "lib/#{spec.platform}/libpq.dll"
133
135
  end
134
136
  end
135
137
 
@@ -45,6 +45,8 @@ class CrossLibrary < OpenStruct
45
45
  end
46
46
  self.static_sourcesdir = compile_home + 'sources'
47
47
  self.static_builddir = compile_home + 'builds' + for_platform
48
+ CLOBBER.include( static_sourcesdir )
49
+ CLEAN.include( static_builddir )
48
50
 
49
51
  # Static OpenSSL build vars
50
52
  self.static_openssl_builddir = static_builddir + "openssl-#{openssl_version}"
@@ -141,9 +143,9 @@ class CrossLibrary < OpenStruct
141
143
  end
142
144
 
143
145
  desc "compile static openssl libraries"
144
- task :openssl_libs => [ libssl, libcrypto ]
146
+ task "openssl_libs:#{for_platform}" => [ libssl, libcrypto ]
145
147
 
146
- task :compile_static_openssl => openssl_makefile do |t|
148
+ task "compile_static_openssl:#{for_platform}" => openssl_makefile do |t|
147
149
  chdir( static_openssl_builddir ) do
148
150
  cmd = cmd_prelude.dup
149
151
  cmd << 'make' << "-j#{NUM_CPUS}" << 'build_libs'
@@ -153,12 +155,12 @@ class CrossLibrary < OpenStruct
153
155
  end
154
156
 
155
157
  desc "compile static #{libssl}"
156
- file libssl => :compile_static_openssl do |t|
158
+ file libssl => "compile_static_openssl:#{for_platform}" do |t|
157
159
  rm t.name.gsub(/\.a$/, ".dll.a")
158
160
  end
159
161
 
160
162
  desc "compile static #{libcrypto}"
161
- file libcrypto => :compile_static_openssl do |t|
163
+ file libcrypto => "compile_static_openssl:#{for_platform}" do |t|
162
164
  rm t.name.gsub(/\.a$/, ".dll.a")
163
165
  end
164
166
 
@@ -189,7 +191,7 @@ class CrossLibrary < OpenStruct
189
191
  end
190
192
 
191
193
  # generate the makefile in a clean build location
192
- file postgresql_global_makefile => [ static_postgresql_builddir, :openssl_libs ] do |t|
194
+ file postgresql_global_makefile => [ static_postgresql_builddir, "openssl_libs:#{for_platform}" ] do |t|
193
195
  options = [
194
196
  "--target=#{host_platform}",
195
197
  "--host=#{host_platform}",
@@ -231,10 +233,10 @@ class CrossLibrary < OpenStruct
231
233
 
232
234
 
233
235
  #desc 'compile libpg.a'
234
- task :libpq => postgresql_lib
236
+ task "native:#{for_platform}" => postgresql_lib
235
237
 
236
238
  # copy libpq.dll to lib dir
237
- dest_libpq = "lib/#{postgresql_lib.basename}"
239
+ dest_libpq = "lib/#{for_platform}/#{postgresql_lib.basename}"
238
240
  directory File.dirname(dest_libpq)
239
241
  file dest_libpq => [postgresql_lib, File.dirname(dest_libpq)] do
240
242
  cp postgresql_lib, dest_libpq
@@ -248,20 +250,15 @@ class CrossLibrary < OpenStruct
248
250
  end
249
251
  end
250
252
 
251
- if File.exist?(File.expand_path("~/.rake-compiler/config.yml"))
252
- CrossLibraries = [
253
- ['i386-mingw32', 'mingw', 'i686-w64-mingw32'],
254
- ['x64-mingw32', 'mingw64', 'x86_64-w64-mingw32'],
255
- ].map do |platform, openssl_config, toolchain|
256
- CrossLibrary.new platform, openssl_config, toolchain
257
- end
258
- else
259
- $stderr.puts "Cross-compilation disabled -- rake-compiler not properly installed"
260
- CrossLibraries = []
253
+ CrossLibraries = [
254
+ ['x86-mingw32', 'mingw', 'i686-w64-mingw32'],
255
+ ['x64-mingw32', 'mingw64', 'x86_64-w64-mingw32'],
256
+ ].map do |platform, openssl_config, toolchain|
257
+ CrossLibrary.new platform, openssl_config, toolchain
261
258
  end
262
259
 
263
260
  desc 'cross compile pg for win32'
264
- task :cross => [ :mingw32, :libpq ]
261
+ task :cross => [ :mingw32 ]
265
262
 
266
263
  task :mingw32 do
267
264
  # Use Rake::ExtensionCompiler helpers to find the proper host
@@ -272,30 +269,32 @@ task :mingw32 do
272
269
  end
273
270
  end
274
271
 
275
- # To reduce the gem file size strip mingw32 dlls before packaging
276
- ENV['RUBY_CC_VERSION'].to_s.split(':').each do |ruby_version|
277
- task "tmp/i386-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/pg_ext.so" do |t|
278
- sh "i686-w64-mingw32-strip -S tmp/i386-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/pg_ext.so"
279
- end
280
-
281
- task "tmp/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/pg_ext.so" do |t|
282
- sh "x86_64-w64-mingw32-strip -S tmp/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/pg_ext.so"
283
- end
272
+ task 'gem:windows:prepare' do
273
+ require 'io/console'
274
+ require 'rake_compiler_dock'
275
+
276
+ # Copy gem signing key and certs to be accessable from the docker container
277
+ mkdir_p 'build/gem'
278
+ sh "cp ~/.gem/gem-*.pem build/gem/ || true"
279
+ sh "bundle package"
280
+ begin
281
+ OpenSSL::PKey.read(File.read(File.expand_path("~/.gem/gem-private_key.pem")), ENV["GEM_PRIVATE_KEY_PASSPHRASE"] || "")
282
+ rescue OpenSSL::PKey::PKeyError
283
+ ENV["GEM_PRIVATE_KEY_PASSPHRASE"] = STDIN.getpass("Enter passphrase of gem signature key: ")
284
+ retry
285
+ end
284
286
  end
285
287
 
286
- desc "Build the windows binary gems"
287
- task 'gem:windows' => ['ChangeLog'] do
288
- require 'rake_compiler_dock'
289
-
290
- # Copy gem signing key and certs to be accessable from the docker container
291
- mkdir_p 'build/gem'
292
- sh "cp ~/.gem/gem-*.pem build/gem/ || true"
293
- sh "bundle package"
294
-
295
- RakeCompilerDock.sh <<-EOT
296
- mkdir ~/.gem &&
297
- (cp build/gem/gem-*.pem ~/.gem/ || true) &&
298
- bundle install --local &&
299
- rake cross native gem MAKE="make -j`nproc`"
300
- EOT
288
+ CrossLibraries.each do |xlib|
289
+ platform = xlib.for_platform
290
+ desc "Build fat binary gem for platform #{platform}"
291
+ task "gem:windows:#{platform}" => ['ChangeLog', 'gem:windows:prepare', xlib.openssl_tarball, xlib.postgresql_tarball] do
292
+ RakeCompilerDock.sh <<-EOT, platform: platform
293
+ (cp build/gem/gem-*.pem ~/.gem/ || true) &&
294
+ bundle install --local &&
295
+ rake native:#{platform} pkg/#{$hoespec.spec.full_name}-#{platform}.gem MAKE="make -j`nproc`"
296
+ EOT
297
+ end
298
+ desc "Build the windows binary gems"
299
+ multitask 'gem:windows' => "gem:windows:#{platform}"
301
300
  end
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/lib/pg.rb CHANGED
@@ -22,7 +22,8 @@ rescue LoadError
22
22
  end
23
23
 
24
24
  # Temporary add this directory for DLL search, so that libpq.dll can be found.
25
- add_dll_path.call(__dir__) do
25
+ # mingw32-platform strings differ (RUBY_PLATFORM=i386-mingw32 vs. x86-mingw32 for rubygems)
26
+ add_dll_path.call(File.join(__dir__, RUBY_PLATFORM.gsub(/^i386-/, "x86-"))) do
26
27
  require "#{major_minor}/pg_ext"
27
28
  end
28
29
  else
@@ -36,7 +37,7 @@ end
36
37
  module PG
37
38
 
38
39
  # Library version
39
- VERSION = '1.2.1'
40
+ VERSION = '1.2.2'
40
41
 
41
42
  # VCS revision
42
43
  REVISION = %q$Revision: 6f611e78845a $
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Michael Granger
@@ -34,7 +34,7 @@ cert_chain:
34
34
  83uuAYSy65yXDGXXPVBeKPVnYrqp91pqpS5Nh7wfuiCrE8lgU8PATh7K4BV1UhAT
35
35
  0MHbAT42wTYkfUj3
36
36
  -----END CERTIFICATE-----
37
- date: 2020-01-02 00:00:00.000000000 Z
37
+ date: 2020-01-08 00:00:00.000000000 Z
38
38
  dependencies:
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: hoe-mercurial
@@ -98,14 +98,14 @@ dependencies:
98
98
  requirements:
99
99
  - - "~>"
100
100
  - !ruby/object:Gem::Version
101
- version: 0.7.0
101
+ version: '1.0'
102
102
  type: :development
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
106
  - - "~>"
107
107
  - !ruby/object:Gem::Version
108
- version: 0.7.0
108
+ version: '1.0'
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: hoe-bundler
111
111
  requirement: !ruby/object:Gem::Requirement
@@ -270,7 +270,7 @@ files:
270
270
  - lib/2.4/pg_ext.so
271
271
  - lib/2.5/pg_ext.so
272
272
  - lib/2.6/pg_ext.so
273
- - lib/libpq.dll
273
+ - lib/2.7/pg_ext.so
274
274
  - lib/pg.rb
275
275
  - lib/pg/basic_type_mapping.rb
276
276
  - lib/pg/binary_decoder.rb
@@ -283,6 +283,7 @@ files:
283
283
  - lib/pg/text_encoder.rb
284
284
  - lib/pg/tuple.rb
285
285
  - lib/pg/type_map_by_column.rb
286
+ - lib/x86-mingw32/libpq.dll
286
287
  - spec/data/expected_trace.out
287
288
  - spec/data/random_binary_data
288
289
  - spec/helpers.rb
@@ -317,15 +318,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
317
318
  version: '2.2'
318
319
  - - "<"
319
320
  - !ruby/object:Gem::Version
320
- version: 2.7.dev
321
+ version: 2.8.dev
321
322
  required_rubygems_version: !ruby/object:Gem::Requirement
322
323
  requirements:
323
324
  - - ">="
324
325
  - !ruby/object:Gem::Version
325
326
  version: '0'
326
327
  requirements: []
327
- rubyforge_project:
328
- rubygems_version: 2.7.8
328
+ rubygems_version: 3.1.2
329
329
  signing_key:
330
330
  specification_version: 4
331
331
  summary: Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]
metadata.gz.sig CHANGED
Binary file