diff options
| author | nibbles 2bits | 2012-10-16 10:53:50 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-10-20 08:42:11 -0700 |
| commit | 8b4b1e06de3b0b08122224fb99b72bcf5feb2a08 (patch) | |
| tree | 62de83df10a2342bbc8ee6616f648bed25ad32f9 /Library/Formula | |
| parent | accca20e6fde7f68b8451bec54752514e6876252 (diff) | |
| download | homebrew-8b4b1e06de3b0b08122224fb99b72bcf5feb2a08.tar.bz2 | |
grib-api: update url + patch for clang
grib-api changed their Homepage and download URLs, plus there is
a continuing build error with clang that's fixable.
- Update the `homepage` and `url`
- Add the patch for missing symbols from Fink
- Remove `fails_with :clang`
Fixes #15473
Closes #15489.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/grib-api.rb | 57 |
1 files changed, 49 insertions, 8 deletions
diff --git a/Library/Formula/grib-api.rb b/Library/Formula/grib-api.rb index 480f1f12a..8e73cba27 100644 --- a/Library/Formula/grib-api.rb +++ b/Library/Formula/grib-api.rb @@ -1,16 +1,15 @@ require 'formula' class GribApi < Formula - homepage 'http://www.ecmwf.int/products/data/software/grib_api.html' - url 'http://www.ecmwf.int/products/data/software/download/software_files/grib_api-1.9.16.tar.gz' - sha1 'fd85e8b939231d4d8f9dc3131fa0aab73fbbcf78' + homepage 'https://software.ecmwf.int/wiki/display/GRIB/Home' + url 'https://software.ecmwf.int/wiki/download/attachments/3473437/grib_api-1.9.16.tar.gz' + sha1 'baff7ad8de71d5e81a90595a0b4650c77f8bd6cf' - depends_on 'jasper' + depends_on 'jasper' => :recommended + depends_on 'openjpeg' => :optional - fails_with :clang do - build 318 - cause 'Undefined symbols when linking.' - end + # Fixes undefined symbols _stdio_read with clang. Patch from Fink. + def patches; DATA; end def install ENV.deparallelize @@ -22,3 +21,45 @@ class GribApi < Formula system "make install" end end + +__END__ +--- a/src/grib_io.c 2012-03-06 10:00:51.000000000 -0800 ++++ b/src/grib_io.c 2012-10-16 10:47:44.000000000 -0700 +@@ -548,19 +548,19 @@ + + } + +-GRIB_INLINE off_t stdio_tell(void* data) { ++GRIB_INLINE static off_t stdio_tell(void* data) { + FILE* f = (FILE*)data; + return ftello(f); + } + +-GRIB_INLINE int stdio_seek(void* data,off_t len) { ++GRIB_INLINE static int stdio_seek(void* data,off_t len) { + FILE* f = (FILE*)data; + int err=0; + if (fseeko(f,len,SEEK_CUR)) err=GRIB_IO_PROBLEM; + return err; + } + +-GRIB_INLINE int stdio_read(void* data,void* buf,int len,int* err) ++GRIB_INLINE static int stdio_read(void* data,void* buf,int len,int* err) + { + FILE* f = (FILE*)data; + int n; +--- a/src/grib_api_prototypes.h 2012-03-06 10:00:51.000000000 -0800 ++++ b/src/grib_api_prototypes.h 2012-10-16 10:49:35.000000000 -0700 +@@ -785,9 +785,9 @@ + int grib_hash_keys_get_size(grib_itrie *t); + + /* grib_io.c */ +-GRIB_INLINE off_t stdio_tell(void *data); +-GRIB_INLINE int stdio_seek(void *data, off_t len); +-GRIB_INLINE int stdio_read(void *data, void *buf, int len, int *err); ++GRIB_INLINE static off_t stdio_tell(void *data); ++GRIB_INLINE static int stdio_seek(void *data, off_t len); ++GRIB_INLINE static int stdio_read(void *data, void *buf, int len, int *err); + int wmo_read_any_from_file(FILE *f, void *buffer, size_t *len); + int wmo_read_grib_from_file(FILE *f, void *buffer, size_t *len); + int wmo_read_bufr_from_file(FILE *f, void *buffer, size_t *len); |
