Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udunits2: update to 2.2.27.14 #8155

Merged
merged 1 commit into from
Sep 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions science/udunits2/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ PortSystem 1.0
PortGroup github 1.0
PortGroup cmake 1.0

github.setup Unidata UDUNITS-2 2.2.27.6 v
# Versions 2.2.27.7-2.2.27.14 are untagged
# https://github.com/Unidata/UDUNITS-2/issues/94
# commit 00ce1e1 on master branch corresponds to 2.2.27.14
github.setup Unidata UDUNITS-2 00ce1e1
version 2.2.27.14
name udunits2
maintainers {takeshi @tenomoto}
license UCAR-Unidata
Expand All @@ -25,19 +29,22 @@ long_description \

homepage http://www.unidata.ucar.edu/software/udunits/

checksums rmd160 04062adf1c45a996fe6a17d093381a03eb5720be \
sha256 482d1614f03c081f25546420c18357fc93e5968a81c7682b6cdd6194efb3921f \
size 231773
checksums rmd160 c1ae6e3887d033980c17fedfe1e95a89ef43d242 \
sha256 3e607a260155a2cf309fa741d5869dcf14c5aadf07674afdb69ca9b0f592b7ad \
size 303468

depends_lib port:expat \
port:cunit

# Need snprintf(), strdup()
# See: https://trac.macports.org/ticket/61032
patchfiles-append patch-_XOPEN_SOURCE.diff

cmake.out_of_source yes

worksrcdir UDUNITS-2-${version}

# adhoc fix to avoid implicit declaration of snprintf()
# in spite of #include <stdio.h>
# Needed due to deliberate implicit declaration of yylex() in parser.c
# See: https://trac.macports.org/ticket/61032
configure.cflags-append \
-Wno-error=implicit-function-declaration
Expand Down
58 changes: 58 additions & 0 deletions science/udunits2/files/patch-_XOPEN_SOURCE.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Need snprintf(), strdup()
See: https://trac.macports.org/ticket/61032

--- lib/converter.c.orig
+++ lib/converter.c
@@ -12,7 +12,7 @@
/*LINTLIBRARY*/

#ifndef _XOPEN_SOURCE
-# define _XOPEN_SOURCE 500
+# define _XOPEN_SOURCE 600
#endif

#ifdef _MSC_VER
--- lib/formatter.c.orig
+++ lib/formatter.c
@@ -11,7 +11,7 @@
/*LINTLIBRARY*/

#ifndef _XOPEN_SOURCE
-# define _XOPEN_SOURCE 500
+# define _XOPEN_SOURCE 600
#endif

#ifdef _MSC_VER
--- lib/parser.c.orig
+++ lib/parser.c
@@ -89,7 +89,7 @@
/*LINTLIBRARY*/

#ifndef _XOPEN_SOURCE
-# define _XOPEN_SOURCE 500
+# define _XOPEN_SOURCE 600
#endif

#include <assert.h>
--- lib/unitAndId.c.orig
+++ lib/unitAndId.c
@@ -12,7 +12,7 @@
/*LINTLIBRARY*/

#ifndef _XOPEN_SOURCE
-# define _XOPEN_SOURCE 500
+# define _XOPEN_SOURCE 600
#endif

#include <assert.h>
--- lib/xml.c.orig
+++ lib/xml.c
@@ -15,7 +15,7 @@
#include <config.h>

#ifndef _XOPEN_SOURCE
-# define _XOPEN_SOURCE 500
+# define _XOPEN_SOURCE 600
#endif

#if defined(__linux__)