tiny_tds 2.0.0-x86-mingw32 → 2.1.0.pre1-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
  SHA1:
3
- metadata.gz: 63f4a4b55ed3ada2526b8951976880c43bc94cc9
4
- data.tar.gz: f3e018c6e78eba48160faeb84afbfd7d9648f787
3
+ metadata.gz: b42e2b9247cd45037bedcd58a07c39d8b28520ef
4
+ data.tar.gz: 0456ac8aff8a082f89d3ee35d661fb1814d0a51b
5
5
  SHA512:
6
- metadata.gz: ee45c234bea04a263aa8fc7373926c1d321f757f8a9cbd625645dd70482784e1ca5243b12897aa2d7871030d473d62706abe3e4da86c139169e4664052c94619
7
- data.tar.gz: b9399b0262462fbb23cbce92f1a8a1624fbf1c3226afd299472bad37021be3349e1125c9b79fe9b3f9da73a64a8becc6561a00627fab45c0c6a8b6877a6b7815
6
+ metadata.gz: 797a236d57a8dc64902b5e939c33206dd86dc2b229b1ecadfadec719c22ea613eea8d38e68bea518c490bc10809a54d680b3a12720ff98b882ed3f6143b25d32
7
+ data.tar.gz: ad42a39989054f20edf2f35645d9020b40411a99f4de412a0886e40e5c20a7e54811081403b9ca8f1240931cd967595eda2fa24ad833219a38a9c3ee517ea10e
data/CHANGELOG CHANGED
@@ -1,9 +1,20 @@
1
- * 1.3.0
1
+ * 2.1.0 *
2
+
3
+ * Support RubyInstaller2 for Windows. Fixes #365.
4
+ * Support the FREETDS_DIR environment variable. Fixes #371.
5
+
6
+
7
+ * 2.0.0 *
8
+
9
+ * Stop building FreeTDS as a part of the extension build.
10
+
11
+
12
+ * 1.3.0 *
2
13
 
3
14
  * FreeTDS: Link libgcc statically for Windows. (#351) Fixes #349.
4
15
 
5
16
 
6
- * 1.2.0
17
+ * 1.2.0 *
7
18
 
8
19
  * Use OpenSSL v1.1.0e & FreeTDS v1.00.27 for Windows builds.
9
20
 
data/Gemfile CHANGED
@@ -2,7 +2,6 @@ source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
4
  group :development do
5
- gem 'rake-compiler-dock', github: 'rake-compiler/rake-compiler-dock'
6
5
  end
7
6
 
8
7
  group :test do
data/Rakefile CHANGED
@@ -29,6 +29,9 @@ Rake::ExtensionTask.new('tiny_tds', SPEC) do |ext|
29
29
 
30
30
  # Add dependent DLLs to the cross gems
31
31
  ext.cross_compiling do |spec|
32
+ # The fat binary gem doesn't depend on the freetds package, since it bundles the library.
33
+ spec.metadata.delete('msys2_mingw_dependencies')
34
+
32
35
  platform_host_map = GEM_PLATFORM_HOSTS
33
36
  gemplat = spec.platform.to_s
34
37
  host = platform_host_map[gemplat]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.1.0.pre1
data/appveyor.yml CHANGED
@@ -3,6 +3,7 @@ init:
3
3
  - SET PATH=C:\MinGW\msys\1.0\bin;%PATH%
4
4
  - SET RAKEOPT=-rdevkit
5
5
  - SET TESTOPTS='-v'
6
+ - SET MAKE=make V=1
6
7
  clone_depth: 5
7
8
  skip_tags: true
8
9
  skip_branch_with_pr: true
@@ -42,8 +43,8 @@ environment:
42
43
  TINYTDS_UNIT_AZURE_PASS:
43
44
  secure: fYKSKV4v+36OFQp2nZdX4DfUpgmy5cm0wuR73cgdmEk=
44
45
  matrix:
45
- - ruby_version: "23-x64"
46
- - ruby_version: "23"
46
+ - ruby_version: "24-x64"
47
+ - ruby_version: "24"
47
48
  - ruby_version: "22-x64"
48
49
  - ruby_version: "22"
49
50
  on_failure:
@@ -23,15 +23,25 @@ do_help if arg_config('--help')
23
23
  # Make sure to check the ports path for the configured host
24
24
  host = RbConfig::CONFIG['host']
25
25
  project_dir = File.join(['..']*4)
26
- freetds_dir = File.join(project_dir, 'ports', host, 'freetds', FREETDS_VERSION)
27
- freetds_dir = File.expand_path(freetds_dir)
26
+ freetds_ports_dir = File.join(project_dir, 'ports', host, 'freetds', FREETDS_VERSION)
27
+ freetds_ports_dir = File.expand_path(freetds_ports_dir)
28
28
 
29
29
  # Add all the special path searching from the original tiny_tds build
30
30
  # order is important here! First in, last searched.
31
- %w(
31
+ DIRS = %w(
32
32
  /usr/local
33
33
  /opt/local
34
- ).each do |path|
34
+ )
35
+
36
+ # Grab freetds environment variable for use by people on services like
37
+ # Heroku who they can't easily use bundler config to set directories
38
+ DIRS.push(ENV['FREETDS_DIR']) if ENV.has_key?('FREETDS_DIR')
39
+
40
+ # Add the ports directory if it exists for local developer builds
41
+ DIRS.push(freetds_ports_dir) if File.directory?(freetds_ports_dir)
42
+
43
+ # Add the search paths for freetds configured above
44
+ DIRS.each do |path|
35
45
  idir = "#{path}/include"
36
46
  ldir = "#{path}/lib"
37
47
 
@@ -41,12 +51,6 @@ freetds_dir = File.expand_path(freetds_dir)
41
51
  )
