proj4rb 2.2.0 → 2.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc96e86f24cffe40c1a80db776c80e5e83fd76a6194b3267c9e6e2c4b5641326
4
- data.tar.gz: bd9043ce0c2c1c0640b783ff802d4bd23adc6419bd59bb038a03abd8b9466438
3
+ metadata.gz: e159814e14a3d1aabbf8f092eb5dd8a507e1f4bd61d016a6e409f75db89ca961
4
+ data.tar.gz: 2ee9e34d84e7a148770beb24d2dff0666c4be80722e602849ae277b084e39e0a
5
5
  SHA512:
6
- metadata.gz: e47e9dbb00d9cfe529aaab596dae15aff43a09a04d6550641a71674a626fd4e79ad177ee18dd402e8d0f1ebae1cd1e05fa61459534e2f601164b9ad1edbc545c
7
- data.tar.gz: 752a5933c869f26be5fd84e085fe6c12b602dd969b7a363929cf47757abb23f0c65b607dd273f891046c1d8a986cffddda518a738b20f1a7a792b3427594d55a
6
+ metadata.gz: 27545786f9a350a0256a9191a2d15fc49843acffc2093b88d58f861bcbc15c2f95ab018e7625fdcf3f80fb8f077c02c24f82ccf7ee40232d976a4bad82593fc9
7
+ data.tar.gz: 3f56592e59d06ff1a9e74a240e6502504c2899451d06603ae129775e254d669535e6a4b270c20737a348161dc253fbb1c503f4c8aa34a9434aba798367a7b1f8
data/ChangeLog CHANGED
@@ -1,10 +1,15 @@
1
- 2.1.0 (January 7, 2020)
1
+ 2.2.1 (January 8, 2020)
2
+ =========================
3
+ * Move proj_as_projjson from version 6.0 to 6.2 api (Charlie Savage)
4
+ * Improve search path generation code (Charlie Savage)
5
+
6
+ 2.2.0 (January 7, 2020)
2
7
  =========================
3
8
  * Fix broken gem - was not including all api files (Jan Klimke)
4
9
  * Add paths on MacOS when using Brew (Jan Klimke)
5
10
  * Various code cleanups (Charlie Savage)
6
11
 
7
- 2.0.1 (January 5, 2020)
12
+ 2.1.0 (January 5, 2020)
8
13
  =========================
9
14
  * Set Ruby 2.4.1 to be the minimum allowed version (Samuel Williams)
10
15
  * Fix incorrect use of context, reduce warnings when running tests (Samuel Williams)
data/lib/api/api.rb CHANGED
@@ -3,18 +3,38 @@ require 'ffi'
3
3
  module Proj
4
4
  module Api
5
5
  extend FFI::Library
6
- ffi_lib ['libproj-15', # Mingw64 Proj 6
7
- 'libproj.so.15', # Linux (Postgresql repository )Proj 6
8
- 'libproj.so.13', # Linux (Fedora 31) Proj 5
9
- 'libproj.so.12', # Linux (Ubuntu 18.04 ) Proj 4
10
- 'libproj-12', # Mingw64 Proj 4
11
- '/opt/local/lib/proj6/lib/libproj.15.dylib', # Macports Proj 6
12
- '/opt/local/lib/proj5/lib/libproj.13.dylib', # Macports Proj 5
13
- '/opt/local/lib/proj49/lib/libproj.12.dylib', # Macports Proj 5
14
- '/usr/local/lib/libproj.15.dylib', # mac homebrew mac Proj 6
15
- '/usr/local/lib/libproj.13.dylib', # mac howbrew Proj 5
16
- '/usr/local/lib/libproj.12.dylib' # mac howbrew Proj 5
17
- ]
6
+
7
+ proj_library_versions = {'proj6' => 15,
8
+ 'proj5' => 13,
9
+ 'proj49' => 12}
10
+
11
+ file_patterns = ["libproj-%d", # Mingw64
12
+ "libproj.so.%d", # Linux
13
+ "/opt/local/lib/%s/lib/libproj.%d.dylib", # Macports
14
+ "/usr/local/lib/libproj.%d.dylib"] # Mac HomeBrew
15
+
16
+ search_paths = file_patterns.map do |file_pattern|
17
+ proj_library_versions.map do |proj_version, proj_library_version|
18
+ formats = file_pattern.count("%") == 1 ? [proj_library_version] : [proj_version, proj_library_version]
19
+ file_pattern % formats
20
+ end
21
+ end.flatten
22
+
23
+ # Generates this array
24
+ # [0] = "libproj-15"
25
+ # [1] = "libproj-13"
26
+ # [2] = "libproj-12"
27
+ # [3] = "libproj.so.15"
28
+ # [4] = "libproj.so.13"
29
+ # [5] = "libproj.so.12"
30
+ # [6] = "/opt/local/lib/proj6/lib/libproj.15.dylib"
31
+ # [7] = "/opt/local/lib/proj5/lib/libproj.13.dylib"
32
+ # [8] = "/opt/local/lib/proj49/lib/libproj.12.dylib"
33
+ # [9] = "/usr/local/lib/libproj.15.dylib"
34
+ # [10] = "/usr/local/lib/libproj.13.dylib"
35
+ # [11] = "/usr/local/lib/libproj.12.dylib"
36
+
37
+ ffi_lib search_paths
18
38
 
19
39
  # Load the old deprecated api - supported by all Proj versions (until Proj 7!)
20
40
  require_relative './api_4_9'
data/lib/api/api_6_0.rb CHANGED
@@ -20,7 +20,6 @@ module Proj
20
20
  # Export to various formats
21
21
  attach_function :proj_as_wkt, [:PJ_CONTEXT, :PJ, :PJ_WKT_TYPE, :pointer], :string
22
22
  attach_function :proj_as_proj_string, [:PJ_CONTEXT, :PJ, :PJ_PROJ_STRING_TYPE, :pointer], :string
23
- attach_function :proj_as_projjson, [:PJ_CONTEXT, :PJ, :pointer], :string
24
23
 
25
24
  # Projection database functions
26
25
  attach_function :proj_context_set_autoclose_database, [:PJ_CONTEXT, :int], :void
data/lib/api/api_6_2.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  module Proj
2
2
  module Api
3
+ attach_function :proj_as_projjson, [:PJ_CONTEXT, :PJ, :pointer], :string
3
4
  attach_function :proj_create_crs_to_crs_from_pj, [:PJ_CONTEXT, :PJ, :PJ, :PJ_AREA, :string], :PJ
4
5
  end
5
6
  end
data/proj4rb.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'proj4rb'
3
- spec.version = '2.2.0'
3
+ spec.version = '2.2.1'
4
4
  spec.summary = 'Ruby bindings for the Proj.4 Carthographic Projection library'
5
5
  spec.description = <<-EOF
6
6
  Proj4rb is a ruby binding for the Proj.4 Carthographic Projection library, that supports conversions between a very large number of geographic coordinate systems and datumspec.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proj4rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guilhem Vellut
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-01-07 00:00:00.000000000 Z
13
+ date: 2020-01-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ffi
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  version: '0'
152
152
  requirements:
153
153
  - Proj (Proj4) Library
154
- rubygems_version: 3.0.6
154
+ rubygems_version: 3.1.2
155
155
  signing_key:
156
156
  specification_version: 4
157
157
  summary: Ruby bindings for the Proj.4 Carthographic Projection library