proj4rb 0.4.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 99cd1a356cd839962a71f2c48333e7441cbec03d
4
+ data.tar.gz: 65f2ba67386c2daea17fe2e22d5f8b50de1bb697
5
+ SHA512:
6
+ metadata.gz: 334bc98a7beb383a5fe66435a258c72985859f8bbd0ac4cff59e106b6bcfc383b447d50c346f1a000adccee1460747b5513904a9e785c3f08dee23fe3d0b21cb
7
+ data.tar.gz: f4e8df9f338f337bfb784bfb7388e22213ed29fe4d01e5d73478146032b1a36c5e5f8158bd1889f653b4964b351e1afef9f9267f663099f6385127db4949d0cd
@@ -152,9 +152,6 @@ copied to the ruby/site-lib directory.
152
152
  ==License
153
153
  Proj4rb is released under the MIT license.
154
154
 
155
- ==Support
156
- Any questions, enhancement proposals, bug notifications or corrections can be
157
- sent to mailto:jochen@topf.org.
158
155
 
159
156
  ==Authors
160
157
  The proj4rb Ruby bindings were started by Guilhem Vellut with most of the code
data/Rakefile CHANGED
@@ -12,42 +12,12 @@ GEM_NAME = "proj4rb"
12
12
  SO_NAME = "proj4_ruby"
13
13
  spec = Gem::Specification.load("#{GEM_NAME}.gemspec")
14
14
 
15
- # Setup compile tasks
16
- Rake::ExtensionTask.new do |ext|
17
- ext.gem_spec = spec
18
- ext.name = SO_NAME
19
- ext.ext_dir = "ext"
20
- ext.lib_dir = "lib/#{RUBY_VERSION.sub(/\.\d$/, '')}"
21
- ext.config_options << "--with-proj-dir=C:/MinGW/local"
22
- end
23
-
24
15
  # Setup generic gem
25
16
  Gem::PackageTask.new(spec) do |pkg|
26
17
  pkg.package_dir = 'pkg'
27
18
  pkg.need_tar = false
28
19
  end
29
20
 
30
- # Setup Windows Gem
31
- if RUBY_PLATFORM.match(/win32|mingw32/)
32
- binaries = (FileList['lib/**/*.so',
33
- 'lib/**/*dll'])
34
-
35
- # Windows specification
36
- win_spec = spec.clone
37
- win_spec.instance_variable_set(:@cache_file, nil)
38
- win_spec.platform = Gem::Platform::CURRENT
39
- win_spec.files += binaries.to_a
40
-
41
- # Unset extensions
42
- win_spec.extensions = nil
43
-
44
- # Rake task to build the windows package
45
- Gem::PackageTask.new(win_spec) do |pkg|
46
- pkg.package_dir = 'pkg'
47
- pkg.need_tar = false
48
- end
49
- end
50
-
51
21
  # RDoc Task
52
22
  desc "Generate rdoc documentation"
53
23
  RDoc::Task.new("rdoc") do |rdoc|