42
52
  end
43
53
 
44
- # Add the ports directory if it exists for local developer builds
45
- if File.directory?(freetds_dir)
46
- puts "Using freetds port path #{freetds_dir}"
47
- dir_config('freetds', "#{freetds_dir}/include", "#{freetds_dir}/lib")
48
- end
49
-
50
54
  have_dependencies = [
51
55
  find_header('sybfront.h'),
52
56
  find_header('sybdb.h'),
@@ -1,5 +1,5 @@
1
1
 
2
- ICONV_VERSION = ENV['TINYTDS_ICONV_VERSION'] || "1.14"
2
+ ICONV_VERSION = ENV['TINYTDS_ICONV_VERSION'] || "1.15"
3
3
  ICONV_SOURCE_URI = "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-#{ICONV_VERSION}.tar.gz"
4
4
 
5
5
  OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.1.0e'
data/lib/tiny_tds.rb CHANGED
@@ -12,20 +12,39 @@ require 'tiny_tds/gem'
12
12
  # Support multiple ruby versions, fat binaries under Windows.
13
13
  if RUBY_PLATFORM =~ /mingw|mswin/ && RUBY_VERSION =~ /(\d+.\d+)/
14
14
  ver = Regexp.last_match(1)
15
- # Set the PATH environment variable, so that the DLLs can be found.
16
- old_path = ENV['PATH']
17
- begin
18
- ENV['PATH'] = [
19
- TinyTds::Gem.ports_bin_paths,
20
- TinyTds::Gem.ports_lib_paths,
21
- old_path
22
- ].flatten.join File::PATH_SEPARATOR
23
15
 
24
- require "tiny_tds/#{ver}/tiny_tds"
25
- rescue LoadError
26
- require 'tiny_tds/tiny_tds'
27
- ensure
28
- ENV['PATH'] = old_path
16
+ add_dll_path = proc do |path, &block|
17
+ begin
18
+ require 'ruby_installer/runtime'
19
+ RubyInstaller::Runtime.add_dll_directory(path, &block)
20
+ rescue LoadError
21
+ old_path = ENV['PATH']
22
+ ENV['PATH'] = "#{path};#{old_path}"
23
+ begin
24
+ block.call
25
+ ensure
26
+ ENV['PATH'] = old_path
27
+ end
28
+ end
29
+ end
30
+
31
+ add_dll_paths = proc do |paths, &block|
32
+ if path=paths.shift
33
+ add_dll_path.call(path) do
34
+ add_dll_paths.call(paths, &block)
35
+ end
36
+ else
37
+ block.call
38
+ end
39
+ end
40
+
41
+ # Temporary add bin directories for DLL search, so that freetds DLLs can be found.
42
+ add_dll_paths.call( TinyTds::Gem.ports_bin_paths ) do
43
+ begin
44
+ require "tiny_tds/#{ver}/tiny_tds"
45
+ rescue LoadError
46
+ require 'tiny_tds/tiny_tds'
47
+ end
29
48
  end
30
49
  else
31
50
  # Load dependent shared libraries into the process, so that they are already present,
@@ -0,0 +1,28 @@
1
+ From 56e8972f66c3e948e2ad6885595c58fd23dcdb37 Mon Sep 17 00:00:00 2001
2
+ From: Lars Kanis <kanis@comcard.de>
3
+ Date: Thu, 6 Jul 2017 17:09:40 +0200
4
+ Subject: [PATCH] Don't use MSYS2 file libws2_32.a for MINGW build
5
+
6
+ This file is intended for MSYS2/cygwin builds and blocks OpenSSL
7
+ detection of freetds on i686.
8
+ ---
9
+ configure | 2 --
10
+ configure.ac | 2 --
11
+ 2 files changed, 4 deletions(-)
12
+
13
+ diff --git a/configure b/configure
14
+ index 9495a49..31eb01d 100644
15
+ --- a/configure
16
+ +++ b/configure
17
+ @@ -15915,8 +15915,6 @@ case $host in
18
+ tds_mingw=yes
19
+ if test "$host_cpu" = "x86_64"; then
20
+ LIBS="-lws2_32"
21
+ - elif test -r /usr/lib/w32api/libws2_32.a; then
22
+ - LIBS="-L/usr/lib/w32api -lws2_32"
23
+ else
24
+ LIBS="-lws2_32"
25
+ fi
26
+ --
27
+ 2.6.2.windows.1
28
+
data/tasks/ports.rake CHANGED
@@ -43,6 +43,9 @@ namespace :ports do
43
43
  # freetds doesn't have an option that will provide an rpath
44
44
  # so we do it manually
45
45
  ENV['OPENSSL_CFLAGS'] = "-Wl,-rpath -Wl,#{openssl.path}/lib"
46
+ # Add the pkgconfig file with MSYS2'ish path, to prefer our ports build
47
+ # over MSYS2 system OpenSSL.
48
+ ENV['PKG_CONFIG_PATH'] = "#{openssl.path.gsub(/^(\w):/i){"/"+$1.downcase}}/lib/pkgconfig:#{ENV['PKG_CONFIG_PATH']}"
46
49
  freetds.configure_options << "--with-openssl=#{openssl.path}"
47
50
  end
48
51
 
@@ -23,7 +23,7 @@ module Ports
23
23
  end
24
24
 
25
25
  if windows?
26
- opts << '--sysconfdir=C:\Sites'
26
+ opts << '--sysconfdir=C:/Sites'
27
27
  opts << '--enable-sspi'
28
28
  end
29
29
 
@@ -28,8 +28,11 @@ module Ports
28
28
  private
29
29
 
30
30
  def execute(action, command, options={})
31
+ # OpenSSL Requires Perl >= 5.10, while the Ruby devkit uses MSYS1 with Perl 5.8.8.
32
+ # To overcome this, prepend Git's usr/bin to the PATH.
33
+ # It has MSYS2 with a recent version of perl.
31
34
  prev_path = ENV['PATH']
32
- if host =~ /mingw/
35
+ if host =~ /mingw/ && IO.popen(["perl", "-e", "print($])"], &:read).to_f < 5.010
33
36
  git_perl = 'C:/Program Files/Git/usr/bin'
34
37
  if File.directory?(git_perl)
35
38
  ENV['PATH'] = "#{git_perl}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
data/tiny_tds.gemspec CHANGED
@@ -19,9 +19,10 @@ Gem::Specification.new do |s|
19
19
  s.extensions = ['ext/tiny_tds/extconf.rb']
20
20
  s.license = 'MIT'
21
21
  s.required_ruby_version = '>= 2.0.0'
22
- s.add_runtime_dependency 'mini_portile2', '~> 2.0'
22
+ s.metadata['msys2_mingw_dependencies'] = 'freetds'
23
+ s.add_development_dependency 'mini_portile2', '~> 2.0'
23
24
  s.add_development_dependency 'rake', '~> 10.4'
24
- s.add_development_dependency 'rake-compiler', '0.9.5'
25
+ s.add_development_dependency 'rake-compiler', '~> 1.0'
25
26
  s.add_development_dependency 'rake-compiler-dock', '~> 0.6.0'
26
27
  s.add_development_dependency 'minitest', '~> 5.6'
27
28
  s.add_development_dependency 'connection_pool', '~> 2.2'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_tds
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0.pre1
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Ken Collins
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-07-07 00:00:00.000000000 Z
13
+ date: 2017-07-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mini_portile2
@@ -19,7 +19,7 @@ dependencies:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
21
  version: '2.0'
22
- type: :runtime
22
+ type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
@@ -44,16 +44,16 @@ dependencies:
44
44
  name: rake-compiler
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - '='
47
+ - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: 0.9.5
49
+ version: '1.0'
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - '='
54
+ - - "~>"
55
55
  - !ruby/object:Gem::Version
56
- version: 0.9.5
56
+ version: '1.0'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: rake-compiler-dock
59
59
  requirement: !ruby/object:Gem::Requirement
@@ -147,6 +147,7 @@ files:
147
147
  - lib/tiny_tds/result.rb
148
148
  - lib/tiny_tds/version.rb
149
149
  - patches/freetds/1.00.27/0001-mingw_missing_inet_pton.diff
150
+ - patches/freetds/1.00.27/0002-Don-t-use-MSYS2-file-libws2_32.diff
150
151
  - patches/libiconv/1.14/1-avoid-gets-error.patch
151
152
  - ports/i686-w64-mingw32/freetds/1.00.27/bin/bsqldb.exe
152
153
  - ports/i686-w64-mingw32/freetds/1.00.27/bin/datacopy.exe
@@ -161,14 +162,14 @@ files:
161
162
  - ports/i686-w64-mingw32/freetds/1.00.27/lib/libct.la
162
163
  - ports/i686-w64-mingw32/freetds/1.00.27/lib/libsybdb.dll.a
163
164
  - ports/i686-w64-mingw32/freetds/1.00.27/lib/libsybdb.la
164
- - ports/i686-w64-mingw32/libiconv/1.14/bin/iconv.exe
165
- - ports/i686-w64-mingw32/libiconv/1.14/bin/libcharset-1.dll
166
- - ports/i686-w64-mingw32/libiconv/1.14/bin/libiconv-2.dll
167
- - ports/i686-w64-mingw32/libiconv/1.14/lib/charset.alias
168
- - ports/i686-w64-mingw32/libiconv/1.14/lib/libcharset.dll.a
169
- - ports/i686-w64-mingw32/libiconv/1.14/lib/libcharset.la
170
- - ports/i686-w64-mingw32/libiconv/1.14/lib/libiconv.dll.a
171
- - ports/i686-w64-mingw32/libiconv/1.14/lib/libiconv.la
165
+ - ports/i686-w64-mingw32/libiconv/1.15/bin/iconv.exe
166
+ - ports/i686-w64-mingw32/libiconv/1.15/bin/libcharset-1.dll
167
+ - ports/i686-w64-mingw32/libiconv/1.15/bin/libiconv-2.dll
168
+ - ports/i686-w64-mingw32/libiconv/1.15/lib/charset.alias
169
+ - ports/i686-w64-mingw32/libiconv/1.15/lib/libcharset.dll.a
170
+ - ports/i686-w64-mingw32/libiconv/1.15/lib/libcharset.la
171
+ - ports/i686-w64-mingw32/libiconv/1.15/lib/libiconv.dll.a
172
+ - ports/i686-w64-mingw32/libiconv/1.15/lib/libiconv.la
172
173
  - ports/i686-w64-mingw32/openssl/1.1.0e/bin/c_rehash
173
174
  - ports/i686-w64-mingw32/openssl/1.1.0e/bin/libcrypto-1_1.dll
174
175
  - ports/i686-w64-mingw32/openssl/1.1.0e/bin/libssl-1_1.dll
@@ -221,12 +222,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
221
222
  requirements:
222
223
  - - ">="
223
224
  - !ruby/object:Gem::Version
224
- version: 2.0.0
225
+ version: '2.0'
226
+ - - "<"
227
+ - !ruby/object:Gem::Version
228
+ version: '2.5'
225
229
  required_rubygems_version: !ruby/object:Gem::Requirement
226
230
  requirements:
227
- - - ">="
231
+ - - ">"
228
232
  - !ruby/object:Gem::Version
229
- version: '0'
233
+ version: 1.3.1
230
234
  requirements: []
231
235
  rubyforge_project:
232
236
  rubygems_version: 2.6.12