pg 0.9.0-x86-mingw32 → 0.11.0pre229-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ {��#r�cN�Z]��E���&�����k�,y�0��5Qi�0n��vW��0u��IV�#�PڄN�R07L�EF��%+��˶��a���כ�� x�uAQ/<��Da�ض�
2
+ \V`,��]g?���<�B����,�B;ç��|>'{ͨ���UC��Fޘk��[A�9�\��]�#T ����������Z�K�&:a
data/ChangeLog CHANGED
@@ -1,4 +1,217 @@
1
- 158[tip] 872063e42b12 2010-02-19 08:02 -0800 ged
1
+ 229[master,tip]:228,222 b477174160c8 2011-03-30 06:13 -0700 ged
2
+ Automated merge with ssh://bitbucket.org/larskanis/ruby-pg
3
+
4
+ 228 cc3a7476465c 2011-03-15 13:21 +0100 kanis
5
+ Update cross compilation tasks to use Ruby 1.8.7 instead of 1.8.6, since pg.gem requires at least 1.8.7 to get installed
6
+
7
+ 227 b90f74cb11a5 2011-03-12 21:40 +0100 kanis
8
+ Update readme for cross compile
9
+
10
+ 226 780650f201e3 2011-03-12 21:38 +0100 kanis
11
+ Use RUBY_CC_VERSION from command line, if set
12
+
13
+ 225 31089d6c9dde 2011-03-11 22:14 +0100 kanis
14
+ update PG and OpenSSL version for cross compile
15
+
16
+ 224 dfe3e7c1ea27 2011-03-11 21:58 +0100 kanis
17
+ always run "make libpq.a" for cross compilation
18
+
19
+ 223:221 06e17573b133 2011-03-11 21:54 +0100 kanis
20
+ re-add required libs for cross compilation
21
+
22
+ 222 56098b479a23 2011-03-30 05:52 -0700 ged
23
+ Comment the WIN32 console FD stuff so I remember what it does.
24
+
25
+ 221 1baa7a8e673e 2011-02-23 14:11 -0800 ged
26
+ Whitespace/line-ending fixes
27
+
28
+ 220:217,219 fb7d22101adf 2011-02-23 11:40 -0800 ged
29
+ Merged with 1c3a1ca9f0cd
30
+
31
+ 219 1c3a1ca9f0cd 2011-01-22 04:41 +0800 ghazel
32
+ for windows support, duplicate the sockets from libpq and create temporary CRT fds
33
+
34
+ 218[github/master]:214 c3f163bf1ecd 2011-01-22 22:11 -0800 ged
35
+ Pulling fixes for Windows from ghazel on Github
36
+
37
+ 217 18f413081e0c 2011-02-10 16:19 -0800 ged
38
+ Bump minor version.
39
+
40
+ 216 739692aa8dd1 2011-01-31 17:10 -0800 ged
41
+ Reformatting fixes for PGresult#[] and PGresult#values
42
+
43
+ 215 59679aee98ee 2011-01-31 11:30 -0600 me-bitbucket
44
+ added PGresult#values to get an array of arrays
45
+
46
+ 214 8ab3dd3c757b 2011-01-19 08:00 -0800 ged
47
+ Added tag v0.10.1 for changeset de10b5d8e442
48
+
49
+ 213[v0.10.1] de10b5d8e442 2011-01-19 08:00 -0800 ged
50
+ Added signature for changeset 230ea3e68db2
51
+
52
+ 212 230ea3e68db2 2011-01-19 07:54 -0800 ged
53
+ Add an include guard for pg.h
54
+
55
+ 211 f877d2d399cc 2011-01-19 07:53 -0800 ged
56
+ Simplify the common case require of the ext
57
+
58
+ 210 8e1707a90330 2011-01-19 07:52 -0800 ged
59
+ Include the extconf header
60
+
61
+ 209 89348c8bb6d1 2010-12-06 12:00 -0800 ged
62
+ Experimenting with a greatly-simplified extconf, since the complex one isn't solving any problems
63
+
64
+ 208 aea173eec98a 2010-12-06 08:45 -0800 ged
65
+ Bumping version to 0.10.1.
66
+
67
+ 207 d61e3310ea3d 2010-12-06 08:41 -0800 ged
68
+ Fixing compatibility with versions of PostgreSQL without PQgetCancel. (fixes #36)
69
+
70
+ 206 89979f184b22 2010-12-06 07:44 -0800 ged
71
+ Fix require for natively-compiled extension under Windows. (fixes #55)
72
+
73
+ 205 9e11be78bfe4 2010-12-06 07:32 -0800 ged
74
+ Change rb_yield_splat() to rb_yield_values() for compatibility with Rubinius. (fixes #54)
75
+
76
+ 204 eb0d4b1df418 2010-12-01 18:54 -0800 ged
77
+ Removed tag 0.10.0
78
+
79
+ 203 78a63dce1491 2010-12-01 18:52 -0800 ged
80
+ Added tag v0.10.0 for changeset 1822a169c4fe
81
+
82
+ 202 469211f606ea 2010-12-01 18:52 -0800 ged
83
+ Fix deprecated expectation.
84
+
85
+ 201:197,200 857722663a6f 2010-12-01 18:47 -0800 ged
86
+ Merged in Mahlon's wait_for_notify update for PostgreSQL 9's notification payload
87
+
88
+ 200 8ffb67a23f45 2010-12-01 18:30 -0800 ged
89
+ Closing pg90_notify_payload pbranch for merge into default
90
+
91
+ 199 de86dca00ad2 2010-12-01 18:24 -0800 ged
92
+ Finished the merge of default; fixed specs under 1.9.2.
93
+
94
+ 198:197,188 60664b2495cf 2010-12-01 16:39 -0800 ged
95
+ merge of default
96
+
97
+ 197 148d0cc3db4a 2010-12-01 14:19 -0800 ged
98
+ Added tag 0.10.0 for changeset 1822a169c4fe
99
+
100
+ 196[v0.10.0] 1822a169c4fe 2010-12-01 14:19 -0800 ged
101
+ Added signature for changeset 3993015a841e
102
+
103
+ 195 3993015a841e 2010-12-01 12:20 -0800 ged
104
+ Ignore the yard cache, handle missing rake-compiler for non-compile-related tasks.
105
+
106
+ 194 71786704391b 2010-11-11 21:39 -0600 ged
107
+ Build/gem updates
108
+
109
+ 193 899329ce1b4e 2010-11-11 21:09 -0600 ged
110
+ Added a spec for collapsed notifications.
111
+
112
+ 192 413f9e81e3ea 2010-11-01 09:01 -0700 ged
113
+ More work trying to get the Windows-native gem to compile. No luck, but it's closer.
114
+
115
+ 191 3402babf2cdf 2010-10-31 16:29 -0700 ged
116
+ Fixed issue with PGconn#wait_for_notify that caused it to miss notifications that happened after the LISTEN but before the wait_for_notify.
117
+
118
+ 190 9d8f82721f69 2010-10-29 08:09 -0700 ged
119
+ Updated to RSpec 2.0
120
+
121
+ 189:186 b2df89600d95 2010-10-11 09:24 -0700 ged
122
+ Fixes for windows static build.
123
+
124
+ 188 193043bf2244 2010-10-08 09:40 -0700 ged
125
+ Added support for the payload of NOTIFY events (w/Mahlon E. Smith)
126
+
127
+ 187 ce9b893ff824 2010-10-08 07:25 -0700 ged
128
+ start new patch on default
129
+
130
+ 186 49ff3442c2ee 2010-10-08 07:23 -0700 ged
131
+ Fixes to get the static windows build to work with PostgreSQL 9.0 and OpenSSL 1.0.0a
132
+
133
+ 185 1fa5cd6851e3 2010-09-28 09:10 -0700 ged
134
+ More work trying to get the native windows gem to compile under PostgreSQL 9.0
135
+
136
+ 184 c9fb855a7d50 2010-09-28 09:09 -0700 ged
137
+ Adding a sample of how to use COPY FROM
138
+
139
+ 183 d85ff87e5949 2010-09-24 10:34 -0700 ged
140
+ Fixes for Ruby 1.9.2.
141
+
142
+ 182 5dbc24f596c8 2010-09-24 10:18 -0700 ged
143
+ Version bump, updates for PostgreSQL 9.
144
+
145
+ 181 1f8dd92ca16c 2010-08-03 10:31 -0700 ged
146
+ Merged JRuby fix into the build system, pulled down other build-system updates. Thanks to timfel for the fix.
147
+
148
+ 180 4f705f605e51 2010-08-03 17:56 +0200 timfelgentreff
149
+ Fix to allow Rakefile to work on JRuby
150
+
151
+ 179 92cc211ef553 2010-08-02 09:28 -0700 ged
152
+ Honor Ruby's default_internal encoding when connecting via the synchronous interface; fixes #33
153
+
154
+ 178 a2237e39d399 2010-08-02 09:23 -0700 ged
155
+ Don't treat the installed pg_config not having archflags as an error; fixes #39
156
+
157
+ 177 14b882b7b88c 2010-08-02 09:21 -0700 ged
158
+ Install extension under arch-specific directory (RPS fix)
159
+
160
+ 176 b0a5ae858569 2010-07-26 19:46 -0700 ged
161
+ Adding rake tasklibs as a sub-repo
162
+
163
+ 175 37835e3b8701 2010-07-21 18:39 -0700 ged
164
+ Removed spec for issue #22, as the library is behaving the same as the underlying library; closes #22
165
+
166
+ 174:173,172 86f238c12fa3 2010-07-21 18:36 -0700 ged
167
+ Merged with 168:dfaa59767b2e
168
+
169
+ 173:167 dfaa59767b2e 2010-07-21 18:35 -0700 ged
170
+ Reworded an example's description and added a specific transaction-abort spec
171
+
172
+ 172:171,168 e756f8fb15d8 2010-06-22 16:23 -0700 ged
173
+ Merged with 170:5418a1d86d91
174
+
175
+ 171 8922f0a8ee44 2010-06-22 16:22 -0700 ged
176
+ Adding example of invalid binary data issue (refs #22), fixing EXT_SO path
177
+
178
+ 170 cb92aa4b6599 2010-02-25 10:39 -0800 ged
179
+ Adding a spec to test bug #12
180
+
181
+ 169:158 86026f5ecf70 2010-02-25 10:39 -0800 ged
182
+ Adding rake-compiler to the dev dependencies
183
+
184
+ 168 5418a1d86d91 2010-06-22 15:54 -0700 ged
185
+ Cross-compile tasks cleanup, extconf diagnostic improvement.
186
+
187
+ 167 07502a793f3a 2010-06-22 10:44 -0700 ged
188
+ Adding some more stuff to the ignorefile
189
+
190
+ 166 873867122e80 2010-06-22 10:43 -0700 ged
191
+ Modified the large-object sample script to reflect the pg library's API (refs #35)
192
+
193
+ 165 ea6eae59e917 2010-06-21 11:08 -0700 ged
194
+ Updating build system, adding .orig files to ignore list.
195
+
196
+ 164 bb8a3baad96e 2010-06-14 13:57 -0700 ged
197
+ Whitespace fix
198
+
199
+ 163 45e6518b780d 2010-05-26 09:33 -0700 ged
200
+ Actually, just use the cflags from pg_config, which should resolve both the -Wall and the -lsocket issue (refs #30)
201
+
202
+ 162 730fb885ce08 2010-05-26 09:27 -0700 ged
203
+ Fixing compilation for non-GCC platforms (fixes #30)
204
+
205
+ 161 a47ffe890970 2010-03-16 07:36 -0700 ged
206
+ Fixed typo in ext/extconf.rb -- thanks to Keith Cascio for spotting this. Closes #27.
207
+
208
+ 160 9a296096f7e9 2010-02-28 08:56 -0800 ged
209
+ Added tag 0.9.0 for changeset da726282493c
210
+
211
+ 159[0.9.0] da726282493c 2010-02-28 08:56 -0800 ged
212
+ Added signature for changeset 872063e42b12
213
+
214
+ 158 872063e42b12 2010-02-19 08:02 -0800 ged
2
215
  Adding "fat gem" compatible loader, set the default RUBY_CC_VERSION.
3
216
 
4
217
  157 ab525ca90531 2010-02-19 06:27 -0800 ged
@@ -28,3 +28,5 @@ Jeff Davis <ruby@j-davis.com>
28
28
  Bertram Scharpf <software@bertram-scharpf.de>
29
29
  Michael Granger <ged@FaerieMUD.org>
30
30
  Mahlon E. Smith <mahlon@martini.nu>
31
+ Jason Yanowitz <me-bitbucket@jasonyanowitz.com>
32
+
data/README CHANGED
@@ -5,8 +5,8 @@ library works with PostgreSQL 7.4 and later.
5
5
 
6
6
  == Requirements
7
7
 
8
- * Ruby 1.8.6 or later.
9
- * PostgreSQL 7.3 or later installed.
8
+ * Ruby 1.8.7-p174 or later.
9
+ * PostgreSQL 7.4 or later installed.
10
10
 
11
11
  It may work with earlier versions as well, but those are not regularly tested.
12
12
 
@@ -39,7 +39,7 @@ There are no runtime dependencies to any but the standard Windows DLLs.
39
39
 
40
40
  Install mingw32. On a debian based system this should work:
41
41
 
42
- apt-get install mingw32
42
+ apt-get install mingw32
43
43
 
44
44
  On MacOS X, if you have MacPorts installed:
45
45
 
@@ -49,13 +49,16 @@ Install the rake-compiler:
49
49
 
50
50
  gem install rake-compiler
51
51
 
52
- Download and cross compile ruby for win32:
52
+ Download and cross compile ruby 1.8 and 1.9 for win32:
53
53
 
54
- rake-compiler cross-ruby VERSION=1.8.6-p287
54
+ rake-compiler cross-ruby VERSION=1.8.7-p334
55
+ rake-compiler cross-ruby VERSION=1.9.2-p180
55
56
 
56
57
  Download and cross compile pg for win32:
57
58
 
58
- rake cross native gem RUBY_CC_VERSION=1.8.6 OPENSSL_VERSION=0.9.8l POSTGRESQL_VERSION=8.4.2
59
+ rake cross native gem
60
+ or with custom versions:
61
+ rake cross native gem RUBY_CC_VERSION=1.8.7:1.9.2 OPENSSL_VERSION=1.0.0d POSTGRESQL_VERSION=9.0.3
59
62
 
60
63
  If everything works, there should be pg-VERSION-x86-mswin32.gem in the pkg
61
64
  directory.
data/Rakefile CHANGED
@@ -11,12 +11,14 @@
11
11
  #
12
12
 
13
13
  BEGIN {
14
+ require 'rbconfig'
14
15
  require 'pathname'
15
16
  basedir = Pathname.new( __FILE__ ).dirname
16
17
 
17
18
  libdir = basedir + "lib"
18
- extdir = basedir + "ext"
19
+ extdir = libdir + Config::CONFIG['sitearch']
19
20
 
21
+ $LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s )
20
22
  $LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s )
21
23
  $LOAD_PATH.unshift( extdir.to_s ) unless $LOAD_PATH.include?( extdir.to_s )
22
24
  }
@@ -75,7 +77,7 @@ elsif VERSION_FILE.exist?
75
77
  PKG_VERSION = VERSION_FILE.read[ /VERSION\s*=\s*['"](\d+\.\d+\.\d+)['"]/, 1 ]
76
78
  end
77
79
 
78
- PKG_VERSION ||= '0.0.0'
80
+ PKG_VERSION = '0.0.0' unless defined?( PKG_VERSION ) && !PKG_VERSION.nil?
79
81
 
80
82
  PKG_FILE_NAME = "#{PKG_NAME.downcase}-#{PKG_VERSION}"
81
83
  GEM_FILE_NAME = "#{PKG_FILE_NAME}.gem"
@@ -90,7 +92,7 @@ EXTCONF = EXTDIR + 'extconf.rb'
90
92
 
91
93
  ARTIFACTS_DIR = Pathname.new( CC_BUILD_ARTIFACTS )
92
94
 
93
- TEXT_FILES = Rake::FileList.new( %w[Rakefile ChangeLog README LICENSE] )
95
+ TEXT_FILES = Rake::FileList.new( %w[Rakefile ChangeLog README* LICENSE] )
94
96
  BIN_FILES = Rake::FileList.new( "#{BINDIR}/*" )
95
97
  LIB_FILES = Rake::FileList.new( "#{LIBDIR}/**/*.rb" )
96
98
  EXT_FILES = Rake::FileList.new( "#{EXTDIR}/**/*.{c,h,rb}" )
@@ -167,26 +169,36 @@ if !RAKE_TASKDIR.exist?
167
169
  end
168
170
 
169
171
  require RAKE_TASKDIR + 'helpers.rb'
172
+ include RakefileHelpers
170
173
 
171
174
  # Set the build ID if the mercurial executable is available
172
175
  if hg = which( 'hg' )
173
- id = IO.read('|-') or exec hg.to_s, 'id', '-n'
174
- PKG_BUILD = 'pre' + (id.chomp[ /^[[:xdigit:]]+/ ] || '1')
176
+ id = `#{hg} id -n`.chomp
177
+ PKG_BUILD = (id.chomp[ /^[[:xdigit:]]+/ ] || '1')
175
178
  else
176
- PKG_BUILD = 'pre0'
179
+ PKG_BUILD = '0'
177
180
  end
178
181
  SNAPSHOT_PKG_NAME = "#{PKG_FILE_NAME}.#{PKG_BUILD}"
179
182
  SNAPSHOT_GEM_NAME = "#{SNAPSHOT_PKG_NAME}.gem"
180
183
 
181
184
  # Documentation constants
182
- RDOCDIR = DOCSDIR + 'api'
185
+ API_DOCSDIR = DOCSDIR + 'api'
186
+ README_FILE = TEXT_FILES.find {|path| path =~ /^README/ } || 'README'
183
187
  RDOC_OPTIONS = [
184
- '-w', '4',
185
- '-HN',
186
- '-i', '.',
187
- '-m', 'README',
188
- '-t', PKG_NAME,
189
- '-W', 'http://bitbucket.org/ged/ruby-pg/browser/'
188
+ '--tab-width=4',
189
+ '--show-hash',
190
+ '--include', BASEDIR.to_s,
191
+ "--main=#{README_FILE}",
192
+ "--title=#{PKG_NAME}",
193
+ ]
194
+ YARD_OPTIONS = [
195
+ '--use-cache',
196
+ '--protected',
197
+ '-r', README_FILE,
198
+ '--exclude', 'extconf\\.rb',
199
+ '--files', 'ChangeLog,LICENSE',
200
+ '--output-dir', API_DOCSDIR.to_s,
201
+ '--title', "#{PKG_NAME} #{PKG_VERSION}",
190
202
  ]
191
203
 
192
204
  # Release constants
@@ -194,28 +206,30 @@ SMTP_HOST = "mail.faeriemud.org"
194
206
  SMTP_PORT = 465 # SMTP + SSL
195
207
 
196
208
  # Project constants
197
- PROJECT_HOST = 'bitbucket.org'
198
- PROJECT_PUBDIR = '/ged/ruby-pg/downloads/'
209
+ PROJECT_HOST = 'deveiate.org'
210
+ PROJECT_PUBDIR = '/usr/local/www/public/code/'
199
211
  PROJECT_DOCDIR = "#{PROJECT_PUBDIR}/#{PKG_NAME}"
200
212
  PROJECT_SCPPUBURL = "#{PROJECT_HOST}:#{PROJECT_PUBDIR}"
201
213
  PROJECT_SCPDOCURL = "#{PROJECT_HOST}:#{PROJECT_DOCDIR}"
202
214
 
215
+ GEM_PUBHOST = 'rubygems.org'
216
+
203
217
  # Gem dependencies: gemname => version
204
218
  DEPENDENCIES = {
205
219
  }
206
220
 
207
221
  # Developer Gem dependencies: gemname => version
208
222
  DEVELOPMENT_DEPENDENCIES = {
209
- 'rake' => '>= 0.8.7',
210
- 'rcodetools' => '>= 0.7.0.0',
211
- 'rcov' => '>= 0.8.1.2.0',
212
- 'rdoc' => '>= 2.4.3',
213
- 'RedCloth' => '>= 4.0.3',
214
- 'rspec' => '>= 1.2.6',
215
- 'termios' => '>= 0',
216
- 'text-format' => '>= 1.0.0',
217
- 'tmail' => '>= 1.2.3.1',
218
- 'diff-lcs' => '>= 1.1.2',
223
+ 'rake' => '~> 0.8.7',
224
+ 'rcodetools' => '~> 0.7.0.0',
225
+ 'rcov' => '~> 0.8.1.2.0',
226
+ 'yard' => '~> 0.6.1',
227
+ 'RedCloth' => '~> 4.2.3',
228
+ 'rspec' => '~> 2.0.1',
229
+ 'ruby-termios' => '~> 0.9.6',
230
+ 'text-format' => '~> 1.0.0',
231
+ 'tmail' => '~> 1.2.3.1',
232
+ 'rake-compiler' => '~>0.7.0',
219
233
  }
220
234
 
221
235
  # Non-gem requirements: packagename => version
@@ -234,13 +248,14 @@ GEMSPEC = Gem::Specification.new do |gem|
234
248
  "This library works with PostgreSQL 7.4 and later.",
235
249
  ].join( "\n" )
