# config

name: project-description
value:
  Sample extension for the Tcl Extension Architecture (TEA), providing a template for building TEA-compliant extensions to Tcl


name: ticket-table
value:
  -- single value fields, most current only
  CREATE TABLE ticket(
      -- Do not change any column that begins with tkt_
      tkt_id    INTEGER PRIMARY KEY,
      tkt_uuid  TEXT UNIQUE,
      tkt_mtime DATE,
      tkt_ctime DATE,

      -- Add as many fields as required below this line
      type            TEXT, -- Tracker
      status          TEXT, -- Primary workflow
      resolution      TEXT, -- Secondary workflow
      subsystem       TEXT, -- Functional module
      priority        TEXT, 
      severity        TEXT, 
      foundin         TEXT, -- Version issue was found in
      private_contact TEXT, 
      title           TEXT, -- summary description
      comment         TEXT, -- description
      cmimetype       TEXT, -- format of description
      submitter       TEXT, -- ticket creator
      assignee        TEXT, -- developer currently handling the ticket
      closer          TEXT, -- developer who closed the ticket, if closed
      closedate       TEXT, -- when the ticket got closed
      is_private	    INTEGER
  );
  -- listified ticket fields
  CREATE TABLE ticketchng(
      -- Do not change any column that begins with tkt_
      tkt_id    INTEGER REFERENCES ticket,
      tkt_rid   INTEGER REFERENCES blob,
      tkt_mtime DATE,
     			 			 			 
      -- Add as many fields as required below this line
      login    TEXT,
      username TEXT,
      mimetype TEXT,
      icomment TEXT
  );
  CREATE INDEX ticketchng_idx1 ON ticketchng(tkt_id, tkt_mtime);


name: ticket-common
value:
  # -*- tcl -*-
  # Fixed priorities, matching SourceForge
  set priority_choices {
      {1 Zero}
      2
      {3 Low}
      4
      {5 Medium}
      6
      {7 High}
      8
      {9 Immediate}
  }

  # Fixed resolutions, matching SourceForge
  set resolution_choices {
      None
      Fixed
      Accepted
      Rejected
      Later
      {Works For Me}
      Invalid
      Duplicate
      {Out of Date}
      Postponed
      Remind
      {Wont Fix}
  }

  # Fixed stati, matching SourceForge
  set status_choices {
      Open
      Pending
      Closed
      Deleted
  }

  # Fixed severities, matching Fossil standard.
  set severity_choices {
      Minor
      Critical
      Severe
      Important
      Cosmetic
  }

  # Dynamic: Developers to assign tickets are taken from the repository
  # user base.
  set assignee_choices {
      aku andreas_kupries anonymous colin developer dgp dkf drh ferrieux fvogel hoehlmann hypnotoad jan.nijtmans jenglish jhobbs kbk kevin_walzer max miguel mistachkin nobody oehhar patthoyts rkeene sebres steveb stever stwo twylite vasiljevic venkat wiede
  }
  # Note: The query below is rejected by the report_query_authorizer.
  # Table user is not readable in reports and render scripts.
  if 0 {query {
      SELECT login AS xxperson
      FROM   user
      WHERE  length (pw) > 0
  } {
      lappend assignee_choices $xxperson
  }}

  # Dynamic fixed, possible trackers
  set type_choices {
      Bug Support Patch RFE
  }

  # Dynamic fixed, possible categories, functional modules
  set subsystem_choices {
      {- New Builtin Commands}
      {- New Builtin Object Types}
      {- New Stub Entries}
      {01. Notifier}
      {02. Event Loops}
      {03. Timer Events}
      {04. Async Events}
      {05. XT Notifier}
      {06. Time Measurement}
      {07. Variables}
      {08. Environment Variables}
      {09. Linked C Variables}
      {10. Objects}
      {11. Conversions From String}
      {11. Conversions from String}
      {12. ByteArray Object}
      {13. Index Object}
      {14. List Object}
      {15. Dict Object}
      {16. Commands A-H}
      {17. Commands I-L}
      {18. Commands M-Z}
      {19. [history]}
      {20. [interp]}
      {21. [namespace]}
      {22. [proc] and [uplevel]}
      {23. [scan]}
      {24. Channel Commands}
      {25. Channel System}
      {26. Channel Transforms}
      {27. Channel Types}
      {28. dde Package}
      {29. http Package}
      {30. msgcat Package}
      {31. opt Package}
      {32. registry Package}
      {33. Safe Base}
      {34. tcltest Package}
      {35. TclOO Package}
      {36. Pathname Management}
      {37. File System}
      {38. Init - Library - Autoload}
      {39. Package Manager}
      {40. Dynamic Loading}
      {41. Memory Allocation}
      {42. Memory Preservation}
      {43. Regexp}
      {44. UTF-8 Strings}
      {45. Parsing and Eval}
      {46. Traces}
      {47. Bytecode Compiler}
      {48. Number Handling}
      {49. Threading}
      {50. Embedding Support}
      {51. Release Notes}
      {52. Portability Support}
      {53. Configuration and Build Tools}
      {53. Configure and Build Tools}
      {54. Configuration Reporting}
      {55. Other Tools}
      {56. LibTomMath}
      {57. zlib}
      {60. NRE and coroutines}
      {61. (unused)}
      {62. (unused)}
      {63. (unused)}
      {67. [resource] (obsolete)}
      {68. Mac Classic (obsolete)}
      {69. Other}
      {70. Sample Extension}
      {75. Tutorial}
      {80. Thread Package}
      {81. Bundled Packages}
      {85. tclconfig}
      {90. FAQs}
      {91. Tutorial}
      {95. contrib ports}
      {None}
  }


name: ticket-newpage
value:
  <th1>
  if {![info exists mutype]} {set mutype {[links only]}}
  if {[info exists submit]} {
      set status     Open
      set resolution None
      set priority   {5 Medium}
      set assignee   nobody
      set closer     nobody
      set is_private 0
      set submitter  $login

      if {$mutype eq "HTML"} {
  	set cmimetype "text/html"
      } elseif {$mutype eq "Wiki"} {
  	set cmimetype "text/x-fossil-wiki"
      } else {
  	set cmimetype "text/plain"
      }
      submit_ticket
      set preview 1
  }
  </th1>
  <h1 style="text-align: center;">Enter A New Ticket</h1>

  <table cellpadding="5">
  <tr>
      <td align="right">Summary:</td>
      <td align="left" ><input type="text" name="title" size="60" value="$<title>"/></td>
      <td align="left" >Enter a one-line summary of the ticket.</td>
  </tr>
  <tr>
      <td align="right">Type:</td>
      <td align="left" ><th1>combobox type $type_choices 1</th1></td>
      <td align="left" >What type of ticket is this?</td>
  </tr>
  <tr>
      <td align="right">Version:</td>
      <td align="left" ><input type="text" name="foundin" size="20" value="$<foundin>" /></td>
      <td align="left" >In what version or build number do you observe the
                        problem?</td>
  </tr>
  <tr>
      <td align="right">Category:</td>
      <td align="left" ><th1>combobox subsystem $subsystem_choices 1</th1></td>
      <td align="left" >Roughly where do you see the problem?</td>
  </tr>
  <tr>
      <td align="right">Severity:</td>
      <td align="left" ><th1>combobox severity $severity_choices 1</th1></td>
      <td align="left" >How debilitating is the problem?  How badly does the
                        problem affect the operation of the product?</td>
  </tr>
  <tr>
      <td align="right">EMail:</td>
      <td align="left" ><input type="text" name="private_contact" value="$<private_contact>" size="30" /></td>
      <td align="left" ><u>Not publicly visible</u> Used by developers to
                        contact you with questions.</td>
  </tr>

  <tr><td colspan="3">
  Enter a detailed description of the problem.
  For code defects, be sure to provide details
  on exactly how the problem can be reproduced.
  Provide as much detail as possible.
  <br/>Format:
  <th1>combobox mutype {{Plain Text} HTML Wiki} 1</th1>
  <br/>
  <th1>set nline [linecount $comment 50 10]</th1>
  <textarea name="comment" cols="80" rows="$nline"
  wrap="virtual" class="wikiedit">$<comment></textarea><br/>
  </td></tr>

  <th1>enable_output [info exists preview]</th1>
  <tr><td colspan="3">
  Description Preview:<br /><hr />
  <th1>
  if {$mutype eq "Wiki"} {
      wiki $comment
  } elseif {$mutype eq "Plain Text"} {
      set r [randhex]
      wiki "<verbatim-$r links>[string trimright $comment]\n</verbatim-$r>"
  } else { # HTML
      wiki "<nowiki>$comment\n</nowiki>"
  }
  </th1>
  <hr /></td></tr>
  <th1>enable_output 1</th1>

  <tr>
      <td>&nbsp;</td>
      <td align="left"><input type="submit" name="preview" value="Preview" /></td>
      <td align="left">See how the description will appear after formatting.</td>
  </tr>

  <th1>enable_output [info exists preview]</th1>
  <tr>
      <td>&nbsp;</td>
      <td align="left"><input type="submit" name="submit" value="Submit" /></td>
      <td align="left">After filling in the information above, press this button
                       to create the new ticket</td>
  </tr>
  <th1>enable_output 1</th1>

  <tr>
      <td>&nbsp;</td>
      <td align="left"><input type="submit" name="cancel" value="Cancel" /></td>
      <td>Abandon and forget this ticket</td>
  </tr>
  </table>


name: ticket-viewpage
value:
  <th1>
  set alwaysPlaintext [info exists plaintext]
  query {SELECT datetime ($tkt_ctime) AS tkt_cdatetime} {}
  query {SELECT datetime ($closedate) AS fmt_closedate} {}
  query {SELECT rtrim($tkt_uuid,'f')  AS tkt_uuidtrim}  {}
  </th1>

  <table cellpadding="5">
  <tr><td class="tktDspLabel">Ticket&nbsp;UUID:</td>
  <th1>
  if {[hascap s]} {
      html "<td class='tktDspValue' colspan='3'>$tkt_uuidtrim ($tkt_id)</td>\n"
  } else {
      html "<td class='tktDspValue' colspan='3'>$tkt_uuidtrim</td>\n"
  }
  </th1>
  </tr>
  <tr>
      <td class="tktDspLabel">Title:</td>
      <td class="tktDspValue" colspan="3">$<title></td>
  </tr>
  <tr>
      <td class="tktDspLabel">Type:</td>
      <td class="tktDspValue">$<type></td>
      <td class="tktDspLabel">Version:</td>
      <td class="tktDspValue">$<foundin></td>
  </tr>
  <tr>
      <td class="tktDspLabel">Submitter:</td>
      <td class="tktDspValue">$<submitter></td>
      <td class="tktDspLabel">Created&nbsp;on:</td>
      <td class="tktDspValue">$<tkt_cdatetime></td>
  </tr>
  <tr>
      <td class="tktDspLabel">Subsystem:</td>
      <td class="tktDspValue">$<subsystem></td>
      <td class="tktDspLabel">Assigned&nbsp;To:</td>
      <td class="tktDspValue">$<assignee></td>
  </tr>
  <tr>
      <td class="tktDspLabel">Priority:</td>
      <td class="tktDspValue">$<priority></td>
      <td class="tktDspLabel">Severity:</td>
      <td class="tktDspValue">$<severity></td>
  </tr>
  <tr>
      <td class="tktDspLabel">Status:</td>
      <td class="tktDspValue">$<status></td>
      <td class="tktDspLabel">Last&nbsp;Modified:</td>
      <td class="tktDspValue">$<tkt_datetime></td>
  </tr>
  <tr>
      <td class="tktDspLabel">Resolution:</td>
      <td class="tktDspValue">$<resolution></td>
      <td class="tktDspLabel">Closed&nbsp;By:</td>
      <td class="tktDspValue">$<closer></td>
  </tr>
  <tr>
  <th1>enable_output [hascap e]</th1>
      <td class="tktDspLabel">Contact:</td>
      <td class="tktDspValue">$<private_contact></td>
  <th1>enable_output [expr {![hascap e]}]</th1>
      <td class="tktDspLabel">&nbsp;</td>
      <td class="tktDspValue">&nbsp;</td>
  <th1>enable_output 1</th1>
      <td class="tktDspLabel">Closed&nbsp;on:</td>
      <td class="tktDspValue">$<fmt_closedate></td>
  </tr>

  <th1>
  if {[info exists comment] && [string length $comment]>10} {
    html {
      <tr><td class="tktDspLabel" valign=top>Description:</td>
          <td colspan="4" class="tktDspValue">
    }
    # plaintext vs. formatted
    # mimetypes: text/plain, text/html, text/x-fossil-wiki
    #            NOT USED: text/x-fossil-plain
    if {$alwaysPlaintext} {
      set r [randhex]
      if {$cmimetype ne "text/plain"} {html "([htmlize $cmimetype])\n"}
      wiki "<verbatim-$r>[string trimright $comment]</verbatim-$r>\n"
    } elseif {$cmimetype eq "text/plain"} {
      set r [randhex]
      wiki "<verbatim-$r links>[string trimright $comment]</verbatim-$r>\n"
    } elseif {$cmimetype eq "text/x-fossil-wiki"} {
      wiki "<p>\n[string trimright $comment]\n</p>\n"
    } elseif {$cmimetype eq "text/html"} {
      wiki "<p><nowiki>\n[string trimright $comment]\n</nowiki>\n"
    } else {
      set r [randhex]
      wiki "<verbatim-$r links>[string trimright $comment]</verbatim-$r>\n"
    }
    html {</tr>}
  }
  </th1>

  <th1>
  set seenRow 0
  query {
      SELECT datetime(tkt_mtime) AS xdate,
             login               AS xlogin,
             mimetype            AS xmimetype,
  	   icomment            AS xcomment,
             username            AS xusername
      FROM  ticketchng
      WHERE tkt_id = $tkt_id
      AND   length(icomment) > 0
      ORDER BY tkt_mtime DESC
  } {
    if {$seenRow} {
      html "<hr>\n"
    } else {
      html "<tr><td class='tktDspLabel' valign='top'>User Comments:</td>\n"
      html "    <td colspan='4' class='tktDspValue'>\n"
      set seenRow 1
    }
    if {[info exists showfields]} {
      html "<ul><p>date=$xdate<br>login=$xlogin<br>user=$xusername<br>mime=$xmimetype<br>comment=$xcomment</p></ul>"
    }
    html "[htmlize $xlogin]"
    if {$xlogin ne $xusername && [string length $xusername]>0} {
      html " (claiming to be [htmlize $xusername])"
    }
    html " added on $xdate:\n"
    if {$alwaysPlaintext || $xmimetype eq "text/plain"} {
      set r [randhex]
      if {$xmimetype ne "text/plain"} {html "([htmlize $xmimetype])\n"}
      wiki "<verbatim-$r>[string trimright $xcomment]</verbatim-$r>\n"
    } elseif {$xmimetype eq "text/x-fossil-wiki"} {
      wiki "<p>\n[string trimright $xcomment]\n</p>\n"
    } elseif {$xmimetype eq "text/html"} {
      wiki "<p><nowiki>\n[string trimright $xcomment]\n</nowiki>\n"
    } else {
      set r [randhex]
      wiki "<verbatim-$r links>[string trimright $xcomment]</verbatim-$r>\n"
    }
  }
  if {$seenRow} {html "</td></tr>\n"}
  </th1>
  </table>


