<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[120397] trunk/dports/devel/girara</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/120397">120397</a></dd>
<dt>Author</dt> <dd>devans@macports.org</dd>
<dt>Date</dt> <dd>2014-05-27 09:54:53 -0700 (Tue, 27 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>girara: maintainer fix for missing getline on SL and earlier (#43804).</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsdevelgiraraPortfile">trunk/dports/devel/girara/Portfile</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsdevelgirarafilespatchgetdelimcdiff">trunk/dports/devel/girara/files/patch-getdelim.c.diff</a></li>
<li><a href="#trunkdportsdevelgirarafilespatchgetdelimhdiff">trunk/dports/devel/girara/files/patch-getdelim.h.diff</a></li>
<li><a href="#trunkdportsdevelgirarafilespatchgetlinecdiff">trunk/dports/devel/girara/files/patch-getline.c.diff</a></li>
<li><a href="#trunkdportsdevelgirarafilespatchgetlinehdiff">trunk/dports/devel/girara/files/patch-getline.h.diff</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsdevelgiraraPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/devel/girara/Portfile (120396 => 120397)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/girara/Portfile        2014-05-27 15:06:04 UTC (rev 120396)
+++ trunk/dports/devel/girara/Portfile        2014-05-27 16:54:53 UTC (rev 120397)
</span><span class="lines">@@ -26,9 +26,8 @@
</span><span class="cx">
</span><span class="cx"> master_sites ${homepage}download/
</span><span class="cx">
</span><del>-checksums \
- rmd160 e89c075c353548740ab9e3de1d8e6ccea61823f6 \
- sha256 d14b54cb04d81ba3b84ad41c5e68951d250b455d0862add1c987e3af9e2e174d
</del><ins>+checksums rmd160 e89c075c353548740ab9e3de1d8e6ccea61823f6 \
+ sha256 d14b54cb04d81ba3b84ad41c5e68951d250b455d0862add1c987e3af9e2e174d
</ins><span class="cx">
</span><span class="cx"> patchfiles patch-Makefile.diff \
</span><span class="cx"> patch-config.mk.diff
</span><span class="lines">@@ -53,6 +52,22 @@
</span><span class="cx">
</span><span class="cx"> variant universal {}
</span><span class="cx">
</span><ins>+platform darwin {
+# Before 10.7 there's no getline() in stdio.h
+# http://stackoverflow.com/a/1117158/205907
+ if {${os.major} < 11} {
+# Using CVS project implementation
+# http://www.opensource.apple.com/source/cvs/cvs-47/cvs/lib/getline.c?txt
+# http://www.opensource.apple.com/source/cvs/cvs-47/cvs/lib/getline.h?txt
+# http://www.opensource.apple.com/source/cvs/cvs-47/cvs/lib/getdelim.c?txt
+# http://www.opensource.apple.com/source/cvs/cvs-47/cvs/lib/getdelim.h?txt
+ patchfiles-append patch-getline.h.diff \
+ patch-getline.c.diff \
+ patch-getdelim.h.diff \
+ patch-getdelim.c.diff
+ }
+}
+
</ins><span class="cx"> build.args PREFIX=${prefix}
</span><span class="cx"> build.env CC=${configure.cc} \
</span><span class="cx"> CXX=${configure.cxx} \
</span></span></pre></div>
<a id="trunkdportsdevelgirarafilespatchgetdelimcdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/girara/files/patch-getdelim.c.diff (0 => 120397)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/girara/files/patch-getdelim.c.diff         (rev 0)
+++ trunk/dports/devel/girara/files/patch-getdelim.c.diff        2014-05-27 16:54:53 UTC (rev 120397)
</span><span class="lines">@@ -0,0 +1,122 @@
</span><ins>+--- /dev/null        2014-05-26 23:26:54.000000000 -0500
++++ getdelim.c        2014-05-26 19:08:15.000000000 -0500
+@@ -0,0 +1,119 @@
++/* getdelim.c --- Implementation of replacement getdelim function.
++ Copyright (C) 1994, 1996, 1997, 1998, 2001, 2003, 2005 Free
++ Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of the GNU General Public License as
++ published by the Free Software Foundation; either version 2, or (at
++ your option) any later version.
++
++ This program is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++ 02110-1301, USA. */
++
++/* Ported from glibc by Simon Josefsson. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <stdlib.h>
++#include <errno.h>
++
++#include "getdelim.h"
++
++#if !HAVE_FLOCKFILE
++# undef flockfile
++# define flockfile(x) ((void) 0)
++#endif
++#if !HAVE_FUNLOCKFILE
++# undef funlockfile
++# define funlockfile(x) ((void) 0)
++#endif
++
++/* Read up to (and including) a DELIMITER from FP into *LINEPTR (and
++ NUL-terminate it). *LINEPTR is a pointer returned from malloc (or
++ NULL), pointing to *N characters of space. It is realloc'ed as
++ necessary. Returns the number of characters read (not including
++ the null terminator), or -1 on error or EOF. */
++
++ssize_t
++getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
++{
++ int result = 0;
++ ssize_t cur_len = 0;
++ ssize_t len;
++
++ if (lineptr == NULL || n == NULL || fp == NULL)
++ {
++ errno = EINVAL;
++ return -1;
++ }
++
++ flockfile (fp);
++
++ if (*lineptr == NULL || *n == 0)
++ {
++ *n = 120;
++ *lineptr = (char *) malloc (*n);
++ if (*lineptr == NULL)
++        {
++         result = -1;
++         goto unlock_return;
++        }
++ }
++
++ for (;;)
++ {
++ char *t;
++ int i;
++
++ i = getc (fp);
++ if (i == EOF)
++ {
++        result = -1;
++        break;
++ }
++
++ /* Make enough space for len+1 (for final NUL) bytes. */
++ if (cur_len + 1 >= *n)
++        {
++         size_t needed = 2 * (cur_len + 1) + 1; /* Be generous. */
++         char *new_lineptr;
++
++         if (needed < cur_len)
++         {
++         result = -1;
++         goto unlock_return;
++         }
++
++         new_lineptr = (char *) realloc (*lineptr, needed);
++         if (new_lineptr == NULL)
++         {
++         result = -1;
++         goto unlock_return;
++         }
++
++         *lineptr = new_lineptr;
++         *n = needed;
++        }
++
++ (*lineptr)[cur_len] = i;
++ cur_len++;
++
++ if (i == delimiter)
++        break;
++ }
++ (*lineptr)[cur_len] = '\0';
++ result = cur_len ? cur_len : result;
++
++ unlock_return:
++ funlockfile (fp);
++ return result;
++}
</ins></span></pre></div>
<a id="trunkdportsdevelgirarafilespatchgetdelimhdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/girara/files/patch-getdelim.h.diff (0 => 120397)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/girara/files/patch-getdelim.h.diff         (rev 0)
+++ trunk/dports/devel/girara/files/patch-getdelim.h.diff        2014-05-27 16:54:53 UTC (rev 120397)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+--- /dev/null        2014-05-26 23:26:54.000000000 -0500
++++ getdelim.h        2014-05-26 19:08:33.000000000 -0500
+@@ -0,0 +1,28 @@
++/* getdelim.h --- Prototype for replacement getdelim function.
++ Copyright (C) 2005 Free Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of the GNU General Public License as
++ published by the Free Software Foundation; either version 2, or (at
++ your option) any later version.
++
++ This program is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++ 02110-1301, USA. */
++
++/* Written by Simon Josefsson. */
++
++/* Get size_t, FILE, ssize_t. And getdelim, if available. */
++# include <stddef.h>
++# include <stdio.h>
++# include <sys/types.h>
++
++#if !HAVE_DECL_GETDELIM
++ssize_t getdelim (char **lineptr, size_t *n, int delimiter, FILE *stream);
++#endif /* !HAVE_GETDELIM */
</ins></span></pre></div>
<a id="trunkdportsdevelgirarafilespatchgetlinecdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/girara/files/patch-getline.c.diff (0 => 120397)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/girara/files/patch-getline.c.diff         (rev 0)
+++ trunk/dports/devel/girara/files/patch-getline.c.diff        2014-05-27 16:54:53 UTC (rev 120397)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+--- /dev/null        2014-05-26 23:26:54.000000000 -0500
++++ getline.c        2014-05-26 19:08:42.000000000 -0500
+@@ -0,0 +1,32 @@
++/* getline.c --- Implementation of replacement getline function.
++ Copyright (C) 2005 Free Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of the GNU General Public License as
++ published by the Free Software Foundation; either version 2, or (at
++ your option) any later version.
++
++ This program is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++ 02110-1301, USA. */
++
++/* Written by Simon Josefsson. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include "getdelim.h"
++#include "getline.h"
++
++ssize_t
++getline (char **lineptr, size_t *n, FILE *stream)
++{
++ return getdelim (lineptr, n, '\n', stream);
++}
</ins></span></pre></div>
<a id="trunkdportsdevelgirarafilespatchgetlinehdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/girara/files/patch-getline.h.diff (0 => 120397)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/girara/files/patch-getline.h.diff         (rev 0)
+++ trunk/dports/devel/girara/files/patch-getline.h.diff        2014-05-27 16:54:53 UTC (rev 120397)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+--- /dev/null        2014-05-26 23:26:54.000000000 -0500
++++ getline.h        2014-05-26 19:08:50.000000000 -0500
+@@ -0,0 +1,28 @@
++/* getline.h --- Prototype for replacement getline function.
++ Copyright (C) 2005 Free Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of the GNU General Public License as
++ published by the Free Software Foundation; either version 2, or (at
++ your option) any later version.
++
++ This program is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++ 02110-1301, USA. */
++
++/* Written by Simon Josefsson. */
++
++/* Get size_t, FILE, ssize_t. And getline, if available. */
++# include <stddef.h>
++# include <stdio.h>
++# include <sys/types.h>
++
++#if !HAVE_DECL_GETLINE
++ssize_t getline (char **lineptr, size_t *n, FILE *stream);
++#endif /* !HAVE_GETLINE */
</ins></span></pre>
</div>
</div>
</body>
</html>