236
250
 
237
- gem.authors = "Michael Granger"
238
- gem.email = ["ged@FaerieMUD.org"]
251
+ gem.authors = ["Jeff Davis", "Michael Granger"]
252
+ gem.email = ["ruby-pg@j-davis.com", "ged@FaerieMUD.org"]
239
253
  gem.homepage = 'http://bitbucket.org/ged/ruby-pg/'
254
+ gem.licenses = ["Ruby", "GPL", "BSD"]
240
255
 
241
256
  gem.has_rdoc = true
242
257
  gem.rdoc_options = RDOC_OPTIONS
243
- gem.extra_rdoc_files = %w[ChangeLog README LICENSE]
258
+ gem.extra_rdoc_files = TEXT_FILES - [ 'Rakefile' ]
244
259
 
245
260
  gem.bindir = BINDIR.relative_path_from(BASEDIR).to_s
246
261
  gem.executables = BIN_FILES.select {|pn| File.executable?(pn) }.
@@ -254,6 +269,13 @@ GEMSPEC = Gem::Specification.new do |gem|
254
269
  gem.files = RELEASE_FILES
255
270
  gem.test_files = SPEC_FILES
256
271
 
272
+ # signing key and certificate chain
273
+ gem.signing_key = '/Volumes/Keys/ged-private_gem_key.pem'
274
+ gem.cert_chain = [File.expand_path('~/.gem/ged-public_gem_cert.pem')]
275
+
276
+
277
+ gem.required_ruby_version = '>=1.8.7'
278
+
257
279
  DEPENDENCIES.each do |name, version|