name: ticket-editpage
value:
  <th1>
  query {SELECT datetime ($tkt_ctime) AS tkt_cdatetime} {}
  query {SELECT datetime ($closedate) AS fmt_closedate} {}
  query {SELECT rtrim($tkt_uuid,'f')  AS tkt_uuidtrim}  {}

  if {![info exists mutype]}   {set mutype {Plain Text}}
  if {![info exists icomment]} {set icomment {}}
  if {![info exists username]} {set username $login}

  if {![info exists cmutype]} {set cmutype {Plain Text}}
  if {![info exists comment]} {set comment {}}

  if {[info exists submit]} {
      if {$mutype eq "Wiki"} {
  	set mimetype text/x-fossil-wiki
      } elseif {$mutype eq "HTML"} {
  	set mimetype text/html
      } elseif {$mutype eq {[links only]}} {
  	set mimetype text/x-fossil-plain
      } else {
  	set mimetype text/plain
      }
      if {$status eq "Closed" || $status eq "Deleted"} {
  	set closer $login
  	query {SELECT julianday('now') AS closedate} {}
      } else {
  	set closer nobody
  	unset closedate
      }

      submit_ticket
      set preview 1
  }
  </th1>

  <table cellpadding="5">
  <tr><td class="tktDspLabel">Ticket&nbsp;UUID:</td>
  <th1>
  if {[hascap s]} {
      html "<td class='tktDspValue' colspan='3'>$tkt_uuidtrim ($tkt_id)</td>\n"
  } else {
      html "<td class='tktDspValue' colspan='3'>$tkt_uuidtrim</td>\n"
  }
  </th1>
  </tr>
  <tr>
      <td align="right">Title:</td>
      <td align="left" colspan="3"><input type="text" name="title" value="$<title>" size="60" /></td>
  </tr>
  <tr>
  <tr>
      <td align="right">Type:</td>
      <td align="left" ><th1>combobox type $type_choices 1</th1></td>
      <td align="right">Version:</td>
      <td align="left" ><input type="text" name="foundin" size="50" value="$<foundin>" /></td>
  </tr>
  <tr>
      <td class="tktDspLabel">Submitter:</td>
      <td class="tktDspValue">$<submitter></td>
      <td class="tktDspLabel">Created&nbsp;on:</td>
      <td class="tktDspValue">$<tkt_cdatetime></td>
  </tr>
  <tr>
      <td align="right">Subsystem:</td>
      <td align="left"><th1>combobox subsystem $subsystem_choices 1</th1></td>
      <td align="right">Assigned&nbsp;To:</td>
      <td align="left" ><th1>combobox assignee $assignee_choices 1</th1></td>
  </tr>
  <tr>
      <td align="right">Priority:</td>
      <td align="left" ><th1>combobox priority $priority_choices 1</th1></td>
      <td align="right">Severity:</td>
      <td align="left" ><th1>combobox severity $severity_choices 1</th1></td>
  </tr>
  <tr>
      <td align="right">Status:</td>
      <td align="left" ><th1>combobox status $status_choices 1</th1></td>
      <td class="tktDspLabel">Last&nbsp;Modified:</td>
      <td class="tktDspValue">$<tkt_datetime></td>
  </tr>
  <tr>
      <td align="right">Resolution:</td>
      <td align="left" ><th1>combobox resolution $resolution_choices 1</th1></td>
      <td class="tktDspLabel">Closed&nbsp;By:</td>
      <td class="tktDspValue">$<closer></td>
  </tr>
  <tr>
  <th1>enable_output [hascap e]</th1>
      <td align="right">Contact:</td>
      <td><input type="text" name="private_contact" size="40" value="$<private_contact>" /></td>
  <th1>enable_output [expr {![hascap e]}]</th1>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
  <th1>enable_output 1</th1>
      <td class="tktDspLabel">Closed&nbsp;on:</td>
      <td class="tktDspValue">$<fmt_closedate></td>
  </tr>
  <tr>
      <td align="right">Description:</td>
      <td align="left" colspan="3"><th1>combobox cmutype {{Plain Text} HTML Wiki} 1</th1>:</td>
  </tr>
  <tr>
      <td>&nbsp;</td>
      <td align="left"  colspan="4">
          <th1>set nline [linecount $comment 50 10]</th1>
          <textarea name="comment" cols="80" rows="$nline" wrap="virtual" class="wikiedit">$<comment></textarea>
      </td>
  </tr>
  <tr>
      <td>&nbsp;</td>
      <td colspan="2">Append Remark with format
          <th1>combobox mutype {{Plain Text} HTML Wiki} 1</th1>
          from
          <input type="text" name="username" value="$<username>" size="30" />:
          <br />
          <textarea name="icomment" cols="80" rows="15" wrap="virtual" class="wikiedit">$<icomment></textarea>
      </td>
  </tr>

  <th1>enable_output [info exists preview]</th1>
  <tr><td colspan="2">
  Description Preview:<br><hr>
  <th1>
  if {$cmutype eq "Wiki"} {
      wiki $comment
  } elseif {$cmutype eq "Plain Text"} {
      set r [randhex]
      wiki "<verbatim-$r>\n[string trimright $comment]\n</verbatim-$r>"
  } else {
      wiki "<nowiki>\n[string trimright $comment]\n</nowiki>"
  }
  </th1>
  <hr>
  </td></tr>
  <tr><td colspan="2">
  Comment Preview:<br><hr>
  <th1>
  if {$mutype eq "Wiki"} {
      wiki $icomment
  } elseif {$mutype eq "Plain Text"} {
      set r [randhex]
      wiki "<verbatim-$r>\n[string trimright $icomment]\n</verbatim-$r>"
  } else {
      wiki "<nowiki>\n[string trimright $icomment]\n</nowiki>"
  }
  </th1>
  <hr>
  </td></tr>
  <th1>enable_output 1</th1>

  <tr>
  <td align="right">
  <input type="submit" name="preview" value="Preview" />
  </td>
  <td align="left">See how the description will appear after formatting.</td>
  </tr>

  <th1>enable_output [info exists preview]</th1>
  <tr>
  <td align="right">
  <input type="submit" name="submit" value="Submit" />
  </td>
  <td align="left">Apply the changes shown above</td>
  </tr>
  <th1>enable_output 1</th1>

  <tr>
  <td align="right">
  <input type="submit" name="cancel" value="Cancel" />
  </td>
  <td>Abandon this edit</td>
  </tr>
  <th1>
  set seenRow 0
  query {
      SELECT datetime(tkt_mtime) AS xdate,
             login               AS xlogin,
             mimetype            AS xmimetype,
  	   icomment            AS xcomment,
             username            AS xusername
      FROM  ticketchng
      WHERE tkt_id = $tkt_id
      AND   length(icomment) > 0
      ORDER BY tkt_mtime DESC
  } {
    if {$seenRow} {
      html "<hr>\n"
    } else {
      html "<tr><td class='tktDspLabel' valign='top'>User Comments:</td>\n"
      html "    <td colspan='3' class='tktDspValue'>\n"
      set seenRow 1
    }
    if {[info exists showfields]} {
      html "<ul><p>date=$xdate<br>login=$xlogin<br>user=$xusername<br>mime=$xmimetype<br>comment=$xcomment</p></ul>"
    }
    html "[htmlize $xlogin]"
    if {$xlogin ne $xusername && [string length $xusername]>0} {
      html " (claiming to be [htmlize $xusername])"
    }
    html " added on $xdate:\n"
    if {$xmimetype eq "text/plain"} {
      set r [randhex]
      wiki "<verbatim-$r>[string trimright $xcomment]</verbatim-$r>\n"
    } elseif {$xmimetype eq "text/x-fossil-wiki"} {
      wiki "<p>\n[string trimright $xcomment]\n</p>\n"
    } elseif {$xmimetype eq "text/html"} {
      wiki "<p><nowiki>\n[string trimright $xcomment]\n</nowiki>\n"
    } else {
      set r [randhex]
      wiki "<verbatim-$r links>[string trimright $xcomment]</verbatim-$r>\n"
    }
  }
  if {$seenRow} {html "</td></tr>\n"}
  </th1>
  </table>


name: ticket-reportlist
value:
  <th1>
  if {[hascap n]} {
      html "<p>Enter a new ticket:</p>"
      html "<ul><li><a href='tktnew'>New ticket</a></li></ul>"
  }
  </th1>

  <p>Choose a report format from the following list:</p>
  <ol>
  <th1>html $report_items</th1>
  </ol>

  <th1>
  if {[hascap t q]} {
      html "<p>Other options:</p>\n<ul>\n"
      if {[hascap t]} {
          html "<li><a href='rptnew'>New report format</a></li>\n"
      }
      if {[hascap q]} {
          html "<li><a href='modreq'>Tend to pending moderation requests</a></li>\n"
      }
  }
  </th1>


name: ticket-report-template
value:
  SELECT
  CASE WHEN status='Open'    THEN '#f2dcdc'
       WHEN status='Deleted' THEN '#bde5d6'
       WHEN status='Pending' THEN '#cacae5'
       WHEN status='Closed'  THEN '#c8c8c8'
       ELSE                       '#ffffff'
  END AS 'bgcolor',
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket


# reportfmt

owner: ticket-master
title: All Tickets
cols:
  #ffffff Key:
  #f2dcdc Open
  #bde5d6 Deleted
  #cacae5 Pending
  #c8c8c8 Closed

sqlcode:
  SELECT
  CASE WHEN status='Open'    THEN '#f2dcdc'
       WHEN status='Deleted' THEN '#bde5d6'
       WHEN status='Pending' THEN '#cacae5'
       WHEN status='Closed'  THEN '#c8c8c8'
       ELSE '#ffffff'
  END AS 'bgcolor',
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket


owner: ticket-master
title: All Open By Category
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Open'
  ORDER BY subsystem, tkt_mtime DESC


owner: ticket-master
title: All Open By Type
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Open'
  ORDER BY type, tkt_mtime DESC


owner: ticket-master
title: All Open
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Open'
  ORDER BY tkt_mtime DESC


owner: ticket-master
title: Most Stale
cols:
  #ffffff Key:
  #f2dcdc Open
  #bde5d6 Deleted
  #cacae5 Pending
  #c8c8c8 Closed

sqlcode:
  SELECT
  CASE WHEN status='Open'    THEN '#f2dcdc'
       WHEN status='Deleted' THEN '#bde5d6'
       WHEN status='Pending' THEN '#cacae5'
       WHEN status='Closed'  THEN '#c8c8c8'
       ELSE '#ffffff'
  END AS 'bgcolor',
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status NOT IN ('Closed', 'Deleted')
  ORDER BY tkt_mtime
  LIMIT 50


owner: ticket-master
title: Pending Tickets
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  resolution            AS 'Resolution',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Pending'
  ORDER BY tkt_mtime DESC


owner: ticket-master
title: Recently Changed
cols:
  #ffffff Key:
  #f2dcdc Open
  #bde5d6 Deleted
  #cacae5 Pending
  #c8c8c8 Closed

sqlcode:
  SELECT
  CASE WHEN status='Open'    THEN '#f2dcdc'
       WHEN status='Deleted' THEN '#bde5d6'
       WHEN status='Pending' THEN '#cacae5'
       WHEN status='Closed'  THEN '#c8c8c8'
       ELSE '#ffffff'
  END AS 'bgcolor',
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  ORDER BY tkt_mtime DESC
  LIMIT 50


owner: ticket-master
title: Open Bug Tickets
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Open'
  AND   type   = 'Bug'
  ORDER BY tkt_mtime DESC


owner: ticket-master
title: Open Support Tickets
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Open'
  AND   type   = 'Support'
  ORDER BY tkt_mtime DESC


owner: ticket-master
title: Open Patch Tickets
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Open'
  AND   type   = 'Patch'
  ORDER BY tkt_mtime DESC


owner: ticket-master
title: Open RFE Tickets
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Open'
  AND   type   = 'RFE'
  ORDER BY tkt_mtime DESC


owner: aku
title: Bugs-Open-Prio-Changed
cols:
  #ffffff Key:
  #f2dcdc prio9
  #e8e8bd prio8
  #cfe8bd prio7
  #cacae5 prio6
  #c8c8c8 prio5-

sqlcode:
  SELECT
  CASE WHEN priority LIKE '9%' THEN '#f2dcdc'
         WHEN priority LIKE '8%' THEN '#e8e8bd'
         WHEN priority LIKE '7%' THEN '#cfe8bd'
         WHEN priority LIKE '6%' THEN '#cacae5'
         ELSE '#c8c8c8' END as 'bgcolor',
  substr(tkt_uuid,1,10) AS '#',
  priority              AS 'Prio',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary',
  datetime(tkt_mtime)   AS 'Last Changed',
  submitter             AS 'Submitter',
  assignee              AS 'Assignee'
  FROM ticket
  WHERE status = 'Open' AND type = 'Bug'
  ORDER BY priority DESC,tkt_mtime DESC


# event

type: ci
user: wart
comment:
  Parameterized the library file name.  The final library name is now a
  combination of the PACKAGE declaration and the version number.


type: ci
user: stanton
comment:
  simlified makefile, replaced lib_LIBRARIES and LIBRARIES with BINARIES
  to avoid confusion with the "libraries" target.


type: ci
user: wart
comment:
  Set list of includes files for compiling to $(includedir).  This assumes
  that you have installed Tcl in the same place that you are installing
  the extension.


type: ci
user: wart
comment:
  Makefile.in:  Removed some unused variables

  README:  Added descriptions of the files distributed with this extension

  README.cygwin:  More instructions on setting up cygwin


type: ci
user: wart
comment:
  Renamed package from Tclsha to ExampleA.
      * Source files renamed
      * configure macros revised to reflect new name

  Added configure macros for locating public or privage Tcl header files.
  The public header file macro is still kinda lame...


type: ci
user: wart
comment:
  Require Tcl 8.2 or later when autogenerating the pkgIndex.tcl file so that
  it can deal with stub-enabled extensions.


type: ci
user: wart
comment:
  Added more comments to Makefile.in explaining what some things do and what
  the user will need to change.

  README.cygwin:  Removed line requiring Visual C++ 5.0

  *.c, *.h:  More changes to adhere to the Tcl coding conventions

  configure.in:  Added substitution for "PACKAGE_CFLAGS" so that authors
  can add extra compiler flags.


type: ci
user: wart
comment:
  Backed out PACKAGE_CFLAGS lines.  Users can set package-specific compiler
  flags using the CFLAGS variable in the configure script.


type: ci
user: wart
comment:
  SC_PUBLIC_TCL_HEADER macro in tcl.m4 is much more robust now.

  aclocal.m4 now uses builtin(include,tcl.m4) to load the tcl.m4
  file.  No more running aclocal.

  mkIndex.tcl converts cygwin paths to native paths on windows so that
  we can build pkgIndex.tcl in the install location.


type: ci
user: wart
comment:
  Makefile.in --
      * pkgdatadir and others now include the package version number
      * "make install" is a little more verbose.
      * Fixed obscure bug when installing man pages.

  configure.in --
      * Parameterized the AC_DEFINE(BUILD_exampleA) line.

  exampleA.h --
      * Lingering reference to the old "sha1" package name

  tcl.m4 --
      * Fixed message reporting bug in SC_LOAD_TKCONFIG
      * Added AC_SUBST for TK_XINCLUDES
      * Made SC_LIB_SPEC a little more intelligent.  You can now give it
        an initial directory in which to look for the library.  It will also
        look in ${prefix} and ${exec-prefix}, if specified.
      * Added macros for locating the Tk public and private header files.


type: ci
user: wart
comment:
  tcl.m4:
  	* Fixed message reporting for thread flag

  Makefile.in:
  mkIndex.tcl.in:
  	* Generated pkgIndex.tcl script now only picks up the libraries
  	  that were mentioned in the $(lib_BINARIES) variable.

  README.cygwin:
  	* Users now recommended to install the full Cygnus Cygwin package
  	  instead of the usertools package.  The full package includes "make".

  tclexampleA.c:
  	* Tcl_InitStubs called with version 8.1 instead of 8.0, since
  	  stubs didn't exist in 8.0.


type: ci
user: wart
comment:
  Incorporated changes suggested by Andreas Kupries.

  Move search for tclsh shell to a separate macro in tcl.m4
  Fixed problems generating Tk includes.


type: ci
user: wart
comment:
  Users now have to change the line that generates the pkgIndex file to match
  the variable holding their library file name.


type: ci
user: wart
comment:
  Reorganized when header files are sought after.

  tcl.m4 has a new macro SC_PATH_PROTOOLS to look for a TclPro installation


type: ci
user: wart
comment:
  Search for executables with the $EXEEXT extension.  This prevents us from
  picking up junk files on Windows.

  Add checks for using cygwin on Windows 98 and 95.  NT was previously assumed.


type: ci
user: hobbs
comment:
  	* Makefile.in: removed unused @vars@.  Cleaned up targets.  Added
  	dist and dist-clean generic targets.  Improved use of OBJEXT.


type: ci
user: hobbs
comment:
  initial commit of complete revamp of sample extension for easier building
  and improved TEA configuration.


type: ci
user: hobbs
comment:
  	* Makefile.in: add EXTRA_SOURCES, WIN_SOURCES, UNIX_SOURCES
  	example lines, remove $(sample_LIB_FILE)_OBJECTS problematic
  	macro, move lib_BINARIES and BINARIES as they don't need editing.
  	Replace $(mkinstalldirs) with "mkdir -p", added $(srcdir)/unix to
  	VPATH, removed inclusion of tclconfig/installFile.tcl and
  	tclconfig/mkinstalldirs in dist: target.


