pg 0.15.0.pre.432-x86-mingw32 → 0.15.0.pre.454-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -55,8 +55,8 @@ $hoespec = Hoe.spec 'pg' do
55
55
 
56
56
  self.developer 'Michael Granger', 'ged@FaerieMUD.org'
57
57
 
58
- self.dependency 'rake-compiler', '~> 0.7', :developer
59
- self.dependency 'hoe-deveiate', '~> 0.1', :developer
58
+ self.dependency 'rake-compiler', '~> 0.8', :developer
59
+ self.dependency 'hoe-deveiate', '~> 0.2', :developer
60
60
 
61
61
  self.spec_extras[:licenses] = ['BSD', 'Ruby', 'GPL']
62
62
  self.spec_extras[:extensions] = [ 'ext/extconf.rb' ]
@@ -102,7 +102,7 @@ task :maint do
102
102
  ENV['MAINTAINER_MODE'] = 'yes'
103
103
  end
104
104
 
105
- ENV['RUBY_CC_VERSION'] ||= '1.8.7:1.9.2'
105
+ ENV['RUBY_CC_VERSION'] ||= '1.8.7:1.9.2:2.0.0'
106
106
 
107
107
  # Rake-compiler task
108
108
  Rake::ExtensionTask.new do |ext|
@@ -112,15 +112,18 @@ Rake::ExtensionTask.new do |ext|
112
112
  ext.lib_dir = 'lib'
113
113
  ext.source_pattern = "*.{c,h}"
114
114
  ext.cross_compile = true
115
- ext.cross_platform = %w[i386-mingw32]
116
-
117
- # configure options only for cross compile
118
- ext.cross_config_options += [
119
- "--with-pg-include=#{STATIC_POSTGRESQL_LIBDIR}",
120
- "--with-opt-include=#{STATIC_POSTGRESQL_INCDIR}",
121
- "--with-pg-lib=#{STATIC_POSTGRESQL_LIBDIR}",
122
- "--with-opt-lib=#{STATIC_OPENSSL_BUILDDIR}",
123
- ]
115
+ ext.cross_platform = CrossLibraries.map(&:for_platform)[0,1]
116
+
117
+ ext.cross_config_options += CrossLibraries.map do |lib|
118
+ {
119
+ lib.for_platform => [
120
+ "--with-pg-include=#{lib.static_postgresql_libdir}",
121
+ "--with-opt-include=#{lib.static_postgresql_incdir}",
122
+ "--with-pg-lib=#{lib.static_postgresql_libdir}",
123
+ "--with-opt-lib=#{lib.static_openssl_builddir}",
124
+ ]
125
+ }
126
+ end
124
127
  end
125
128
 
126
129
 
@@ -131,7 +134,6 @@ end
131
134
  file 'ChangeLog' => '.hg/branch' do |task|
132
135
  $stderr.puts "Updating the changelog..."
133
136
  begin
134
- include Hoe::MercurialHelpers
135
137
  content = make_changelog()
136
138
  rescue NameError
137
139
  abort "Packaging tasks require the hoe-mercurial plugin (gem install hoe-mercurial)"
@@ -6,6 +6,7 @@ require 'rbconfig'
6
6
  require 'rake/clean'
7
7
  require 'rake/extensiontask'
8
8
  require 'rake/extensioncompiler'
9
+ require 'ostruct'
9
10
 
10
11
  MISCDIR = BASEDIR + 'misc'
11
12
 
@@ -17,218 +18,242 @@ else
17
18
  1
18
19
  end
19
20
 
20
- # Cross-compilation constants
21
- OPENSSL_VERSION = ENV['OPENSSL_VERSION'] || '1.0.1c'
22
- POSTGRESQL_VERSION = ENV['POSTGRESQL_VERSION'] || '9.2.2'
21
+ class CrossLibrary < OpenStruct
22
+ include Rake::DSL
23
23
 
24
- COMPILE_HOME = Pathname( "./build" ).expand_path
25
- STATIC_SOURCESDIR = COMPILE_HOME + 'sources'
26
- STATIC_BUILDDIR = COMPILE_HOME + 'builds'
24
+ def initialize(for_platform, openssl_config)
25
+ super()
27
26
 
28
- # Static OpenSSL build vars
29
- STATIC_OPENSSL_BUILDDIR = STATIC_BUILDDIR + "openssl-#{OPENSSL_VERSION}"
27
+ self.for_platform = for_platform
28
+ self.openssl_config = openssl_config
30
29
 
