ibm_db 3.0.1-x86-mingw32 → 3.0.2-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES +4 -0
- data/README +1 -1
- data/ext/ibm_db.c +1 -1
- data/lib/active_record/connection_adapters/ibm_db_adapter.rb +3169 -3170
- metadata +33 -35
- data/ext/OLD/extconf.rb +0 -264
- data/ext/OLD/extconf_MacOS.rb +0 -269
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ibm_db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- IBM
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 4.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: archive-zip
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.7.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.7.0
|
41
41
|
description:
|
@@ -48,30 +48,28 @@ extra_rdoc_files:
|
|
48
48
|
- MANIFEST
|
49
49
|
files:
|
50
50
|
- CHANGES
|
51
|
-
- LICENSE
|
52
|
-
- MANIFEST
|
53
|
-
- ParameterizedQueries README
|
54
|
-
- README
|
55
|
-
- ext/Makefile.nt32
|
56
|
-
- ext/Makefile.nt32.191
|
57
|
-
- ext/OLD/extconf.rb
|
58
|
-
- ext/OLD/extconf_MacOS.rb
|
59
51
|
- ext/extconf.rb
|
60
52
|
- ext/ibm_db.c
|
53
|
+
- ext/Makefile.nt32
|
54
|
+
- ext/Makefile.nt32.191
|
61
55
|
- ext/ruby_ibm_db.h
|
62
56
|
- ext/ruby_ibm_db_cli.c
|
63
57
|
- ext/ruby_ibm_db_cli.h
|
64
58
|
- init.rb
|
65
|
-
- lib/
|
59
|
+
- lib/active_record/connection_adapters/ibmdb_adapter.rb
|
66
60
|
- lib/active_record/connection_adapters/ibm_db_adapter.rb
|
67
61
|
- lib/active_record/connection_adapters/ibm_db_pstmt.rb
|
68
|
-
- lib/active_record/connection_adapters/ibmdb_adapter.rb
|
69
62
|
- lib/active_record/vendor/db2-i5-zOS.yaml
|
63
|
+
- lib/IBM_DB.rb
|
70
64
|
- lib/mswin32/ibm_db.rb
|
71
65
|
- lib/mswin32/rb19x/ibm_db.so
|
72
66
|
- lib/mswin32/rb21x/i386/ibm_db.so
|
73
67
|
- lib/mswin32/rb22x/i386/ibm_db.so
|
74
68
|
- lib/mswin32/rb2x/i386/ibm_db.so
|
69
|
+
- LICENSE
|
70
|
+
- MANIFEST
|
71
|
+
- ParameterizedQueries README
|
72
|
+
- README
|
75
73
|
- test/active_record/connection_adapters/fake_adapter.rb
|
76
74
|
- test/assets/example.log
|
77
75
|
- test/assets/flowers.jpg
|
@@ -100,13 +98,13 @@ files:
|
|
100
98
|
- test/cases/associations/nested_through_associations_test.rb
|
101
99
|
- test/cases/associations/required_test.rb
|
102
100
|
- test/cases/associations_test.rb
|
101
|
+
- test/cases/attributes_test.rb
|
103
102
|
- test/cases/attribute_decorators_test.rb
|
104
103
|
- test/cases/attribute_methods/read_test.rb
|
105
104
|
- test/cases/attribute_methods/serialization_test.rb
|
106
105
|
- test/cases/attribute_methods_test.rb
|
107
106
|
- test/cases/attribute_set_test.rb
|
108
107
|
- test/cases/attribute_test.rb
|
109
|
-
- test/cases/attributes_test.rb
|
110
108
|
- test/cases/autosave_association_test.rb
|
111
109
|
- test/cases/base_test.rb
|
112
110
|
- test/cases/batches_test.rb
|
@@ -143,8 +141,8 @@ files:
|
|
143
141
|
- test/cases/explain_test.rb
|
144
142
|
- test/cases/finder_respond_to_test.rb
|
145
143
|
- test/cases/finder_test.rb
|
146
|
-
- test/cases/fixture_set/file_test.rb
|
147
144
|
- test/cases/fixtures_test.rb
|
145
|
+
- test/cases/fixture_set/file_test.rb
|
148
146
|
- test/cases/forbidden_attributes_protection_test.rb
|
149
147
|
- test/cases/habtm_destroy_order_test.rb
|
150
148
|
- test/cases/helper.rb
|
@@ -161,9 +159,9 @@ files:
|
|
161
159
|
- test/cases/migration/change_schema_test - Copy.rb
|
162
160
|
- test/cases/migration/change_schema_test.rb
|
163
161
|
- test/cases/migration/change_table_test.rb
|
162
|
+
- test/cases/migration/columns_test.rb
|
164
163
|
- test/cases/migration/column_attributes_test.rb
|
165
164
|
- test/cases/migration/column_positioning_test.rb
|
166
|
-
- test/cases/migration/columns_test.rb
|
167
165
|
- test/cases/migration/command_recorder_test.rb
|
168
166
|
- test/cases/migration/create_join_table_test.rb
|
169
167
|
- test/cases/migration/foreign_key_test - Changed.rb
|
@@ -200,8 +198,8 @@ files:
|
|
200
198
|
- test/cases/relation/where_chain_test.rb
|
201
199
|
- test/cases/relation/where_test.rb
|
202
200
|
- test/cases/relation/where_test2.rb
|
203
|
-
- test/cases/relation_test.rb
|
204
201
|
- test/cases/relations_test.rb
|
202
|
+
- test/cases/relation_test.rb
|
205
203
|
- test/cases/reload_models_test.rb
|
206
204
|
- test/cases/result_test.rb
|
207
205
|
- test/cases/sanitize_test.rb
|
@@ -219,9 +217,9 @@ files:
|
|
219
217
|
- test/cases/tasks/sqlite_rake_test.rb
|
220
218
|
- test/cases/test_case.rb
|
221
219
|
- test/cases/timestamp_test.rb
|
220
|
+
- test/cases/transactions_test.rb
|
222
221
|
- test/cases/transaction_callbacks_test.rb
|
223
222
|
- test/cases/transaction_isolation_test.rb
|
224
|
-
- test/cases/transactions_test.rb
|
225
223
|
- test/cases/type/decimal_test.rb
|
226
224
|
- test/cases/type/integer_test.rb
|
227
225
|
- test/cases/type/string_test.rb
|
@@ -252,16 +250,16 @@ files:
|
|
252
250
|
- test/fixtures/all/developers.yml
|
253
251
|
- test/fixtures/all/people.yml
|
254
252
|
- test/fixtures/all/tasks.yml
|
253
|
+
- test/fixtures/authors.yml
|
255
254
|
- test/fixtures/author_addresses.yml
|
256
255
|
- test/fixtures/author_favorites.yml
|
257
|
-
- test/fixtures/authors.yml
|
258
256
|
- test/fixtures/binaries.yml
|
259
257
|
- test/fixtures/books.yml
|
260
258
|
- test/fixtures/bulbs.yml
|
261
259
|
- test/fixtures/cars.yml
|
262
|
-
- test/fixtures/categories.yml
|
263
260
|
- test/fixtures/categories/special_categories.yml
|
264
261
|
- test/fixtures/categories/subsubdir/arbitrary_filename.yml
|
262
|
+
- test/fixtures/categories.yml
|
265
263
|
- test/fixtures/categories_ordered.yml
|
266
264
|
- test/fixtures/categories_posts.yml
|
267
265
|
- test/fixtures/categorizations.yml
|
@@ -276,8 +274,8 @@ files:
|
|
276
274
|
- test/fixtures/dashboards.yml
|
277
275
|
- test/fixtures/developers.yml
|
278
276
|
- test/fixtures/developers_projects.yml
|
279
|
-
- test/fixtures/dog_lovers.yml
|
280
277
|
- test/fixtures/dogs.yml
|
278
|
+
- test/fixtures/dog_lovers.yml
|
281
279
|
- test/fixtures/doubloons.yml
|
282
280
|
- test/fixtures/edges.yml
|
283
281
|
- test/fixtures/entrants.yml
|
@@ -292,10 +290,10 @@ files:
|
|
292
290
|
- test/fixtures/jobs.yml
|
293
291
|
- test/fixtures/legacy_things.yml
|
294
292
|
- test/fixtures/mateys.yml
|
295
|
-
- test/fixtures/member_details.yml
|
296
|
-
- test/fixtures/member_types.yml
|
297
293
|
- test/fixtures/members.yml
|
298
294
|
- test/fixtures/memberships.yml
|
295
|
+
- test/fixtures/member_details.yml
|
296
|
+
- test/fixtures/member_types.yml
|
299
297
|
- test/fixtures/men.yml
|
300
298
|
- test/fixtures/minimalistics.yml
|
301
299
|
- test/fixtures/minivans.yml
|
@@ -338,10 +336,10 @@ files:
|
|
338
336
|
- test/fixtures/tags.yml
|
339
337
|
- test/fixtures/tasks.yml
|
340
338
|
- test/fixtures/teapots.yml
|
341
|
-
- test/fixtures/to_be_linked/accounts.yml
|
342
|
-
- test/fixtures/to_be_linked/users.yml
|
343
339
|
- test/fixtures/topics.yml
|
344
340
|
- test/fixtures/toys.yml
|
341
|
+
- test/fixtures/to_be_linked/accounts.yml
|
342
|
+
- test/fixtures/to_be_linked/users.yml
|
345
343
|
- test/fixtures/traffic_lights.yml
|
346
344
|
- test/fixtures/treasures.yml
|
347
345
|
- test/fixtures/uuid_children.yml
|
@@ -380,15 +378,15 @@ files:
|
|
380
378
|
- test/migrations/valid_with_timestamps/20100201010101_valid_with_timestamps_we_need_reminders.rb
|
381
379
|
- test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb
|
382
380
|
- test/migrations/version_check/20131219224947_migration_version_check.rb
|
383
|
-
- test/models/admin.rb
|
384
381
|
- test/models/admin/account.rb
|
385
382
|
- test/models/admin/randomly_named_c1.rb
|
386
383
|
- test/models/admin/user.rb
|
384
|
+
- test/models/admin.rb
|
387
385
|
- test/models/aircraft.rb
|
388
386
|
- test/models/arunit2_model.rb
|
389
387
|
- test/models/author.rb
|
390
|
-
- test/models/auto_id.rb
|
391
388
|
- test/models/autoloadable/extra_firm.rb
|
389
|
+
- test/models/auto_id.rb
|
392
390
|
- test/models/binary.rb
|
393
391
|
- test/models/bird.rb
|
394
392
|
- test/models/book.rb
|
@@ -448,9 +446,9 @@ files:
|
|
448
446
|
- test/models/man.rb
|
449
447
|
- test/models/matey.rb
|
450
448
|
- test/models/member.rb
|
449
|
+
- test/models/membership.rb
|
451
450
|
- test/models/member_detail.rb
|
452
451
|
- test/models/member_type.rb
|
453
|
-
- test/models/membership.rb
|
454
452
|
- test/models/minimalistic.rb
|
455
453
|
- test/models/minivan.rb
|
456
454
|
- test/models/mixed_case_monkey.rb
|
@@ -469,9 +467,9 @@ files:
|
|
469
467
|
- test/models/price_estimate.rb
|
470
468
|
- test/models/professor.rb
|
471
469
|
- test/models/project.rb
|
472
|
-
- test/models/publisher.rb
|
473
470
|
- test/models/publisher/article.rb
|
474
471
|
- test/models/publisher/magazine.rb
|
472
|
+
- test/models/publisher.rb
|
475
473
|
- test/models/randomly_named_c1.rb
|
476
474
|
- test/models/rating.rb
|
477
475
|
- test/models/reader.rb
|
@@ -536,18 +534,18 @@ require_paths:
|
|
536
534
|
- lib
|
537
535
|
required_ruby_version: !ruby/object:Gem::Requirement
|
538
536
|
requirements:
|
539
|
-
- -
|
537
|
+
- - '>='
|
540
538
|
- !ruby/object:Gem::Version
|
541
539
|
version: 2.0.0
|
542
540
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
543
541
|
requirements:
|
544
|
-
- -
|
542
|
+
- - '>='
|
545
543
|
- !ruby/object:Gem::Version
|
546
544
|
version: '0'
|
547
545
|
requirements:
|
548
546
|
- ActiveRecord, at least 4.2.0
|
549
547
|
rubyforge_project: rubyibm
|
550
|
-
rubygems_version: 2.
|
548
|
+
rubygems_version: 2.0.14.1
|
551
549
|
signing_key:
|
552
550
|
specification_version: 4
|
553
551
|
summary: 'Rails Driver and Adapter for IBM Data Servers: {DB2 on Linux/Unix/Windows,
|
data/ext/OLD/extconf.rb
DELETED
@@ -1,264 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require 'net/http'
|
3
|
-
require 'open-uri'
|
4
|
-
require 'rubygems/package'
|
5
|
-
require 'zlib'
|
6
|
-
require 'fileutils'
|
7
|
-
|
8
|
-
|
9
|
-
# +----------------------------------------------------------------------+
|
10
|
-
# | Licensed Materials - Property of IBM |
|
11
|
-
# | |
|
12
|
-
# | (C) Copyright IBM Corporation 2006 - 2015 |
|
13
|
-
# +----------------------------------------------------------------------+
|
14
|
-
|
15
|
-
TAR_LONGLINK = '././@LongLink'
|
16
|
-
|
17
|
-
WIN = RUBY_PLATFORM =~ /mswin/ || RUBY_PLATFORM =~ /mingw/
|
18
|
-
|
19
|
-
# use ENV['IBM_DB_HOME'] or latest db2 you can find
|
20
|
-
IBM_DB_HOME = ENV['IBM_DB_HOME']
|
21
|
-
|
22
|
-
machine_bits = ['ibm'].pack('p').size * 8
|
23
|
-
|
24
|
-
is64Bit = true
|
25
|
-
|
26
|
-
if machine_bits == 64
|
27
|
-
is64Bit = true
|
28
|
-
puts "Detected 64-bit Ruby\n "
|
29
|
-
else
|
30
|
-
is64Bit = false
|
31
|
-
puts "Detected 32-bit Ruby\n "
|
32
|
-
end
|
33
|
-
|
34
|
-
module Kernel
|
35
|
-
def suppress_warnings
|
36
|
-
origVerbosity = $VERBOSE
|
37
|
-
$VERBOSE = nil
|
38
|
-
result = yield
|
39
|
-
$VERBOSE = origVerbosity
|
40
|
-
return result
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
DOWNLOADLINK = ''
|
45
|
-
|
46
|
-
if(RUBY_PLATFORM =~ /aix/i)
|
47
|
-
#AIX
|
48
|
-
if(is64Bit)
|
49
|
-
puts "Detected platform - aix 64"
|
50
|
-
DOWNLOADLINK = "http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/aix64_odbc_cli.tar.gz"
|
51
|
-
else
|
52
|
-
puts "Detected platform - aix 32"
|
53
|
-
DOWNLOADLINK = "http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/aix32_odbc_cli.tar.gz"
|
54
|
-
end
|
55
|
-
elsif (RUBY_PLATFORM =~ /powerpc/ || RUBY_PLATFORM =~ /ppc/)
|
56
|
-
#PPC
|
57
|
-
if(is64Bit)
|
58
|
-
puts "Detected platform - ppc linux 64"
|
59
|
-
DOWNLOADLINK = "http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/ppc64_odbc_cli.tar.gz"
|
60
|
-
else
|
61
|
-
puts "Detected platform - ppc linux 64"
|
62
|
-
DOWNLOADLINK = "http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/ppc32_odbc_cli.tar.gz"
|
63
|
-
end
|
64
|
-
elsif (RUBY_PLATFORM =~ /linux/)
|
65
|
-
#x86
|
66
|
-
if(is64Bit)
|
67
|
-
puts "Detected platform - linux x86 64"
|
68
|
-
DOWNLOADLINK = "http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/linuxx64_odbc_cli.tar.gz"
|
69
|
-
else
|
70
|
-
puts "Detected platform - linux 32"
|
71
|
-
DOWNLOADLINK = "http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/linuxia32_odbc_cli.tar.gz"
|
72
|
-
end
|
73
|
-
elsif (RUBY_PLATFORM =~ /sparc/i)
|
74
|
-
#Solaris
|
75
|
-
if(is64Bit)
|
76
|
-
puts "Detected platform - sun sparc64"
|
77
|
-
DOWNLOADLINK = "http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/sun64_odbc_cli.tar.gz"
|
78
|
-
else
|
79
|
-
puts "Detected platform - sun sparc32"
|
80
|
-
DOWNLOADLINK = "http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/sun32_odbc_cli.tar.gz"
|
81
|
-
end
|
82
|
-
elsif (RUBY_PLATFORM =~ /solaris/i)
|
83
|
-
if(is64Bit)
|
84
|
-
puts "Detected platform - sun amd64"
|
85
|
-
DOWNLOADLINK = "http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/sunamd64_odbc_cli.tar.gz"
|
86
|
-
else
|
87
|
-
puts "Detected platform - sun amd32"
|
88
|
-
DOWNLOADLINK = "http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/sunamd32_odbc_cli.tar.gz"
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
def downloadCLIPackage(destination, link = nil)
|
93
|
-
if(link.nil?)
|
94
|
-
downloadLink = DOWNLOADLINK
|
95
|
-
else
|
96
|
-
downloadLink = link
|
97
|
-
end
|
98
|
-
|
99
|
-
uri = URI.parse(downloadLink)
|
100
|
-
filename = "#{destination}/clidriver.tar.gz"
|
101
|
-
|
102
|
-
headers = {
|
103
|
-
'Accept-Encoding' => 'identity',
|
104
|
-
}
|
105
|
-
|
106
|
-
request = Net::HTTP::Get.new(uri.request_uri, headers)
|
107
|
-
http = Net::HTTP.new(uri.host, uri.port)
|
108
|
-
response = http.request(request)
|
109
|
-
|
110
|
-
f = open(filename, 'wb')
|
111
|
-
f.write(response.body)
|
112
|
-
f.close()
|
113
|
-
|
114
|
-
filename
|
115
|
-
end
|
116
|
-
|
117
|
-
def untarCLIPackage(archive,destination)
|
118
|
-
Gem::Package::TarReader.new( Zlib::GzipReader.open(archive) ) do |tar|
|
119
|
-
tar.each do |entry|
|
120
|
-
file = nil
|
121
|
-
if entry.full_name == $TAR_LONGLINK
|
122
|
-
file = File.join destination, entry.read.strip
|
123
|
-
next
|
124
|
-
end
|
125
|
-
file ||= File.join destination, entry.full_name
|
126
|
-
if entry.directory?
|
127
|
-
File.delete file if File.file? file
|
128
|
-
FileUtils.mkdir_p file, :mode => entry.header.mode, :verbose => false
|
129
|
-
elsif entry.file?
|
130
|
-
FileUtils.rm_rf file if File.directory? file
|
131
|
-
File.open file, "wb" do |f|
|
132
|
-
f.print entry.read
|
133
|
-
end
|
134
|
-
FileUtils.chmod entry.header.mode, file, :verbose => false
|
135
|
-
elsif entry.header.typeflag == '2' #Symlink!
|
136
|
-
File.symlink entry.header.linkname, file
|
137
|
-
end
|
138
|
-
end
|
139
|
-
end
|
140
|
-
end
|
141
|
-
|
142
|
-
if(IBM_DB_HOME == nil || IBM_DB_HOME == '')
|
143
|
-
IBM_DB_INCLUDE = ENV['IBM_DB_INCLUDE']
|
144
|
-
IBM_DB_LIB = ENV['IBM_DB_LIB']
|
145
|
-
|
146
|
-
if( ( (IBM_DB_INCLUDE.nil?) || (IBM_DB_LIB.nil?) ) ||
|
147
|
-
( IBM_DB_INCLUDE == '' || IBM_DB_LIB == '' )
|
148
|
-
)
|
149
|
-
if(!DOWNLOADLINK.nil? && !DOWNLOADLINK.empty?)
|
150
|
-
puts "Environment variable IBM_DB_HOME is not set. Downloading and setting up the DB2 client driver\n"
|
151
|
-
destination = "#{File.expand_path(File.dirname(File.dirname(__FILE__)))}/../lib"
|
152
|
-
|
153
|
-
archive = downloadCLIPackage(destination)
|
154
|
-
untarCLIPackage(archive,destination)
|
155
|
-
|
156
|
-
IBM_DB_HOME="#{destination}/clidriver"
|
157
|
-
|
158
|
-
IBM_DB_INCLUDE = "#{IBM_DB_HOME}/include"
|
159
|
-
IBM_DB_LIB="#{IBM_DB_HOME}/lib"
|
160
|
-
else
|
161
|
-
puts "Environment variable IBM_DB_HOME is not set. Set it to your DB2/IBM_Data_Server_Driver installation directory and retry gem install.\n "
|
162
|
-
exit 1
|
163
|
-
end
|
164
|
-
end
|
165
|
-
else
|
166
|
-
IBM_DB_INCLUDE = "#{IBM_DB_HOME}/include"
|
167
|
-
|
168
|
-
if(is64Bit)
|
169
|
-
IBM_DB_LIB="#{IBM_DB_HOME}/lib64"
|
170
|
-
else
|
171
|
-
IBM_DB_LIB="#{IBM_DB_HOME}/lib32"
|
172
|
-
end
|
173
|
-
end
|
174
|
-
|
175
|
-
if( !(File.directory?(IBM_DB_LIB)) )
|
176
|
-
suppress_warnings{IBM_DB_LIB = "#{IBM_DB_HOME}/lib"}
|
177
|
-
if( !(File.directory?(IBM_DB_LIB)) )
|
178
|
-
puts "Cannot find #{IBM_DB_LIB} directory. Check if you have set the IBM_DB_HOME environment variable's value correctly\n "
|
179
|
-
exit 1
|
180
|
-
end
|
181
|
-
notifyString = "Detected usage of IBM Data Server Driver package. Ensure you have downloaded "
|
182
|
-
|
183
|
-
if(is64Bit)
|
184
|
-
notifyString = notifyString + "64-bit package "
|
185
|
-
else
|
186
|
-
notifyString = notifyString + "32-bit package "
|
187
|
-
end
|
188
|
-
notifyString = notifyString + "of IBM_Data_Server_Driver and retry the 'gem install ibm_db' command\n "
|
189
|
-
|
190
|
-
puts notifyString
|
191
|
-
end
|
192
|
-
|
193
|
-
if( !(File.directory?(IBM_DB_INCLUDE)) )
|
194
|
-
puts " #{IBM_DB_HOME}/include folder not found. Check if you have set the IBM_DB_HOME environment variable's value correctly\n "
|
195
|
-
exit 1
|
196
|
-
end
|
197
|
-
|
198
|
-
require 'mkmf'
|
199
|
-
|
200
|
-
dir_config('IBM_DB',IBM_DB_INCLUDE,IBM_DB_LIB)
|
201
|
-
|
202
|
-
def crash(str)
|
203
|
-
printf(" extconf failure: %s\n", str)
|
204
|
-
exit 1
|
205
|
-
end
|
206
|
-
|
207
|
-
if( RUBY_VERSION =~ /1.9/ || RUBY_VERSION =~ /2./)
|
208
|
-
create_header('gil_release_version')
|
209
|
-
create_header('unicode_support_version')
|
210
|
-
end
|
211
|
-
|
212
|
-
unless (have_library(WIN ? 'db2cli' : 'db2','SQLConnect') or find_library(WIN ? 'db2cli' : 'db2','SQLConnect', IBM_DB_LIB))
|
213
|
-
crash(<<EOL)
|
214
|
-
Unable to locate libdb2.so/a under #{IBM_DB_LIB}
|
215
|
-
|
216
|
-
Follow the steps below and retry
|
217
|
-
|
218
|
-
Step 1: - Install IBM DB2 Universal Database Server/Client
|
219
|
-
|
220
|
-
step 2: - Set the environment variable IBM_DB_HOME as below
|
221
|
-
|
222
|
-
(assuming bash shell)
|
223
|
-
|
224
|
-
export IBM_DB_HOME=<DB2/IBM_Data_Server_Driver installation directory> #(Eg: export IBM_DB_HOME=/opt/ibm/db2/v10)
|
225
|
-
|
226
|
-
step 3: - Retry gem install
|
227
|
-
|
228
|
-
EOL
|
229
|
-
end
|
230
|
-
|
231
|
-
if(RUBY_VERSION =~ /2./)
|
232
|
-
require 'rbconfig'
|
233
|
-
end
|
234
|
-
|
235
|
-
alias :libpathflag0 :libpathflag
|
236
|
-
def libpathflag(libpath)
|
237
|
-
if(RUBY_VERSION =~ /2./)
|
238
|
-
ldflags = case RbConfig::CONFIG["arch"]
|
239
|
-
when /solaris2/
|
240
|
-
libpath[0..-2].map {|path| " -R#{path}"}.join
|
241
|
-
when /linux/
|
242
|
-
libpath[0..-2].map {|path| " -R#{path} "}.join
|
243
|
-
else
|
244
|
-
""
|
245
|
-
end
|
246
|
-
else
|
247
|
-
ldflags = case Config::CONFIG["arch"]
|
248
|
-
when /solaris2/
|
249
|
-
libpath[0..-2].map {|path| " -R#{path}"}.join
|
250
|
-
when /linux/
|
251
|
-
libpath[0..-2].map {|path| " -R#{path} "}.join
|
252
|
-
else
|
253
|
-
""
|
254
|
-
end
|
255
|
-
end
|
256
|
-
|
257
|
-
#libpathflag0 + " '-Wl,-R$$ORIGIN/clidriver/lib #{ldflags}' "
|
258
|
-
libpathflag0 + " '-Wl,-R$$ORIGIN/clidriver/lib' "
|
259
|
-
end
|
260
|
-
|
261
|
-
have_header('gil_release_version')
|
262
|
-
have_header('unicode_support_version')
|
263
|
-
|
264
|
-
create_makefile('ibm_db')
|