@@ -0,0 +1,238 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ # V=0 quiet, V=1 verbose. other values don't work.
5
+ V = 0
6
+ Q1 = $(V:1=)
7
+ Q = $(Q1:0=@)
8
+ ECHO1 = $(V:1=@:)
9
+ ECHO = $(ECHO1:0=@echo)
10
+
11
+ #### Start of system configuration section. ####
12
+
13
+ srcdir = .
14
+ topdir = /c/mingw64/mingw64/local/ruby/include/ruby-2.1.0
15
+ hdrdir = $(topdir)
16
+ arch_hdrdir = c:/mingw64/mingw64/local/ruby/include/ruby-2.1.0/x64-mingw32
17
+ PATH_SEPARATOR = :
18
+ VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
19
+ prefix = $(DESTDIR)/c/mingw64/mingw64/local/ruby
20
+ rubysitearchprefix = $(rubylibprefix)/$(sitearch)
21
+ rubyarchprefix = $(rubylibprefix)/$(arch)
22
+ rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
23
+ exec_prefix = $(prefix)
24
+ vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
25
+ sitearchhdrdir = $(sitehdrdir)/$(sitearch)
26
+ rubyarchhdrdir = $(rubyhdrdir)/$(arch)
27
+ vendorhdrdir = $(rubyhdrdir)/vendor_ruby
28
+ sitehdrdir = $(rubyhdrdir)/site_ruby
29
+ rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
30
+ vendorarchdir = $(vendorlibdir)/$(sitearch)
31
+ vendorlibdir = $(vendordir)/$(ruby_version)
32
+ vendordir = $(rubylibprefix)/vendor_ruby
33
+ sitearchdir = $(sitelibdir)/$(sitearch)
34
+ sitelibdir = $(sitedir)/$(ruby_version)
35
+ sitedir = $(rubylibprefix)/site_ruby
36
+ rubyarchdir = $(rubylibdir)/$(arch)
37
+ rubylibdir = $(rubylibprefix)/$(ruby_version)
38
+ sitearchincludedir = $(includedir)/$(sitearch)
39
+ archincludedir = $(includedir)/$(arch)
40
+ sitearchlibdir = $(libdir)/$(sitearch)
41
+ archlibdir = $(libdir)/$(arch)
42
+ ridir = $(datarootdir)/$(RI_BASE_NAME)
43
+ mandir = $(datarootdir)/man
44
+ localedir = $(datarootdir)/locale
45
+ libdir = $(exec_prefix)/lib
46
+ psdir = $(docdir)
47
+ pdfdir = $(docdir)
48
+ dvidir = $(docdir)
49
+ htmldir = $(docdir)
50
+ infodir = $(datarootdir)/info
51
+ docdir = $(datarootdir)/doc/$(PACKAGE)
52
+ oldincludedir = $(DESTDIR)/usr/include
53
+ includedir = $(prefix)/include
54
+ localstatedir = $(prefix)/var
55
+ sharedstatedir = $(prefix)/com
56
+ sysconfdir = $(prefix)/etc
57
+ datadir = $(datarootdir)
58
+ datarootdir = $(prefix)/share
59
+ libexecdir = $(exec_prefix)/libexec
60
+ sbindir = $(exec_prefix)/sbin
61
+ bindir = $(exec_prefix)/bin
62
+ archdir = $(rubyarchdir)
63
+
64
+
65
+ CC = x86_64-w64-mingw32-gcc
66
+ CXX = x86_64-w64-mingw32-g++
67
+ LIBRUBY = lib$(RUBY_SO_NAME).dll.a
68
+ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
69
+ LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
70
+ LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
71
+ empty =
72
+ OUTFLAG = -o $(empty)
73
+ COUTFLAG = -o $(empty)
74
+
75
+ RUBY_EXTCONF_H =
76
+ cflags = $(optflags) $(debugflags) $(warnflags)
77
+ optflags = -O3 -fno-omit-frame-pointer -fno-fast-math
78
+ debugflags = -ggdb3
79
+ warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
80
+ CCDLFLAGS =
81
+ CFLAGS = $(CCDLFLAGS) $(cflags) $(ARCH_FLAG)
82
+ INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
83
+ DEFS = -D_FILE_OFFSET_BITS=64
84
+ CPPFLAGS = -DHAVE_PROJ_API_H -Ic:/mingw64/mingw64/local/include -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT $(DEFS) $(cppflags)
85
+ CXXFLAGS = $(CCDLFLAGS) $(cxxflags) $(ARCH_FLAG)
86
+ ldflags = -L. -Lc:/mingw64/mingw64/local/lib
87
+ dldflags = -Wl,--enable-auto-image-base,--enable-auto-import $(DEFFILE)
88
+ ARCH_FLAG =
89
+ DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
90
+ LDSHARED = $(CC) -shared $(if $(filter-out -g -g0,$(debugflags)),,-s)
91
+ LDSHAREDXX = $(CXX) -shared $(if $(filter-out -g -g0,$(debugflags)),,-s)
92
+ AR = ar
93
+ EXEEXT = .exe
94
+
95
+ RUBY_INSTALL_NAME = ruby
96
+ RUBY_SO_NAME = x64-msvcrt-ruby210
97
+ RUBYW_INSTALL_NAME = $(RUBYW_BASE_NAME)
98
+ RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
99
+ RUBYW_BASE_NAME = rubyw
100
+ RUBY_BASE_NAME = ruby
101
+
102
+ arch = x64-mingw32
103
+ sitearch = x64-msvcrt
104
+ ruby_version = 2.1.0
105
+ ruby = $(bindir)/ruby
106
+ RUBY = $(ruby)
107
+ ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
108
+
109
+ RM = rm -f
110
+ RM_RF = $(RUBY) -run -e rm -- -rf
111
+ RMDIRS = rmdir --ignore-fail-on-non-empty -p
112
+ MAKEDIRS = /bin/mkdir -p
113
+ INSTALL = /bin/install -c
114
+ INSTALL_PROG = $(INSTALL) -m 0755
115
+ INSTALL_DATA = $(INSTALL) -m 644
116
+ COPY = cp
117
+ TOUCH = exit >
118
+
119
+ #### End of system configuration section. ####
120
+
121
+ preload =
122
+
123
+ libpath = . $(libdir)
124
+ LIBPATH = -L. -L$(libdir)
125
+ DEFFILE = $(TARGET)-$(arch).def
126
+
127
+ CLEANFILES = mkmf.log $(DEFFILE)
128
+ DISTCLEANFILES =
129
+ DISTCLEANDIRS =
130
+
131
+ extout =
132
+ extout_prefix =
133
+ target_prefix =
134
+ LOCAL_LIBS =
135
+ LIBS = $(LIBRUBYARG_SHARED) -lproj -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi
136
+ ORIG_SRCS = projrb.c
137
+ SRCS = $(ORIG_SRCS)
138
+ OBJS = projrb.o
139
+ HDRS =
140
+ TARGET = proj4_ruby
141
+ TARGET_NAME = proj4_ruby
142
+ TARGET_ENTRY = Init_$(TARGET_NAME)
143
+ DLLIB = $(TARGET).so
144
+ EXTSTATIC =
145
+ STATIC_LIB =
146
+
147
+ TIMESTAMP_DIR = .
148
+ BINDIR = $(bindir)
149
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
150
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
151
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
152
+ HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
153
+ ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
154
+
155
+ TARGET_SO = $(DLLIB)
156
+ CLEANLIBS = $(TARGET).so
157
+ CLEANOBJS = *.o *.bak
158
+
159
+ all: $(DLLIB)
160
+ static: $(STATIC_LIB)
161
+ .PHONY: all install static install-so install-rb
162
+ .PHONY: clean clean-so clean-static clean-rb
163
+
164
+ clean-static::
165
+ clean-rb-default::
166
+ clean-rb::
167
+ clean-so::
168
+ clean: clean-so clean-static clean-rb-default clean-rb
169
+ -$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
170
+
171
+ distclean-rb-default::
172
+ distclean-rb::
173
+ distclean-so::
174
+ distclean-static::
175
+ distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
176
+ -$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
177
+ -$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
178
+ -$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
179
+
180
+ realclean: distclean
181
+ install: install-so install-rb
182
+
183
+ install-so: $(DLLIB) $(TIMESTAMP_DIR)/.RUBYARCHDIR.time
184
+ $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
185
+ clean-static::
186
+ -$(Q)$(RM) $(STATIC_LIB)
187
+ install-rb: pre-install-rb install-rb-default
188
+ install-rb-default: pre-install-rb-default
189
+ pre-install-rb: Makefile
190
+ pre-install-rb-default: Makefile
191
+ pre-install-rb-default:
192
+ $(ECHO) installing default proj4_ruby libraries
193
+ $(TIMESTAMP_DIR)/.RUBYARCHDIR.time:
194
+ $(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
195
+ $(Q) $(TOUCH) $@
196
+
197
+ site-install: site-install-so site-install-rb
198
+ site-install-so: install-so
199
+ site-install-rb: install-rb
200
+
201
+ .SUFFIXES: .c .m .cc .mm .cxx .cpp .o
202
+
203
+ .cc.o:
204
+ $(ECHO) compiling $(<)
205
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
206
+
207
+ .mm.o:
208
+ $(ECHO) compiling $(<)
209
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
210
+
211
+ .cxx.o:
212
+ $(ECHO) compiling $(<)
213
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
214
+
215
+ .cpp.o:
216
+ $(ECHO) compiling $(<)
217
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
218
+
219
+ .c.o:
220
+ $(ECHO) compiling $(<)
221
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
222
+
223
+ .m.o:
224
+ $(ECHO) compiling $(<)
225
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
226
+
227
+ $(DLLIB): $(DEFFILE) $(OBJS) Makefile
228
+ $(ECHO) linking shared-object $(DLLIB)
229
+ -$(Q)$(RM) $(@)
230
+ $(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
231
+
232
+
233
+
234
+ $(DEFFILE):
235
+ $(ECHO) generating $(@)
236
+ $(Q) $(RUBY) -e "puts 'EXPORTS', '$(TARGET_ENTRY)'" > $@
237
+
238
+ $(OBJS): $(HDRS) $(ruby_headers)
@@ -6,6 +6,8 @@ if not have_header('proj_api.h')
6
6
  raise('Cannot find proj_api.h header')
7
7
  end
8
8
 
9
+ have_header('projects.h')
10
+
9
11
  unless have_library('proj', 'pj_init') or
10
12
  have_library('libproj', 'pj_init')
11
13
  raise('Cannot find proj4 library')
@@ -0,0 +1,103 @@
1
+ have_header: checking for proj_api.h... -------------------- yes
2
+
3
+ "x86_64-w64-mingw32-gcc -o conftest.exe -Ic:/mingw64/mingw64/local/ruby/include/ruby-2.1.0/x64-mingw32 -Ic:/mingw64/mingw64/local/ruby/include/ruby-2.1.0/ruby/backward -Ic:/mingw64/mingw64/local/ruby/include/ruby-2.1.0 -I. -Ic:/mingw64/mingw64/local/include -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -Lc:/mingw64/mingw64/local/ruby/lib -L. -Lc:/mingw64/mingw64/local/lib -lx64-msvcrt-ruby210 -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
4
+ checked program was:
5
+ /* begin */
6
+ 1: #include "ruby.h"
7
+ 2:
8
+ 3: #include <winsock2.h>
9
+ 4: #include <windows.h>
10
+ 5: int main(int argc, char **argv)
11
+ 6: {
12
+ 7: return 0;
13
+ 8: }
14
+ /* end */
15
+
16
+ "x86_64-w64-mingw32-gcc -E -Ic:/mingw64/mingw64/local/ruby/include/ruby-2.1.0/x64-mingw32 -Ic:/mingw64/mingw64/local/ruby/include/ruby-2.1.0/ruby/backward -Ic:/mingw64/mingw64/local/ruby/include/ruby-2.1.0 -I. -Ic:/mingw64/mingw64/local/include -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -o conftest.i"
17
+ checked program was:
18
+ /* begin */
19
+ 1: #include "ruby.h"
20
+ 2:
21
+ 3: #include <winsock2.h>
22
+ 4: #include <windows.h>
23
+ 5: #include <proj_api.h>
24
+ /* end */
25
+
26
+ --------------------
27
+
28
+ have_header: checking for projects.h... -------------------- no
29
+
30
+ "x86_64-w64-mingw32-gcc -E -Ic:/mingw64/mingw64/local/ruby/include/ruby-2.1.0/x64-mingw32 -Ic:/mingw64/mingw64/local/ruby/include/ruby-2.1.0/ruby/backward -Ic:/mingw64/mingw64/local/ruby/include/ruby-2.1.0 -I. -Ic:/mingw64/mingw64/local/include -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -o conftest.i"
31
+ conftest.c:5:22: fatal error: projects.h: No such file or directory
32
+ #include <projects.h>
33
+ ^
34
+ compilation terminated.
35
+ checked program was:
36
+ /* begin */
37
+ 1: #include "ruby.h"
38
+ 2:
39
+ 3: #include <winsock2.h>
40
+ 4: #include <windows.h>
41
+ 5: #include <projects.h>
42
+ /* end */
43
+
44
+ --------------------
45
+
46
+ have_library: checking for pj_init() in -lproj... -------------------- yes
47
+
48
+ "x86_64-w64-mingw32-gcc -o conftest.exe -Ic:/mingw64/mingw64/local/ruby/include/ruby-2.1.0/x64-mingw32 -Ic:/mingw64/mingw64/local/ruby/include/ruby-2.1.0/ruby/backward -Ic:/mingw64/mingw64/local/ruby/include/ruby-2.1.0 -I. -Ic:/mingw64/mingw64/local/include -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -Lc:/mingw64/mingw64/local/ruby/lib -L. -Lc:/mingw64/mingw64/local/lib -lx64-msvcrt-ruby210 -lproj -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
49
+ conftest.c: In function 't':
50
+ conftest.c:16:57: error: 'pj_init' undeclared (first use in this function)
51
+ int t(void) { void ((*volatile p)()); p = (void ((*)()))pj_init; return 0; }
52
+ ^
53
+ conftest.c:16:57: note: each undeclared identifier is reported only once for each function it appears in
54
+ conftest.c:16:32: warning: variable 'p' set but not used [-Wunused-but-set-variable]
55
+ int t(void) { void ((*volatile p)()); p = (void ((*)()))pj_init; return 0; }
56
+ ^
57
+ checked program was:
58
+ /* begin */
59
+ 1: #include "ruby.h"
60
+ 2:
61
+ 3: #include <winsock2.h>
62
+ 4: #include <windows.h>
63
+ 5:
64
+ 6: /*top*/
65
+ 7: extern int t(void);
66
+ 8: int main(int argc, char **argv)
67
+ 9: {
68
+ 10: if (argc > 1000000) {
69
+ 11: printf("%p", &t);
70
+ 12: }
71
+ 13:
72
+ 14: return 0;
73
+ 15: }
74
+ 16: int t(void) { void ((*volatile p)()); p = (void ((*)()))pj_init; return 0; }
75
+ /* end */
76
+
77
+ "x86_64-w64-mingw32-gcc -o conftest.exe -Ic:/mingw64/mingw64/local/ruby/include/ruby-2.1.0/x64-mingw32 -Ic:/mingw64/mingw64/local/ruby/include/ruby-2.1.0/ruby/backward -Ic:/mingw64/mingw64/local/ruby/include/ruby-2.1.0 -I. -Ic:/mingw64/mingw64/local/include -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -Lc:/mingw64/mingw64/local/ruby/lib -L. -Lc:/mingw64/mingw64/local/lib -lx64-msvcrt-ruby210 -lproj -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
78
+ conftest.c: In function 't':
79
+ conftest.c:16:1: warning: implicit declaration of function 'pj_init' [-Wimplicit-function-declaration]
80
+ int t(void) { pj_init(); return 0; }
81
+ ^
82
+ checked program was:
83
+ /* begin */
84
+ 1: #include "ruby.h"
85
+ 2:
86
+ 3: #include <winsock2.h>
87
+ 4: #include <windows.h>
88
+ 5:
89
+ 6: /*top*/
90
+ 7: extern int t(void);
91
+ 8: int main(int argc, char **argv)
92
+ 9: {
93
+ 10: if (argc > 1000000) {
94
+ 11: printf("%p", &t);
95
+ 12: }
96
+ 13:
97
+ 14: return 0;
98
+ 15: }
99
+ 16: int t(void) { pj_init(); return 0; }
100
+ /* end */
101
+
102
+ --------------------
103
+
File without changes
@@ -0,0 +1,2 @@
1
+ EXPORTS
2
+ Init_proj4_ruby
Binary file
@@ -1,15 +1,19 @@
1
1
  #include <ruby.h>
2
+ #ifdef HAVE_PROJECTS_H
2
3
  #include <projects.h>
4
+ #endif
3
5
  #include <proj_api.h>
4
6
 
5
7
  static VALUE mProjrb;
6
8
 
9
+ #ifdef HAVE_PROJECTS_H
7
10
  static VALUE cDef;
8
11
  static VALUE cDatum;
9
12
  static VALUE cEllipsoid;
10
13
  static VALUE cPrimeMeridian;
11
14
  static VALUE cProjectionType;
12
15
  static VALUE cUnit;
16
+ #endif
13
17
 
14
18
  static VALUE cError;
15
19
  static VALUE cProjection;
@@ -97,6 +101,7 @@ static VALUE proj_initialize(VALUE self, VALUE params){
97
101
  return self;
98
102
  }
99
103
 
104
+ #ifdef HAVE_PROJECTS_H
100
105
  /**Has this projection an inverse?
101
106
 
102
107
  call-seq: hasInverse? -> true or false
@@ -107,6 +112,7 @@ static VALUE proj_has_inverse(VALUE self){
107
112
  Data_Get_Struct(self,_wrap_pj,wpj);
108
113
  return wpj->pj->inv ? Qtrue : Qfalse;
109
114
  }
115
+ #endif
110
116
 
111
117
  /**Is this projection a latlong projection?
112
118
 
@@ -250,7 +256,7 @@ static VALUE proj_transform(VALUE self, VALUE dst, VALUE point){
250
256
  return self; /* Makes gcc happy */
251
257
  }
252
258
 
253
- #if PJ_VERSION >= 449
259
+ #if PJ_VERSION >= 449 && defined(HAVE_PROJECTS_H)
254
260
  /**Return list of all datums we know about.
255
261
 
256
262
  call-seq: list -> Array of Proj4::Datum
@@ -508,7 +514,9 @@ void Init_proj4_ruby(void) {
508
514
  cProjection = rb_define_class_under(mProjrb,"Projection",rb_cObject);
509
515
  rb_define_alloc_func(cProjection,proj_alloc);
510
516
  rb_define_method(cProjection,"initialize",proj_initialize,1);
517
+ #ifdef HAVE_PROJECTS_H
511
518
  rb_define_method(cProjection,"hasInverse?",proj_has_inverse,0);
519
+ #endif
512
520
  rb_define_method(cProjection,"isLatLong?",proj_is_latlong,0);
513
521
  rb_define_method(cProjection,"isGeocent?",proj_is_geocent,0);
514
522
  rb_define_alias(cProjection,"isGeocentric?","isGeocent?");
@@ -517,7 +525,7 @@ void Init_proj4_ruby(void) {
517
525
  rb_define_method(cProjection,"inverse!",proj_inverse,1);
518
526
  rb_define_method(cProjection,"transform!",proj_transform,2);
519
527
 
520
- #if PJ_VERSION >= 449
528
+ #if PJ_VERSION >= 449 && defined(HAVE_PROJECTS_H)
521
529
  cDef = rb_define_class_under(mProjrb,"Def",rb_cObject);
522
530
 
523
531
  /* The Datum class holds information about datums ('WGS84', 'potsdam', ...) known to Proj.4. */
Binary file
@@ -6,10 +6,9 @@ end
6
6
 
7
7
  # Load the C-based binding.
8
8
  begin
9
- RUBY_VERSION =~ /(\d+.\d+)/
10
- require "#{$1}/proj4_ruby"
9
+ require 'proj4_ruby'
11
10
  rescue LoadError
12
- require "proj4_ruby"
11
+ require '../ext/proj4_ruby'
13
12
  end
14
13
 
15
14
  # Ruby bindings for the Proj.4 cartographic projection library (http://trac.osgeo.org/proj/).
@@ -1,9 +1,9 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  require File.join(File.dirname(__FILE__), '..', 'lib', 'proj4')
4
- require 'test/unit'
4
+ require 'minitest/autorun'
5
5
 
6
- class ConstantsTest < Test::Unit::TestCase
6
+ class ConstantsTest < Minitest::Test
7
7
  def test_version
8
8
  assert 440 < Proj4::LIBVERSION
9
9
  end
@@ -1,9 +1,9 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  require File.join(File.dirname(__FILE__), '..', 'lib', 'proj4')
4
- require 'test/unit'
4
+ require 'minitest/autorun'
5
5
 
6
- class CreateProjectionTest < Test::Unit::TestCase
6
+ class CreateProjectionTest < Minitest::Test
7
7
  def setup
8
8
  @proj_wgs84 = Proj4::Projection.new(["init=epsg:4326"]) # WGS84
9
9
  @proj_gk = Proj4::Projection.new(["init=epsg:31467"]) # Gauss-Kruger Zone 3
@@ -1,10 +1,10 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  require File.join(File.dirname(__FILE__), '..', 'lib', 'proj4')
4
- require 'test/unit'
4
+ require 'minitest/autorun'
5
5
 
6
6
  if Proj4::LIBVERSION >= 449
7
- class DatumsTest < Test::Unit::TestCase
7
+ class DatumsTest < Minitest::Test
8
8
 
9
9
  def test_get_all
10
10
  datums = Proj4::Datum.list.sort.collect{ |u| u.id }
@@ -1,10 +1,10 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  require File.join(File.dirname(__FILE__), '..', 'lib', 'proj4')
4
- require 'test/unit'
4
+ require 'minitest/autorun'
5
5
 
6
6
  if Proj4::LIBVERSION >= 449
7
- class EllipsoidsTest < Test::Unit::TestCase
7
+ class EllipsoidsTest < Minitest::Test
8
8
 
9
9
  def test_get_all
10
10
  ellipsoids = Proj4::Ellipsoid.list.sort.collect{ |u| u.id }
@@ -1,9 +1,9 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  require File.join(File.dirname(__FILE__), '..', 'lib', 'proj4')
4
- require 'test/unit'
4
+ require 'minitest/autorun'
5
5
 
6
- class ErrorsTest < Test::Unit::TestCase
6
+ class ErrorsTest < Minitest::Test
7
7
 
8
8
  def test_list
9
9
  assert_equal "Unknown", Proj4::Error.error(0)
@@ -1,9 +1,9 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  require File.join(File.dirname(__FILE__), '..', 'lib', 'proj4')
4
- require 'test/unit'
4
+ require 'minitest/autorun'
5
5
 
6
- class InitProjectionTest < Test::Unit::TestCase
6
+ class InitProjectionTest < Minitest::Test
7
7
 
8
8
  def setup
9
9
  # NAD27(76) / UTM zone 17N
@@ -1,10 +1,10 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  require File.join(File.dirname(__FILE__), '..', 'lib', 'proj4')
4
- require 'test/unit'
4
+ require 'minitest/autorun'
5
5
 
6
6
  if Proj4::LIBVERSION >= 449
7
- class PrimeMeridiansTest < Test::Unit::TestCase
7
+ class PrimeMeridiansTest < Minitest::Test
8
8
 
9
9
  def test_get_all
10
10
  prime_meridians = Proj4::PrimeMeridian.list.sort.collect{ |u| u.id}
@@ -1,10 +1,10 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  require File.join(File.dirname(__FILE__), '..', 'lib', 'proj4')
4
- require 'test/unit'
4
+ require 'minitest/autorun'
5
5
 
6
6
  if Proj4::LIBVERSION >= 449
7
- class ProjectionTypesTest < Test::Unit::TestCase
7
+ class ProjectionTypesTest < Minitest::Test
8
8
 
9
9
  def test_get_all
10
10
  pt = Proj4::ProjectionType.list.sort.collect{ |u| u.id }
@@ -1,9 +1,9 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  require File.join(File.dirname(__FILE__), '..', 'lib', 'proj4')
4
- require 'test/unit'
4
+ require 'minitest/autorun'
5
5
 
6
- class SimpleProjectionTest < Test::Unit::TestCase
6
+ class SimpleProjectionTest < Minitest::Test
7
7
 
8
8
  def setup
9
9
  @proj_gk = Proj4::Projection.new(["init=epsg:31467"])
@@ -1,9 +1,9 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  require File.join(File.dirname(__FILE__), '..', 'lib', 'proj4')
4
- require 'test/unit'
4
+ require 'minitest/autorun'
5
5
 
6
- class TransformTest < Test::Unit::TestCase
6
+ class TransformTest < Minitest::Test
7
7
 
8
8
  PRECISION = 0.1 ** 8
9
9
 
@@ -1,10 +1,10 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  require File.join(File.dirname(__FILE__), '..', 'lib', 'proj4')
4
- require 'test/unit'
4
+ require 'minitest/autorun'
5
5
 
6
6
  if Proj4::LIBVERSION >= 449
7
- class UnitsTest < Test::Unit::TestCase
7
+ class UnitsTest < Minitest::Test
8
8
 
9
9
  def test_get_all
10
10
  units = Proj4::Unit.list.sort.collect{ |u| u.id }
metadata CHANGED
@@ -1,60 +1,39 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: proj4rb
3
- version: !ruby/object:Gem::Version
4
- hash: 9
5
- prerelease:
6
- segments:
7
- - 0
8
- - 4
9
- - 3
10
- version: 0.4.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Guilhem Vellut
14
8
  - Jochen Topf
15
9
  - Charlie Savage
16
10
  autorequire:
17
11
  bindir: bin
18
12
  cert_chain: []
19
-
20
- date: 2011-08-30 00:00:00 Z
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
23
- name: rake-compiler
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 0
33
- version: "0"
34
- type: :development
35
- version_requirements: *id001
36
- description: " 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.\n"
13
+ date: 2014-12-14 00:00:00.000000000 Z
14
+ dependencies: []
15
+ description: |2
16
+ 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.
37
17
  email:
38
18
  executables: []
39
-
40
- extensions:
19
+ extensions:
41
20
  - ext/extconf.rb
42
21
  extra_rdoc_files: []
43
-
44
- files:
45
- - Changelog
22
+ files:
46
23
  - MIT-LICENSE
47
- - proj4rb.gemspec
48
- - Rakefile
49
24
  - README.rdoc
25
+ - Rakefile
26
+ - data/GL27
27
+ - data/MD
28
+ - data/TN
29
+ - data/WI
30
+ - data/WO
50
31
  - data/conus
51
32
  - data/epsg
52
33
  - data/epsg-deprecated
53
34
  - data/esri
54
35
  - data/esri.extra
55
- - data/GL27
56
36
  - data/hawaii
57
- - data/MD
58
37
  - data/nad.lst
59
38
  - data/nad27
60
39
  - data/nad83
@@ -66,9 +45,6 @@ files:
66
45
  - data/stgeorge
67
46
  - data/stlrnc
68
47
  - data/stpaul
69
- - data/TN
70
- - data/WI
71
- - data/WO
72
48
  - data/world
73
49
  - example/basic.rb
74
50
  - example/list-datums.rb
@@ -78,8 +54,14 @@ files:
78
54
  - example/list-projection-types.rb
79
55
  - example/list-units.rb
80
56
  - example/version.rb
81
- - ext/projrb.c
57
+ - ext/Makefile
82
58
  - ext/extconf.rb
59
+ - ext/mkmf.log
60
+ - ext/out.log
61
+ - ext/proj4_ruby-x64-mingw32.def
62
+ - ext/proj4_ruby.so
63
+ - ext/projrb.c
64
+ - ext/projrb.o
83
65
  - ext/vc/proj4_ruby.sln
84
66
  - ext/vc/proj4_ruby.vcproj
85
67
  - lib/proj4.rb
@@ -96,41 +78,31 @@ files:
96
78
  - test/test_transform.rb
97
79
  - test/test_units.rb
98
80
  homepage: https://github.com/cfis/proj4rb
99
- licenses: []
100
-
81
+ licenses:
82
+ - MIT
83
+ metadata: {}
101
84
  post_install_message:
102
85
  rdoc_options: []
103
-
104
- require_paths:
86
+ require_paths:
105
87
  - lib
106
- required_ruby_version: !ruby/object:Gem::Requirement
107
- none: false
108
- requirements:
88
+ required_ruby_version: !ruby/object:Gem::Requirement
89
+ requirements:
109
90
  - - ">="
110
- - !ruby/object:Gem::Version
111
- hash: 57
112
- segments:
113
- - 1
114
- - 8
115
- - 7
91
+ - !ruby/object:Gem::Version
116
92
  version: 1.8.7
117
- required_rubygems_version: !ruby/object:Gem::Requirement
118
- none: false
119
- requirements:
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
+ requirements:
120
95
  - - ">="
121
- - !ruby/object:Gem::Version
122
- hash: 3
123
- segments:
124
- - 0
125
- version: "0"
126
- requirements:
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ requirements:
127
99
  - Proj.4 C library
128
- rubyforge_project: proj4rb
129
- rubygems_version: 1.8.10
100
+ rubyforge_project:
101
+ rubygems_version: 2.4.5
130
102
  signing_key:
131
- specification_version: 3
103
+ specification_version: 4
132
104
  summary: Ruby bindings for the Proj.4 Carthographic Projection library
133
- test_files:
105
+ test_files:
134
106
  - test/test_constants.rb
135
107
  - test/test_create_projection.rb
136
108
  - test/test_datums.rb
data/Changelog DELETED
@@ -1,28 +0,0 @@
1
- 0.4.3 (August 30, 2011)
2
- - Remove Rake depedency in specfile
3
-
4
- 0.4.2 (August 15, 2011)
5
- - Minor build tweak to support MSVC++
6
-
7
- 0.4.1 (July 30, 2011)
8
- - Search first for binaries when using windows gems
9
- - Add # encoding to test files
10
- - Reformat tests files to use standard ruby 2 space indenting
11
-
12
- 0.4.0 (July 30, 2011)
13
- - Update to compile on Ruby 1.9.* (Fabio Renzo Panettieri)
14
- - Add in gemspec file (Charlie Savage)
15
- - Add rake-compiler as development dependency, remove older MinGW build system (Charlie Savage)
16
- - Move to GitHub (Charlie Savage)
17
-
18
- 0.3.1 (December 23, 2009)
19
- - Update extconf.conf file to be more flexible to make it easier to build
20
- on OS X when using MacPorts
21
- - Updated windows binary to link against proj4.7
22
-
23
- 0.3.0 (August 14, 2008)
24
- - Removed Proj4::UV class which was previously deprecated
25
- - New build infrastructure for Windows (Charlie Savage)
26
- - Fixed memory leaks in forward() and inverse() methods (Charlie Savage)
27
-
28
-
@@ -1,34 +0,0 @@
1
- # encoding: utf-8
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = 'proj4rb'
5
- spec.version = "0.4.3"
6
- spec.summary = "Ruby bindings for the Proj.4 Carthographic Projection library"
7
- spec.description = <<-EOF
8
- 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.
9
- EOF
10
- spec.platform = Gem::Platform::RUBY
11
- spec.authors = ['Guilhem Vellut', 'Jochen Topf', 'Charlie Savage']
12
- spec.homepage = 'https://github.com/cfis/proj4rb'
13
- spec.rubyforge_project = 'proj4rb'
14
- spec.required_ruby_version = '>= 1.8.7'
15
- spec.date = DateTime.now
16
- spec.requirements << 'Proj.4 C library'
17
- spec.require_path = 'lib'
18
- spec.extensions = ["ext/extconf.rb"]
19
- spec.files = Dir.glob(['Changelog',
20
- 'MIT-LICENSE',
21
- 'proj4rb.gemspec',
22
- 'Rakefile',
23
- 'README.rdoc',
24
- 'data/**/*',
25
- 'example/**/*',
26
- 'ext/*.c',
27
- 'ext/*.rb',
28
- 'ext/vc/*.sln',
29
- 'ext/vc/*.vcproj',
30
- 'lib/**/*.rb'])
31
-
32
- spec.test_files = Dir.glob('test/test*.rb')
33
- spec.add_development_dependency('rake-compiler')
34
- end