31
- OPENSSL_SOURCE_URI =
32
- URI( "http://www.openssl.org/source/openssl-#{OPENSSL_VERSION}.tar.gz" )
33
- OPENSSL_TARBALL = STATIC_SOURCESDIR + File.basename( OPENSSL_SOURCE_URI.path )
34
- OPENSSL_MAKEFILE = STATIC_OPENSSL_BUILDDIR + 'Makefile'
30
+ # Cross-compilation constants
31
+ self.openssl_version = ENV['OPENSSL_VERSION'] || '1.0.1e'
32
+ self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '9.2.3'
35
33
 
36
- LIBSSLEAY32 = STATIC_OPENSSL_BUILDDIR + 'libssleay32.a'
37
- LIBEAY32 = STATIC_OPENSSL_BUILDDIR + 'libeay32.a'
34
+ self.compile_home = Pathname( "./build" ).expand_path
35
+ self.static_sourcesdir = compile_home + 'sources'
36
+ self.static_builddir = compile_home + 'builds' + for_platform
38
37
 
39
- OPENSSL_PATCHES = Rake::FileList[ (MISCDIR + "openssl-#{OPENSSL_VERSION}.*.patch").to_s ]
38
+ # Static OpenSSL build vars
39
+ self.static_openssl_builddir = static_builddir + "openssl-#{openssl_version}"
40
40
 
41
- # Static PostgreSQL build vars
42
- STATIC_POSTGRESQL_BUILDDIR = STATIC_BUILDDIR + "postgresql-#{POSTGRESQL_VERSION}"
43
- POSTGRESQL_SOURCE_URI = begin
44
- uristring = "http://ftp.postgresql.org/pub/source/v%s/postgresql-%s.tar.bz2" %
45
- [ POSTGRESQL_VERSION, POSTGRESQL_VERSION ]
46
- URI( uristring )
47
- end
48
- POSTGRESQL_TARBALL = STATIC_SOURCESDIR + File.basename( POSTGRESQL_SOURCE_URI.path )
49
-
50
- STATIC_POSTGRESQL_SRCDIR = STATIC_POSTGRESQL_BUILDDIR + 'src'
51
- STATIC_POSTGRESQL_LIBDIR = STATIC_POSTGRESQL_SRCDIR + 'interfaces/libpq'
52
- STATIC_POSTGRESQL_INCDIR = STATIC_POSTGRESQL_SRCDIR + 'include'
53
-
54
- POSTGRESQL_GLOBAL_MAKEFILE = STATIC_POSTGRESQL_SRCDIR + 'Makefile.global'
55
- POSTGRESQL_SHLIB_MAKEFILE = STATIC_POSTGRESQL_SRCDIR + 'Makefile.shlib'
56
- POSTGRESQL_SHLIB_MF_ORIG = STATIC_POSTGRESQL_SRCDIR + 'Makefile.shlib.orig'
57
- POSTGRESQL_LIB = STATIC_POSTGRESQL_LIBDIR + 'libpq.a'
58
- POSTGRESQL_PATCHES = Rake::FileList[ (MISCDIR + "postgresql-#{POSTGRESQL_VERSION}.*.patch").to_s ]
59
-
60
- CROSS_PREFIX = begin
61
- Rake::ExtensionCompiler.mingw_host
62
- rescue => err
63
- $stderr.puts "Cross-compilation disabled -- %s" % [ err.message ]
64
- 'unknown'
65
- end
41
+ self.openssl_source_uri =
42
+ URI( "http://www.openssl.org/source/openssl-#{openssl_version}.tar.gz" )
43
+ self.openssl_tarball = static_sourcesdir + File.basename( openssl_source_uri.path )
44
+ self.openssl_makefile = static_openssl_builddir + 'Makefile'
66
45
 
46
+ self.libssleay32 = static_openssl_builddir + 'libssleay32.a'
47
+ self.libeay32 = static_openssl_builddir + 'libeay32.a'
67
48
 
68
- # clean intermediate files and folders
69
- CLEAN.include( STATIC_BUILDDIR.to_s )
49
+ self.openssl_patches = Rake::FileList[ (MISCDIR + "openssl-#{openssl_version}.*.patch").to_s ]
70
50
 