258
280
  version = '>= 0' if version.length.zero?
259
281
  gem.add_runtime_dependency( name, version )
@@ -294,7 +316,7 @@ import LOCAL_RAKEFILE if LOCAL_RAKEFILE.exist?
294
316
  #####################################################################
295
317
 
296
318
  ### Default task
297
- task :default => [:clean, :local, :spec, :rdoc, :package]
319
+ task :default => [:clean, :local, :spec, :apidocs, :package]
298
320
 
299
321
  ### Task the local Rakefile can append to -- no-op by default
300
322
  task :local
@@ -1,26 +1,61 @@
1
1
  #!rake
2
2
 
3
- require 'rake/extensiontask'
4
- require 'rake/extensioncompiler'
3
+ require 'uri'
4
+ require 'tempfile'
5
5
  require 'rbconfig'
6
6
 
7
- # C extension constants
7
+ MISCDIR = BASEDIR + 'misc'
8
+
8
9
  EXT_MAKEFILE = EXTDIR + 'Makefile'
9
10
  EXT_SOURCES = FileList[ EXTDIR + '*.c' ]
10
- EXT_SO = EXTDIR + "pg.#{CONFIG['DLEXT']}"
11
-
12
- SITEARCH_DIR = LIBDIR + Config::CONFIG['sitearch']
11
+ EXT_SO = EXTDIR + "pg_ext.#{CONFIG['DLEXT']}"
13
12
 
