90 | | |
91 | | |
92 | | === Libjpeg === |
93 | | |
94 | | 1. Download libjpeg from [http://www.ijg.org/files/jpegsrc.v6b.tar.gz here] |
95 | | |
96 | | 2. Unpack to c:\osgeo4w\usr\src |
97 | | |
98 | | 3. In MSYS console, type: |
99 | | {{{ |
100 | | cd /osgeo4w/usr/src/jpeg-6b |
101 | | ./configure --prefix=/osgeo4w --enable-shared |
102 | | make |
103 | | mkdir /osgeo4w/man/man1 |
104 | | make install |
105 | | }}} |
106 | | 4. Because make procedure doesn't create the shared library (even if enabled by configure), we need to build it manually: |
107 | | (As a hint, you can copy the below and paste int msys with Shift+Insert) |
108 | | {{{ |
109 | | COMOBJECTS="jcomapi.o jutils.o jerror.o jmemmgr.o jmemnobs.o" |
110 | | CLIBOBJECTS="jcapimin.o jcapistd.o jctrans.o jcparam.o \ |
111 | | jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o \ |
112 | | jcprepct.o jccoefct.o jccolor.o jcsample.o jchuff.o \ |
113 | | jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o jfdctint.o" |
114 | | DLIBOBJECTS="jdapimin.o jdapistd.o jdtrans.o jdatasrc.o \ |
115 | | jdmaster.o jdinput.o jdmarker.o jdhuff.o jdphuff.o \ |
116 | | jdmainct.o jdcoefct.o jdpostct.o jddctmgr.o \ |
117 | | jidctfst.o jidctflt.o jidctint.o jidctred.o \ |
118 | | jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o" |
119 | | LIBOBJECTS="$CLIBOBJECTS $DLIBOBJECTS $COMOBJECTS" |
120 | | COBJECTS="cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o cdjpeg.o" |
121 | | DOBJECTS="djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o cdjpeg.o" |
122 | | TROBJECTS="jpegtran.o rdswitch.o cdjpeg.o transupp.o" |
123 | | for i in *.exe ; do rm /osgeo4w/bin/$i ; done |
124 | | rm *.exe |
125 | | cd .libs |
126 | | rm libjpeg.a |
127 | | rm /osgeo4w/lib/libjpeg.a |
128 | | cd .. |
129 | | gcc -shared -s -o ./.libs/libjpeg.dll -lm -Wl,--out-implib,./.libs/libjpeg.a $LIBOBJECTS |
130 | | gcc -s -g -O2 -o cjpeg.exe $COBJECTS -L./.libs/ -ljpeg |
131 | | gcc -s -g -O2 -o djpeg.exe $DOBJECTS -L./.libs/ -ljpeg |
132 | | gcc -s -g -O2 -o jpegtran.exe $TROBJECTS -L./.libs/ -ljpeg |
133 | | gcc -s -g -O2 -o rdjpgcom.exe rdjpgcom.o -L./.libs/ -ljpeg |
134 | | gcc -s -g -O2 -o wrjpgcom.exe wrjpgcom.o -L./.libs/ -ljpeg |
135 | | cd .libs |
136 | | install libjpeg.a /osgeo4w/lib |
137 | | install libjpeg.dll /osgeo4w/bin |
138 | | cd .. |
139 | | for i in *.exe ; do install $i /osgeo4w/bin ; done |
140 | | }}} |
141 | | |
142 | | (Again as an aside, we could put the following into a jpeg-headers package (with proper attributes?): |
143 | | * /osgeo4w/lib/libjpeg.a |
144 | | * /osgeo4w/bin/libjpeg.dll |
145 | | * /osgeo4w/bin/cjpeg.exe |
146 | | * /osgeo4w/bin/djpeg.exe |
147 | | * /osgeo4w/bin/jpegtran.exe |
148 | | * /osgeo4w/bin/rdjpgcom.exe |
149 | | * /osgeo4w/bin/wrjpgcom.exe) |
150 | | |
151 | | |
152 | | === PostgreSQL === |
153 | | |
154 | | 1. Download pgsql from [http://wwwmaster.postgresql.org/download/mirrors-ftp/source/v8.3.7/postgresql-8.3.7.tar.gz here] |
155 | | |
156 | | 2. Unpack to c:\osgeo4w\usr\src |
157 | | |
158 | | 3. Open c:\osgeo4w\usr\src\postgresql-8.3.7\src\test\regress\pg_regress.c |
159 | | |
160 | | 4. At line 51 change: |
161 | | {{{ |
162 | | char *bindir = PGBINDIR; |
163 | | char *libdir = LIBDIR; |
164 | | char *datadir = PGSHAREDIR; |
165 | | }}} |
166 | | To: |
167 | | {{{ |
168 | | char *bindir = "/osgeo4w/pgsql/bin"; |
169 | | char *libdir = "/osgeo4w/pgsql/lib"; |
170 | | char *datadir = "/osgeo4w/pgsql/share"; |
171 | | }}} |
172 | | |
173 | | 5. Open c:\osgeo4w\usr\src\postgresql-8.3.7\src\port\crypt.c |
174 | | |
175 | | 6. At line 108 change: |
176 | | {{{ |
177 | | typedef int int32_t; |
178 | | }}} |
179 | | To: |
180 | | {{{ |
181 | | /*typedef int int32_t;*/ |
182 | | }}} |
183 | | 7. In the msys console type: |
184 | | {{{ |
185 | | cd /osgeo4w/usr/src/postgresql-8.3.7 |
186 | | ./configure --prefix=/osgeo4w \ |
187 | | --with-includes=/osgeo4w/include \ |
188 | | --with-libraries=/osgeo4w/lib \ |
189 | | --without-readline |
190 | | make -f GNUmakefile |
191 | | make install -f GNUmakefile |
192 | | }}} |
193 | | |
194 | | |
195 | | === SQLite === |
196 | | |
197 | | 1. Download '''sqlite3''' from [http://www.sqlite.org/sqlite-amalgamation-3.5.9.tar.gz here] |
198 | | |
199 | | 2. Unpack to c:\osgeo4w\usr\src |
200 | | |
201 | | {{{ |
202 | | cd /osgeo4w/usr/usr/sqlite-amalgamation-3.5.9 |
203 | | ./configure --prefix=/osgeo4w |
204 | | make |
205 | | make install |
206 | | }}} |
207 | | |
208 | | |
209 | | === PROJ.4 === |
210 | | |
211 | | 1. Download PROJ.4 from [ftp://ftp.remotesensing.org/proj/proj-4.6.0.tar.gz here] |
212 | | |
213 | | 2. Unpack to c:\osgeo4w\usr\src |
214 | | |
215 | | 3. Download the US, Canadian and New Zealand datum shift grids from [ftp://ftp.remotesensing.org/proj/proj-datumgrid-1.3.zip here] |
216 | | |
217 | | 4. Unpack to c:\osgeo4w\usr\src\proj-4.6.0\nad |
218 | | |
219 | | 5. In MSYS console, type: |
220 | | {{{ |
221 | | cd /osgeo4w/usr/src/proj-4.6.0 |
222 | | ./configure --prefix=/osgeo4w --enable-shared --disable-static |
223 | | make |
224 | | make install |
225 | | }}} |
226 | | Because make procedure doesn't create shared library (even if enabled by configure), we need to build it manually: |
227 | | {{{ |
228 | | cd src |
229 | | for i in *.exe ; do rm /osgeo4w/bin/$i ; done |
230 | | rm /osgeo4w/bin/invgeod.exe |
231 | | rm /osgeo4w/bin/invproj.exe |
232 | | rm *.exe |
233 | | cd .libs |
234 | | rm libproj.a |
235 | | rm /osgeo4w/lib/libproj.a |
236 | | gcc -shared -s -o libproj.dll -lm -Wl,--out-implib,libproj.a *.o |
237 | | cd .. |
238 | | gcc -s -g -O2 -o cs2cs.exe cs2cs.o gen_cheb.o p_series.o .libs/emess.o -L./.libs/ -lproj |
239 | | gcc -s -g -O2 -o geod.exe geod.o geod_set.o geod_for.o geod_inv.o .libs/emess.o -L./.libs/ -lproj |
240 | | gcc -s -g -O2 -o nad2bin.exe nad2bin.o -L./.libs/ -lproj |
241 | | gcc -s -g -O2 -o nad2nad.exe nad2nad.o .libs/emess.o -L./.libs/ -lproj |
242 | | gcc -s -g -O2 -o proj.exe proj.o gen_cheb.o p_series.o .libs/emess.o -L./.libs/ -lproj |
243 | | cp proj.exe invproj.exe |
244 | | cp geod.exe invgeod.exe |
245 | | cd .libs |
246 | | install libproj.a /osgeo4w/lib |
247 | | install libproj.dll /osgeo4w/bin |
248 | | cd .. |
249 | | for i in *.exe ; do install $i /osgeo4w/bin ; done |
250 | | }}} |
251 | | |
252 | | |
253 | | === GDAL === |
254 | | |
255 | | '''Untested: so far gdal-1.5.2 won't compile, perhaps try a newer (or older) version''' |
256 | | |
257 | | 1. Download '''gdal''' from [http://download.osgeo.org/gdal/gdal-1.5.2.tar.gz here] |
258 | | |
259 | | 2. Unpack to c:\osgeo4w\usr\src |
260 | | |
261 | | 3. Open c:\osgeo4w\usr\src\gdal-1.5.2\configure |
262 | | |
263 | | 4. At line 23832 replace: |
264 | | {{{ |
265 | | expat_lib_flags="-L$expat_prefix/lib -lexpat" |
266 | | }}} |
267 | | with: |
268 | | {{{ |
269 | | LIBS="$LIBS -L$expat_prefix/lib -lexpat" |
270 | | }}} |
271 | | 5. In MSYS console, type: |
272 | | {{{ |
273 | | cd /c/osgeo4w/usr/src/gdal-1.5.2 |
274 | | ./configure --prefix=/osgeo4w \ |
275 | | --without-grass \ |
276 | | --with-sqlite3=/osgeo4w \ |
277 | | --with-pg=/osgeo4w/bin/pg_config.exe |
278 | | }}} |
279 | | 6. Open c:\msys\local\src\gdal-1.5.2\GNUmakefile |
280 | | |
281 | | 7. After line 4 add: |
282 | | {{{ |
283 | | GDAL_ROOT=. |
284 | | }}} |
285 | | 8. Finally build and install GDAL: |
286 | | {{{ |
287 | | make -f GNUmakefile |
288 | | make install -f GNUmakefile |
289 | | }}} |
290 | | |