51
+ # Static PostgreSQL build vars
52
+ self.static_postgresql_builddir = static_builddir + "postgresql-#{postgresql_version}"
53
+ self.postgresql_source_uri = begin
54
+ uristring = "http://ftp.postgresql.org/pub/source/v%s/postgresql-%s.tar.bz2" %
55
+ [ postgresql_version, postgresql_version ]
56
+ URI( uristring )
57
+ end
58
+ self.postgresql_tarball = static_sourcesdir + File.basename( postgresql_source_uri.path )
59
+
60
+ self.static_postgresql_srcdir = static_postgresql_builddir + 'src'
61
+ self.static_postgresql_libdir = static_postgresql_srcdir + 'interfaces/libpq'
62
+ self.static_postgresql_incdir = static_postgresql_srcdir + 'include'
63
+
64
+ self.postgresql_global_makefile = static_postgresql_srcdir + 'Makefile.global'
65
+ self.postgresql_shlib_makefile = static_postgresql_srcdir + 'Makefile.shlib'
66
+ self.postgresql_shlib_mf_orig = static_postgresql_srcdir + 'Makefile.shlib.orig'
67
+ self.postgresql_lib = static_postgresql_libdir + 'libpq.a'
68
+ self.postgresql_patches = Rake::FileList[ (MISCDIR + "postgresql-#{postgresql_version}.*.patch").to_s ]
69
+
70
+ # Use rake-compilers config.yml to determine the toolchain that was used
71
+ # to build Ruby for this platform.
72
+ self.host_platform = begin
73
+ config_file = YAML.load_file(File.expand_path("~/.rake-compiler/config.yml"))
74
+ _, rbfile = config_file.find{|key, fname| key.start_with?("rbconfig-#{for_platform}-") }
75
+ IO.read(rbfile).match(/CONFIG\["host"\] = "(.*)"/)[1]
76
+ end
71
77
 
72
- ENV['RUBY_CC_VERSION'] ||= '1.8.7:1.9.3'
73
78
 
74
- def download(url, save_to)
75
- part = save_to+".part"
76
- sh "wget #{url.to_s.inspect} -O #{part.inspect} || curl #{url.to_s.inspect} -o #{part.inspect}"
77
- FileUtils.mv part, save_to
78
- end
79
+ # clean intermediate files and folders
80
+ CLEAN.include( static_builddir.to_s )
79
81
 
80
- def run(*args)
81
- sh *args
82
- end
83
82
 
84
- #####################################################################
85
- ### C R O S S - C O M P I L A T I O N - T A S K S
86
- #####################################################################
83
+ ENV['RUBY_CC_VERSION'] ||= '1.8.7:1.9.3:2.0.0'
87
84
 
85
+ def download(url, save_to)
86
+ part = save_to+".part"
87
+ sh "wget #{url.to_s.inspect} -O #{part.inspect} || curl #{url.to_s.inspect} -o #{part.inspect}"
88
+ FileUtils.mv part, save_to
89
+ end
88
90
 
89
- directory STATIC_SOURCESDIR.to_s
91
+ def run(*args)
92
+ sh *args
93
+ end
90
94
 
91
- #
92
- # Static OpenSSL build tasks
93
- #
94
- directory STATIC_OPENSSL_BUILDDIR.to_s
95
+ #####################################################################
96
+ ### C R O S S - C O M P I L A T I O N - T A S K S
97
+ #####################################################################
95
98
 
96
- # openssl source file should be stored there
97
- file OPENSSL_TARBALL => STATIC_SOURCESDIR do |t|
98
- download( OPENSSL_SOURCE_URI, t.name )
99
- end
100
99
 
101
- # Extract the openssl builds
102
- file STATIC_OPENSSL_BUILDDIR => OPENSSL_TARBALL do |t|
103
- puts "extracting %s to %s" % [ OPENSSL_TARBALL, STATIC_OPENSSL_BUILDDIR.parent ]
104
- STATIC_OPENSSL_BUILDDIR.mkpath
105
- run 'tar', '-xzf', OPENSSL_TARBALL.to_s, '-C', STATIC_OPENSSL_BUILDDIR.parent.to_s
106
- OPENSSL_MAKEFILE.unlink if OPENSSL_MAKEFILE.exist?
107
-
108
- OPENSSL_PATCHES.each do |patchfile|
109
- puts " applying patch #{patchfile}..."
110
- run 'patch', '-Np1', '-d', STATIC_OPENSSL_BUILDDIR.to_s,
111
- '-i', File.expand_path( patchfile, BASEDIR )
112
- end
113
- end
100
+ directory static_sourcesdir.to_s
114
101
 
