<!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>[143533] trunk/dports/devel/cvs</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/143533">143533</a></dd>
<dt>Author</dt> <dd>larryv@macports.org</dd>
<dt>Date</dt> <dd>2015-12-14 10:20:49 -0800 (Mon, 14 Dec 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>cvs: Use modern patch-naming style</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsdevelcvsPortfile">trunk/dports/devel/cvs/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsdevelcvsfilesproxypatch">trunk/dports/devel/cvs/files/proxy.patch</a></li>
<li><a href="#trunkdportsdevelcvsfilesusesystemgetlinepatch">trunk/dports/devel/cvs/files/use-system-getline.patch</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkdportsdevelcvsfilespatchcvsproxy">trunk/dports/devel/cvs/files/patch-cvs-proxy</a></li>
<li><a href="#trunkdportsdevelcvsfilespatchgetline">trunk/dports/devel/cvs/files/patch-getline</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsdevelcvsPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/devel/cvs/Portfile (143532 => 143533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/cvs/Portfile        2015-12-14 18:16:06 UTC (rev 143532)
+++ trunk/dports/devel/cvs/Portfile        2015-12-14 18:20:49 UTC (rev 143533)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> # Lion provides a POSIX getline; rename the one in the source to use
</span><span class="cx"> # the OS-provided one instead, and avoid conflict on name
</span><span class="cx"> if {${os.platform} eq &quot;darwin&quot; &amp;&amp; ${os.major} &gt;= 11} {
</span><del>-    patchfiles-append patch-getline
</del><ins>+    patchfiles-append use-system-getline.patch
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> configure.args      --infodir=${prefix}/share/info \
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> variant proxy {
</span><del>-    patchfiles-append       patch-cvs-proxy
</del><ins>+    patchfiles-append proxy.patch
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> livecheck.type      regex
</span></span></pre></div>
<a id="trunkdportsdevelcvsfilespatchcvsproxy"></a>
<div class="delfile"><h4>Deleted: trunk/dports/devel/cvs/files/patch-cvs-proxy (143532 => 143533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/cvs/files/patch-cvs-proxy        2015-12-14 18:16:06 UTC (rev 143532)
+++ trunk/dports/devel/cvs/files/patch-cvs-proxy        2015-12-14 18:20:49 UTC (rev 143533)
</span><span class="lines">@@ -1,223 +0,0 @@
</span><del>---- src/client.c.org        Tue Nov 30 13:49:23 2004
-+++ src/client.c        Wed Dec  1 12:42:01 2004
-@@ -144,6 +144,7 @@

- static size_t try_read_from_server PROTO ((char *, size_t));

-+static void proxy_connect PROTO ((cvsroot_t *, int));
- static void auth_server PROTO ((cvsroot_t *, struct buffer *, struct buffer *,
-                                 int, int, struct hostent *));

-@@ -3762,7 +3763,7 @@
-     int port_number;
-     struct sockaddr_in client_sai;
-     struct hostent *hostinfo;
--    struct buffer *to_server, *from_server;
-+    struct buffer *local_to_server, *local_from_server;

-     sock = socket (AF_INET, SOCK_STREAM, 0);
-     if (sock == -1)
-@@ -3770,7 +3771,17 @@
-         error (1, 0, &quot;cannot create socket: %s&quot;, SOCK_STRERROR (SOCK_ERRNO));
-     }
-     port_number = get_cvs_port_number (root);
-+
-+    /* if we have a proxy connect to that instead */
-+    if(root-&gt;proxy)
-+    {
-+      hostinfo = init_sockaddr (&amp;client_sai, root-&gt;proxy, root-&gt;proxy_port);
-+    }
-+    else
-+    {
-     hostinfo = init_sockaddr (&amp;client_sai, root-&gt;hostname, port_number);
-+    }
-+    
-     if (trace)
-     {
-         fprintf (stderr, &quot; -&gt; Connecting to %s(%s):%d\n&quot;,
-@@ -3780,29 +3791,41 @@
-     if (connect (sock, (struct sockaddr *) &amp;client_sai, sizeof (client_sai))
-         &lt; 0)
-         error (1, 0, &quot;connect to %s(%s):%d failed: %s&quot;,
--               root-&gt;hostname,
-+               root-&gt;proxy ? root-&gt;proxy : root-&gt;hostname,
-                inet_ntoa (client_sai.sin_addr),
--               port_number, SOCK_STRERROR (SOCK_ERRNO));
-+               root-&gt;proxy ? root-&gt;proxy_port : port_number,
-+               SOCK_STRERROR (SOCK_ERRNO));

--    make_bufs_from_fds (sock, sock, 0, &amp;to_server, &amp;from_server, 1);
-+    make_bufs_from_fds (sock, sock, 0, &amp;local_to_server, &amp;local_from_server, 1);

--    auth_server (root, to_server, from_server, verify_only, do_gssapi, hostinfo);
-+    if(root-&gt;proxy)
-+    {
-+      // REALLY ugly hack to allow proxy_connect() to use send_to_server().
-+      // The proper fix would be to remove the global to_server &amp; from_server
-+      // variables, and instead let send_to_server() etc. take the target
-+      // server struct as a paramter.
-+      to_server = local_to_server;
-+      from_server = local_from_server;
-+      proxy_connect (root, port_number);
-+   }
-+
-+    auth_server (root, local_to_server, local_from_server, verify_only, do_gssapi, hostinfo);

-     if (verify_only)
-     {
-         int status;

--        status = buf_shutdown (to_server);
-+        status = buf_shutdown (local_to_server);
-         if (status != 0)
-             error (0, status, &quot;shutting down buffer to server&quot;);
--        buf_free (to_server);
--        to_server = NULL;
-+        buf_free (local_to_server);
-+        local_to_server = NULL;

--        status = buf_shutdown (from_server);
-+        status = buf_shutdown (local_from_server);
-         if (status != 0)
-             error (0, status, &quot;shutting down buffer from server&quot;);
--        buf_free (from_server);
--        from_server = NULL;
-+        buf_free (local_from_server);
-+        local_from_server = NULL;

-         /* Don't need to set server_started = 0 since we don't set it to 1
-          * until returning from this call.
-@@ -3810,11 +3833,53 @@
-     }
-     else
-     {
--        *to_server_p = to_server;
--        *from_server_p = from_server;
-+        *to_server_p = local_to_server;
-+        *from_server_p = local_from_server;
-     }

-     return;
-+}
-+
-+
-+
-+static void
-+proxy_connect (root, port_number)
-+    cvsroot_t *root;
-+    int port_number;
-+{
-+#define CONNECT_STRING &quot;CONNECT %s:%d HTTP/1.0\r\n\r\n&quot;
-+    /* Send a &quot;CONNECT&quot; command to proxy: */
-+    char* read_buf;
-+    int codenum, count;
-+    
-+    /* 4 characters for port covered by the length of %s &amp; %d */
-+    char* write_buf = xmalloc (strlen (CONNECT_STRING) + strlen (root-&gt;hostname
-+) + 20 + 1);
-+    int len = sprintf (write_buf, CONNECT_STRING, root-&gt;hostname, port_number);
-+
-+    send_to_server (write_buf, len);
-+    
-+    /* Wait for HTTP status code, bail out if you don't get back a 2xx code.*/
-+    count = read_line (&amp;read_buf);
-+    sscanf (read_buf, &quot;%s %d&quot;, write_buf, &amp;codenum);
-+    
-+    if ((codenum / 100) != 2)
-+       error (1, 0, &quot;proxy server %s:%d does not support http tunnelling&quot;,
-+              root-&gt;proxy, root-&gt;proxy_port);
-+    free (read_buf);
-+    free (write_buf);
-+    
-+    /* Skip through remaining part of MIME header, recv_line
-+       consumes the trailing \n */
-+    while(read_line (&amp;read_buf) &gt; 0)
-+    {
-+       if (read_buf[0] == '\r' || read_buf[0] == 0)
-+       {
-+           free (read_buf);
-+           break;
-+       }
-+       free (read_buf);
-+    }
- }


---- src/client.h.org        Wed Dec  1 07:36:43 2004
-+++ src/client.h        Wed Dec  1 07:38:06 2004
-@@ -69,6 +69,9 @@
- #   ifndef CVS_AUTH_PORT
- #     define CVS_AUTH_PORT 2401
- #   endif /* CVS_AUTH_PORT */
-+#   ifndef CVS_PROXY_PORT
-+#     define CVS_PROXY_PORT 80
-+#   endif /* CVS_PROXY_PORT */
- # endif /* (AUTH_CLIENT_SUPPORT) || defined (HAVE_GSSAPI) */

- # if HAVE_KERBEROS
---- src/root.c.org        Wed Dec  1 07:38:19 2004
-+++ src/root.c        Wed Dec  1 07:48:43 2004
-@@ -303,6 +303,8 @@
-     newroot-&gt;proxy_port = 0;
-     newroot-&gt;isremote = 0;
- #endif /* CLIENT_SUPPORT */
-+    newroot-&gt;proxy = NULL;
-+    newroot-&gt;proxy_port = CVS_PROXY_PORT;

-     return newroot;
- }
-@@ -332,6 +334,8 @@
-     if (root-&gt;proxy_hostname != NULL)
-         free (root-&gt;proxy_hostname);
- #endif /* CLIENT_SUPPORT */
-+    if (root-&gt;proxy != NULL)
-+        free (root-&gt;proxy);
-     free (root);
- }

-@@ -375,6 +379,7 @@
- #ifdef CLIENT_SUPPORT
-     int check_hostname, no_port, no_password;
- #endif /* CLIENT_SUPPORT */
-+    const char *env_var;

-     /* allocate some space */
-     newroot = new_cvsroot_t();
-@@ -555,6 +560,29 @@
-         /* restore the '/' */
-         cvsroot_copy = firstslash;
-         *cvsroot_copy = '/';
-+
-+       
-+       /* Determine proxy */
-+       env_var = getenv(&quot;CVS_PROXY&quot;);
-+       if (!env_var)
-+           env_var = getenv(&quot;HTTP_PROXY&quot;);
-+       /* Check if a proxy was specified, and if it is a HTTP proxy */
-+       if (env_var &amp;&amp; !memcmp(env_var, &quot;http://&quot;, 7))
-+       {
-+           char *port_str;
-+           
-+           /* Try to parse the proxy data */
-+           env_var += 7;
-+           /* TODO - parse username/password data, too */
-+           port_str = strchr(env_var, ':');
-+           if (port_str)
-+           {
-+               *port_str++ = 0;
-+               newroot-&gt;proxy_port = atoi(port_str);
-+           }
-+           newroot-&gt;proxy = xstrdup(env_var);
-+       }
-+
- #endif /* CLIENT_SUPPORT */
-     }

---- src/root.h.org        Wed Dec  1 07:48:49 2004
-+++ src/root.h        Wed Dec  1 12:26:12 2004
-@@ -39,4 +39,5 @@
-     int proxy_port;                /* The port of the proxy or zero, as above. */
-     unsigned char isremote;        /* Nonzero if we are doing remote access. */
- #endif /* CLIENT_SUPPORT */
-+    char *proxy;        
- } cvsroot_t;
</del></span></pre></div>
<a id="trunkdportsdevelcvsfilespatchgetline"></a>
<div class="delfile"><h4>Deleted: trunk/dports/devel/cvs/files/patch-getline (143532 => 143533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/cvs/files/patch-getline        2015-12-14 18:16:06 UTC (rev 143532)
+++ trunk/dports/devel/cvs/files/patch-getline        2015-12-14 18:20:49 UTC (rev 143533)
</span><span class="lines">@@ -1,22 +0,0 @@
</span><del>---- lib/getline.c.orig        2011-07-26 09:06:04.000000000 +0930
-+++ lib/getline.c        2011-07-26 09:06:17.000000000 +0930
-@@ -155,7 +155,7 @@
- }

- int
--getline (lineptr, n, stream)
-+_getline (lineptr, n, stream)
-      char **lineptr;
-      size_t *n;
-      FILE *stream;
---- lib/getline.h.orig        2011-07-26 09:06:08.000000000 +0930
-+++ lib/getline.h        2011-07-26 09:06:23.000000000 +0930
-@@ -12,7 +12,7 @@
- #define GETLINE_NO_LIMIT -1

- int
--  getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
-+  _getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
- int
-   getline_safe __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
-                          int limit));
</del></span></pre></div>
<a id="trunkdportsdevelcvsfilesproxypatchfromrev143532trunkdportsdevelcvsfilespatchcvsproxy"></a>
<div class="copfile"><h4>Copied: trunk/dports/devel/cvs/files/proxy.patch (from rev 143532, trunk/dports/devel/cvs/files/patch-cvs-proxy) (0 => 143533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/cvs/files/proxy.patch                                (rev 0)
+++ trunk/dports/devel/cvs/files/proxy.patch        2015-12-14 18:20:49 UTC (rev 143533)
</span><span class="lines">@@ -0,0 +1,223 @@
</span><ins>+--- src/client.c.org        Tue Nov 30 13:49:23 2004
++++ src/client.c        Wed Dec  1 12:42:01 2004
+@@ -144,6 +144,7 @@

+ static size_t try_read_from_server PROTO ((char *, size_t));

++static void proxy_connect PROTO ((cvsroot_t *, int));
+ static void auth_server PROTO ((cvsroot_t *, struct buffer *, struct buffer *,
+                                 int, int, struct hostent *));

+@@ -3762,7 +3763,7 @@
+     int port_number;
+     struct sockaddr_in client_sai;
+     struct hostent *hostinfo;
+-    struct buffer *to_server, *from_server;
++    struct buffer *local_to_server, *local_from_server;

+     sock = socket (AF_INET, SOCK_STREAM, 0);
+     if (sock == -1)
+@@ -3770,7 +3771,17 @@
+         error (1, 0, &quot;cannot create socket: %s&quot;, SOCK_STRERROR (SOCK_ERRNO));
+     }
+     port_number = get_cvs_port_number (root);
++
++    /* if we have a proxy connect to that instead */
++    if(root-&gt;proxy)
++    {
++      hostinfo = init_sockaddr (&amp;client_sai, root-&gt;proxy, root-&gt;proxy_port);
++    }
++    else
++    {
+     hostinfo = init_sockaddr (&amp;client_sai, root-&gt;hostname, port_number);
++    }
++    
+     if (trace)
+     {
+         fprintf (stderr, &quot; -&gt; Connecting to %s(%s):%d\n&quot;,
+@@ -3780,29 +3791,41 @@
+     if (connect (sock, (struct sockaddr *) &amp;client_sai, sizeof (client_sai))
+         &lt; 0)
+         error (1, 0, &quot;connect to %s(%s):%d failed: %s&quot;,
+-               root-&gt;hostname,
++               root-&gt;proxy ? root-&gt;proxy : root-&gt;hostname,
+                inet_ntoa (client_sai.sin_addr),
+-               port_number, SOCK_STRERROR (SOCK_ERRNO));
++               root-&gt;proxy ? root-&gt;proxy_port : port_number,
++               SOCK_STRERROR (SOCK_ERRNO));

+-    make_bufs_from_fds (sock, sock, 0, &amp;to_server, &amp;from_server, 1);
++    make_bufs_from_fds (sock, sock, 0, &amp;local_to_server, &amp;local_from_server, 1);

+-    auth_server (root, to_server, from_server, verify_only, do_gssapi, hostinfo);
++    if(root-&gt;proxy)
++    {
++      // REALLY ugly hack to allow proxy_connect() to use send_to_server().
++      // The proper fix would be to remove the global to_server &amp; from_server
++      // variables, and instead let send_to_server() etc. take the target
++      // server struct as a paramter.
++      to_server = local_to_server;
++      from_server = local_from_server;
++      proxy_connect (root, port_number);
++   }
++
++    auth_server (root, local_to_server, local_from_server, verify_only, do_gssapi, hostinfo);

+     if (verify_only)
+     {
+         int status;

+-        status = buf_shutdown (to_server);
++        status = buf_shutdown (local_to_server);
+         if (status != 0)
+             error (0, status, &quot;shutting down buffer to server&quot;);
+-        buf_free (to_server);
+-        to_server = NULL;
++        buf_free (local_to_server);
++        local_to_server = NULL;

+-        status = buf_shutdown (from_server);
++        status = buf_shutdown (local_from_server);
+         if (status != 0)
+             error (0, status, &quot;shutting down buffer from server&quot;);
+-        buf_free (from_server);
+-        from_server = NULL;
++        buf_free (local_from_server);
++        local_from_server = NULL;

+         /* Don't need to set server_started = 0 since we don't set it to 1
+          * until returning from this call.
+@@ -3810,11 +3833,53 @@
+     }
+     else
+     {
+-        *to_server_p = to_server;
+-        *from_server_p = from_server;
++        *to_server_p = local_to_server;
++        *from_server_p = local_from_server;
+     }

+     return;
++}
++
++
++
++static void
++proxy_connect (root, port_number)
++    cvsroot_t *root;
++    int port_number;
++{
++#define CONNECT_STRING &quot;CONNECT %s:%d HTTP/1.0\r\n\r\n&quot;
++    /* Send a &quot;CONNECT&quot; command to proxy: */
++    char* read_buf;
++    int codenum, count;
++    
++    /* 4 characters for port covered by the length of %s &amp; %d */
++    char* write_buf = xmalloc (strlen (CONNECT_STRING) + strlen (root-&gt;hostname
++) + 20 + 1);
++    int len = sprintf (write_buf, CONNECT_STRING, root-&gt;hostname, port_number);
++
++    send_to_server (write_buf, len);
++    
++    /* Wait for HTTP status code, bail out if you don't get back a 2xx code.*/
++    count = read_line (&amp;read_buf);
++    sscanf (read_buf, &quot;%s %d&quot;, write_buf, &amp;codenum);
++    
++    if ((codenum / 100) != 2)
++       error (1, 0, &quot;proxy server %s:%d does not support http tunnelling&quot;,
++              root-&gt;proxy, root-&gt;proxy_port);
++    free (read_buf);
++    free (write_buf);
++    
++    /* Skip through remaining part of MIME header, recv_line
++       consumes the trailing \n */
++    while(read_line (&amp;read_buf) &gt; 0)
++    {
++       if (read_buf[0] == '\r' || read_buf[0] == 0)
++       {
++           free (read_buf);
++           break;
++       }
++       free (read_buf);
++    }
+ }


+--- src/client.h.org        Wed Dec  1 07:36:43 2004
++++ src/client.h        Wed Dec  1 07:38:06 2004
+@@ -69,6 +69,9 @@
+ #   ifndef CVS_AUTH_PORT
+ #     define CVS_AUTH_PORT 2401
+ #   endif /* CVS_AUTH_PORT */
++#   ifndef CVS_PROXY_PORT
++#     define CVS_PROXY_PORT 80
++#   endif /* CVS_PROXY_PORT */
+ # endif /* (AUTH_CLIENT_SUPPORT) || defined (HAVE_GSSAPI) */

+ # if HAVE_KERBEROS
+--- src/root.c.org        Wed Dec  1 07:38:19 2004
++++ src/root.c        Wed Dec  1 07:48:43 2004
+@@ -303,6 +303,8 @@
+     newroot-&gt;proxy_port = 0;
+     newroot-&gt;isremote = 0;
+ #endif /* CLIENT_SUPPORT */
++    newroot-&gt;proxy = NULL;
++    newroot-&gt;proxy_port = CVS_PROXY_PORT;

+     return newroot;
+ }
+@@ -332,6 +334,8 @@
+     if (root-&gt;proxy_hostname != NULL)
+         free (root-&gt;proxy_hostname);
+ #endif /* CLIENT_SUPPORT */
++    if (root-&gt;proxy != NULL)
++        free (root-&gt;proxy);
+     free (root);
+ }