14
13
  NUM_CPUS = if File.exist?('/proc/cpuinfo')
15
14
  File.read('/proc/cpuinfo').scan('processor').length
15
+ elsif RUBY_PLATFORM.include?( 'darwin' )
16
+ `system_profiler SPHardwareDataType | grep 'Cores' | awk '{print $5}'`.chomp
16
17
  else
17
18
  1
18
19
  end
19
20
 
20
21
  # Cross-compilation constants
21
- COMPILE_HOME = File.expand_path("~/.rake-compiler")
22
- OPENSSL_VERSION = ENV['OPENSSL_VERSION'] || '0.9.8l'
23
- POSTGRESQL_VERSION = ENV['POSTGRESQL_VERSION'] || '8.4.2'
22
+ OPENSSL_VERSION = ENV['OPENSSL_VERSION'] || '1.0.0d'
23
+ POSTGRESQL_VERSION = ENV['POSTGRESQL_VERSION'] || '9.0.3'
24
+
25
+ COMPILE_HOME = Pathname( "~/.rake-compiler" ).expand_path
26
+ STATIC_SOURCESDIR = COMPILE_HOME + 'sources'
27
+ STATIC_BUILDDIR = COMPILE_HOME + 'builds'
28
+
29
+ # Static OpenSSL build vars
30
+ STATIC_OPENSSL_BUILDDIR = STATIC_BUILDDIR + "openssl-#{OPENSSL_VERSION}"
31
+
32
+ OPENSSL_SOURCE_URI =
33
+ URI( "http://www.openssl.org/source/openssl-#{OPENSSL_VERSION}.tar.gz" )
34
+ OPENSSL_TARBALL = STATIC_SOURCESDIR + File.basename( OPENSSL_SOURCE_URI.path )
35
+ OPENSSL_MAKEFILE = STATIC_OPENSSL_BUILDDIR + 'Makefile'
36
+
37
+ LIBSSLEAY32 = STATIC_OPENSSL_BUILDDIR + 'libssleay32.a'
38
+ LIBEAY32 = STATIC_OPENSSL_BUILDDIR + 'libeay32.a'
39
+
40
+ OPENSSL_PATCHES = Rake::FileList[ MISCDIR + "openssl-#{OPENSSL_VERSION}.*.patch" ]
41
+
42
+ # Static PostgreSQL build vars
43
+ STATIC_POSTGRESQL_BUILDDIR = STATIC_BUILDDIR + "postgresql-#{POSTGRESQL_VERSION}"
44
+ POSTGRESQL_SOURCE_URI = begin
45
+ uristring = "http://ftp9.us.postgresql.org/pub/mirrors/postgresql/source/" +
46
+ "v%s/postgresql-%s.tar.gz" % [ POSTGRESQL_VERSION, POSTGRESQL_VERSION ]
47
+ URI( uristring )
48
+ end
49
+ POSTGRESQL_TARBALL = STATIC_SOURCESDIR + File.basename( POSTGRESQL_SOURCE_URI.path )
50
+
51
+ STATIC_POSTGRESQL_SRCDIR = STATIC_POSTGRESQL_BUILDDIR + 'src'
52
+ STATIC_POSTGRESQL_LIBDIR = STATIC_POSTGRESQL_SRCDIR + 'interfaces/libpq'
53
+ STATIC_POSTGRESQL_INCDIR = STATIC_POSTGRESQL_SRCDIR + 'include'
54
+
55
+ POSTGRESQL_GLOBAL_MAKEFILE = STATIC_POSTGRESQL_SRCDIR + 'Makefile.global'
56
+ POSTGRESQL_SHLIB_MAKEFILE = STATIC_POSTGRESQL_SRCDIR + 'Makefile.shlib'
57
+ POSTGRESQL_SHLIB_MF_ORIG = STATIC_POSTGRESQL_SRCDIR + 'Makefile.shlib.orig'
58
+ POSTGRESQL_LIB = STATIC_POSTGRESQL_LIBDIR + 'libpq.a'
24
59
 