115
- CMD_PRELUDE = [
116
- 'env',
117
- "CC=#{CROSS_PREFIX}-gcc",
118
- "CFLAGS=-DDSO_WIN32",
119
- "AR=#{CROSS_PREFIX}-ar",
120
- "RANLIB=#{CROSS_PREFIX}-ranlib"
121
- ]
102
+ #
103
+ # Static OpenSSL build tasks
104
+ #
105
+ directory static_openssl_builddir.to_s
122
106
 
107
+ # openssl source file should be stored there
108
+ file openssl_tarball => static_sourcesdir do |t|
109
+ download( openssl_source_uri, t.name )
110
+ end
123
111
 
124
- # generate the makefile in a clean build location
125
- file OPENSSL_MAKEFILE => STATIC_OPENSSL_BUILDDIR do |t|
126
- Dir.chdir( STATIC_OPENSSL_BUILDDIR ) do
127
- cmd = CMD_PRELUDE.dup
128
- cmd << "./Configure" << 'mingw'
112
+ # Extract the openssl builds
113
+ file static_openssl_builddir => openssl_tarball do |t|
114
+ puts "extracting %s to %s" % [ openssl_tarball, static_openssl_builddir.parent ]
115
+ static_openssl_builddir.mkpath
116
+ run 'tar', '-xzf', openssl_tarball.to_s, '-C', static_openssl_builddir.parent.to_s
117
+ openssl_makefile.unlink if openssl_makefile.exist?
118
+
119
+ openssl_patches.each do |patchfile|
120
+ puts " applying patch #{patchfile}..."
121
+ run 'patch', '-Np1', '-d', static_openssl_builddir.to_s,
122
+ '-i', File.expand_path( patchfile, BASEDIR )
123
+ end
124
+ end
129
125
 
130
- run( *cmd )
131
- end
132
- end
126
+ self.cmd_prelude = [
127
+ 'env',
128
+ "CC=#{host_platform}-gcc",
129
+ "CFLAGS=-DDSO_WIN32",
130
+ "AR=#{host_platform}-ar",
131
+ "RANLIB=#{host_platform}-ranlib"
132
+ ]
133
133
 
134
- desc "compile static openssl libraries"
135
- task :openssl_libs => [ LIBSSLEAY32, LIBEAY32 ]
136
134
 
137
- task :compile_static_openssl => OPENSSL_MAKEFILE do |t|
138
- Dir.chdir( STATIC_OPENSSL_BUILDDIR ) do
139
- cmd = CMD_PRELUDE.dup
140
- cmd << 'make' << "-j#{NUM_CPUS}" << 'build_libs'
135
+ # generate the makefile in a clean build location
136
+ file openssl_makefile => static_openssl_builddir do |t|
137
+ Dir.chdir( static_openssl_builddir ) do
138
+ cmd = cmd_prelude.dup
139
+ cmd << "./Configure" << openssl_config
141
140
 
142
- run( *cmd )
143
- end
144
- end
141
+ run( *cmd )
142
+ end
143
+ end
145
144
 
146
- desc "compile static #{LIBEAY32}"
147
- file LIBEAY32 => :compile_static_openssl do |t|
148
- FileUtils.cp( STATIC_OPENSSL_BUILDDIR + 'libcrypto.a', LIBEAY32.to_s )
149
- end
145
+ desc "compile static openssl libraries"
146
+ task :openssl_libs => [ libssleay32, libeay32 ]
150
147
 
151
- desc "compile static #{LIBSSLEAY32}"
152
- file LIBSSLEAY32 => :compile_static_openssl do |t|
153
- FileUtils.cp( STATIC_OPENSSL_BUILDDIR + 'libssl.a', LIBSSLEAY32.to_s )
154
- end
148
+ task :compile_static_openssl => openssl_makefile do |t|
149
+ Dir.chdir( static_openssl_builddir ) do
150
+ cmd = cmd_prelude.dup
151
+ cmd << 'make' << "-j#{NUM_CPUS}" << 'build_libs'
155
152
 
153
+ run( *cmd )
154
+ end
155
+ end
156
156
 
