<pre style='margin:0'>
Vincent (Veence) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/45b2e591b885eba86e4dc85d19f0608a35fa9520">https://github.com/macports/macports-ports/commit/45b2e591b885eba86e4dc85d19f0608a35fa9520</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 45b2e59 grass7: add more patches (__unix__ -> __APPLE__)
</span>45b2e59 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 45b2e591b885eba86e4dc85d19f0608a35fa9520
</span>Author: Veence <vince@macports.org>
AuthorDate: Thu Dec 22 10:30:04 2016 +0100
<span style='display:block; white-space:pre;color:#404040;'> grass7: add more patches (__unix__ -> __APPLE__)
</span>---
gis/grass7/Portfile | 17 +++++-
gis/grass7/files/patch_libraster-gdal_c.diff.tplt | 67 +++++++++++++++++++++++
2 files changed, 82 insertions(+), 2 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/gis/grass7/Portfile b/gis/grass7/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index a36e008..72f96d9 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/gis/grass7/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/gis/grass7/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6,7 +6,7 @@ PortGroup active_variants 1.1
</span>
name grass7
version 7.1.99.2
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 2
</span> set realVersion 7.2.0RC2
#distname grass-${version}
distname grass-${realVersion}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -43,19 +43,32 @@ depends_lib port:freetype \
</span> port:${wxWidgets.port} \
port:py27-${wxWidgets.port}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+pre-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exec sed -e s#&&&#${prefix}# \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${filespath}/patch_libraster-gdal_c.diff.tplt > \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/patch_libraster-gdal_c.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exec patch -p0 -d ${worksrcpath} < ${worksrcpath}/patch_libraster-gdal_c.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> patchfiles patch-configure.diff \
patch-Install_make.diff
post-patch {
set python_bin ${prefix}/bin/python2.7
set python_scripts [exec find ${worksrcpath} -name *.py]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- puts $python_scripts
</span> foreach f $python_scripts {
reinplace "s|/usr/bin/env python|${python_bin}|" ${f}
}
reinplace "s|PYVER.*|PYVER = 2.7|" ${worksrcpath}/macosx/Makefile
reinplace "s|^PYTHON.*|PYTHON = ${python_bin}|" ${worksrcpath}/include/Make/Platform.make.in
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Substitute __unix__ by __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set c_files [exec find ${worksrcpath} -name *.\[ch\]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts $c_files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach f $c_files {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|__unix__|__APPLE__|" $f
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> ui_warn "WARNING! Experimental build. Report any problems."
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/gis/grass7/files/patch_libraster-gdal_c.diff.tplt b/gis/grass7/files/patch_libraster-gdal_c.diff.tplt
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..22ac3d5
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/gis/grass7/files/patch_libraster-gdal_c.diff.tplt
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,67 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- lib/raster/gdal.c.orig 2016-12-22 08:43:18.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ lib/raster/gdal.c 2016-12-22 08:45:47.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -29,7 +29,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef GDAL_LINK
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef GDAL_DYNAMIC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# if defined(__unix) || defined(__unix__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if defined(__unix) || defined(__unix__) || defined (__APPLE__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # include <dlfcn.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # ifdef _WIN32
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -77,12 +77,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void *sym;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# ifdef __unix__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sym = dlsym(library_h, name);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# ifdef _WIN32
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sym = GetProcAddress((HINSTANCE) library_h, name);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!sym)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ G_fatal_error(_("Unable to locate symbol <%s>"), name);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -92,41 +87,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void try_load_library(const char *name)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# ifdef __unix__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ library_h = dlopen(name, RTLD_NOW);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# ifdef _WIN32
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- library_h = LoadLibrary(name);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void load_library(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static const char *const candidates[] = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# ifdef __unix__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "libgdal.so.20",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "libgdal.so.1",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "libgdal.1.1.so",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "gdal.1.0.so",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "gdal.so.1.0",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "libgdal.so",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "libgdal1.6.0.so",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "libgdal1.7.0.so",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# ifdef _WIN32
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "gdal200.dll",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "gdal111.dll",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "gdal110.dll",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "gdal19.dll",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "gdal18.dll",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "gdal17.dll",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "gdal16.dll",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "gdal15.dll",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "gdal11.dll",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "gdal.1.0.dll",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "libgdal-1.dll",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "gdal.dll",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "&&&/lib/libgdal.20.dylib",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ NULL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int i;
</span></pre><pre style='margin:0'>
</pre>