25
60
  CROSS_PREFIX = if RUBY_PLATFORM.include?( 'darwin' )
26
61
  'i386-mingw32'
@@ -32,6 +67,13 @@ end
32
67
  SPEC_DATA = Rake::FileList[ SPECDIR + 'data/*' ]
33
68
  GEMSPEC.test_files += SPEC_DATA.to_a
34
69
 
70
+ # Clean up any testing database directories
71
+ TESTING_TMPDIRS = Rake::FileList[ "#{BASEDIR}/tmp_test_*" ]
72
+ CLOBBER.include( STATIC_SOURCESDIR.to_s, *TESTING_TMPDIRS )
73
+
74
+ # clean intermediate files and folders
75
+ CLEAN.include( STATIC_BUILDDIR.to_s )
76
+
35
77
 
36
78
  #####################################################################
37
79
  ### T A S K S
@@ -47,197 +89,224 @@ namespace :spec do
47
89
  task :text => [ :compile ]
48
90
  end
49
91
 
50
- ENV['RUBY_CC_VERSION'] = '1.8.6:1.9.1'
51
-
52
- Rake::ExtensionTask.new do |ext|
53
- ext.name = 'pg_ext'
54
- ext.gem_spec = GEMSPEC
55
- ext.ext_dir = 'ext'
56
- ext.lib_dir = 'lib'
57
- ext.source_pattern = "*.{c,h}"
58
-
59
- # If there's an explicit 'compile' argument, use everything after it as options.
60
- if offset = ARGV.index( 'compile' )
61
- trace "config options = %p" % [ ARGV[(offset + 1)..-1] ]
62
- ext.config_options = ARGV[ (offset + 1)..-1 ]
63
- # Otherwise, just grab everything from the first option onward
64
- elsif offset = ARGV.index( ARGV.find {|arg| arg =~ /^--/ } )
65
- trace "config options = %p" % [ ARGV[offset..-1] ]
66
- ext.config_options = ARGV[ offset..-1 ]
67
- else
68
- trace "No config options (ARGV = %p)" % [ ARGV ]
69
- end
92
+ ENV['RUBY_CC_VERSION'] ||= '1.8.7:1.9.2'
93
+
94
+ begin
95
+ require 'rake/clean'
96
+ require 'rake/extensiontask'
97
+ require 'rake/extensioncompiler'
98
+
99
+ Rake::ExtensionTask.new do |ext|
100
+ ext.name = 'pg_ext'
101
+ ext.gem_spec = GEMSPEC
102
+ ext.ext_dir = EXTDIR.to_s
103
+ ext.lib_dir = LIBDIR.to_s
104
+ ext.source_pattern = "*.{c,h}"
105
+
106
+ # If there's an explicit 'compile' argument, use everything after it as options.
107
+ if offset = ARGV.index( 'compile' )
108
+ trace "config options = %p" % [ ARGV[(offset + 1)..-1] ]
109
+ ext.config_options = ARGV[ (offset + 1)..-1 ]
110
+ # Otherwise, just grab everything from the first option onward
111
+ elsif offset = ARGV.index( ARGV.find {|arg| arg =~ /^--/ } )
112
+ trace "config options = %p" % [ ARGV[offset..-1] ]
113
+ ext.config_options = ARGV[ offset..-1 ]
114
+ else
115
+ trace "No config options (ARGV = %p)" % [ ARGV ]
116
+ end
70
117
 