157
+ desc "compile static #{libeay32}"
158
+ file libeay32 => :compile_static_openssl do |t|
159
+ FileUtils.cp( static_openssl_builddir + 'libcrypto.a', libeay32.to_s )
160
+ end
157
161
 
158
- #
159
- # Static PostgreSQL build tasks
160
- #
161
- directory STATIC_POSTGRESQL_BUILDDIR.to_s
162
+ desc "compile static #{libssleay32}"
163
+ file libssleay32 => :compile_static_openssl do |t|
164
+ FileUtils.cp( static_openssl_builddir + 'libssl.a', libssleay32.to_s )
165
+ end
162
166
 
163
167
 
164
- # postgresql source file should be stored there
165
- file POSTGRESQL_TARBALL => STATIC_SOURCESDIR do |t|
166
- download( POSTGRESQL_SOURCE_URI, t.name )
167
- end
168
168
 
169
- # Extract the postgresql sources
170
- file STATIC_POSTGRESQL_BUILDDIR => POSTGRESQL_TARBALL do |t|
171
- puts "extracting %s to %s" % [ POSTGRESQL_TARBALL, STATIC_POSTGRESQL_BUILDDIR.parent ]
172
- STATIC_POSTGRESQL_BUILDDIR.mkpath
173
- run 'tar', '-xjf', POSTGRESQL_TARBALL.to_s, '-C', STATIC_POSTGRESQL_BUILDDIR.parent.to_s
174
- mv POSTGRESQL_SHLIB_MAKEFILE, POSTGRESQL_SHLIB_MF_ORIG
175
-
176
- POSTGRESQL_PATCHES.each do |patchfile|
177
- puts " applying patch #{patchfile}..."
178
- run 'patch', '-Np1', '-d', STATIC_POSTGRESQL_BUILDDIR.to_s,
179
- '-i', File.expand_path( patchfile, BASEDIR )
180
- end
181
- end
169
+ #
170
+ # Static PostgreSQL build tasks
171
+ #
172
+ directory static_postgresql_builddir.to_s
182
173
 
183
- # generate the makefile in a clean build location
184
- file POSTGRESQL_GLOBAL_MAKEFILE => [ STATIC_POSTGRESQL_BUILDDIR, :openssl_libs ] do |t|
185
- options = [
186
- '--target=i386-mingw32',
187
- "--host=#{Rake::ExtensionCompiler.mingw_host}",
188
- '--with-openssl',
189
- '--without-zlib',
190
- '--disable-shared',
191
- ]
192
-
193
- Dir.chdir( STATIC_POSTGRESQL_BUILDDIR ) do
194
- configure_path = STATIC_POSTGRESQL_BUILDDIR + 'configure'
195
- cmd = [ configure_path.to_s, *options ]
196
- cmd << "CFLAGS=-L#{STATIC_OPENSSL_BUILDDIR}"
197
- cmd << "LDFLAGS=-L#{STATIC_OPENSSL_BUILDDIR}"
198
- cmd << "LDFLAGS_SL=-L#{STATIC_OPENSSL_BUILDDIR}"
199
- cmd << "LIBS=-lwsock32 -lws2_32 -lgdi32"
200
- cmd << "CPPFLAGS=-I#{STATIC_OPENSSL_BUILDDIR}/include"
201
-
202
- run( *cmd )
203
- end
204
- end
205
174
 
175
+ # postgresql source file should be stored there
176
+ file postgresql_tarball => static_sourcesdir do |t|
177
+ download( postgresql_source_uri, t.name )
178
+ end
206
179
 
