grib-api 1.9.18
The patch fixes the configure script for Lion compatibilty per recommendations from https://software.ecmwf.int/wiki/plugins/viewsource/viewpagesrc.action?pageId=12648475. Closes Homebrew/homebrew#16564. Signed-off-by: Jack Nagel <jacknagel@gmail.com>master
parent
a7e5a1635b
commit
ecd11df88b
|
@ -2,14 +2,17 @@ require 'formula'
|
|||
|
||||
class GribApi < Formula
|
||||
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'
|
||||
url 'https://software.ecmwf.int/wiki/download/attachments/3473437/grib_api-1.9.18.tar.gz'
|
||||
sha1 '87616917a6978a56ae4fe173a3e6e3828b0ebfba'
|
||||
|
||||
depends_on 'jasper' => :recommended
|
||||
depends_on 'openjpeg' => :optional
|
||||
|
||||
# Fixes undefined symbols _stdio_read with clang. Patch from Fink.
|
||||
def patches; DATA; end
|
||||
# Fixes build errors in Lion
|
||||
# https://software.ecmwf.int/wiki/plugins/viewsource/viewpagesrc.action?pageId=12648475
|
||||
def patches
|
||||
DATA
|
||||
end
|
||||
|
||||
def install
|
||||
ENV.deparallelize
|
||||
|
@ -23,43 +26,34 @@ class GribApi < Formula
|
|||
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);
|
||||
diff --git a/configure b/configure
|
||||
index 0a88b28..9dafe46 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7006,7 +7006,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
|
||||
darwin* | rhapsody*)
|
||||
# PIC is the default on this platform
|
||||
# Common symbols not allowed in MH_DYLIB files
|
||||
- lt_prog_compiler_pic='-fno-common'
|
||||
+ #lt_prog_compiler_pic='-fno-common'
|
||||
;;
|
||||
|
||||
hpux*)
|
||||
@@ -12186,7 +12186,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
|
||||
darwin* | rhapsody*)
|
||||
# PIC is the default on this platform
|
||||
# Common symbols not allowed in MH_DYLIB files
|
||||
- lt_prog_compiler_pic_F77='-fno-common'
|
||||
+ #lt_prog_compiler_pic_F77='-fno-common'
|
||||
;;
|
||||
|
||||
hpux*)
|
||||
@@ -15214,7 +15214,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
|
||||
darwin* | rhapsody*)
|
||||
# PIC is the default on this platform
|
||||
# Common symbols not allowed in MH_DYLIB files
|
||||
- lt_prog_compiler_pic_FC='-fno-common'
|
||||
+ #lt_prog_compiler_pic_FC='-fno-common'
|
||||
;;
|
||||
|
||||
hpux*)
|
||||
|
|
Loading…
Reference in New Issue