<!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>[141278] trunk/dports/net</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/141278">141278</a></dd>
<dt>Author</dt> <dd>ryandesign@macports.org</dd>
<dt>Date</dt> <dd>2015-10-13 23:32:32 -0700 (Tue, 13 Oct 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>docsis: new port, version 0.9.6 (#49268)</pre>
<h3>Added Paths</h3>
<ul>
<li>trunk/dports/net/docsis/</li>
<li><a href="#trunkdportsnetdocsisPortfile">trunk/dports/net/docsis/Portfile</a></li>
<li>trunk/dports/net/docsis/files/</li>
<li><a href="#trunkdportsnetdocsisfilesnetsnmp54patch">trunk/dports/net/docsis/files/net-snmp-5.4.patch</a></li>
<li><a href="#trunkdportsnetdocsisfilesprog_namepatch">trunk/dports/net/docsis/files/prog_name.patch</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsnetdocsisPortfile"></a>
<div class="addfile"><h4>Added: trunk/dports/net/docsis/Portfile (0 => 141278)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/net/docsis/Portfile         (rev 0)
+++ trunk/dports/net/docsis/Portfile        2015-10-14 06:32:32 UTC (rev 141278)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+PortGroup github 1.0
+
+github.setup rlaager docsis 0.9.6 upstream/
+categories net
+platforms darwin
+maintainers ryandesign openmaintainer
+license GPL-2+
+
+description generates binary configuration files for DOCSIS-compliant cable modems
+
+long_description This program encodes text configuration files which contain Configuration \
+ File Settings into binary configuration files, as specified by the DOCSIS \
+ Radio Frequency Interface Specification, Appendix C. \
+ It supports most DOCSIS 2.0 Configuration Settings.
+
+checksums rmd160 6fde2a520120a5aa9867101ed044a05c57566801 \
+ sha256 7f75fb1332b1e788ed111f64b65a702df5f23b280d0f2622c6321d6a4d2dad50
+
+depends_build port:autoconf \
+ port:automake \
+ port:bison \
+ port:flex \
+ path:bin/glib-gettextize:glib2 \
+ port:libtool
+
+depends_lib path:lib/libssl.dylib:openssl \
+ port:net-snmp
+
+patchfiles net-snmp-5.4.patch \
+ prog_name.patch
+
+configure.cmd ./autogen.sh
</ins><span class="cx">Property changes on: trunk/dports/net/docsis/Portfile
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdportsnetdocsisfilesnetsnmp54patch"></a>
<div class="addfile"><h4>Added: trunk/dports/net/docsis/files/net-snmp-5.4.patch (0 => 141278)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/net/docsis/files/net-snmp-5.4.patch         (rev 0)
+++ trunk/dports/net/docsis/files/net-snmp-5.4.patch        2015-10-14 06:32:32 UTC (rev 141278)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Fix build with net-snmp 5.4
+http://docsis.org/node/1334
+https://sourceforge.net/p/docsis/bugs/17/
+https://github.com/rlaager/docsis/commit/ed9180b94919ee9f3cceeccc8a4bf538a0ad10b5
+--- src/docsis.c.orig        2010-06-14 14:24:40.000000000 -0500
++++ src/docsis.c        2015-10-14 00:48:44.000000000 -0500
+@@ -401,7 +401,7 @@
+ #endif /* DEBUG */
+
+ setenv ("MIBS", "ALL", 1);
+- init_mib ();
++ netsnmp_init_mib ();
+ if (!netsnmp_ds_get_boolean
+ (NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_NUMERIC_OIDS))
+ {
</ins></span></pre></div>
<a id="trunkdportsnetdocsisfilesprog_namepatch"></a>
<div class="addfile"><h4>Added: trunk/dports/net/docsis/files/prog_name.patch (0 => 141278)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/net/docsis/files/prog_name.patch         (rev 0)
+++ trunk/dports/net/docsis/files/prog_name.patch        2015-10-14 06:32:32 UTC (rev 141278)
</span><span class="lines">@@ -0,0 +1,200 @@
</span><ins>+Remove prog_name, which was causing a duplicate symbol compile failure
+https://sourceforge.net/p/docsis/bugs/14/
+https://github.com/rlaager/docsis/commit/1c0abdfc8536165d1e91791a4cae38dcbf66b3d5
+--- src/docsis.c.orig
++++ src/docsis.c
+@@ -113,7 +113,7 @@ add_cmts_mic (unsigned char *tlvbuf, unsigned int tlvbuflen,
+          else
+          {
+          if ( cp[0] == 64 ) {
+-                printf("%s: warning: TLV64 (length > 255) not allowed in DOCSIS config files\n", prog_name);
++                printf("docsis: warning: TLV64 (length > 255) not allowed in DOCSIS config files\n");
+                 cp = cp + (size_t) ntohs(*((unsigned short *)(cp+1))) + 3;
+          } else {
+                  cp = cp + cp[1] + 2;
+@@ -134,11 +134,11 @@ add_cmts_mic (unsigned char *tlvbuf, unsigned int tlvbuflen,
+ }
+
+ #ifdef __GNUC__
+-static void usage (char *prog_name) __attribute__((__noreturn__));
++static void usage () __attribute__((__noreturn__));
+ #endif
+
+ static void
+-usage (char *prog_name)
++usage ()
+ {
+ printf ("DOCSIS Configuration File creator, version %s\n", VERSION);
+ printf
+@@ -147,19 +147,14 @@ usage (char *prog_name)
+ ("Copyright (c) 2002,2003,2004,2005 Evvolve Media SRL, docsis@evvolve.com \n\n");
+
+ printf
+- ("To encode a cable modem configuration file: \n\t %s -e <modem_cfg_file> <key_file> <output_file>\n",
+- prog_name);
++ ("To encode a cable modem configuration file: \n\t docsis -e <modem_cfg_file> <key_file> <output_file>\n");
+ printf
+- ("To encode multiple cable modem configuration files: \n\t %s -m <modem_cfg_file1> ... <key_file> <new_extension>\n",
+- prog_name);
++ ("To encode multiple cable modem configuration files: \n\t docsis -m <modem_cfg_file1> ... <key_file> <new_extension>\n");
+ printf
+- ("To encode a MTA configuration file: \n\t %s -p <mta_cfg_file> <output_file>\n",
+- prog_name);
++ ("To encode a MTA configuration file: \n\t docsis -p <mta_cfg_file> <output_file>\n");
+ printf
+- ("To encode multiple MTA configuration files: \n\t %s -m -p <mta_file1> ... <new_extension>\n",
+- prog_name);
+- printf ("To decode a CM or MTA config file: \n\t %s -d <binary_file>\n",
+-         prog_name);
++ ("To encode multiple MTA configuration files: \n\t docsis -m -p <mta_file1> ... <new_extension>\n");
++ printf ("To decode a CM or MTA config file: \n\t docsis -d <binary_file>\n");
+ printf
+ ("\nWhere:\n<cfg_file>\t\t= name of text (human readable) cable modem or MTA \n\t\t\t configuration file\n<key_file>\t\t= text file containing the authentication key \n\t\t\t (shared secret) to be used for the CMTS MIC\n<output_file> \t\t= name of output file where the binary data will\n\t\t\t be written to (if it does not exist it is created).\n<binary_file>\t\t= name of binary file to be decoded\n<new_extension>\t\t= new extension to be used when encoding multiple files\n");
+ printf ("\nSee examples/*.cfg for configuration file format.\n");
+@@ -179,17 +174,14 @@ main (int argc, char *argv[])
+ unsigned int encode_docsis = FALSE, decode_bin = FALSE;
+ int i;
+
+- memset (prog_name, 0, 255);
+- strncpy (prog_name, argv[0], 254);
+-
+ if (argc < 2 ) {
+-        usage(prog_name);
++        usage();
+         exit (10);
+ }
+
+ if (!strcmp (argv[1], "-m") ){ /* variable number of args, encoding multiple files */
+         if (argc < 5 ) {
+-                usage(prog_name);
++                usage();
+                 exit (10);
+         }
+         extension_string = argv[argc-1];
+@@ -204,21 +196,21 @@ main (int argc, char *argv[])
+         {
+         case 3:
+                 if (strcmp (argv[1], "-d"))
+-                        usage (prog_name);
++                        usage ();
+                 decode_bin = TRUE;
+                 config_file = argv[2];
+                 break;
+                 ;
+         case 4:
+                 if (strcmp (argv[1], "-p"))
+-                        usage (prog_name);
++                        usage ();
+                 config_file = argv[2];
+                 output_file = argv[3];
+                 break;
+                 ;
+         case 5:
+                 if (strcmp (argv[1], "-e"))
+-                        usage (prog_name);
++                        usage ();
+                 encode_docsis = TRUE;
+                 config_file = argv[2];
+                 key_file = argv[3];
+@@ -226,7 +218,7 @@ main (int argc, char *argv[])
+                 break;
+                 ;
+         default:
+-                 usage (prog_name);
++                usage ();
+                 exit (10);
+ }
+ }
+@@ -235,7 +227,7 @@ main (int argc, char *argv[])
+ {
+ if ((kf = fopen (key_file, "r")) == NULL)
+         {
+-         printf ("%s: error: can't open keyfile %s\n", prog_name, key_file);
++         printf ("docsis: error: can't open keyfile %s\n", key_file);
+          exit (-5);
+         }
+ keylen = fread (key, sizeof (unsigned char), 64, kf);
+@@ -307,7 +299,7 @@ int encode_one_file ( char *input_file, char *output_file,
+
+ if (!strcmp (input_file, output_file))
+ {
+-        printf ("%s: Error: source file is the same as destination file\n", prog_name);
++        printf ("docsis: Error: source file is the same as destination file\n");
+         return -1;
+ }
+
+@@ -350,7 +342,7 @@ int encode_one_file ( char *input_file, char *output_file,
+ decode_main_aggregate (buffer, buflen);
+ if ((of = fopen (output_file, "wb")) == NULL)
+ {
+- printf ("%s: error: can't open output file %s\n", prog_name, output_file);
++ printf ("docsis: error: can't open output file %s\n", output_file);
+ return -2;
+ }
+ fwrite (buffer, sizeof (unsigned char), buflen, of);
+--- src/docsis_encode.c.orig
++++ src/docsis_encode.c
+@@ -33,7 +33,6 @@
+ #include <math.h>
+
+ #include "docsis_common.h"
+-#include "docsis_globals.h"
+ #include "docsis_encode.h"
+ #include "docsis_snmp.h"
+ #include "ethermac.h"
+@@ -57,7 +56,7 @@ int encode_uint ( unsigned char *buf, void *tval, struct symbol_entry *sym_ptr )
+ helper = (union t_val *) tval;
+ if ( sym_ptr->low_limit || sym_ptr->high_limit ) {
+         if ( helper->uintval < sym_ptr->low_limit || helper->uintval > sym_ptr->high_limit ) {
+-                printf ("%s: at line %d, %s value %d out of range %hd-%hd\n ", prog_name,line,sym_ptr->sym_ident,helper->uintval,sym_ptr->low_limit, sym_ptr->high_limit);
++                printf ("docsis: at line %d, %s value %d out of range %hd-%hd\n ", line,sym_ptr->sym_ident,helper->uintval,sym_ptr->low_limit, sym_ptr->high_limit);
+                 exit(-15);
+         }
+ }
+@@ -86,7 +85,7 @@ int encode_ushort ( unsigned char *buf, void *tval, struct symbol_entry *sym_ptr
+ helper = (union t_val *) tval;
+ if ( sym_ptr->low_limit || sym_ptr->high_limit ) {
+         if ( helper->uintval < sym_ptr->low_limit || helper->uintval > sym_ptr->high_limit ) {
+-                printf ("%s: at line %d, %s value %d out of range %hd-%hd\n ", prog_name,line,sym_ptr->sym_ident,helper->uintval,sym_ptr->low_limit, sym_ptr->high_limit);
++                printf ("docsis: at line %d, %s value %d out of range %hd-%hd\n ", line,sym_ptr->sym_ident,helper->uintval,sym_ptr->low_limit, sym_ptr->high_limit);
+                 exit(-15);
+         }
+ }
+@@ -118,7 +117,7 @@ int encode_uchar ( unsigned char *buf, void *tval, struct symbol_entry *sym_ptr
+
+ if ( sym_ptr->low_limit || sym_ptr->high_limit ) {
+         if ( helper->uintval < sym_ptr->low_limit || helper->uintval > sym_ptr->high_limit ) {
+-                printf ("%s: at line %d, %s value %d out of range %hd-%hd\n ", prog_name,line,sym_ptr->sym_ident,helper->uintval,sym_ptr->low_limit, sym_ptr->high_limit);
++                printf ("docsis: at line %d, %s value %d out of range %hd-%hd\n ", line,sym_ptr->sym_ident,helper->uintval,sym_ptr->low_limit, sym_ptr->high_limit);
+                 exit(-15);
+         }
+ }
+--- src/docsis_globals.h.orig
++++ src/docsis_globals.h
+@@ -23,7 +23,6 @@
+ #ifndef _DOCSIS_GLOBALS_H
+ #define _DOCSIS_GLOBALS_H
+
+-char prog_name[255];
+ struct tlv *global_tlvtree_head;
+ symbol_type *global_symtable;
+
+--- src/docsis_yy.y.orig
++++ src/docsis_yy.y
+@@ -37,7 +37,6 @@ extern unsigned int line;         /* current line number, defined in a.l */
+ extern struct tlv *global_tlvtree_head; /* Global list of all config TLVs */
+ extern symbol_type *global_symtable;
+ extern FILE *yyin;
+-extern char prog_name[255];
+
+ struct tlv *_my_tlvtree_head;
+
+@@ -620,7 +619,7 @@ int parse_config_file ( char *file, struct tlv **parse_tree_result )
+
+ if ( (cf = fopen ( file, "r" ))== NULL )
+ {
+-        printf ("%s: Can't open input file %s\n", prog_name, file );
++        printf ("docsis: Can't open input file %s\n", file );
+         return -1;
+ }
+
</ins></span></pre>
</div>
</div>
</body>
</html>