207
- # patch the Makefile.shlib -- depend on the build dir so it's only
208
- # rewritten if the tarball is re-extracted.
209
- file POSTGRESQL_SHLIB_MAKEFILE => POSTGRESQL_SHLIB_MF_ORIG do |t|
210
- tf = Tempfile.new( POSTGRESQL_SHLIB_MAKEFILE.basename.to_s )
211
- POSTGRESQL_SHLIB_MF_ORIG.open( File::RDONLY ) do |ifh|
212
- ifh.each_line do |line|
213
- tf.print( line.sub(/^(\s*haslibarule\s*=\s*yes)/, "# \\1 ") )
180
+ # Extract the postgresql sources
181
+ file static_postgresql_builddir => postgresql_tarball do |t|
182
+ puts "extracting %s to %s" % [ postgresql_tarball, static_postgresql_builddir.parent ]
183
+ static_postgresql_builddir.mkpath
184
+ run 'tar', '-xjf', postgresql_tarball.to_s, '-C', static_postgresql_builddir.parent.to_s
185
+ mv postgresql_shlib_makefile, postgresql_shlib_mf_orig
186
+
187
+ postgresql_patches.each do |patchfile|
188
+ puts " applying patch #{patchfile}..."
189
+ run 'patch', '-Np1', '-d', static_postgresql_builddir.to_s,
190
+ '-i', File.expand_path( patchfile, BASEDIR )
191
+ end
192
+ end
193
+
194
+ # generate the makefile in a clean build location
195
+ file postgresql_global_makefile => [ static_postgresql_builddir, :openssl_libs ] do |t|
196
+ options = [
197
+ "--target=#{host_platform}",
198
+ "--host=#{host_platform}",
199
+ '--with-openssl',
200
+ '--without-zlib',
201
+ '--disable-shared',
202
+ ]
203
+
204
+ Dir.chdir( static_postgresql_builddir ) do
205
+ configure_path = static_postgresql_builddir + 'configure'
206
+ cmd = [ configure_path.to_s, *options ]
207
+ cmd << "CFLAGS=-L#{static_openssl_builddir}"
208
+ cmd << "LDFLAGS=-L#{static_openssl_builddir}"
209
+ cmd << "LDFLAGS_SL=-L#{static_openssl_builddir}"
210
+ cmd << "LIBS=-lwsock32 -lgdi32"
211
+ cmd << "CPPFLAGS=-I#{static_openssl_builddir}/include"
212
+
213
+ run( *cmd )
214
+ end
214
215
  end
215
- end
216
- tf.close
217
216
 
218
- FileUtils.mv( tf.path, t.name, :verbose => $puts )
219
- end
220
217
 
218
+ # patch the Makefile.shlib -- depend on the build dir so it's only
219
+ # rewritten if the tarball is re-extracted.
220
+ file postgresql_shlib_makefile => postgresql_shlib_mf_orig do |t|
221
+ tf = Tempfile.new( postgresql_shlib_makefile.basename.to_s )
222
+ postgresql_shlib_mf_orig.open( File::RDONLY ) do |ifh|
223
+ ifh.each_line do |line|
224
+ tf.print( line.sub(/^(\s*haslibarule\s*=\s*yes)/, "# \\1 ") )
225
+ end
226
+ end
227
+ tf.close
221
228
 
222
- # make libpq.a
223
- task POSTGRESQL_LIB => [ POSTGRESQL_GLOBAL_MAKEFILE, POSTGRESQL_SHLIB_MAKEFILE ] do |t|
224
- Dir.chdir( POSTGRESQL_LIB.dirname ) do
225
- sh 'make', "-j#{NUM_CPUS}", POSTGRESQL_LIB.basename.to_s, 'PORTNAME=win32'
229
+ FileUtils.mv( tf.path, t.name, :verbose => $puts )
230
+ end
231
+
232
+
233
+ # make libpq.a
234
+ task postgresql_lib => [ postgresql_global_makefile, postgresql_shlib_makefile ] do |t|
235
+ Dir.chdir( postgresql_lib.dirname ) do
236
+ sh 'make', "-j#{NUM_CPUS}", postgresql_lib.basename.to_s, 'PORTNAME=win32'
237
+ end
238
+ end
239
+
240
+
241
+ #desc 'compile static libpg.a'
242
+ task :static_libpq => postgresql_lib
226
243
  end
227
244
  end
228
245
 
229
-
230
- #desc 'compile static libpg.a'
231
- task :static_libpq => POSTGRESQL_LIB
246
+ if File.exist?(File.expand_path("~/.rake-compiler/config.yml"))
247
+ CrossLibraries = [
248
+ ['i386-mingw32', 'mingw'],
249
+ ['x64-mingw32', 'mingw64'],
250
+ ].map do |platform, openssl_config|
251
+ CrossLibrary.new platform, openssl_config
252
+ end
253
+ else
254
+ $stderr.puts "Cross-compilation disabled -- rake-compiler not properly installed"
255
+ CrossLibraries = []
256
+ end
232
257
 
233
258
  desc 'cross compile pg for win32'
234
259
  task :cross do