[138338] trunk/dports/graphics/ufraw

jeremyhu at macports.org jeremyhu at macports.org
Sun Jul 5 19:43:05 PDT 2015


Revision: 138338
          https://trac.macports.org/changeset/138338
Author:   jeremyhu at macports.org
Date:     2015-07-05 19:43:05 -0700 (Sun, 05 Jul 2015)
Log Message:
-----------
ufraw: Build fix for SL and earlier

Modified Paths:
--------------
    trunk/dports/graphics/ufraw/Portfile

Added Paths:
-----------
    trunk/dports/graphics/ufraw/files/snowleopard-strnlen.patch

Modified: trunk/dports/graphics/ufraw/Portfile
===================================================================
--- trunk/dports/graphics/ufraw/Portfile	2015-07-06 00:52:45 UTC (rev 138337)
+++ trunk/dports/graphics/ufraw/Portfile	2015-07-06 02:43:05 UTC (rev 138338)
@@ -41,6 +41,12 @@
 
 patchfiles          patch-ufraw-gimp.c.diff
 
+platform darwin {
+    if {${os.major} < 11} {
+        patchfiles-append snowleopard-strnlen.patch
+    }
+}
+
 configure.args      --enable-contrast
 
 post-destroot {

Added: trunk/dports/graphics/ufraw/files/snowleopard-strnlen.patch
===================================================================
--- trunk/dports/graphics/ufraw/files/snowleopard-strnlen.patch	                        (rev 0)
+++ trunk/dports/graphics/ufraw/files/snowleopard-strnlen.patch	2015-07-06 02:43:05 UTC (rev 138338)
@@ -0,0 +1,23 @@
+--- dcraw.cc.orig	2015-07-05 19:35:57.000000000 -0700
++++ dcraw.cc	2015-07-05 19:38:28.000000000 -0700
+@@ -41,6 +41,20 @@ extern "C" {
+ #include <time.h>
+ #include <sys/types.h>
+ 
++extern "C" {
++static size_t
++strnlen(const char *s, size_t maxlen)
++{
++	size_t len;
++
++	for (len = 0; len < maxlen; len++, s++) {
++		if (!*s)
++			break;
++	}
++	return (len);
++}
++}
++
+ #ifndef HAVE_CONFIG_H /*fseeko() is handled by the UFRaw config system - NKBJ*/
+ #if defined(DJGPP) || defined(__MINGW32__)
+ #define fseeko fseek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150705/f26033ad/attachment.html>


More information about the macports-changes mailing list