71
- ext.cross_compile = true # enable cross compilation (requires cross compile toolchain)
72
- ext.cross_platform = %w[i386-mswin32 i386-mingw32] # forces the Windows platform instead of the default one
118
+ ext.cross_compile = true
119
+ ext.cross_platform = %w[i386-mswin32 i386-mingw32]
73
120
 
74
- # configure options only for cross compile
75
- ext.cross_config_options += [
76
- "--with-pg-include=#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}/src/interfaces/libpq",
77
- "--with-opt-include=#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}/src/include",
78
- "--with-pg-lib=#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}/src/interfaces/libpq",
79
- "--with-opt-lib=#{COMPILE_HOME}/builds/openssl-#{OPENSSL_VERSION}",
80
- "--enable-static-build",
81
- ]
121
+ # configure options only for cross compile
122
+ ext.cross_config_options += [
123
+ "--with-pg-include=#{STATIC_POSTGRESQL_LIBDIR}",
124
+ "--with-opt-include=#{STATIC_POSTGRESQL_INCDIR}",
125
+ "--with-pg-lib=#{STATIC_POSTGRESQL_LIBDIR}",
126
+ "--with-opt-lib=#{STATIC_OPENSSL_BUILDDIR}",
127
+ "--enable-static-build",
128
+ ]
82
129
 
83
- end
130
+ end
84
131
 
85
132
 
86
- desc "Stop any Postmaster instances that remain after testing."
87
- task :cleanup_testing_dbs do
88
- require 'spec/lib/helpers'
89
- PgTestingHelpers.stop_existing_postmasters()
90
- Rake::Task[:clean].invoke
91
- end
92
133
 
134
+ #####################################################################
135
+ ### C R O S S - C O M P I L A T I O N - T A S K S
136
+ #####################################################################
93
137
 
94
- #####################################################################
95
- ### C R O S S - C O M P I L A T I O N - T A S K S
96
- #####################################################################
97
138
 
139
+ directory STATIC_SOURCESDIR.to_s
98
140
 
99
- # define a location where sources will be stored
100
- directory "#{COMPILE_HOME}/sources"
101
- directory "#{COMPILE_HOME}/builds/openssl-#{OPENSSL_VERSION}"
141
+ #
142
+ # Static OpenSSL build tasks
143
+ #
144
+ directory STATIC_OPENSSL_BUILDDIR.to_s
102
145
 
103
- # clean intermediate files and folders
104
- CLEAN.include("#{COMPILE_HOME}/builds/openssl-#{OPENSSL_VERSION}")
105
-
106
- # openssl source file should be stored there
107
- file "#{COMPILE_HOME}/sources/openssl-#{OPENSSL_VERSION}.tar.gz" => ["#{COMPILE_HOME}/sources"] do |t|
108
- # download the source file using wget or curl
109
- chdir File.dirname(t.name) do
110
- #http://www.openssl.org/source/openssl-0.9.8k.tar.gz
111
- url = "http://www.openssl.org/source/#{File.basename(t.name)}"
112
- sh "wget #{url} || curl -O #{url}"
146
+ # openssl source file should be stored there
147
+ file OPENSSL_TARBALL => STATIC_SOURCESDIR do |t|
148
+ download( OPENSSL_SOURCE_URI, t.name )
113
149
  end
114
- end
115
150
 
116
- # Extract the openssl builds
117
- file "#{COMPILE_HOME}/builds/openssl-#{OPENSSL_VERSION}" => ["#{COMPILE_HOME}/sources/openssl-#{OPENSSL_VERSION}.tar.gz"] do |t|
118
- chdir File.dirname(t.name) do
119
- t.prerequisites.each { |f| sh "tar xfz ../sources/#{File.basename(f)}" }
151
+ # Extract the openssl builds
152
+ file STATIC_OPENSSL_BUILDDIR => OPENSSL_TARBALL do |t|
153
+ trace "extracting %s to %s" % [ OPENSSL_TARBALL, STATIC_OPENSSL_BUILDDIR.parent ]
154
+ STATIC_OPENSSL_BUILDDIR.mkpath
155
+ run 'tar', '-xzf', OPENSSL_TARBALL.to_s, '-C', STATIC_OPENSSL_BUILDDIR.parent.to_s
156
+ OPENSSL_MAKEFILE.unlink if OPENSSL_MAKEFILE.exist?
157
+
158
+ OPENSSL_PATCHES.each do |patchfile|
159
+ trace " applying patch #{patchfile}..."
160
+ run 'patch', '-Np1', '-d', STATIC_OPENSSL_BUILDDIR.to_s,
161
+ '-i', File.expand_path( patchfile, BASEDIR )
162
+ end
120
163
  end
121
- end
122
164
 
123
- # generate the makefile in a clean build location
124
- file "#{COMPILE_HOME}/builds/openssl-#{OPENSSL_VERSION}/Makefile" =>
125
- ["#{COMPILE_HOME}/builds/openssl-#{OPENSSL_VERSION}"] do |t|
165
+ CMD_PRELUDE = [
166
+ 'env',
167
+ "CC=#{CROSS_PREFIX}-gcc",
168
+ "CFLAGS=-DDSO_WIN32",
169
+ "AR=#{CROSS_PREFIX}-ar",
170
+ "RANLIB=#{CROSS_PREFIX}-ranlib"
171
+ ]
126
172
 