type: ci
user: hobbs
comment:
  	* configure: regenerated
  	* configure.in: removed pulling (UN)SHARED_LIB_SUFFIX from
  	tclConfig.sh as these are defined by SC_CONFIG_CFLAGS.


type: ci
user: hobbs
comment:
  	* Makefile.in (TCLSH_PROG): added a viable TCL_LIBRARY for when
  	the TCLSH_PROG is a built, but not installed, executable.
  	(install-binaries, test, LIB_FILE): use	$($(PACKAGE)_LIB_FILE)
  	instead of directly referencing package name to reduce number of
  	lines that need changing.
  	(dist): removed install of no longer existent tclconfig/config.*


type: ci
user: hobbs
comment:
  	* configure:
  	* configure.in: use double eval on the ${PACKAGE}_LIB_FILE to
  	substitute the ${DBGX} variable.
  	Remove output of the mkIndex.tcl script.


type: ci
user: hobbs
comment:
  	* Makefile.in: added pkgIndex.tcl to binaries dependencies.
  	Removed use of mkIndex.tcl script.  Simple pkgIndex.tcl target
  	added and install-lib-binaries modified to use pkglibdir instead
  	of bindir and libdir directories.


type: ci
user: hobbs
comment:
  	* README:
  	* mkIndex.tcl.in (removed): removed the need for this script by
  	simplifying the default install structure to use pkglibdir for the
  	main dynamic library file generated.


type: ci
user: hobbs
comment:
  	* Makefile.in (TCLSH_PROG): moved and updated env var definitions
  	to have tclsh work from build dir.  Removed TCL_EXTRA_CFLAGS,
  	TCL_LD_FLAGS, TCL_SHLIB_LD_LIBS, TCL_DBGX, TCL_STUB_LIB_FILE,
  	TCL_STUB_LIB_SPEC as they aren't needed (configure acquires all
  	that info for us).  TCL_LIBS is also not needed, but left in as a
  	reference to the libs Tcl used.


type: ci
user: hobbs
comment:
  	* configure: regen based on updated tclconfig/tcl.m4
  	* configure.in: moved the SHLIB_LD_LIBS magic into
  	tclconfig/tcl.m4 and noted where users can modify (SHLIB_LD_)LIBS.


type: ci
user: hobbs
comment:
  	* Makefile.in: moved setting TCLLIBPATH to the test target because
  	that is where it is needed, added a little doc about it.

  	* configure:
  	* configure.in: BUILD_${PACKAGE} had to be static BUILD_sample in
  	AC_DEFINE because autoconf wasn't substituting ${PACKAGE}.


type: ci
user: hobbs
comment:
  	* configure: regen'ed from changed tclconfig/tcl.m4

  	* generic/tclsample.c: added #include <string.h> for strlen /
  	strcmp declarations.


type: ci
user: hobbs
comment:
  	* Makefile.in (install-lib-binaries): ensure that binary files are
  	installed with executable bit set (use INSTALL_PROGRAM)


type: ci
user: hobbs
comment:
  	* Makefile.in: improved use of DESTDIR in install targets.
  	Removed need for installdirs target.
  	Broke TCLSH_PROG into TCLSH_ENV and TCLSH_PROG with TCLSH var and
  	added comments about TCLSH_ENV.
  	Added default shell and gdb targets.
  	Added comments about using RUNTIME_SOURCES var.


type: ci
user: hobbs
comment:
  	* configure:
  	* configure.in: updated to new TEA base that: prefixes all macros
  	with TEA_* instead of SC_*; adds TEA_PREFIX, which defaults the
  	prefix and exec_prefix values to what Tcl used; adds
  	TEA_SETUP_COMPILER, which handles basic compiler / support program
  	checks and simplifies the configure.in.


type: ci
user: hobbs
comment:
  	* configure:
  	* configure.in: move the CFLAGS definition into TEA_ENABLE_SHARED
  	and make it pick up the env CFLAGS at configure time.


type: ci
user: mdejong
comment:
  	* README: Add generic unix build instructions
  	and suggest the msys + mingw build process
  	described in tcl/win/README.
  	* README.cygwin: Remove Cygwin specific info since
  	this is now covered in the README file.
  	[Tc Patch 679416]


type: ci
user: patthoyts
comment:
  	* README:           Added notes for the win/ build files.

  	* win/Makefile.vc:  Patch #762878 applied to provide a sample VC++
  	* win/rules.vc:     build system. This is NOT TEA but is a useful
  	* win/nmakehlp.c:   alternative for win32 developers.


type: ci
user: patthoyts
comment:
  	* win/rules.vc:    Fixed nmakehlp to find the correct Tcl or Tk
  	* win/nmakehlp.c:  version from the tcl.h header file. This will
  	* win/makefile.vc  then pick up the right libraries.


type: ci
user: hobbs
comment:
  	* configure:           Update of TEA spec to (hopefully) simplify
  	* configure.in:        some aspects of TEA by making use of more
  	* Makefile.in:         AC 2.5x features.  Use PACKAGE_NAME (instead
  	* generic/tclsample.c: of PACKAGE) and PACKAGE_VERSION (instead of
  	* tclconfig/tcl.m4:    VERSION) arguments to AC_INIT as the TEA
  	package name and version.
  	Provide a version argument to TEA_INIT - starting with 3.0.
  	Drop all use of interior shell substs that older makefiles didn't
  	like.  Use PKG_* naming convention instead.
  	Move specification of source files and public headers into
  	configure.in with TEA_ADD_SOURCES and TEA_ADD_HEADERS.  These will
  	be munged during ./configure into the right obj file names (no
  	$(SOURCES:.c=.obj) needed).
  	There is almost nothing that should be touched in Makefile.in now
  	for the developer.  May want to add a TEA_ADD_TCL_SOURCES for the
  	RUNTIME_SOURCES that remains.


type: ci
user: hobbs
comment:
  	Use SHLID_LD_FLAGS (instead of SHLID_LDFLAGS) as Tcl does.
  	Only specify the user requested LDFLAGS/CFLAGS in the Makefile,
  	don't mention the _OPTIMIZE/_DEBUG variants.


type: ci
user: hobbs
comment:
  	* configure:
  	* configure.in:
  	* Makefile.in (VPATH): readd $(srcdir) to front of VPATH as the
  	first part of VPATH can get chopped off.
  	Change .c.$(OBJEXT) rule to .c.@OBJEXT@ to support more makes.
  	* tclconfig/tcl.m4: add TEA_ADD_STUB_SOURCES to support libstub
  	generation and TEA_ADD_TCL_SOURCES to replace RUNTIME_SOURCES as
  	the way the user specifies library files.


type: ci
user: hobbs
comment:
  	* Makefile.in:      added TEA_ADD_LIBS, TEA_ADD_INCLUDES and
  	* configure:        TEA_ADD_CFLAGS to configurable parameters with
  	* configure.in:     PKG_* equivs in the Makefile.  This allows the
  	* tclconfig/tcl.m4: user to worry less about actual magic VAR names.
  	Corrected Makefile.in to note that TEA_ADD_TCL_SOURCES requires
  	exact file names.


type: ci
user: patthoyts
comment:
  * win/rules.vc:    Modified the nmake build system to support
  * win/makefile.vc: an specific installation directory not in the
  tcl install tree. eg: a site-lib directory. Some general fixups
  too, get the tests working again, update the version, and use the
  new PACKAGE_VERSION macro.


