updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / wgrib2 / wgrib2.patch
blobfefac5bdc6b15ab1f2a7269d0a198acacb5eddc3
1 --- makefile.orig 2011-08-04 20:03:32.000000000 +0200
2 +++ makefile 2011-11-08 14:09:07.605580448 +0100
3 @@ -33,12 +33,12 @@
6 # Warning do not set both USE_NETCDF3 and USE_NETCDF4 to one
7 -USE_NETCDF3=1
8 -USE_NETCDF4=0
9 +USE_NETCDF3=0
10 +USE_NETCDF4=1
11 USE_REGEX=1
12 USE_TIGGE=1
13 -USE_MYSQL=0
14 -USE_IPOLATES=0
15 +USE_MYSQL=1
16 +USE_IPOLATES=1
17 USE_UDF=0
19 ifeq ($(USE_NETCDF3),1)
20 @@ -72,18 +72,15 @@
22 # grib2c library
24 -g:=${cwd}/g2clib-1.2.1
25 -glib:=$g/libgrib2c.a
26 -wLDFLAGS+=-L$g -lgrib2c
27 -wCPPFLAGS+=-I$g
28 +glib:=/usr/lib/libgrib2c.a
29 +wLDFLAGS+=-L/usr/lib -lgrib2c
30 +wCPPFLAGS+=-I/usr/include
32 # Jasper
34 -j=${cwd}/jasper-1.900.1
35 -jlib=$j/src/libjasper/.libs/libjasper.a
36 -wLDFLAGS+=-L$j/src/libjasper/.libs -ljasper
37 -wCPPFLAGS+=-I$j/src/libjasper/include
39 +jlib=/usr/lib/libjasper.a
40 +wLDFLAGS+=-L/usr/lib -ljasper
41 +wCPPFLAGS+=-I/usr/include
43 ifeq ($(USE_NETCDF3),1)
44 n:=${cwd}/netcdf-3.6.2
45 @@ -96,13 +93,12 @@
46 endif
48 ifeq ($(USE_NETCDF4),1)
49 - n4:=${cwd}/netcdf-4.1.1
50 - n4lib:=${n4}/libsrc4/.libs/libnetcdf.a
51 - h5:=${cwd}/hdf5-1.8.6
52 - h5lib:=${h5}/src/.libs/libhdf5.a
53 + n4lib:=/usr/lib/libnetcdf.a
54 + h5:=
55 + h5lib:=
56 # wLDFLAGS+=-L${n4}/libsrc/.libs -lnetcdf
57 - wLDFLAGS+=-L${n4}/libsrc4/.libs -lnetcdf -L${h5}/hl/src/.libs -lhdf5_hl -L${h5}/src/.libs -lhdf5
58 - wCPPFLAGS+=-I${n4}/libsrc4
59 + wLDFLAGS+=`nc-config --libs`
60 + wCPPFLAGS+=`nc-config --cflags`
61 a:=$(shell echo "\#define USE_NETCDF4" >> ${CONFIG_H})
62 else
63 a:=$(shell echo "//\#define USE_NETCDF4" >> ${CONFIG_H})
64 @@ -162,17 +158,15 @@
66 # png
68 -p=${cwd}/libpng-1.2.44
69 -plib=$p/.libs/libpng.a
70 -wLDFLAGS+=-L$p/.libs -lpng
71 -wCPPFLAGS+=-I$p
72 +plib=/usr/lib/libpng.a
73 +wLDFLAGS+=-L/usr/lib -lpng
74 +wCPPFLAGS+=-I/usr/include
76 # z
78 -z=${cwd}/zlib-1.2.5
79 -zlib=$z/libz.a
80 -wLDFLAGS+=-L$z -lz
81 -wCPPFLAGS+=-I$z
82 +zlib=/usr/lib/libz.a
83 +wLDFLAGS+=-L/usr/lib -lz
84 +wCPPFLAGS+=-I/usr/include
86 wLDFLAGS+=-lm
87 wCPPFLAGS+=-I/usr/include ${CPPFLAGS}
88 @@ -204,78 +198,6 @@
89 cd $w && export LDFLAGS="${wLDFLAGS}" && export CPPFLAGS="${wCPPFLAGS}" && ${MAKE}
92 -${jlib}:
93 - cp $j.tar.gz tmpj.tar.gz
94 - gunzip -n tmpj.tar.gz
95 - tar -xvf tmpj.tar
96 - rm tmpj.tar
97 - cd $j && ./configure --without-x --disable-libjpeg --disable-opengl && ${MAKE}
99 -${plib}: ${zlib}
100 - cp $p.tar.gz tmpp.tar.gz
101 - gunzip -n tmpp.tar.gz
102 - tar -xvf tmpp.tar
103 - rm tmpp.tar
104 -# for OSX
105 -# export LDFLAGS="-L$z" && cd $p && export CPPFLAGS="${wCPPFLAGS}" && make -f scripts/makefile.darwin
106 -# for everybody else
107 - export LDFLAGS="-L$z" && cd $p && export CPPFLAGS="${wCPPFLAGS}" && ./configure --disable-shared && ${MAKE}
109 -${zlib}:
110 - cp $z.tar.gz tmpz.tar.gz
111 - gunzip -n tmpz.tar.gz
112 - tar -xvf tmpz.tar
113 - rm tmpz.tar
114 - cd $z && ./configure && ${MAKE}
117 -${glib}: ${jlib} ${plib} ${zlib}
118 - touch ${glib}
119 - rm ${glib}
120 - cd $g && export CPPFLAGS="${wCPPFLAGS}" && ${MAKE}
123 -${nlib}:
124 - cp netcdf.tar.gz tmpn.tar.gz
125 - gunzip -n tmpn.tar.gz
126 - tar -xvf tmpn.tar
127 - rm tmpn.tar
128 - cd $n && ./configure --enable-c-only && ${MAKE} check
130 -${n4lib}: ${zlib} ${h5lib}
131 - mkdir -p ${cwd}/zlib/include
132 - mkdir -p ${cwd}/zlib/lib
133 - cp ${z}/*.h ${cwd}/zlib/include/
134 - cp ${z}/*.a ${cwd}/zlib/lib/
136 - mkdir -p ${cwd}/hdf5/include
137 - cp ${h5}/src/*.h ${h5}/hl/src/*.h ${cwd}/hdf5/include
138 - mkdir -p ${cwd}/hdf5/lib
139 - cp ${h5}/src/.libs/*a ${h5}/hl/src/.libs/*a ${cwd}/hdf5/lib/
141 - cp ${n4}.tar.gz tmpn.tar.gz
142 - gunzip -n tmpn.tar.gz
143 - tar -xvf tmpn.tar
144 - rm tmpn.tar
145 - cd ${n4} && ./configure --disable-fortran --disable-cxx --disable-dap --enable-netcdf-4 --with-zlib=${cwd}/zlib --with-hdf5=${cwd}/hdf5 && ${MAKE}
147 -# cd ${n4} && ./configure --enable-c-only && ${MAKE} check
149 -# cd ${n4} && ./configure --enable-netcdf-4 --enable-c-only --with-zlib=${cwd}/zlib --with-hdf5=${cwd}/hdf5 && ${MAKE} check
151 -# cd ${n4} && ./configure --enable-c-only && ${MAKE} check
153 -# cd ${n4} && ./configure --enable-netcdf-4 --enable-c-only && ${MAKE} check
156 -${h5lib}:
157 - cp ${h5}.tar.gz tmph5.tar.gz
158 - gunzip -n tmph5.tar.gz
159 - tar -xvf tmph5.tar
160 - rm tmph5.tar
161 - cd ${h5} && ./configure --disable-shared --disable-fortran --with-zlib=$z && ${MAKE} && ${MAKE}
162 -# cd ${h5} && ./configure --disable-shared --disable-fortran --with-zlib=$z && ${MAKE} && ${MAKE} check
164 ${iplib}:
165 cd ${ip} && export F90=${F90} && make