127
- chdir File.dirname(t.name) do
128
- sh File.expand_path("Configure"), 'mingw'
173
+
174
+ # generate the makefile in a clean build location
175
+ file OPENSSL_MAKEFILE => STATIC_OPENSSL_BUILDDIR do |t|
176
+ Dir.chdir( STATIC_OPENSSL_BUILDDIR ) do
177
+ cmd = CMD_PRELUDE.dup
178
+ cmd << "./Configure" << 'mingw'
179
+
180
+ run( *cmd )
181
+ end
129
182
  end
130
- end
131
183
 
132
- # make
133
- file "#{COMPILE_HOME}/builds/openssl-#{OPENSSL_VERSION}/libssleay32.a" => ["#{COMPILE_HOME}/builds/openssl-#{OPENSSL_VERSION}/Makefile"] do |t|
134
- chdir File.dirname(t.prerequisites.first) do
135
- sh <<-EOT
136
- export cross=#{CROSS_PREFIX}- &&
137
- make -j#{NUM_CPUS} CC="${cross}gcc -DDSO_WIN32" AR="${cross}ar r" RANLIB="${cross}ranlib" build_libs &&
138
- cp libcrypto.a libeay32.a &&
139
- cp libssl.a libssleay32.a
140
- EOT
184
+ desc "compile static openssl libraries"
185
+ task :openssl_libs => [ LIBSSLEAY32, LIBEAY32 ]
186
+
187
+ task :compile_static_openssl => OPENSSL_MAKEFILE do |t|
188
+ Dir.chdir( STATIC_OPENSSL_BUILDDIR ) do
189
+ cmd = CMD_PRELUDE.dup
190
+ cmd << 'make' << "-j#{NUM_CPUS}" << 'build_libs'
191
+
192
+ run( *cmd )
193
+ end
141
194
  end
142
- end
143
195
 
144
- #desc 'compile static libssl.a'
145
- task 'openssl-make' => ["#{COMPILE_HOME}/builds/openssl-#{OPENSSL_VERSION}/libssleay32.a"]
196
+ desc "compile static #{LIBEAY32}"
197
+ file LIBEAY32 => :compile_static_openssl do |t|
198
+ FileUtils.cp( STATIC_OPENSSL_BUILDDIR + 'libcrypto.a', LIBEAY32.to_s )
199
+ end
146
200
 
201
+ desc "compile static #{LIBSSLEAY32}"
202
+ file LIBSSLEAY32 => :compile_static_openssl do |t|
203
+ FileUtils.cp( STATIC_OPENSSL_BUILDDIR + 'libssl.a', LIBSSLEAY32.to_s )
204
+ end
147
205
 
148
- # define a location where sources will be stored
149
- directory "#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}"
150
206
 
151
- # clean intermediate files and folders
152
- CLEAN.include("#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}")
153
207
 
208
+ #
209
+ # Static PostgreSQL build tasks
210
+ #
211
+ directory STATIC_POSTGRESQL_BUILDDIR.to_s
154
212
 
155
- # postgresql source file should be stored there
156
- file "#{COMPILE_HOME}/sources/postgresql-#{POSTGRESQL_VERSION}.tar.bz2" => ["#{COMPILE_HOME}/sources"] do |t|
157
- # download the source file using wget or curl
158
- chdir File.dirname(t.name) do
159
- #http://wwwmaster.postgresql.org/redir/53/h/source/v8.4.0/postgresql-8.4.0.tar.bz2
160
- url = "http://wwwmaster.postgresql.org/redir/53/h/source/v#{POSTGRESQL_VERSION}/#{File.basename(t.name)}"
161
- sh "wget #{url} || curl -O #{url}"
162
- end
163
- end
164
213
 
165
- # Extract the postgresql sources
166
- file "#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}" => ["#{COMPILE_HOME}/sources/postgresql-#{POSTGRESQL_VERSION}.tar.bz2"] do |t|
167
- chdir File.dirname(t.name) do
168
- t.prerequisites.each { |f| sh "tar xfj ../sources/#{File.basename(f)}" }
214
+ # postgresql source file should be stored there
215
+ file POSTGRESQL_TARBALL => STATIC_SOURCESDIR do |t|
216
+ download( POSTGRESQL_SOURCE_URI, t.name )
169
217
  end
170
- end
171
218
 
172
- # generate the makefile in a clean build location
173
- file "#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}/src/Makefile.global" =>
174
- ["#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}",
175
- "#{COMPILE_HOME}/builds/openssl-#{OPENSSL_VERSION}/libssleay32.a"] do |t|
176
-
177
- options = [
178
- '--target=i386-mingw32',
179
- "--host=#{Rake::ExtensionCompiler.mingw_host}",
180
- '--with-openssl',
181
- '--without-zlib',
182
- '--disable-shared',
183
- ]
219
+ # Extract the postgresql sources
220
+ file STATIC_POSTGRESQL_BUILDDIR => POSTGRESQL_TARBALL do |t|
221
+ trace "extracting %s to %s" % [ POSTGRESQL_TARBALL, STATIC_POSTGRESQL_BUILDDIR.parent ]
222
+ STATIC_POSTGRESQL_BUILDDIR.mkpath
223
+ run 'tar', '-xzf', POSTGRESQL_TARBALL.to_s, '-C', STATIC_POSTGRESQL_BUILDDIR.parent.to_s
224
+ mv POSTGRESQL_SHLIB_MAKEFILE, POSTGRESQL_SHLIB_MF_ORIG
225
+ end
184
226
 