type: ci
user: hobbs
comment:
  	* configure.in, configure, Makefile.in: Reorder configure.in for
  	better 64-bit build configuration, replacing EXTRA_CFLAGS with
  	CFLAGS.  [Bug #874058]
  	(install-doc, install-libraries): guard against null globs


type: ci
user: hobbs
comment:
  	* configure: update for minor tcl.m4 changes.  This is the first
  	checkin that uses autoconf-2.59 (previously used 2.57).


type: ci
user: hobbs
comment:
  	* configure: regen with later tcl.m4.
  	* Makefile.in: use @AR@ instead of hard-coded 'ar' to fix AIX
  	64-bit static build.


type: ci
user: das
comment:
  	* Makefile.in: split out TCLLIBPATH from TCLSH_ENV to allow
  	customization and overriding, add PKG_LIB_FILE dependency to
  	pkgIndex.tcl target.
  	* configure: autoconf-2.59 for tclconfig/tcl.m4 updates.


type: ci
user: das
comment:
  	* configure.in: added AC_DEFINE* descriptions to allow
  	use with autoheader.
  	* configure: autoconf-2.59.


type: ci
user: das
comment:
  	* Makefile.in: added commented out variable definitions for building
  	extensions using Tk, to document exactly what needs to be added for Tk.
  	Commented out obsolete makefile variables TCL_DEFS and TCL_LIBS.

  	* configure: autoconf-2.59 for TEA updates.


type: ci
user: mdejong
comment:
  	* Makefile.in: Subst TCLSH_PROG from PATH
  	as SYSTEM_TCLSH and subst BUILD_TCLSH and
  	BUILD_WISH. Use SYSTEM_TCLSH for the
   	pkgIndex.tcl generation target.
  	* configure: Regen.
  	* configure.in: Invoke new TEA_BUILD_TCLSH
  	and TEA_BUILD_WISH macros defined in tcl.m4.
  	[Tcl bug 1160114]
  	[Tcl patch 1244153]


type: ci
user: mdejong
comment:
  	* README: Add info about mingw and mention
  	pkgIndex.tcl.in.
  	* configure: Regen.
  	* configure.in: Emit a pkgIndex.tcl in the
  	build directory. This makes it possible to
  	build and install sampleextension without
  	having to run anything in a tclsh shell.
  	A build process that depends on running
  	the software being built will not work
  	when cross compiling.
  	* pkgIndex.tcl.in: Add template.


type: ci
user: mdejong
comment:
  	* Makefile.in: Remove SYSTEM_TCLSH and revert
  	back to just using TCLSH_PROG and WISH_PROG.
  	Remove use of SYSTEM_TCLSH at build time since
  	this is no longer supported.
  	* configure: Regen.
  	* configure.in: Don't invoke TEA_BUILD_TCLSH or
  	TEA_BUILD_WISH since these were removed from
  	tcl.m4. This fixes up support for a build
  	or installed version of Tcl.


type: ci
user: hobbs
comment:
  	* configure, configure.in: update to TEA 3.4 (darwin-64, Win-64
  	build improvements). [Bug 1369597]


type: ci
user: das
comment:
  	* generic/sample.c:
  	* generic/tclsample.c: fix gcc4 warnings.

  	* configure: autoconf-2.59 for TEA updates.


type: ci
user: das
comment:
  	* tcl.m4 (Darwin): for Tk extensions, remove -arch ppc64 from CFLAGS
  	like in the Tk configure, as neither TkAqua nor TkX11 can be built for
  	64bit at present (no 64bit GUI libraries).


type: ci
user: das
comment:
  	* tcl.m4 (Darwin): use makefile variable LDFLAGS_DEFAULT instead of
  	LDFLAGS in SHLIB_LD, to ensure linker flags in sampleextension Makefile
  	are picked up. [Bug 1403343]


type: ci
user: hobbs
comment:
  	* Makefile.in, configure.in (CLEANFILES): correct cleanup handling
  	of pkgIndex.tcl and clarify when it should be in CLEANFILES,
  	CONFIG_CLEAN_FILES and/or BINARIES. [Bug 1655088]
  	* configure: Updated with TEA 3.6 changes


type: ci
user: patthoyts
comment:
  Round of updating to synch up with the Tcl core version of this build system.
  Added sample resource file.


type: ci
user: patthoyts
comment:
  	* win/nmakehlp.c:  Added support for simple substitution of an
  	* win/makefile.vc: input file. This permits us to make use of
  	pkgIndex.tcl.in style files without resorting to use of the tclsh
  	we are building against -- when compiling for a foreign target (eg
  	AMD64 from a ix86 host) we may not be able to run the
  	tclsh. nmakehlp however must always be a native executable.


type: ci
user: hobbs
comment:
  	* Makefile.in: separate PKG_ENV parts from TCLSH/WISH_ENV parts to
  	better allow 8.4 and 8.5 core variant testing.


type: ci
user: patthoyts
comment:
  Updated win build files. Added new option to nmakehlp to qualify a
  path name for use in setting up paths for test.


type: ci
user: das
comment:
  	* Makefile.in: use INSTALL_LIBRARY instead of INSTALL_PROGRAM to
  	install libraries, avoids breakage from tcl's install-strip when
  	built as a bundled package.


type: ci
user: jenglish
comment:
  Bug 1960628:
  sampleextension: pkgIndex.tcl.in: use @PACKAGE_NAME@ instead of "Tclsha1"
  tclconfig: tcl.m4: Allow ${SHLIB_SUFFIX} to be overridden at configure-time
  Also fix some comment typos, and an uninitialized variable
  bug-waiting-to-happen.


type: ci
user: andreas_kupries
comment:
  	* configure: Regenerated to get my latest updates to tcl.m4 (See
  	tclconfig/ChangeLog).

  	NOTE: This pulled in an unexpected set of changes regarding
  	SHLIB_VERSION and SHARED_LIB_SUFFIX, indicating that configure was
  	not regenerated since some older change to tcl.m4.


type: ci
user: hobbs
comment:
          * configure, configure.in: TEA 3.8 update, just include tcl.m4,
          modify TEA_INIT version and run autoconf 2.59


type: ci
user: nijtmans
comment:
  configure: Regenerated to use latest TEA tcl.m4.
  This adds cross-compile support to UNIX and Win,
  and support for building 64-bit executables with
  mingw-w64 build tools.


type: ci
user: jan.nijtmans
comment:
  update to latest TEA
  Remove some unused code
  Always set USE_THREAD_ALLOC in combination with TCL_THREADS


type: ci
user: jan.nijtmans
comment:
  Update to latest TEA. 
  Use $(INSTALL_DATA_DIR) in stead of mkdir in Makefile. 
  Add more versionsed settings for fossil.


type: t
user: stwo
brief: Closed ticket [2429444fff].
comment:
  Closed ticket [2429444fff]: <i>install-doc target removes all mann manual pages</i> plus 7 other changes


type: t
user: nobody
brief: Ticket [941042ffff]: 4 changes
comment:
  Ticket [941042ffff] <i>Remove TCL_STORAGE_CLASS monkey business</i> status still Open with 4 other changes


type: t
user: fandom
brief: Ticket [538772ffff]: 4 changes
comment:
  Ticket [538772ffff] <i>mingw support for sample extension</i> status still Open with 4 other changes


type: t
user: dkf
brief: Ticket [681117ffff]: 4 changes
comment:
  Ticket [681117ffff] <i>Add mention in Makefile about doc target dependency</i> status still Open with 4 other changes


type: t
user: patthoyts
brief: Ticket [1689286fff]: 1 change
comment:
  Ticket [1689286fff] <i>nmakehlp not building on Win32 with VC</i> status still Open with 1 other change


type: t
user: lvirden
brief: Ticket [532557ffff]: 1 change
comment:
  Ticket [532557ffff] <i>sample makefile install target fails</i> status still Open with 1 other change


type: t
user: hobbs
brief: Ticket [1403343fff]: 5 changes
comment:
  Ticket [1403343fff] <i>TEA 3.4 is missing LDFLAGS support</i> status still Open with 5 other changes


type: t
user: abhayh
brief: New ticket [3097212fff].
comment:
  New ticket [3097212fff] <i>&quot;Too many Initiallizers &quot; error with Tcl_CreateObjCommand() </i>.


type: t
user: dgp
brief: Ticket [927244ffff]: 5 changes
comment:
  Ticket [927244ffff] <i>update sampleextension to use tcltest 2</i> status still Open with 5 other changes


type: t
user: mdejong
brief: Ticket [583573ffff]: 7 changes
comment:
  Ticket [583573ffff] <i>Add AC_PREREQ(2.13) to configure.in</i> status still Closed with 7 other changes


type: t
user: hobbs
brief: Closed ticket [1631922fff].
comment:
  Closed ticket [1631922fff]: <i>TEA should check actual existence of private headers</i> plus 7 other changes


type: t
user: mic42
brief: Ticket [583573ffff]: 2 changes
comment:
  Ticket [583573ffff] <i>Add AC_PREREQ(2.13) to configure.in</i> status still Open with 2 other changes


type: t
user: rmax
brief: Ticket [1631922fff]: 1 change
comment:
  Ticket [1631922fff] <i>TEA should check actual existence of private headers</i> status still Open with 1 other change


type: t
user: dkf
brief: Ticket [2782814fff]: 4 changes
comment:
  Ticket [2782814fff] <i>sample CVS snapshots contain old data</i> status still Open with 4 other changes


type: t
user: hobbs
brief: Ticket [794741ffff]: 5 changes
comment:
  Ticket [794741ffff] <i>sampleextension stublib ranlib fix</i> status still Open with 5 other changes


type: t
user: dgp
brief: Ticket [681117ffff]: 1 change
comment:
  Ticket [681117ffff] <i>Add mention in Makefile about doc target dependency</i> status still Open with 1 other change


type: t
user: lvirden
brief: Ticket [532557ffff]: 4 changes
comment:
  Ticket [532557ffff] <i>sample makefile install target fails</i> status still Open with 4 other changes


type: t
user: ferrieux
brief: Ticket [3097212fff]: 4 changes
comment:
  Ticket [3097212fff] <i>&quot;Too many Initiallizers &quot; error with Tcl_CreateObjCommand() </i> status still Open with 4 other changes


type: t
user: fandom
brief: Ticket [486768ffff]: 4 changes
comment:
  Ticket [486768ffff] <i>Sample extension doesn't work on FreeBSD</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [486768ffff]: 6 changes
comment:
  Ticket [486768ffff] <i>Sample extension doesn't work on FreeBSD</i> status still Open with 6 other changes


type: t
user: fandom
brief: Ticket [538772ffff]: 5 changes
comment:
  Ticket [538772ffff] <i>mingw support for sample extension</i> status still Open with 5 other changes


type: t
user: dkf
brief: Ticket [1076907fff]: 5 changes
comment:
  Ticket [1076907fff] <i>Sample Extension Uses Pre-Object Style</i> status still Closed with 5 other changes


type: t
user: das
brief: Ticket [794741ffff]: 4 changes
comment:
  Ticket [794741ffff] <i>sampleextension stublib ranlib fix</i> status still Open with 4 other changes


type: t
user: twylite
comment:
  Add attachment [/artifact/245e8845c5b7a7e0|sampleextension-twy-20070327.patch] to ticket [1689286fffffffff]


type: t
user: jenglish
comment:
  Add attachment [/artifact/bf5b5a682a14e041|sampleextension-monkey-business.patch] to ticket [941042ffffffffff]


type: t
user: hobbs
brief: Ticket [1631922fff]: 4 changes
comment:
  Ticket [1631922fff] <i>TEA should check actual existence of private headers</i> status still Closed with 4 other changes


type: t
user: ferrieux
brief: Ticket [3097212fff]: 4 changes
comment:
  Ticket [3097212fff] <i>&quot;Too many Initiallizers &quot; error with Tcl_CreateObjCommand() </i> status still Closed with 4 other changes


type: t
user: mic42
brief: Ticket [1517839fff]: 4 changes
comment:
  Ticket [1517839fff] <i>pkgIndex.tcl should not be in CLEANFILES</i> status still Open with 4 other changes


type: t
user: jenglish
brief: Ticket [1863648fff]: 4 changes
comment:
  Ticket [1863648fff] <i>TclOO stub library on windows is misnamed?</i> status still Open with 4 other changes


type: t
user: jenglish
brief: Ticket [941042ffff]: 1 change
comment:
  Ticket [941042ffff] <i>Remove TCL_STORAGE_CLASS monkey business</i> status still Open with 1 other change


type: t
user: hobbs
brief: Closed ticket [681117ffff].
comment:
  Closed ticket [681117ffff]: <i>Add mention in Makefile about doc target dependency</i> plus 7 other changes


type: t
user: patthoyts
brief: Ticket [762878ffff]: 4 changes
comment:
  Ticket [762878ffff] <i>Visual Studio support in sampleextension</i> status still Open with 4 other changes


type: t
user: gregcouch
brief: Ticket [1403343fff]: 4 changes
comment:
  Ticket [1403343fff] <i>TEA 3.4 is missing LDFLAGS support</i> status still Open with 4 other changes


type: t
user: andreas_kupries
brief: Ticket [486768ffff]: 5 changes
comment:
  Ticket [486768ffff] <i>Sample extension doesn't work on FreeBSD</i> status still Open with 5 other changes


type: t
user: dkf
brief: Ticket [1076907fff]: 2 changes
comment:
  Ticket [1076907fff] <i>Sample Extension Uses Pre-Object Style</i> status still Open with 2 other changes


type: t
user: dkf
brief: Ticket [1863648fff]: 6 changes
comment:
  Ticket [1863648fff] <i>TclOO stub library on windows is misnamed?</i> status still Open with 6 other changes


type: t
user: dgp
brief: Ticket [2429444fff]: 2 changes
comment:
  Ticket [2429444fff] <i>install-doc target removes all mann manual pages</i> status still Open with 2 other changes


type: t
user: mic42
brief: Ticket [583573ffff]: 6 changes
comment:
  Ticket [583573ffff] <i>Add AC_PREREQ(2.13) to configure.in</i> status still Closed with 6 other changes


type: t
user: andreas_kupries
brief: Ticket [2429444fff]: 4 changes
comment:
  Ticket [2429444fff] <i>install-doc target removes all mann manual pages</i> status still Open with 4 other changes


type: t
user: twylite
brief: Ticket [1689286fff]: 4 changes
comment:
  Ticket [1689286fff] <i>nmakehlp not building on Win32 with VC</i> status still Open with 4 other changes


type: t
user: dkf
brief: Ticket [1517839fff]: 2 changes
comment:
  Ticket [1517839fff] <i>pkgIndex.tcl should not be in CLEANFILES</i> status still Open with 2 other changes


type: t
user: hobbs
brief: Ticket [762878ffff]: 5 changes
comment:
  Ticket [762878ffff] <i>Visual Studio support in sampleextension</i> status still Open with 5 other changes


type: t
user: dkf
brief: Ticket [1076907fff]: 2 changes
comment:
  Ticket [1076907fff] <i>Sample Extension Uses Pre-Object Style</i> status still Closed with 2 other changes


type: t
user: dkf
brief: Ticket [2782814fff]: 2 changes
comment:
  Ticket [2782814fff] <i>sample CVS snapshots contain old data</i> status still Open with 2 other changes


type: t
user: hobbs
brief: Ticket [1631922fff]: 4 changes
comment:
  Ticket [1631922fff] <i>TEA should check actual existence of private headers</i> status still Open with 4 other changes


type: t
user: hobbs
brief: Ticket [1631922fff]: 1 change
comment:
  Ticket [1631922fff] <i>TEA should check actual existence of private headers</i> status still Closed with 1 other change


type: t
user: ferrieux
brief: Ticket [2429444fff]: 6 changes
comment:
  Ticket [2429444fff] <i>install-doc target removes all mann manual pages</i> status still Open with 6 other changes


type: t
user: dgp
brief: Ticket [1076907fff]: 4 changes
comment:
  Ticket [1076907fff] <i>Sample Extension Uses Pre-Object Style</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [1076907fff]: 5 changes
comment:
  Ticket [1076907fff] <i>Sample Extension Uses Pre-Object Style</i> status still Open with 5 other changes


type: t
user: stwo
brief: Closed ticket [2429444fff].
comment:
  Closed ticket [2429444fff]: <i>install-doc target removes all mann manual pages</i> plus 6 other changes


type: t
user: hobbs
brief: Closed ticket [1631922fff].
comment:
  Closed ticket [1631922fff]: <i>TEA should check actual existence of private headers</i> plus 3 other changes


type: t
user: ferrieux
brief: Closed ticket [3097212fff].
comment:
  Closed ticket [3097212fff]: <i>&quot;Too many Initiallizers &quot; error with Tcl_CreateObjCommand() </i> plus 3 other changes


type: t
user: andreas_kupries
brief: Open ticket [2429444fff].
comment:
  Open ticket [2429444fff]: <i>install-doc target removes all mann manual pages</i> plus 4 other changes


type: ci
user: jan.nijtmans
comment:
  Simpler approach to [0f839e585c2245da8c7ac4ee4575323a3827bad|0f839e585c]: make all symbols MODULE_SCOPE


type: ci
user: jan.nijtmans
comment:
  Make sampleextension work with novem. Remove Tcl_PkgRequire() call, as the same check is already done by Tcl_InitStubs().


# ticket

tkt_uuid: 1076907fffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 4
foundin: None
title: Sample Extension Uses Pre-Object Style
cmimetype: text/plain
submitter: karll
assignee: dkf
closer: dkf
closedate: 2004-12-02T00:38:07
comment:
  The sample extension uses the old string-style of
  commands, and hence, Tcl_CreateCommand instead of
  Tcl_CreateObjCommand, etc.

  Starting from the sample extension and working with
  more modern object-style commands, one is likely to get
  a clean build with no errors, a clean load of the
  shared library, and a nonobvious segmentation fault on
  any attempt to use one of the added commands.

  Suggest the sample extension be updated to use
  object-style commands.


tkt_uuid: 1403343fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: obsolete: 8.4.12
title: TEA 3.4 is missing LDFLAGS support
cmimetype: text/plain
submitter: gregcouch
assignee: das
closer: das
closedate: 2006-03-21T12:37:40
comment:
  TEA 3.4 provides lots of support for CFLAGS, in
  tclconfig/tcl.m4, configure.in and Makefile.in, but the
  corresponding support for LDFLAGS is missing.  Some
  changes are obvious to me, like adding LDFLAGS =
  @LDFLAGS@ to Makefile.in, but many are not (e.g should
  there be a separate SHLIB_LDFLAGS?).  It also seems
  obvious to me that Jeff Hobbs could fix this "the right
  way" in his sleep.

  Using the sampleextension, this bug can be reproduced
  by doing:

  env CFLAGS="-isysroot $(SDK)"
  LDFLAGS="-Wl,-syslibroot,$(SDK)" ./configure

  Followed by a "make -n" to see that CFLAGS makes it and
  LDFLAGS doesn't.

  The example above is for building Mac OSX 10.3 binaries
  (both applications and shared libraries) on 10.4, but
  LDFLAGS=options is useful on other platforms as well.


tkt_uuid: 1517839fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 7 High
foundin: None
title: pkgIndex.tcl should not be in CLEANFILES
cmimetype: text/plain
submitter: karll
assignee: hobbs
closer: hobbs
closedate: 2007-02-09T19:08:29
comment:
  pkgIndex.tcl is now made from pkgIndex.tcl.in by executing the configure 
  script.  By having pkgIndex.tcl defined in CLEANFILES in configure.in, 
  when doing a "make clean", pkgIndex.tcl gets deleted.  Subsequently, a 
  make install will fail.

  pkgIndex.tcl should only be deleted on a "make distclean", which is where 
  the Makefile and other stuff get deleted that require a rerun of the 
  configure script to generate.

  To fix this, remove pkgIndex.tcl from CLEANFILES in configure.in.  It 
  occurs in two places there.

  Modify Makefile.in to add pkgIndex.tckl to the CONFIG_CLEAN_FILES line.
  This will give the correct behavior.


tkt_uuid: 1631922fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 9 Immediate
foundin: None
title: TEA should check actual existence of private headers
cmimetype: text/plain
submitter: hobbs
assignee: das
closer: hobbs
closedate: 2008-11-05T00:10:03
comment:
  TEA_PRIVATE_(TCL|TK)_HEADERS says "checking for", but only uses whatever values are in tclConfig.sh.  It should error (or at least warn) if TCL|TK_SRC_DIR does not exist (as it will probably just lead to an error in make).


tkt_uuid: 1636345fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: TEA_ADD_LIBS and extension stubs
cmimetype: text/plain
submitter: pointsman
assignee: hobbs
closer: hobbs
closedate: 2010-08-16T23:18:25
comment:
  If a extension use the stubs table of another extension then it seems to be not enougth, to add the used stubs table in configure.in with e.g.

  TEA_ADD_LIBS([${TDOM_STUB_LIB_SPEC}])

  The build tools combination TEA/cygwin/VC++ requieres something like e.g.:

  if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
      TEA_ADD_LIBS([\"`${CYGPATH} ${TDOM_STUB_LIB_PATH}`\"])
  else
      TEA_ADD_LIBS([${TDOM_STUB_LIB_SPEC}])
  fi

  That magic would be better done by TEA behind the scence, after it detects the environment.


tkt_uuid: 1644655fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: obsolete: 8.5a6
title: configure broken in SC_COMMANDS_PRE
cmimetype: text/plain
submitter: lvirden
assignee: das
closer: das
closedate: 2007-01-26T02:46:27
comment:
  downloaded the activestate cvs head for tcl on jan 25, 2007.

  Using sparc solaris, ksh, and configured with
  --prefix=/projects/sprs_lwv/tcl85 --enable-shared --enable-symbols --enable-stubs --enable-64bit --enable-threads

  results in this error:

  checking for ar... ar
  ../configure: line 8855: syntax error near unexpected token `;'
  ../configure: line 8855: `    SC_COMMANDS_PRE(CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS="")'


tkt_uuid: 1655088fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 7 High
foundin: None
title: make clean removes pkgIndex.tcl
cmimetype: text/plain
submitter: decosterjos
assignee: hobbs
closer: hobbs
closedate: 2007-02-09T19:08:03
comment:
  Hi,

  When running 'make clean' after running configure for the sampleextension (from CVS on 8-feb-2007), the pkgIndex.tcl is removed. 

  Kind regards,

  Jos.


tkt_uuid: 1689286fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: obsolete: 8.5a6
title: nmakehlp not building on Win32 with VC
cmimetype: text/plain
submitter: twylite
assignee: patthoyts
closer: patthoyts
closedate: 2009-05-04T23:48:23
comment:
  I have just got the latest sampleextension from CVS, and am getting errors building it with VC6 or VC8.

    c:\build\sampleextension\win> pushd sampleextension\win
    c:\build\sampleextension\win> nmake /f makefile.vc all TCLDIR=..\..\tcl TKDIR=..\..\tk
    'nmakehlp' is not recognized as an internal or external command,
    operable program or batch file.
    ...<snip>
    Command line warning D4002 : ignoring unknown option '-fp:strict'
    Command line warning D4002 : ignoring unknown option '-GS'
    Command line warning D4002 : ignoring unknown option '-GL'
    ...<snip>
    LINK : warning LNK4044: unrecognized option "ltcg"; ignored

  The problems aren't fatal, but they shouldn't be there.

  Nmakehlp.exe doesn't build because:

    c:\sampleextension\win> cl nmakehlp.c
    ...<snip>
    /out:nmakehlp.exe
    nmakehlp.obj
    nmakehlp.obj : error LNK2001: unresolved external symbol _wnsprintf
    nmakehlp.exe : fatal error LNK1120: 1 unresolved externals
    
  This can be solved by taking the latest nmakehlp.c from the Tcl sources:

    c:\sampleextension\win> copy ..\..\tcl\win\nmakehlp.c
    
  The other warnings are fixed as a result of successfully building and using nmakehlp.

  --

  The next problem is that running the tests doesn't work.  The makefile looks for tclsh85.exe, which doesn't exist since I'm using a threaded build of Tcl.  

  The problem is on line 298 of rules.vc:

    SUFX    = sgx

  should be

    SUFX    = tsgx
    
  since the sampleextension build is supposed to be threaded by default.

  --

  Patch file against CVS is attached:
  - Updates nmakehlp.c to match the tcl module's version
  - Add 't' flag to SUFX default


tkt_uuid: 1863648fffffffffffffffffffffffffffffffff
type: RFE
status: Open
resolution: None
subsystem: 70. Sample Extension
priority: 7 High
foundin: None
title: TclOO stub library on windows is misnamed?
cmimetype: text/plain
submitter: kennykb
assignee: hobbs
comment:
  When doing a usual configure and make, using MinGW and msys on Windows XP, I notice that the TclOO stub library is named libTclOOstub011.a. This is a Unix naming convention; it would be significantly less surprising on Windows if it were called TclOOstub011.lib, by analogy to tclstub85.lb and tkstub85.lib.


tkt_uuid: 1960628fffffffffffffffffffffffffffffffff
type: Patch
status: Closed
resolution: Accepted
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: TEA adjustments/fixes
cmimetype: text/plain
submitter: stwo
assignee: jenglish
closer: jenglish
closedate: 2009-03-16T23:49:48
comment:
  If the VPATH needs to deviate from the standard four dirs (src, src/generic,src/unix,wrc/win) an extension writer would need to alter the tcl.m4 file as well as Makefile.in as opposed to need to simply alter configure.in.
  The new macro, TEA_ADD_VPATH_DIR is used to add directories to the VPATH. TEA_ADD_VPATH_DIR should be called before TEA_ADD_SOURCES or TEA_ADD_STUB_SOURCES to ensure that all source files are found. The default search dirs are now only the src snd src/generic dirs. If needed,  src/unix and src/win have to be added manually using TCL_ADD_VPATH_DIR. Also in this patch is a small adjustment to pkgIndex.tcl.in which removes the need to edit pkgIndex.tcl.in for basic usage cases. Also updates TEA_VERSION to 3.7.


tkt_uuid: 2025889fffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: Duplicate
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: BUILD_packagename variable for windows
cmimetype: text/plain
submitter: nicolascastagne
assignee: nobody
closer: hobbs
closedate: 2010-08-13T20:24:56
comment:
  On windows, to allow exporting symbols, there must be a BUILD_packagename variable defined by the configure script

   (eg : BUILD_sample for the sample extension)

  Header files have to check for this variable, which is defined if compilation is made on window.



  I suggest that :
  - the name of this variable could be made clearer, eg : WINDOW_BUILD_sample
  - the name of this variable could be freed of the package name. After all, what we mind here is knowing that the build is made on window. We don't mind to know the name of the extension. 

  The latest, also, would make easier to adapt the sample extension to a specific extension (removes one thing to change in configure.in)


  If the above is not possible, or not wanted, I suggest to add a few words on the need to change the name of this variable in :
  - configure.in
  - and the header files
  when adapting the sample extension to a specific extension.

  AFAIR, it is not quated in the doc.

  Hope this helps,
  Nicolas


tkt_uuid: 2429444fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: obsolete: 8.6a3
title: install-doc target removes all mann manual pages
cmimetype: text/plain
submitter: nobody
assignee: stwo
closer: stwo
closedate: 2010-12-17T18:23:26
comment:
  When the doc directory doesn't exist in some TEA packages I've found that: sudo make install;  causes the default Makefile.in to remove all of /usr/local/man/mann.

  Apparently the problem according to ferrieux is that the * expands to itself in the case of no match.

  In one case it was tkpath removing my mann files, and in another case (on another machine) it was another package, though I'm not sure which yet.

  A suggested solution (from ferrieux) is to check with a branch for * after the expansion was supposed to be done, if I understand correctly.


tkt_uuid: 2782806fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: obsolete: 8.6b1.1
title: sample package's test cases fail
cmimetype: text/plain
submitter: lvirden
assignee: nijtmans
closer: nijtmans
closedate: 2010-04-23T11:53:50
comment:
  Platform: sparc solaris 8 and Sun's C compiler
  Code - sample extension cvs head from April 27, 2009 ActiveState snapshot, configured and compiled against Tcl 8.6's cvs head from the April 27, 2009 snapshot

  When I configure and then run "gmake all test install", I get these errors:

  Tests running in interp:       /vol/tclsrcsol/tcl86/tcl/unix/tclsh
  Tests running with pwd:        /vol/tclsrcsol/tcl86/sample/unix
  Tests running in working dir:  /vol/tclsrcsol/tcl86/sample/tests
  Only running tests that match:        *
  Skipping test files that match:       l.*.test
  Only sourcing test files that match:  *.test
  Tests began at Tue Apr 28 08:06:16 EDT 2009
  sample.test
  can't find package Tclsha1
  tclsample.test
  can't find package Tclsha1

  Tests ended at Tue Apr 28 08:06:17 EDT 2009
  all.tcl:        Total   0       Passed  0       Skipped 0       Failed  0

  The Makefile then goes on:

  Sourced 0 Test Files.
   /projects/gnu/sparc-sun-solaris2.8/bin/ginstall -c libsample0.5.so /projects/sp
  rs_lwv/tcl86/lib/sample0.5/libsample0.5.so
   : /projects/sprs_lwv/tcl86/lib/sample0.5/libsample0.5.so
   Install pkgIndex.tcl /projects/sprs_lwv/tcl86/lib/sample0.5
  Installing header files in /projects/sprs_lwv/tcl86/include
  Installing documentation in /projects/sprs_lwv/tcl86/man
  Installing ../doc/sha1.n

  Even after this point, if I run a "gmake test" again, I still get the "can't find package Tclsha1" message.

  Two observations

  1. I don't recall seeing this problem before but the ChangeLog only appears to indicate a change for AIX.
  2. The tests can't find the extension, but no failures are listed for the test suite.


tkt_uuid: 2788534fffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: add package require to doc
cmimetype: text/plain
submitter: lvirden
assignee: nijtmans
closer: nijtmans
closedate: 2010-04-29T12:42:52
comment:
  Currently the sample extension's man page doesn't mention what package require the developer needs to load the command. To me, this seems like an invaluable piece of information.


tkt_uuid: 2788597fffffffffffffffffffffffffffffffff
type: Patch
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: fix to cvs code bugs
cmimetype: text/plain
submitter: lvirden
assignee: nijtmans
closer: nijtmans
closedate: 2010-04-23T11:53:07
comment:
  The attached patch fixes the tclsample.c file so that it correctly attempts to deal with sample package, as well as fixes the two test case files so they load the correct package.


tkt_uuid: 2994714fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: sample extension man page does not format
cmimetype: text/plain
submitter: lvirden
assignee: dkf
closer: dkf
closedate: 2010-04-30T13:23:39
comment:
  platform: sparc solaris 8
  tcl cvs head, dated 20100429 on the activestate cvs ftp site
  sample cvs head, dated 20100429 on the activestate cvs ftp site

  After configuring, building, testing, and installing the sample extension, I ran

  man -s n sha1

  with the install man folder in my MANPATH and got the error:

  Reformatting page.  Please Wait...unknown preprocessor specifier T

  After adding
  .\"
  as the first line of the man page (similar to what I see in other Tcl man files)
  the page formats and displays as expected.


tkt_uuid: 3097212fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Invalid
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: Linking extension with stubs
cmimetype: text/plain
submitter: abhayh
assignee: kennykb
closer: ferrieux
closedate: 2010-10-28T11:53:39
comment:
  Hi everyone. I am using MS VS 2005 to write a simple TCL extension. Below is my code.

  #include<tcl.h>
  #include<iostream>
  using namespace std;

  int Add_Nums (ClientData clientData, Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST * objv);
                         //ClientData clientData, Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST * objv)


  int DLLEXPORT
  Add_Init(Tcl_Interp *interp)
  {
     
      if(Tcl_InitStubs(interp,"8.4",0)==NULL){
          return TCL_ERROR;
      }
      if (Tcl_PkgProvide(interp, "add", "1.1") == TCL_ERROR) {
           return TCL_ERROR;
       }
      Tcl_Command Tcl_CreateObjCommand(interp,"add",Add_Nums,NULL,NULL);
      return TCL_OK;

  }


  int Add_Nums (ClientData clientData, Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST * objv)    
  {
      int adding(int no1,int no2);
      return TCL_OK;
  }

  int adding(int no1,int no2)
  {
     
      int sum =0;
      cout<<"Enter the two numbers:"<<endl;
      cin>>no1>>no2;
     
      cout<<"Sum is "<<no1+no2<<endl;
      return(sum);
  } 

  When i build this , its giving me " Too many Initiallizers " pointing at Tcl_CreateObjCommand() line.

  How do i resolve this?

  Thanks


tkt_uuid: 3597507fffffffffffffffffffffffffffffffff
type: RFE
status: Open
resolution: None
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: Change PKG_DIR convention
cmimetype: text/plain
submitter: dgp
assignee: nobody
comment:
  As noted in

  https://sourceforge.net/mailarchive/message.php?msg_id=30251660

  the established convention for PKG_DIR in Makefile.in

  PKG_DIR=    $(PACKAGE_NAME)$(PACKAGE_VERSION)

  cannot work well for packages that make the unfortunate choice
  to end their package name with a number.

  An alternative convention

  PKG_DIR=    $(PACKAGE_NAME)-$(PACKAGE_VERSION)

  would take care of them, and also align better with
  other packaging standards out there, AIUI.


tkt_uuid: 481264ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: Sample TEA extension should be in SF.net
cmimetype: text/plain
submitter: lvirden
assignee: nobody
closer: hobbs
closedate: 2002-03-23T00:46:06
comment:
  I don't see on the tcl.sf.net project page a mention of
  the TEA sample extension.  Having it on the web site
  would make it easier for people t find...


tkt_uuid: 481825ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: None
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: release sample extension package
cmimetype: text/plain
submitter: nobody
assignee: nobody
closer: hobbs
closedate: 2002-03-23T00:55:54
comment:
  currently no tar file, etc. for the sample extension
  exists on the web site.  It would be appreciated if
  either the last released tar/zip files would be added,
  or if the current state of the software would be
  released, so that people looking for the code could
  find it more easily.


tkt_uuid: 486768ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: obsolete: 8.3.3
title: Sample extension doesn't work on FreeBSD
cmimetype: text/plain
submitter: fandom
assignee: hobbs
closer: hobbs
closedate: 2002-03-06T08:47:50
comment:
  I tried getting the sample extensio to work in FreeBSD 
  4.2, I did the following:

  - I created a 'configure' script in Linux using 
  autoconf configure.in > configure. I did it Linux since
  the FreeBSD install didn't seem to include it. And by the
  way, in Linux the extension works fine.

  - I followed the usual secuence:
  - ./configure
  - make
  - make install

  During the make install appeared the following error:

  eval pkg_mkIndex exampleA0.2 ../libexampleA0.2.so 
  *.tcl
  warning: error while loading ../libexampleA0.2.so: 
  couldn't load file "./../libexampleA0.2.so": 
  ./../libexampleA0.2.so: invalid shared object: 
  e_phentsize != sizeof(Elf_Phdr)

  The result is that the pkgIndex.tcl has no 'package 
  ifneeded' line.


tkt_uuid: 532557ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: obsolete: 8.4a5
title: sample makefile install target fails
cmimetype: text/plain
submitter: lvirden
assignee: hobbs
closer: hobbs
closedate: 2002-03-20T19:07:56
comment:
  Build Platform: SPARC Solaris 2.6, Sun compiler
  Install Platform: SPARC Solaris 8

  The latest CVS head for sample generates this error:

  If you have documentation to create, place the commands
  to
  build the docs in the 'doc:' target.  For example:
          xml2nroff sample.xml > sample.n
          xml2html sample.xml > sample.html
  mkdir -p /usr/tcl84/lib
  mkdir -p /usr/tcl84/bin
  mkdir -p /usr/tcl84/lib/sample0.3
   /projects/gnu/sparc-sun-solaris2.6/bin/ginstall -c -m
  644 libsample0.3g.so /usr
  /tcl84/lib/sample0.3/libsample0.3g.so
   : /usr/tcl84/lib/sample0.3/libsample0.3g.so
  if test "x1" = "x1"; then \
      /projects/gnu/sparc-sun-solaris2.6/bin/ginstall -c
  -m 644 pkgIndex.tcl /usr/
  tcl84/lib/sample0.3
  /bin/sh: syntax error at line 1: `end of file'
  unexpected
  make: *** [install-binaries] Error 2


tkt_uuid: 538772ffffffffffffffffffffffffffffffffff
type: Patch
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: mingw support for sample extension
cmimetype: text/plain
submitter: fandom
assignee: hobbs
closer: hobbs
closedate: 2002-04-04T06:20:41
comment:
  The sample extensions as it is now in the CVS doesn't
  support compiling using the mingw compiler in a cygwin
  enviroment.

  I have tested the patch in a WinMe and WinXP systems
  and it seems to work, there are a couple a things to
  consider though:

  - I am no expert in gcc options a know nothing of MS
  compilers, so there may be so options that are not
  translated right.

  - The configure.in script doesn't work the autoconf
  2.5x that cygwin using, but i made the configure script
  in Linux.


tkt_uuid: 544203ffffffffffffffffffffffffffffffffff
type: Patch
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: mingw support
cmimetype: text/plain
submitter: fandom
assignee: hobbs
closer: hobbs
closedate: 2002-04-22T23:18:31
comment:
  The patch I submitted a couple weeks ago to make the 
  sample extension compile with mingw has a little 
  problem.

  The mingw test uses cc.exe to try to compile the test, 
  this program is not present so the test fails.

  In the computer where I developed the patch I had 
  created cc.exe as a shortcut to gcc.exe so I didn't 
  notice the problem.

  As far as I can see there is no code in tcl.m4 or 
  configure.in to create this test, so if this comes 
  from a macro in autoconf, the simplest way to solve it 
  is to tell the user to do: CC=gcc ./configure, so I 
  have updated the README.cygwin accordingly.

  I have also added a comment in the file on how to use 
  autoconf with cygwin.

  On the other hand I noticed that 'make distclean' 
  didn't delete the 'pkgIndex.tcl' file, I don't know if 
  this is deliberate, so I modified 'makefile.in' to 
  delete it.


tkt_uuid: 549782ffffffffffffffffffffffffffffffffff
type: Patch
status: Open
resolution: None
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: sample TIP55 DESCRIPTION.txt file
cmimetype: text/plain
submitter: stevecassidy
assignee: hobbs
comment:
  Here's a sample DESCRIPTION.txt file for the
  sampleextension. I'll try to contribute a makefile 
  target to build a package some time soon.


tkt_uuid: 554351ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: obsolete: 8.5a0
title: Sample Extension not 64-bit Aware
cmimetype: text/plain
submitter: dgp
assignee: hobbs
closer: hobbs
closedate: 2003-12-08T18:28:34
comment:
  OK, the main point of the sampleextension
  is the TEA config/build/install stuff, but
  the extension still ought to actually work.
  It does not work on 64-bit Linux/Alpha:

  $ make test
  TCL_LIBRARY=`echo /local/src/tcl/library`
  LD_LIBRARY_PATH=".:/local/src/tcl/unix:/home/dgp/alpha/linux/lib:/usr/local/lib:/usr/lib"
  LIBPATH=".:/local/src/tcl/unix:"
  SHLIB_PATH=".:/local/src/tcl/unix:"
  PATH=".:/local/src/tcl/unix:/home/dgp/alpha/linux/bin:/home/dgp/Tcl:/home/dgp/Perl:/home/dgp/bin:/home/dgp/bin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/X11:/usr/openwin/bin:/usr/games:."
  TCLLIBPATH="." "/local/src/tcl/unix/tclsh" `echo
  ./tests/all.tcl` 
  Tests running in interp:      
  /local/src/tcl/unix/tclsh
  Tests running with pwd:       
  /local/src/sampleextension
  Tests running in working dir: 
  /local/src/sampleextension/tests
  Only sourcing test files that match:  *.test
  Tests began at Thu May 09 22:24:44 EDT 2002
  sample.test

  ==== sha-1.1 Use of -string operand FAILED
  ==== Contents of test case:

      set result [sha1 -string foo]

  ---- Result was:
  b0b801b1bf5f29352b10094e72d6842b9676a1f8
  ---- Result should have been (exact matching):
  0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33
  ==== sha-1.1 FAILED

  make: *** [test] Segmentation fault


  My guess is that there's an implicit assumption
  of 32-bit "registers".


tkt_uuid: 580188ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Invalid
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: obsolete: 8.3.4
title: dll exports no functions on windows
cmimetype: text/plain
submitter: mic42
assignee: hobbs
closer: hobbs
closedate: 2002-07-11T18:32:35
comment:
  Building the samplextension from CVS (11. July 2002),
  with cygwin/VC6 works o.k. on windows (W2k), but there
  are no functions exported from the dll, so it can not
  be loaded into a tclsh.

  dumpbin /EXPORTS sample04.dll reveals the missing Exports.

  tclsh says "couldn't find procedure Sample_Init".

  Building the same samplextension with 8.4a4 works
  perfectly well (just tested a threaded 8.4a4) and
  symbols are exported.

  Adding (when using 8.3.4) the usual
  __declspec(dllexport) to the prototyp works as
  expected, so there seems to be an issue with the EXTERN
  / DLLEXPORT Macro. 

  Michael Schlenker


tkt_uuid: 583573ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Accepted
subsystem: 70. Sample Extension
priority: 3 Low
foundin: None
title: Add AC_PREREQ(2.13) to configure.in
cmimetype: text/plain
submitter: mic42
assignee: hobbs
closer: mdejong
closedate: 2002-07-19T20:29:47
comment:
  The newest cygwin for windows is installed with
  autoconf 2.53a and 2.13, so autoconf fails if used,
  because 2.53a is used by default.

  To force usage of autoconf 2.13 AC_PREREQ(2.13) should
  probably be used in configure.in.


tkt_uuid: 638045ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
resolution: None
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: Extended genStubs.tcl
cmimetype: text/plain
submitter: andreas_kupries
assignee: hobbs
comment:
  The attached genStubs.tcl is extended to 
  recognize 'supressor names'. These are translated into 
  CPP directives (#if defined/!defined) to conditionally 
  initialize a stub table.

  This was used first in the mod-8-3-4-branch (Cisco 
  modular Tcl) to enforce that the slots for functions
  which are compiled out are initialized with NULL.

  IMHO this is useful for extensions too.


tkt_uuid: 679416ffffffffffffffffffffffffffffffffff
type: Patch
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: Compiling with mingw
cmimetype: text/plain
submitter: nobody
assignee: mdejong
closer: mdejong
closedate: 2003-02-25T18:11:23
comment:
  A new README.cygwin with updated instrucctions on how
  to compile the sample extension using msys_mingw


tkt_uuid: 681117ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: Add mention in Makefile about doc target dependency
cmimetype: text/plain
submitter: lvirden
assignee: hobbs
closer: hobbs
closedate: 2005-02-02T00:42:09
comment:
  It would be useful to add, either in code or at least
  documentation, a note indicating to the developer that
  a dependancy should be expressed for the doc target
  between the generated doc files and the source doc
  files.  That way, the make file doesn't try to generate
  them on the installation machine (where the target
  _may_ not run anyways)...


tkt_uuid: 683474ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 3 Low
foundin: None
title: sampleextension revision control
cmimetype: text/plain
submitter: jenglish
assignee: hobbs
closer: hobbs
closedate: 2005-02-02T00:39:20
comment:
  The sampleextension Makefile.in and configure.in files
  should contain some sort of version identification, to
  make it easier for package authors who use them as
  templates to keep in sync with later revisions.

  See tcl-core mailing list thread "sampleextension
  revision control" for other discussion:

  http://sourceforge.net/mailarchive/forum.php?thread_id=1628329&forum_id=3854


tkt_uuid: 719051ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 9 Immediate
foundin: obsolete: 8.5a0
title: sample configure no longer works
cmimetype: text/plain
submitter: lvirden
assignee: hobbs
closer: hobbs
closedate: 2003-04-10T18:31:59
comment:
  The current sample CVS head snapshot from activestate
  contains a configure which generates an error on Sparc
  Solaris 2.6, Sun's C compiler:

  $ tar xfz sample-20030409.tar.gz
  $ mkdir sample/unix
  $ cd sample/unix
  $ ../configure --prefix=/usr/tcl84 --enable-symbols
  --enable-shared
  :
  stuff goes along and then
  checking if 64bit support is enabled... no
  checking if 64bit Sparc VIS support is requested... no
  checking system version (for dynamic loading)... SunOS-5.6
  checking for dlopen in -ldl... yes
  checking for ar... ar
  ../configure: syntax error at line 3171: `WCEROOT=$'
  unexpected


tkt_uuid: 762878ffffffffffffffffffffffffffffffffff
type: Patch
status: Closed
resolution: Accepted
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: Visual Studio support in sampleextension
cmimetype: text/plain
submitter: patthoyts
assignee: patthoyts
closer: patthoyts
closedate: 2003-07-02T00:38:35
comment:
  I think it would be useful to include support for
  Visual Studio in the sample extension in the same way
  that Tcl itself does.

  To this end I have taken the current makefile.vc,
  nmakehlp.c and rules.vc from the tcl cvs and (slightly)
  modified them to be generically useful for building
  packages. The modified makefile can now be trivially
  edited to support most (simple) TEA compliant packages.

  I feel this is a useful addition to the sample TEA
  build system.


tkt_uuid: 794741ffffffffffffffffffffffffffffffffff
type: Patch
status: Deleted
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: sampleextension stublib ranlib fix
cmimetype: text/plain
submitter: nobody
assignee: das
closer: das
closedate: 2005-02-04T12:32:27
comment:
  the attached patch fixes an issue with ranlib not being run 
  on stub libs when building dynamically linked extensions 
  (i.e. with RANLIB=.), this breaks building of 
  interdependent stubified extensions on platforms that need 
  ranlib to be run on static libs prior to linking (such as Mac 
  OS X).

  Essentially, ranlib calls on always static libs e.g. stub libs 
  need to be separated from ranlib calls on libs that can be 
  either static or dynamic, this is done via the new 
  RANLIB_STUB which is set to the value of RANLIB before 
  RANLIB is reset to . when building a dynamically linked 
  extension.

  Also added a section to the Makefile illustrating how to 
  build stub libraries to clarify usage of the new 
  RANLIB_STUB.
  The technique adopted at install time is to run 
  RANLIB_STUB on libraries containing the string "stub" and 
  RANLIB on others.

  This issue affects a number of TEA extensions using their 
  own stub libs: incrTcl, trf, tkimg, tclxml, tcldom; but 
  should also be fixed in sampleextension so that newly 
  TEAfied extensions won't perpetuate this problem...

  See the following patches for details on how the 
  abovementioned extensions are affected:
  http://tcltkaqua.sf.net/8.4.4/patches/incrTcl.diff
  http://tcltkaqua.sf.net/8.4.4/patches/trf.diff
  http://tcltkaqua.sf.net/8.4.4/patches/tkimg.diff
  http://tcltkaqua.sf.net/8.4.4/patches/tclxml.diff
  http://tcltkaqua.sf.net/8.4.4/patches/tcldom.diff
  these will be submitted to the respective projects as time 
  permits...


tkt_uuid: 856299ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: Invalid
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: support multiple build directories
cmimetype: text/plain
submitter: dgp
assignee: dgp
closer: dgp
closedate: 2003-12-08T18:28:40
comment:
  When building Tcl for several
  platforms (or in several variants),
  it is useful to create many build
  directories as siblings of unix,
  win, etc. one for each build.

  Then one can do the build with

     $ ../configure
     $ make

  etc.

  The same approach does not appear
  to work with the sampleextension.
  That is, the configure and Makefile.in
  appear to only work in the root
  directory of the sampleextension
  distribution, and in no other directory.

  Would be nice to make this less
  restrictive.  As is, multi-platform
  development is a bit of a pain.


tkt_uuid: 859072ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 7 High
foundin: obsolete: 8.4.6
title: sample extension make file broken
cmimetype: text/plain
submitter: lvirden
assignee: hobbs
closer: hobbs
closedate: 2004-09-20T22:11:43
comment:
  I am trying to build the latest sample extension on a
  sparc solaris 8
  machine with Sun's C compiler.

  After everything builds and tests fine, when the
  install is executed this is
  what occurs:

   /projects/gnu/sparc-sun-solaris2.8/bin/ginstall -c
  libsample0.5g.so /volws/lwv2
  6/ldatae/lib/sample0.5/libsample0.5g.so
   : /volws/lwv26/ldatae/lib/sample0.5/libsample0.5g.so
  if test "x1" = "x1"; then \
      /projects/gnu/sparc-sun-solaris2.8/bin/ginstall -c
  -m 644 pkgIndex.tcl /volws/lwv26/ldatae/lib/sample0.5; \
  fi
  Installing header files in /volws/lwv26/ldatae/include
  /bin/bash: -c: line 1: syntax error near unexpected
  token `;'
  /bin/bash: -c: line 1: `for i in  ; do  echo
  "Installing ../$i" ;  /projects/gnu
  /sparc-sun-solaris2.8/bin/ginstall -c -m 644 ../$i
  /volws/lwv26/ldatae/include ;
    done;'
  make: *** [install-libraries] Error 2


tkt_uuid: 927244ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
resolution: None
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: update sampleextension to use tcltest 2
cmimetype: text/plain
submitter: dgp
assignee: nijtmans
comment:
  It's good to have an example
  extension for people to copy.

  Would be better to use up to
  date testing features.


tkt_uuid: 941042ffffffffffffffffffffffffffffffffff
type: Patch
status: Closed
resolution: Wont Fix
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: Remove TCL_STORAGE_CLASS monkey business
cmimetype: text/plain
submitter: jenglish
assignee: hobbs
closer: sf-robot
closedate: 2010-09-29T19:23:04
comment:
  The attached patch replaces the (confusing, and
  incorrect) preprocessor gyrations:

     #ifdef BUILD_sample
     #undef TCL_STORAGE_CLASS
     #define TCL_STORAGE_CLASS DLLEXPORT
     #endif

  with the usual Windows idiom, defining a distinct
  SAMPLE_STORAGE_CLASS macro instead of hijacking Tcl's
  EXTERN macro.


tkt_uuid: 951247ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
foundin: None
title: TEA: --with-tcl option confusing
cmimetype: text/plain
submitter: dkf
assignee: dkf
closer: dkf
closedate: 2005-01-12T10:27:25
comment:
  It would be nice if we could also pass the name of the
  tclConfig.sh file directly in the --with-tcl option;
  it's not always clear to new users that they have to
  pass the name of the directory containing the file, and
  not the file itself.


tkt_uuid: 0f839e585c2245da8c7ac4ee4575323a3827badf
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
severity: Minor
foundin: current
private_contact: 36034badbf4fa68e1e6f55bc81729916152660a8
title: Symbol name conflict
cmimetype: text/plain
submitter: stwo
assignee: jan.nijtmans
closer: jan.nijtmans
closedate: 2456946.81091101
comment:
  Some systems (BSDs) have sha1 functions in their libcs with names identical to those in sampleextension.
  Recommend renaming the functions to sample_SHA1Init etc. or some other suitable name.


tkt_uuid: f72ade40ae579eede4e4904f0b5ef724e8d4751a
type: RFE
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
severity: Minor
foundin: current
private_contact: 36034badbf4fa68e1e6f55bc81729916152660a8
title: Installer improvements
cmimetype: text/plain
submitter: stwo
assignee: jan.nijtmans
closer: jan.nijtmans
closedate: 2456932.2592694
comment:
  Substitute INSTALL_* from and make consistent with, tcl.m4.
  Companion to tclconfig ticket [604f8d1457].


tkt_uuid: 2788536fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 70. Sample Extension
priority: 5 Medium
severity: Minor
foundin: None
title: sample extension does not load
cmimetype: text/plain
submitter: lvirden
assignee: aku
closer: stwo
closedate: 2456933.65783178
comment:
  I obtained the sample extenion cvs head, from the activestate ftp site, dated 20090504.
  I built it against Tcl 8.6 CVS head.
  It builds and I then install it.
  Then I type
  % package require sample
  attempt to provide package sample 0.5 failed: no version of package sample provided


tkt_uuid: 2782814fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Out of Date
subsystem: 70. Sample Extension
priority: 5 Medium
severity: Minor
foundin: None
title: sample CVS snapshots contain old data
cmimetype: text/plain
submitter: lvirden
assignee: andreas_kupries
closer: stwo
closedate: 2456933.60993659
comment:
  Within the CVS snapshots of the sample extension code is a directory called "sample". Within that directory is a 3 yr old snapshot of the sample extension. Is this an intentional effort to provide a full snapshot of the code at a frozen point in time?  If so, then it might be useful to rename the directory "tcl 8.4 sample" or "tea 2 sample" or whatever the frozen code represents.

  If this is happening by accident, then it seems like a good idea to remove it so as not to confuse someone trying to figure out how to use sample.


tkt_uuid: 0a2062417c2d3196c5865f4978eaa6b6114d1a0e
type: Support
status: Open
resolution: None
subsystem: 70. Sample Extension
priority: 5 Medium
severity: Minor
private_contact: 2caf797de13248fb0c6ec498502ae2197d48be0f
title: Clarify copyright of the sampleextension / placeholder
cmimetype: text/plain
submitter: anonymous
assignee: nobody
closer: nobody
comment:
  The file license.terms in the sampleextension states that the software is copyrighted by Scriptics. For an author wishing to put his work under the same license, it is unclear, how to modify the license to comply with it. For other licenses, does the Tcl license need to be kept to comply with?


# ticketchng

login: dgp
username: dgp
mimetype: text/plain
icomment:
  data_type - 360894

  Logged In: YES 
  user_id=80530

  I like this idea very much, but
  I'd call it a feature request rather
  than a bug.


login: dkf
username: dkf
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=79902

  Done; the code still isn't entirely elegant (it's confused
  about the difference between options and subcommands) but
  it's now object-based confusion. :^)


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=72656

  I'll look into this, but I wanted to note that the latest
  TEA in CVS has support for the universal OS X builds already.


login: gregcouch
username: gregcouch
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=131838

  More information.

  Universal OS X builds work for Tcl and Tk, but not for the
  sample extension (I believe tktable has the same problem). 
  Also, with "configure --enable-symbols", the -g is not
  showing up on the link line.


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=72656

  The latest tcl.m4 updates to TEA/sample should allow
  building on 10.4 without LDFLAGS being set.  There are some
  special combinations that still require LDFLAGS to be passed
  through, but it's a bit of a quagmire in the m4 handling of
  LDFLAGS right now.  Passing on to Daniel so he can comment
  on the special conditions.


login: das
username: das
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=90580

  the darwin specific problem in TEA w.r.t LDFLAGS was that the TEA makefile 
  has LDFLAGS_DEFAULT rather than LDFLAGS like the tcl makefile, so darwin 
  SHLIB_LD had to be modified accordingly, a fix for this was committed on 
  23/1/06 to TEA tclconfig.

  as far as your example for building 10.3 binaries on 10.4 goes, that no longer 
  works with the latest tools (Xcode 2.2.1), instead use
  export CFLAGS='-mmacosx-version-min=10.3 -isysroot /Developer/
  SDKs/MacOSX10.3.9.sdk'
  (i.e. no LDFLAGS needed anymore anyway)

  universal builds are similar:
  export CFLAGS='-mmacosx-version-min=10.4 -arch ppc -arch ppc64 -
  arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk'

  these will work with latest 8.4 & HEAD tcl/tk core and TEA 3.5 extensions.


login: petasis
username: petasis
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=92283
  Originator: NO

  The changes made in tcl.m4 to close this bug are not appropriate. In fact, the smaplextension now fails at least under fedora core 6: The changes should be:

  Instead of:
  if test ! -d "${TK_SRC_DIR}/tkInt.h" ; then
     AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}])
  fi

  Should be:
  if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
     AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}])
  fi

  Why? 

  a) test -d checks for existence of directories. Not for single file. It will return false, even if the file is there. In my system, only test -f works when the file is there...

  b) We should also put /generic/<file>, as TK_SRC_SIR in tkConfig.h should point to the root of the sources, and not in the generic directory. If you set TK_SRC_SIR to include generic (to force configure to not fail), you end up ith generic/generic/ in includes :-(

  Of course, the same must be changed also for tclInt.h...

  Can you please fix this?


login: rmax
username: rmax
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=124643
  Originator: NO

  This fix breaks tcl.m4 in systems where the private headers got installed along with the public ones and ${TCL_SRC_DIR} doesn't exist (anymore), which is common when Tcl gets installed as part of the OS distribution. 

  So, in addition to ${TCL_SRC_DIR} the location found by TEA_PUBLIC_TCL_HEADERS should be checked for tclInt.h .


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  New TEA 3.7 has this in the private header checks.  Note that it should be used in conjunction with the latest private headers from the core because they had unnecessary ../win/tclWinPort.h and ../unix/tclUnixPort.h refs that would bork things.  The ../win and ../unix have been removed across the board now, but were present in 8.4 and 8.5 for Tcl and Tk.


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  Making note for Daniel - the tcl.m4 TEA_PRIVATE_TK_HEADERS framework check is missing an 'else' clause that the Tcl one has - correct or no?


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=72656
  Originator: NO

  You are correct that that is about the magic necessary.  I could make a macro (TEA_ADD_STUB_LIBS?), but it's a rare extension that would use it.


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  allow_comments - 1

  Fixed for TEA 3.9, subsumed this functionality into TEA_LOAD_CONFIG. with TEA_LOAD_CONFIG_LIB that is called automatically.


login: das
username: das
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=90580
  Originator: NO

  awww, my bad, I mistakenly copy/pasted changes from tcl core-8-4-branch (for AC 2.13) instead of the correct AC 2.59 changes from HEAD. Fixed now, apologies.


login: decosterjos
username: decosterjos
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=370749
  Originator: YES

  Running this sequences:

  make distclean
  ./configure
  make
  make clean
  make
  make test

  gives the following output:

  Tests running in interp:       /usr/bin/tclsh8.3
  Tests running with pwd:        /target/staff/decoster/tmp/tcltk8.5/sampleextension
  Tests running in working dir:  /target/staff/decoster/tmp/tcltk8.5/sampleextension/tests
  Only sourcing test files that match:  *.test
  Tests began at Thu Feb 08 12:46:13 CET 2007
  sample.test
  can't find package Tclsha1
  tclsample.test
  can't find package Tclsha1

  Tests ended at Thu Feb 08 12:46:13 CET 2007
  all.tcl:        Total   0       Passed  0       Skipped 0       Failed  0
  Sourced 0 Test Files.


login: dkf
username: dkf
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=79902
  Originator: NO

  I think this is probably a TEA bug. TclOO just uses that part, and never defines it manually; it's derived from somewhere in tclconfig/tcl.m4


login: jenglish
username: jenglish
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=68433
  Originator: NO

  Better still would be to name it libtcloostub.a on Unices or TCLOOSTUB.LIB on Windows.

  There is no good reason to include a version number in stub library names, since the *_InitStubs() procedure is normally identical on all versions.

  But yes, this is a TEA bug.


login: stwo
username: stwo
mimetype: text/plain
icomment:
  File Deleted - 277251: 



  File Added - 277475: tea_3.6-3.7.patch

  Logged In: YES 
  user_id=143350
  Originator: YES

  New patch does everything the original did plus the following:

  Uses TK_INCLUDE_SPEC to find tk.h, same way as
  TCL_INCLUDE_SPEC is used to find tcl.h

  Additionally checks for tclConfig.sh in:
  ${exec_prefix}/lib/tcl[8-9].[0-9]
  ${exec}/lib/tcl[8-9].[0-9]
  /usr/local/lib/tcl[8-9].[0-9]

  Additionally checks for tkConfig.sh in:
  ${exec_prefix}/lib/tk[8-9].[0-9]
  ${exec}/lib/tk[8-9].[0-9]
  /usr/local/lib/tk[8-9].[0-9]

  Added INSTALL_LIBRARY macro.
  Suitable for archs where install options for
  binaries and libraries are different (ex: binaries
  are stripped, libraries aren't).
  Currently set to ${INSTALL_PROGRAM} - no functional change.
  Groundwork for future install improvements.

  Assorted code/spelling/typo fixes/uniformity.
  File Added: tea_3.6-3.7.patch


login: stwo
username: stwo
mimetype: text/plain
icomment:
  File Added - 291950: tea36.patch

  Logged In: YES 
  user_id=143350
  Originator: YES

  New, simpler patch.

  pkgIndex.tcl.in:
  Replace 'Tclsha1' with '@PACKAGE_NAME@' to free
  an extension writer from having to modify the file.

  tcl.m4:
  Use TK_INCLUDE_SPEC to find tk.h, same way as
  TCL_INCLUDE_SPEC is used to find tcl.h, fixes
  bug where TEA can't find Tk headers. As part
  of this, ensure variable 'list' is empty before
  filling - I don't think it should contain the
  list of directories for TCL_PUBLIC_HEADERS
  when it looks for TK_PUBLIC_HEADERS.

  Remove -Wno-implicit-int from CFLAGS_WARNING.

  Add AC var SHLIB_VERSION used like:
  SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
  to free porters/builders from having to patch tcl.m4
  on systems where the shared library version is important.

  Assorted code/spelling/typo fixes/uniformity.

  Does not change ephemeral TEA version number '3.6'.
  File Added: tea36.patch


login: kennykb
username: kennykb
mimetype: text/plain
icomment:
  The idea of allowing the VPATH to be extended with whatever the extension needs appears to make eminent sense.  I'll have a look at this patch.


login: stwo
username: stwo
mimetype: text/plain
icomment:
  File Added - 317123: patch-pkgIndex_tcl

  Slightly improved versions of previous patches.
  Older patches left for reference/ideas for possible future changes.
  File Added: patch-pkgIndex_tcl


login: stwo
username: stwo
mimetype: text/plain
icomment:
  File Added - 317124: patch-tclconfig_tcl_m4

  Slightly improved versions of previous patches.
  Older patches left for reference/ideas for possible future changes.
  File Added: patch-tclconfig_tcl_m4


login: jenglish
username: jenglish
mimetype: text/plain
icomment:
  (For future reference): Stu explained on the chat that ${SHLIB_VERSION} was added so that porters could override the hardcoded ".1.0" part of "libfooXY.so.1.0" at configure-time.

  (Stu -- if you could further elaborate *why* one might want/need to do so, it would be appreciated.  Why not f'rinstance just name the shared library "libfooXY.so" -- or better yet, just "foo.so"?  That works just fine on every other ELF-based Unix, why is BSD different here?)


login: jenglish
username: jenglish
mimetype: text/plain
icomment:
  (For future reference): On the chat, stu pointed (again) to: http://www.openbsd.org/porting/libraries.html

  ... which if I understand correctly is talking about more or less the standard ELF rules for dynamically-linked libraries and SONAMES.  So there doesn't seem to be anything hugely different between the *BSDs and other modern Unices.

  However -- and this is the part that seems to be widely misunderstood -- the "libfoo.so.major.minor" SONAME naming scheme is only relevant for shared libraries that are dynamically *linked*.

  For shared libraries that are dynamically *loaded* -- like Tcl extensions! -- the SONAME, and the filename, are utterly irrelevant as far as dlopen() is concerned. 

  (And as far as the Tcl [load] command is concerned, the only part of the filename that matters is the bit between the optional leading "lib" and the first nonalphaorunderline character.  See Tcl_LoadObjCmd()).

  AFAICT, all the autogoo trying to guess the "right" ${SHARED_LIB_SUFFIX} is a PWOT, a WOMBAT, a tapdancing badger.   On every Unix I've seen in the last 10 years, you could name the shared library "FOO.DLL" and in Tcl say [package ifneeded foo X.Y [list load [file join $dir FOO.DLL]]] and everything would work Just Fine.

  What am I missing?


login: stwo
username: stwo
mimetype: text/plain
icomment:
  ${SHLIB_VERSION}, not ${SHARED_LIB_SUFFIX}.
  ${SHLIB_VERSION} is used by the ports/packages system for dependencies.
  For example, the shared lib for tcl8.5.6 would (initially) be libtcl85.so.0.0.
  If there were a minor adjustment made to the the tcl8.5.6 port (let's say a small fix taken from tcl's cvs) then the resultant lib would be libtcl85.so.0.1.
  If there were a tcl8.5.7 release then the resultant lib (on OpenBSD) would be libtcl85.so.1.0.
  Without these numbers there'd be no way for the ports/packages system to resolve dependencies, since the lib names in the above examples would all be the same (libtcl85.so). This 'dependency resolving' is crucial for automatic package updates.

  Without ${SHLIB_VERSION}, tcl.m4 would have to always be patched to set the proper ${SHLIB_VERSION} as can currently be seen in the ports trees of all the BSDs. Using ${SHLIB_VERSION} will obviate patching for this purpose, saving others the trouble and hence making Tcl/Tk and any TEA extension slightly more friendly to the ports/packages systems of these os's.

  Those using non-BSD os's can safely continue to ignore this but hopefully now they'll understand why the BSD's need it.


login: jenglish
username: jenglish
mimetype: text/plain
icomment:
  OK, so: this is *not* just the standard ELF SONAME rules as Linux/Solaris/IRIX/etc., interpret them, the *BSDs really are different here.

  And the ${SHLIB_VERSION} part of the patch really needs to be applied to the core's (tcl and tk) build system, so *BSD porters can specify an appropriate name for libtclXY.so.${SHLIB_VERSION} and libtkXY.so.${SHLIB_VERSION}.  For TEA, for extensions, it's still irrelevant.  (Do I have that right, or am I still missing something)?

  ... and it looks like tcl/unix/tcl.m4 and tk/unix/tcl.m4 already support configure-time overriding of  ${SHLIB_VERSION}, so nothing to do here.

  One more part to go, see next message.


login: jenglish
username: jenglish
mimetype: text/plain
icomment:
  stu explains on the chat:

  > tkConfig.sh has the correct TK_INCLUDE_SPEC but TEA_PUBLIC_TK_HEADERS 
  > does not use it.
  > [...] suggest grepping for TK_INCLUDE_SPEC  and you'd see that it's not used, except for 
  > mac framework builds.
  > imho, TEA_PUBLIC_TCL_HEADERS and TEA_PUBLIC_TK_HEADERS should be 
  > (nearly) identical but for s/TCL/TK/

  ... and jenglish finally gets it.  This part of the patch:

  if test x"${TK_INCLUDE_SPEC}" != x ; then
      d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
      list="$list `ls -d ${d} 2>/dev/null`"
  fi

  is , I maintain, still buggy [*] (as is most of the surrounding autogoo), but without it TEA_PUBLIC_TK_HEADERS DFW at all if Tk has been installed in a nonstandard location.

  Remainder of the patch committed (tclconfig/tcl.m4 r1.130 -> r1.131).  Closing.

  [*] bugs: makes several unwarranted assumptions about the nature and form of TK_INCLUDE_SPEC.


login: ferrieux
username: ferrieux
mimetype: text/plain
icomment:
  Yes. To elaborate, the bug is in the install-doc target which does

    list='$(srcdir)/doc/*.n'; for i in $$list; do
    ...
    rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \

  Hence if $srcdir/doc is empty of any *.n, then the 'list' var is set to a path having a literal star in its [file tail].
  It gets iterated over by 'for' as a single-element list, hence 'i' gets the same value, and 'basename' still extracts the star.
  This results in

    rm -f $(DESTDIR)$(mandir)/mann/*.n

  which is unfortunate ;-)
  As suggested on the chat with George, there are generic ways to detect no-matches in shell (like looking for the naked star).
  But here it might be wiser to avoid the rm in the first place. Why is it there ? (it is followed by INSTALL_DATA which could well overwrite files)...


login: andreas_kupries
username: andreas_kupries
mimetype: text/plain
icomment:
  allow_comments - 0

  Hm. Actually I believe the INSTALLDIR can fail to write over an existing file, if the permissions make it non-writable and the 'cp' has no force option. Which may not be portable. In that case the 'rm -f' ensures that the file is gone even if non-writable, without asking, as long as we have permission to write to the directory.


login: stwo
username: stwo
mimetype: text/plain
icomment:
  Re INSTALL_DATA failing:
  This isn't much of a problem and shouldn't be a problem with the newer 'install-sh' and may not have even been a problem with the older 'install-sh' and there have been no complaints since the change, so I'm closing it. If it's still a problem for someone then let them speak up; better this fix than wiping directories.


login: lvirden
username: lvirden
mimetype: text/plain
icomment:
  The problem appears to be this. Previously, when the sample package was installed, it was installed as lib/sampleVersion.Level/pkgIndex.tcl and libsample*.so, but within the pkgIndex.tcl, the package was identified as Tclsha1.

  However, the current pkgIndex.tcl is being installed identifying itself as "sample".

  The test cases still look for Tclsha1 (as well a variety of programs which make use of it), but that name is no longer used in the pkgIndex.tcl.


login: lvirden
username: lvirden
mimetype: text/plain
icomment:
  see patch https://sourceforge.net/tracker/?func=detail&aid=2788597&group_id=10894&atid=310894 for a fix for this bug


login: lvirden
username: lvirden
mimetype: text/plain
icomment:
  I downloaded the latest CVS head for sample, built it against the latest tcl 8.6 development head, and ran the test suite. The same error in the pkgIndex.tcl is seen.


login: ferrieux
username: ferrieux
mimetype: text/plain
icomment:
  That's a C typo. You don't want "Tcl_Command" just before the call to Tcl_CreateObjCommand.
  Before submitting a bug report, try identifying the failing part. A compile error is hardly the Tcl library's responsibility.


login: abhayh
username: abhayh
mimetype: text/plain
icomment:
  Sorry about the typo.But in my actual it's Tcl_CreateObjCommand(), i have rechecked it. If this is not the right place to post the problem, can you please link me to the proper one & close this thread. 

  Thanks


login: abhayh
username: abhayh
mimetype: text/plain
icomment:
  #include<tcl.h>
  #include<iostream>
  using namespace std;

  int Add_Nums (ClientData clientData, Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST * objv);
                //ClientData clientData, Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST * objv)
  int DLLEXPORT
  Add_Init(Tcl_Interp *interp)
  {

       #ifdef USE_TCL_STUBS
           Tcl_InitStubs(interp, "8.4", 0);
       #endif 
     
  if (Tcl_PkgProvide(interp, "8.4", "1.1") == TCL_ERROR) {
           return TCL_ERROR;
   }
       Tcl_CreateObjCommand(interp,"add",Add_Nums,NULL,NULL);
       return TCL_OK;
   
  }


  int Add_Nums (ClientData clientData, Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST * objv)
  {
  int adding(int no1,int no2);
      return TCL_OK;
  }

  int adding(int no1,int no2)
  {

  int sum =0;
  cout<<"Enter the two numbers:"<<endl;
  cin>>no1>>no2;

  cout<<"Sum is "<<no1+no2<<endl;
  return(sum);
   } 

  Well, it's now showing me few linker errors.  I tried to debug it , but couldn't find a way.  It's getting compiled but has few unresolved symbol issues. 

  These are the errors.

  1> : error LNK2001: unresolved external symbol _tclStubsPtr
  1> : error LNK2019: unresolved external symbol _Tcl_InitStubs referenced in function "int __cdecl Add_Init(struct Tcl_Interp *)" (?Add_Init@@YAHPAUTcl_Interp@@@Z)
  1> : fatal error LNK1120: 2 unresolved externals
  1> - 3 error(s), 0 warning(s)
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


login: dkf
username: dkf
mimetype: text/plain
icomment:
  Solution part #1: You need to link with the tclstub library.
  Solution part #2: The Add_Init function needs to have 'extern "C"' linkage or [load] will never be able to do anything with the lib.
  Solution part #3: Tcl_PkgProvide's second argument needs to be the package name (e.g., "add" in this case).


login: abhayh
username: abhayh
mimetype: text/plain
icomment:
  >>Solution part #2: The Add_Init function needs to have 'extern "C"' linkage
  or [load] will never be able to do anything with the lib.
  Solution part #3: Tcl_PkgProvide's second argument needs to be the package
  name (e.g., "add" in this case).

  I edited the code as above. 

  #include<tcl.h>
  #include<iostream>
  using namespace std;

  #ifndef STATIC_BUILD
  #if defined(_MSC_VER)
  #   define EXPORT(a,b) __declspec(dllexport) a b
  #   define DllEntryPoint DllMain
  #else
  #   if defined(__BORLANDC__)
  #       define EXPORT(a,b) a _export b
  #   else
  #       define EXPORT(a,b) a b
  #   endif
  #endif
  #endif



  int Add_Nums (ClientData clientData, Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST * objv);
                //ClientData clientData, Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST * objv)
  int DLLEXPORT
  extern "C" int Add_Init(Tcl_Interp *interp)
  {

       #ifdef USE_TCL_STUBS
           Tcl_InitStubs(interp, "8.4", 0);
       #endif 
     
  if (Tcl_PkgProvide(interp, "add", "1.1") == TCL_ERROR) {
           return TCL_ERROR;
   }
       Tcl_CreateObjCommand(interp,"add",Add_Nums,NULL,NULL);
       return TCL_OK;
   
  }


  int Add_Nums (ClientData clientData, Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST * objv)
  {
  int adding(int no1,int no2);
      return TCL_OK;
  }

  int adding(int no1,int no2)
  {

  int sum =0;
  cout<<"Enter the two numbers:"<<endl;
  cin>>no1>>no2;

  cout<<"Sum is "<<no1+no2<<endl;
  return(sum);
   } 

  >>Solution part #1: You need to link with the tclstub library.

  How do i link with tclstub library?I have added tclstub84.lib in the "Linker"> Additioinal Library Dependencies.Is this the right way?


  As of now ,I am getting the following error. 

  1> error LNK2001: unresolved external symbol _tclStubsPtr
  1> error LNK2019: unresolved external symbol _Tcl_InitStubs referenced in function _Add_Init
  1> fatal error LNK1120: 2 unresolved externals


login: abhayh
username: abhayh
mimetype: text/plain
icomment:
  I am able to resolve the issue. Thanks a lot :)

  Now i'm having issues loading the dll.

  % load Name_of_Dll_file.dll Pkgname gives me "Cannot find proc Name_of_Dll_file_init ..

  I have few querries.
  1. Should the Dll name & the Cpp source code name should be the same?
  2.If my dll name is mydll.dll , then the name of  init function should be mydll_init , is it ?
  3.What should be the package name?


login: ferrieux
username: ferrieux
mimetype: text/plain
icomment:
  Maybe it 's a bit late to say this ... but this discussion doesn't quite belong there.
  Next time, use the comp.lang.tcl newsgroup, where you'll reach a larger audience both of experts and followers.


login: stwo
username: stwo
mimetype: text/plain
icomment:
  Perhaps I spoke a bit too quickly.
  My personal preference would be for the topmost *source* dir of the package to be named '
  'name-ver' and the install dir to simply be 'name' but that might not be practical so I'm fine with an install dir of 'name-ver'.


login: dgp
username: dgp
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=80530

  OK, it looks like the bug is in the sampleextension
  module itself.  Something's gone wrong in the build so
  that the libexampleA0.2.so is not actually a [load]-able
  file on your FreeBSD platform.

  The output from the 'make' might be helpful, revealing
  details of how the extension was built.  In particular,
  what compiler/linker combination are you using?

  Not sure who the "maintainer" for the TEA sample extension
  is, but I think it might be Andreas, or he'll know who is.


login: fandom
username: fandom
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=316500

  I have attached to this comment the output of the
  configure, make and make install commands.


login: andreas_kupries
username: andreas_kupries
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=75003

  AFAIK we have no maintainer for the sample extension.

  Regarding the output of make, I see the 'ld' command, but 
  no objects which are link into the library.


login: dgp
username: dgp
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=80530

  1. Does the sample extension require GNU make?
  2. Is the submitter of this report using GNU make?


login: andreas_kupries
username: andreas_kupries
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=75003

  Ok, Jeff tells me that TEA does not depend on gnu make.
  He asked me to shunt this item to him. Doing that now.


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=72656

  this had to do with FreeBSD's regular make not handling 
  $($@_OBJECTS) substitutions that had .'s in them (or 
  something like that).  Anyway, gmake works just fine, but 
  I've reworked the whole TEA stuff and sampleextension to be 
  much more portable.


login: lvirden
username: lvirden
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=15949

  Here's the fix to this problem.


  --- sample/Makefile.in.orig     Wed Mar 20 11:46:56 2002
  +++ sample/Makefile.in  Wed Mar 20 11:53:07 2002
  @@ -185,3 +185,3 @@
          if test "x$(SHARED_BUILD)" = "x1"; then \
  -           $(INSTALL_DATA) pkgIndex.tcl $(pkglibdir)
  +           $(INSTALL_DATA) pkgIndex.tcl $(pkglibdir) ; \
          fi


login: fandom
username: fandom
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=316500

  I had a problem with Netscape not showing the entry to 
  enter the path of the patch, so I ended up submiting this 
  twice, please close the duplicate one


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=72656

  Added a slightly modified version on 2002-04-03.  I don't 
  have any way to test (I use VC++), so this needs 
  confirmation that it works at all.


login: mdejong
username: mdejong
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=90858

  I am sending this one to hobbs since he has been
  doing some work on sampleextension to get it
  working with mingw.


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=72656

  I made the 1-line change in README.cygwin and added 
  pkgIndex.tcl to the CLEANFILES arg in configure.in.  Is 
  that all that was necessary?


login: fandom
username: fandom
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=316500

  I also think the comment in README.cygwin about autoconf should be changed 
  to something like the following. Before I noticed they also included 
  version 2.13, I lost a lot of time generating the 'configure' scripts in 
  a Linux box and then taking them to Windows. I would like to think I 
  am not the only one capable of being such a fool. 
   
  Authoring TEA extensions 
   
  If you are authoring a TEA extension, you will also want the GNU 
  autoconf package.  The Cygnus tools now include two versions of 
  autoconf: v2.13 and v2.52, with the latest version being invoked 
  by default, TEA scripts don't yet work with it, so you will have 
  to invoke version 2.13 explicitely with the command: 
   
  /usr/autotool/stable/bin/autoconf 
   
   


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=72656

  I have instead removed the AC_CYGWIN macro call, the only 
  thing that prevented using autoconf 2.5x.  This only 
  enabled us to warn people against using cygwin's gcc, and I 
  don't think there was enough value there to prevent being 
  able to use autoconf 2.5x.


login: mdejong
username: mdejong
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=90858

  I am not sure what to do with this. I know Jeff has been
  working on the sampleextension so I am sending it his way.


login: mdejong
username: mdejong
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=90858

  I don't have access to a 64 bit system. Sending back to
  hobbs in the hope that he can find someone with a 64 bit
  system.


login: dkf
username: dkf
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=79902

  Ooer!  SHA1Transform (in sample.c) is absolutely not
  portable to 64-bit systems (it assumes that
  sizeof(long)==4*sizeof(char) and that
  sizeof(long[16])==sizeof(char[64]), neither of which is
  guaranteed to be true, and both of which could fail
  independently.)  Maybe the rest of that file is better, but
  I somehow doubt it...

  Fixing this bug requires a hefty rewrite of that file, so
  I'm dropping the priority.


login: dkf
username: dkf
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=79902

  Well, it's already scared *me* off for a while! ;^)

  Perhaps if I was to start by working from the tcllib
  version!


login: dkf
username: dkf
mimetype: text/plain
icomment:
  File Added - 27812: 64bit.patch

  Logged In: YES 
  user_id=79902

  Could someone try this possible fix?


login: dgp
username: dgp
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=80530


  Problem 1:  The shared library produced with
  an --enable-symbols configuration will not
  [load].  This means that generation of
  pkgIndex.tcl also fails -- silently.  Neither is good.

  % load libsample0.4g.so
  couldn't load file "libsample0.4g.so":
  /local/src/sampleextension/libsample0.4g.so: undefined
  symbol: assert

  Same problem without --enable-symbols actually:

  % load libsample0.4.so
  couldn't load file "libsample0.4.so":
  /local/src/sampleextension/libsample0.4.so: undefined
  symbol: assert


login: dgp
username: dgp
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=80530


  After commenting out the assert(), I get
  a [load]-able shared library; thus a valid
  pkgIndex.tcl file, and after installing a
  `make test` runs successfully with 0 failures.

  So, good 64-bit fix (modulo assert-removal),
  but new build/install issues discovered.


login: dgp
username: dgp
mimetype: text/plain
icomment:
  File Added - 69939: 554351.patch

  Logged In: YES 
  user_id=80530


  With the recent changes (TEA 3)
  this slightly modified patch seems
  to be all we need for 64-bit support.
  Thanks, dkf.  tclguy, please test and
  apply.


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=72656

  I cannot confirm this when compiling with the latest CVS 
  head of 8.3.4+ and 8.4b1+, using the CVS head of 
  sampleextension.  In all cases, Sample_Init gets exported.


login: mdejong
username: mdejong
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=90858

  This would not do anything since the prereq
  only sets the lower bound. It would not fail
  with 2.5X.


login: mic42
username: mic42
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=302287

  It does something, because the newest cygwin environment on windows uses a wrapper_script (/usr/bin/autoconf) 
  to decide which version of autoconf should be used. If one types autoconf the wrapper is invoked, checks if 
  AC_PREREQ <= 2.13 and invokes the STABLE version in that case (2.13), otherwise the DEVELOP version is 
  used (2.53a), which results in a failure with the configure.in of the sample extension.

  If it doesn't hurt on Unix and other platforms, but makes the autoconf run better under unmodified cygwin why not do 
  it?


login: mdejong
username: mdejong
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=90858

  Ok, I will add this. It seems of little use
  since this only works under Cygwin, but
  I guess it could not hurt.


login: mdejong
username: mdejong
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=90858

  It seems strange to me to have Mingw build instructions in
  a file called README.cygwin. How about we toast the
  README.cygwin file and create a new INSTALL file
  that describes how to configure for unix and windows
  systems?


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=72656

  How about a README.build like most have ... or some 
  such.  Shouldn't there just be one general README for this?


login: mdejong
username: mdejong
mimetype: text/plain
icomment:
  File Added - 43259: README.patch

  Logged In: YES 
  user_id=90858

  How about we remove the README.cygwin file and just
  tell folks to read the install instructions in the tcl unix
  and win subdirs? The following patch does just that.
  It seems like this is better in the long run since we would
  only need to update future build instructions in one place.


login: nobody
username: nobody
mimetype: text/plain
icomment:
  Logged In: NO 

  What is meant is this - right now, when one does a
  make all, it would be useful if all parts of the build
  were completed.  Some extensions attempt to generate docs,
  etc. on the install machine, but tools may not be there
  to perform such actions - certainly the install machine
  may be significantly different than the machine on which
  the configure ran.


login: dgp
username: dgp
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=80530


  Has the TEA version number
  (recently bumped 3.0 -> 3.1)
  satisfied this request?


login: andreas_kupries
username: andreas_kupries
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=75003

  Reassigned to Jeff as he is working on the CE port, including 
  configure changes.


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=72656

  I only tested on Linux, forgetting that sh == bash there.  I had 
  to correct use of some newer constructs.  Commited now.


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=72656

  In general I disagree with including these, because the whole 
  point of the *TEA* sample extension includes the cross-
  platform build configure/make setup.  However, feel free to 
  commit this if you add a note about that.


login: patthoyts
username: patthoyts
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=202636

  Applied with some notes in the README recommending the use
  of the Msys+mingw build process.


login: das
username: das
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=90580

  oops, looks the browser forgot my login cookie...
  submitted by 'das'


login: lvirden
username: lvirden
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=15949

  One thing I have noticed:
  install-libraries: libraries
          @mkdir -p $(DESTDIR)$(includedir)
          @echo "Installing header files in
  $(DESTDIR)$(includedir)"
          @for i in $(PKG_HEADERS) ; do \
              echo "Installing $(srcdir)/$$i" ; \
              $(INSTALL_DATA) $(srcdir)/$$i
  $(DESTDIR)$(includedir) ; \
          done;
  is the code generated in the Makefile for same.
  But PKG_HEADERS is empty - causing the for loop to be
  for i in ; do

  that isn't going to work very well...

  The for loop should either be surrounded by an if or there needs
  to be something added to the for loop so that there is
  always at least
  one entry to process...

  It's really important to fix this kind of thing if we are
  going to tell people
  to use the sample code as a basis of their development.


login: lvirden
username: lvirden
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=15949

  I tried to modify the Makefile to use an if, but I couldn't
  figure out a syntax for it.  It looks to me like the code
  needs to be conditionally generated or something.  


login: dkf
username: dkf
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=79902

  Perhaps something like this would do the trick:

          @test -n "$(PKG_HEADERS)" || \
              for i in $(PKG_HEADERS) ; do \
              echo "Installing $(srcdir)/$$i" ; \
              $(INSTALL_DATA) $(srcdir)/$$i \
              $(DESTDIR)$(includedir) ; done

  Basically, I'm adding a 'test -n "$(PKG_HEADERS)" ||' guard
  to the for line. If it doesn't work, there are other (less
  neat) formulations with test that should work.


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  Logged In: YES 
  user_id=72656

  Using a construct like:

  @list='$(PKG_HEADERS)'; for i in $$list; do ...

  I have avoided the empty list issues.


login: nobody
username: nobody
mimetype: text/plain
icomment:
  Logged In: NO 

  The usual convention on Windows is to define a preprocessor
  symbol like "XXXAPI", and use declarations like "extern
  XXXAPI XXX_Foo(void);", where XXXAPI expands to 
  "__declspec(dllexport)" in source modules that are part of
  the library and "__declspec(dllimport)" in source modules
  that use the library.

  This is basically how <tcl.h> defines the EXTERN macro
  (which probably should have been called "TCLAPI" instead of
  "EXTERN", but that's an historical accident.)

  The preprocessor gyrations that Tk and the sampleextension
  go through aren't necessarily incorrect, but they are
  confusing, error-prone, and unnecessarily complicated.  The
  #ifdef / #undef / #define / #include / #undef / #define
  cycle is basically hijacking Tcl's storage class macro
  "EXTERN" and temporarily repurposing it to mean "My
  package's public symbols" instead of "Tcl's public symbols".
   The conventional idiom would be for each extension to
  define its own storage class macro instead; that's what the
  patch does.

  Also, for simple extensions that are only dynamically loaded
  and don't export a public, non-stubbed API to dependent
  extensions, you don't even need to do that: just declare the
  _Init() routine as DLLEXPORT and it will do the right thing
  on all platforms.


login: hobbs
username: hobbs
mimetype: text/plain
icomment:
  See also 2025889.

  We do need to separate the BUILD_$pkg variants in case one TEA extension depends on another (includes it's .h), which also means we'd need the $pkg_STORAGE_CLASS.  The problem I have with this proposal is that it requires changes on several lines, rather than the single BUILD_$pkg in a .h file that is currently needed.  Can someone convince me this is a better approach?


login: sf-robot
username: sf-robot
mimetype: text/plain
icomment:
  This Tracker item was closed automatically by the system. It was
  previously set to a Pending status, and the original submitter
  did not respond within 14 days (the time period specified by
  the administrator of this Tracker).


login: anonymous
username: dkf
mimetype: text/html
icomment:
  I concur. The function name itself is not of substantial interest to the purpose of the extension: demonstrating how to be a TEA-compliant extension package.


login: jan.nijtmans
mimetype: text/x-fossil-wiki
icomment:
  A simpler approach is making all related symbols MODULE_SCOPE. See: [2608aea91892f891ac6dc4f5e7ab4516a7e5724e|2608aea918].

  Is that acceptable as well?


login: stwo
username: stwo
mimetype: text/plain
icomment:
  Checkin [2608aea918] makes it work for me on OpenBSD!

  Should the MODULE_SCOPEs also be put into sample.c?


login: jan.nijtmans
mimetype: text/plain
icomment:
  Putting MODULE_SCOPE in *.c files is not necessary, as long as the *.h file is assured to be included first. (Tcl sometimes violates that, therefore you can find some MODULE_SCOPE occurrences there, but in Thread it you can find a better example)


login: stwo
username: stwo
mimetype: text/plain
icomment:
  Can't attach! Here's the patch.

  Index: Makefile.in
  ==================================================================
  --- Makefile.in
  +++ Makefile.in
  @@ -84,16 +84,16 @@
   pkgincludedir	= $(includedir)/$(PKG_DIR)
   
   top_builddir	= .
   
   INSTALL_OPTIONS	=
  -INSTALL		= $(SHELL) $(srcdir)/tclconfig/install-sh -c ${INSTALL_OPTIONS}
  -INSTALL_DATA_DIR = ${INSTALL} -d -m 755
  -INSTALL_PROGRAM	= ${INSTALL} -m 555
  -INSTALL_DATA	= ${INSTALL} -m 444
  -INSTALL_SCRIPT	= ${INSTALL_PROGRAM}
  -INSTALL_LIBRARY	= ${INSTALL_DATA}
  +INSTALL		= @INSTALL@
  +INSTALL_DATA_DIR = @INSTALL_DATA_DIR@
  +INSTALL_DATA	= @INSTALL_DATA@
  +INSTALL_PROGRAM	= @INSTALL_PROGRAM@
  +INSTALL_SCRIPT	= @INSTALL_SCRIPT@
  +INSTALL_LIBRARY	= @INSTALL_LIBRARY@
   
   PACKAGE_NAME	= @PACKAGE_NAME@
   PACKAGE_VERSION	= @PACKAGE_VERSION@
   CC		= @CC@
   CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@


login: jan.nijtmans
mimetype: text/plain
icomment:
  I agree as well. The only thing missing was the ${INSTALL_OPTIONS} argument. Tried it with "thread" as well, I don't see any difference in how the files are installed. Committed now. Thanks!


login: lvirden
username: lvirden
mimetype: text/plain
icomment:
  see patch in https://sourceforge.net/tracker/?func=detail&aid=2788597&group_id=10894&atid=310894 for the fix to this bug


login: stwo
username: stwo
mimetype: text/plain
icomment:
  I think it would have been better had the name gone to 'Tclsha1' instead of 'sample'.
  The command created is 'sha1', not 'sample'.