+@@ -375,6 +379,7 @@
+ #ifdef CLIENT_SUPPORT
+     int check_hostname, no_port, no_password;
+ #endif /* CLIENT_SUPPORT */
++    const char *env_var;

+     /* allocate some space */
+     newroot = new_cvsroot_t();
+@@ -555,6 +560,29 @@
+         /* restore the '/' */
+         cvsroot_copy = firstslash;
+         *cvsroot_copy = '/';
++
++       
++       /* Determine proxy */
++       env_var = getenv(&quot;CVS_PROXY&quot;);
++       if (!env_var)
++           env_var = getenv(&quot;HTTP_PROXY&quot;);
++       /* Check if a proxy was specified, and if it is a HTTP proxy */
++       if (env_var &amp;&amp; !memcmp(env_var, &quot;http://&quot;, 7))
++       {
++           char *port_str;
++           
++           /* Try to parse the proxy data */
++           env_var += 7;
++           /* TODO - parse username/password data, too */
++           port_str = strchr(env_var, ':');
++           if (port_str)
++           {
++               *port_str++ = 0;
++               newroot-&gt;proxy_port = atoi(port_str);
++           }
++           newroot-&gt;proxy = xstrdup(env_var);
++       }
++
+ #endif /* CLIENT_SUPPORT */
+     }

+--- src/root.h.org        Wed Dec  1 07:48:49 2004
++++ src/root.h        Wed Dec  1 12:26:12 2004
+@@ -39,4 +39,5 @@
+     int proxy_port;                /* The port of the proxy or zero, as above. */
+     unsigned char isremote;        /* Nonzero if we are doing remote access. */
+ #endif /* CLIENT_SUPPORT */
++    char *proxy;        
+ } cvsroot_t;
</ins></span></pre></div>
<a id="trunkdportsdevelcvsfilesusesystemgetlinepatchfromrev143532trunkdportsdevelcvsfilespatchgetline"></a>
<div class="copfile"><h4>Copied: trunk/dports/devel/cvs/files/use-system-getline.patch (from rev 143532, trunk/dports/devel/cvs/files/patch-getline) (0 => 143533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/cvs/files/use-system-getline.patch                                (rev 0)
+++ trunk/dports/devel/cvs/files/use-system-getline.patch        2015-12-14 18:20:49 UTC (rev 143533)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+--- lib/getline.c.orig        2011-07-26 09:06:04.000000000 +0930
++++ lib/getline.c        2011-07-26 09:06:17.000000000 +0930
+@@ -155,7 +155,7 @@
+ }

+ int
+-getline (lineptr, n, stream)
++_getline (lineptr, n, stream)
+      char **lineptr;
+      size_t *n;
+      FILE *stream;
+--- lib/getline.h.orig        2011-07-26 09:06:08.000000000 +0930
++++ lib/getline.h        2011-07-26 09:06:23.000000000 +0930
+@@ -12,7 +12,7 @@
+ #define GETLINE_NO_LIMIT -1

+ int
+-  getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
++  _getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
+ int
+   getline_safe __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
+                          int limit));
</ins></span></pre>
</div>
</div>

</body>
</html>