185
- chdir "#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}" do
186
- configure_path = File.expand_path("#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}/configure")
187
- sh <<-EOT
188
- export CFLAGS=-L#{COMPILE_HOME}/builds/openssl-#{OPENSSL_VERSION} &&
189
- export LDFLAGS=-L#{COMPILE_HOME}/builds/openssl-#{OPENSSL_VERSION} &&
190
- export LDFLAGS_SL=-L#{COMPILE_HOME}/builds/openssl-#{OPENSSL_VERSION} &&
191
- export "LIBS=-lwsock32 -lgdi32" &&
192
- export CPPFLAGS=-I#{COMPILE_HOME}/builds/openssl-#{OPENSSL_VERSION}/include &&
193
- #{configure_path} #{options.join(" ")}
194
- EOT
227
+ # generate the makefile in a clean build location
228
+ file POSTGRESQL_GLOBAL_MAKEFILE => [ STATIC_POSTGRESQL_BUILDDIR, :openssl_libs ] do |t|
229
+ options = [
230
+ '--target=i386-mingw32',
231
+ "--host=#{Rake::ExtensionCompiler.mingw_host}",
232
+ '--with-openssl',
233
+ '--without-zlib',
234
+ '--disable-shared',
235
+ ]
236
+
237
+ Dir.chdir( STATIC_POSTGRESQL_BUILDDIR ) do
238
+ configure_path = STATIC_POSTGRESQL_BUILDDIR + 'configure'
239
+ cmd = [ configure_path.to_s, *options ]
240
+ cmd << "CFLAGS=-L#{STATIC_OPENSSL_BUILDDIR}"
241
+ cmd << "LDFLAGS=-L#{STATIC_OPENSSL_BUILDDIR}"
242
+ cmd << "LDFLAGS_SL=-L#{STATIC_OPENSSL_BUILDDIR}"
243
+ cmd << "LIBS=-lwsock32 -lws2_32 -lgdi32"
244
+ cmd << "CPPFLAGS=-I#{STATIC_OPENSSL_BUILDDIR}/include"
245
+
246
+ run( *cmd )
247
+ end
195
248
  end
196
- end
197
249
 
198
- # backup Makefile.shlib
199
- file "#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}/src/Makefile.shlib.bak" => ["#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}/src/Makefile.global"] do |t|
200
- cp "#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}/src/Makefile.shlib", t.name
201
- end
202
250
 
203
- # patch the Makefile.shlib
204
- file "#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}/src/Makefile.shlib" => ["#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}/src/Makefile.shlib.bak"] do |t|
205
- content = File.open(t.name, 'rb') { |f| f.read }
251
+ # patch the Makefile.shlib -- depend on the build dir so it's only
252
+ # rewritten if the tarball is re-extracted.
253
+ file POSTGRESQL_SHLIB_MAKEFILE => POSTGRESQL_SHLIB_MF_ORIG do |t|
254
+ tf = Tempfile.new( POSTGRESQL_SHLIB_MAKEFILE.basename )
255
+ POSTGRESQL_SHLIB_MF_ORIG.open( File::RDONLY ) do |ifh|
256
+ ifh.each_line do |line|
257
+ tf.print( line.sub(/^(\s*haslibarule\s*=\s*yes)/, "# \\1 ") )
258
+ end
259
+ end
260
+ tf.close
206
261
 
207
- out = ""
262
+ FileUtils.mv( tf.path, t.name, :verbose => $trace )
263
+ end
208
264
 
209
- content.each_line do |line|
210
- if line =~ /^(\s*haslibarule\s*=\s*yes)/
211
- out << "##{$1}\n"
212
- else
213
- out << line
265
+
266
+ # make libpq.a
267
+ task POSTGRESQL_LIB => [ POSTGRESQL_GLOBAL_MAKEFILE, POSTGRESQL_SHLIB_MAKEFILE ] do |t|
268
+ Dir.chdir( POSTGRESQL_LIB.dirname ) do
269
+ sh 'make', "-j#{NUM_CPUS}", POSTGRESQL_LIB.basename.to_s, 'PORTNAME=win32'
214
270
  end
215
271
  end
216
272
 
217
- when_writing("Patching Makefile.shlib") {
218
- File.open(t.name, 'wb') { |f| f.write(out) }
219
- }
220
- end
221
273
 
274
+ #desc 'compile static libpg.a'
275
+ task :static_libpq => POSTGRESQL_LIB
222
276
 
223
- # make libpq.a
224
- file "#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}/src/interfaces/libpq/libpq.a" => ["#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}/src/Makefile.global", "#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}/src/Makefile.shlib"] do |t|
225
- chdir File.dirname(t.name) do
226
- sh "make -j#{NUM_CPUS} libpq.a PORTNAME=win32"
277
+ desc 'cross compile pg for win32'
278
+ task :cross do
279
+ ENV['CROSS_COMPILING'] = 'yes'
280
+ end
281
+ task :cross => [ :mingw32, :static_libpq ]
282
+
283
+ task :mingw32 do
284
+ # Use Rake::ExtensionCompiler helpers to find the proper host
285
+ unless Rake::ExtensionCompiler.mingw_host then
286
+ warn "You need to install mingw32 cross compile functionality to be able to continue."
287
+ warn "Please refer to your distribution/package manager documentation about installation."
288
+ fail
289
+ end
227
290
  end
228
- end
229
-
230
- #desc 'compile static libpg.a'
231
- task 'postgresql-make' => ['openssl-make', "#{COMPILE_HOME}/builds/postgresql-#{POSTGRESQL_VERSION}/src/interfaces/libpq/libpq.a"]
232
-
233
- desc 'cross compile pg for win32'
234
- task 'cross' => [:mingw32, 'postgresql-make']
235
291
 
236
- task :mingw32 do
237
- # Use Rake::ExtensionCompiler helpers to find the proper host
238
- unless Rake::ExtensionCompiler.mingw_host then
239
- warn "You need to install mingw32 cross compile functionality to be able to continue."
240
- warn "Please refer to your distribution/package manager documentation about installation."
292
+ rescue LoadError => err
293
+ task :no_rake_compiler do
294
+ log "You'll need to install rake-compiler to compile this."
241
295
  fail
242
296
  end
297
+
298
+ task :compile => :no_rake_compiler
299
+ task :cross => :no_rake_compiler
300
+ task :mingw32 => :no_rake_compiler
301
+ task :static_libpq => :no_rake_compiler
302
+ end
303
+
304
+
305
+ desc "Stop any Postmaster instances that remain after testing."
306
+ task :cleanup_testing_dbs do
307
+ require 'spec/lib/helpers'
308
+ PgTestingHelpers.stop_existing_postmasters()
309
+ Rake::Task[:clean].invoke
243
310
  end
311
+
312
+