<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[122999] branches/new-help-system/base</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/122999">122999</a></dd>
<dt>Author</dt> <dd>cal@macports.org</dd>
<dt>Date</dt> <dd>2014-08-03 08:04:12 -0700 (Sun, 03 Aug 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>new-help-system: Merge from trunk, update for in-tree Tcl compatibility, port documentation changes</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchesnewhelpsystembaseChangeLog">branches/new-help-system/base/ChangeLog</a></li>
<li><a href="#branchesnewhelpsystembaseDoxyfilein">branches/new-help-system/base/Doxyfile.in</a></li>
<li><a href="#branchesnewhelpsystembaseLICENSE">branches/new-help-system/base/LICENSE</a></li>
<li><a href="#branchesnewhelpsystembaseMakefilein">branches/new-help-system/base/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembaseMkmacportsautoconfmkin">branches/new-help-system/base/Mk/macports.autoconf.mk.in</a></li>
<li><a href="#branchesnewhelpsystembaseMkmacportssubdirmk">branches/new-help-system/base/Mk/macports.subdir.mk</a></li>
<li><a href="#branchesnewhelpsystembaseaclocalm4">branches/new-help-system/base/aclocal.m4</a></li>
<li><a href="#branchesnewhelpsystembaseconfigRELEASE_URL">branches/new-help-system/base/config/RELEASE_URL</a></li>
<li><a href="#branchesnewhelpsystembaseconfigmacports_version">branches/new-help-system/base/config/macports_version</a></li>
<li><a href="#branchesnewhelpsystembaseconfigure">branches/new-help-system/base/configure</a></li>
<li><a href="#branchesnewhelpsystembaseconfigureac">branches/new-help-system/base/configure.ac</a></li>
<li><a href="#branchesnewhelpsystembasedocmacportsconf5">branches/new-help-system/base/doc/macports.conf.5</a></li>
<li><a href="#branchesnewhelpsystembasedocmacportsconfin">branches/new-help-system/base/doc/macports.conf.in</a></li>
<li><a href="#branchesnewhelpsystembasedocportactivate1">branches/new-help-system/base/doc/port-activate.1</a></li>
<li><a href="#branchesnewhelpsystembasedocportedit1">branches/new-help-system/base/doc/port-edit.1</a></li>
<li><a href="#branchesnewhelpsystembasedocportfetch1">branches/new-help-system/base/doc/port-fetch.1</a></li>
<li><a href="#branchesnewhelpsystembasedocportinstall1">branches/new-help-system/base/doc/port-install.1</a></li>
<li><a href="#branchesnewhelpsystembasedocportuninstall1">branches/new-help-system/base/doc/port-uninstall.1</a></li>
<li><a href="#branchesnewhelpsystembasedocport1">branches/new-help-system/base/doc/port.1</a></li>
<li><a href="#branchesnewhelpsystembasedocport1txt">branches/new-help-system/base/doc/port.1.txt</a></li>
<li><a href="#branchesnewhelpsystembasedocportfile7">branches/new-help-system/base/doc/portfile.7</a></li>
<li><a href="#branchesnewhelpsystembasedocportgroup7">branches/new-help-system/base/doc/portgroup.7</a></li>
<li><a href="#branchesnewhelpsystembasedocportundocumented7">branches/new-help-system/base/doc/portundocumented.7</a></li>
<li><a href="#branchesnewhelpsystembasem4foundationm4">branches/new-help-system/base/m4/foundation.m4</a></li>
<li><a href="#branchesnewhelpsystembasem4tclm4">branches/new-help-system/base/m4/tcl.m4</a></li>
<li><a href="#branchesnewhelpsystembaseportmgrReleaseProcess">branches/new-help-system/base/portmgr/ReleaseProcess</a></li>
<li><a href="#branchesnewhelpsystembaseportmgrdmgLicensehtml">branches/new-help-system/base/portmgr/dmg/License.html</a></li>
<li><a href="#branchesnewhelpsystembaseportmgrjobsMakefile">branches/new-help-system/base/portmgr/jobs/Makefile</a></li>
<li><a href="#branchesnewhelpsystembaseportmgrjobsPortIndex2MySQLtcl">branches/new-help-system/base/portmgr/jobs/PortIndex2MySQL.tcl</a></li>
<li><a href="#branchesnewhelpsystembaseportmgrjobsport_binary_distributabletcl">branches/new-help-system/base/portmgr/jobs/port_binary_distributable.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcMakefilein">branches/new-help-system/base/src/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcconfighin">branches/new-help-system/base/src/config.h.in</a></li>
<li><a href="#branchesnewhelpsystembasesrccregistryentryc">branches/new-help-system/base/src/cregistry/entry.c</a></li>
<li><a href="#branchesnewhelpsystembasesrccregistryentryh">branches/new-help-system/base/src/cregistry/entry.h</a></li>
<li><a href="#branchesnewhelpsystembasesrccregistryfilec">branches/new-help-system/base/src/cregistry/file.c</a></li>
<li><a href="#branchesnewhelpsystembasesrccregistryregistryc">branches/new-help-system/base/src/cregistry/registry.c</a></li>
<li><a href="#branchesnewhelpsystembasesrccregistryregistryh">branches/new-help-system/base/src/cregistry/registry.h</a></li>
<li><a href="#branchesnewhelpsystembasesrccregistrysqlc">branches/new-help-system/base/src/cregistry/sql.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10accessc">branches/new-help-system/base/src/darwintracelib1.0/access.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10closec">branches/new-help-system/base/src/darwintracelib1.0/close.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10darwintracec">branches/new-help-system/base/src/darwintracelib1.0/darwintrace.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10darwintraceh">branches/new-help-system/base/src/darwintracelib1.0/darwintrace.h</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10dup2c">branches/new-help-system/base/src/darwintracelib1.0/dup2.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10mkdirc">branches/new-help-system/base/src/darwintracelib1.0/mkdir.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10openc">branches/new-help-system/base/src/darwintracelib1.0/open.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10procc">branches/new-help-system/base/src/darwintracelib1.0/proc.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10readdirc">branches/new-help-system/base/src/darwintracelib1.0/readdir.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10readlinkc">branches/new-help-system/base/src/darwintracelib1.0/readlink.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10renamec">branches/new-help-system/base/src/darwintracelib1.0/rename.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10rmdirc">branches/new-help-system/base/src/darwintracelib1.0/rmdir.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10statc">branches/new-help-system/base/src/darwintracelib1.0/stat.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10unlinkc">branches/new-help-system/base/src/darwintracelib1.0/unlink.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcmachista10Makefilein">branches/new-help-system/base/src/machista1.0/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcmachista10libmachistac">branches/new-help-system/base/src/machista1.0/libmachista.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcmacports10get_systemconfiguration_proxiesc">branches/new-help-system/base/src/macports1.0/get_systemconfiguration_proxies.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcmacports10macportstcl">branches/new-help-system/base/src/macports1.0/macports.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcmacports10macports_dlisttcl">branches/new-help-system/base/src/macports1.0/macports_dlist.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcmacports10macports_test_autoconftclin">branches/new-help-system/base/src/macports1.0/macports_test_autoconf.tcl.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcmacports10sysctlc">branches/new-help-system/base/src/macports1.0/sysctl.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcmacports10testsPortfile">branches/new-help-system/base/src/macports1.0/tests/Portfile</a></li>
<li><a href="#branchesnewhelpsystembasesrcmacports10testsmacportstest">branches/new-help-system/base/src/macports1.0/tests/macports.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcmacports10testsmacports_dlisttest">branches/new-help-system/base/src/macports1.0/tests/macports_dlist.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcmacports10testsmacports_utiltest">branches/new-help-system/base/src/macports1.0/tests/macports_util.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcmacports10teststesttcl">branches/new-help-system/base/src/macports1.0/tests/test.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10package_test_autoconftclin">branches/new-help-system/base/src/package1.0/package_test_autoconf.tcl.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10portarchivefetchtcl">branches/new-help-system/base/src/package1.0/portarchivefetch.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10portdpkgtcl">branches/new-help-system/base/src/package1.0/portdpkg.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10portmpkgtcl">branches/new-help-system/base/src/package1.0/portmpkg.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10portpkgtcl">branches/new-help-system/base/src/package1.0/portpkg.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10portrpmtcl">branches/new-help-system/base/src/package1.0/portrpm.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10portsrpmtcl">branches/new-help-system/base/src/package1.0/portsrpm.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10portunarchivetcl">branches/new-help-system/base/src/package1.0/portunarchive.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10testsPortfile">branches/new-help-system/base/src/package1.0/tests/Portfile</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10testslibrarytcl">branches/new-help-system/base/src/package1.0/tests/library.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10testsportarchivefetchtest">branches/new-help-system/base/src/package1.0/tests/portarchivefetch.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10testsportdmgtest">branches/new-help-system/base/src/package1.0/tests/portdmg.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10testsportdpkgtest">branches/new-help-system/base/src/package1.0/tests/portdpkg.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10testsportmdmgtest">branches/new-help-system/base/src/package1.0/tests/portmdmg.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10testsportmpkgtest">branches/new-help-system/base/src/package1.0/tests/portmpkg.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10testsportpkgtest">branches/new-help-system/base/src/package1.0/tests/portpkg.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10teststesttcl">branches/new-help-system/base/src/package1.0/tests/test.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10Makefilein">branches/new-help-system/base/src/pextlib1.0/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10Pextlibc">branches/new-help-system/base/src/pextlib1.0/Pextlib.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10curlc">branches/new-help-system/base/src/pextlib1.0/curl.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10filemapc">branches/new-help-system/base/src/pextlib1.0/filemap.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10flockc">branches/new-help-system/base/src/pextlib1.0/flock.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10fstraversec">branches/new-help-system/base/src/pextlib1.0/fs-traverse.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10mktempc">branches/new-help-system/base/src/pextlib1.0/mktemp.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10readlinec">branches/new-help-system/base/src/pextlib1.0/readline.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10realpathc">branches/new-help-system/base/src/pextlib1.0/realpath.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10rmd160cmdc">branches/new-help-system/base/src/pextlib1.0/rmd160cmd.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10setmodec">branches/new-help-system/base/src/pextlib1.0/setmode.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10strcasecmph">branches/new-help-system/base/src/pextlib1.0/strcasecmp.h</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10strsedc">branches/new-help-system/base/src/pextlib1.0/strsed.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10systemc">branches/new-help-system/base/src/pextlib1.0/system.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10tracelibc">branches/new-help-system/base/src/pextlib1.0/tracelib.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10ttyc">branches/new-help-system/base/src/pextlib1.0/tty.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10uidc">branches/new-help-system/base/src/pextlib1.0/uid.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10xinstallc">branches/new-help-system/base/src/pextlib1.0/xinstall.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcpkg_mkindexshin">branches/new-help-system/base/src/pkg_mkindex.sh.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcportporttcl">branches/new-help-system/base/src/port/port.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcportportindextcl">branches/new-help-system/base/src/port/portindex.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcportportmirrortcl">branches/new-help-system/base/src/port/portmirror.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10fetch_commontcl">branches/new-help-system/base/src/port1.0/fetch_common.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10port_autoconftclin">branches/new-help-system/base/src/port1.0/port_autoconf.tcl.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10port_test_autoconftclin">branches/new-help-system/base/src/port1.0/port_test_autoconf.tcl.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10portactivatetcl">branches/new-help-system/base/src/port1.0/portactivate.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10portconfiguretcl">branches/new-help-system/base/src/port1.0/portconfigure.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10portdestroottcl">branches/new-help-system/base/src/port1.0/portdestroot.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10portdistchecktcl">branches/new-help-system/base/src/port1.0/portdistcheck.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10portextracttcl">branches/new-help-system/base/src/port1.0/portextract.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10portfetchtcl">branches/new-help-system/base/src/port1.0/portfetch.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10portinstalltcl">branches/new-help-system/base/src/port1.0/portinstall.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10portlinttcl">branches/new-help-system/base/src/port1.0/portlint.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10portlivechecktcl">branches/new-help-system/base/src/port1.0/portlivecheck.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10portloadtcl">branches/new-help-system/base/src/port1.0/portload.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10portmaintcl">branches/new-help-system/base/src/port1.0/portmain.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10porttracetcl">branches/new-help-system/base/src/port1.0/porttrace.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10portunloadtcl">branches/new-help-system/base/src/port1.0/portunload.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10portutiltcl">branches/new-help-system/base/src/port1.0/portutil.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10testsPortfile">branches/new-help-system/base/src/port1.0/tests/Portfile</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10testsportactivatetest">branches/new-help-system/base/src/port1.0/tests/portactivate.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10testsportchecksumtest">branches/new-help-system/base/src/port1.0/tests/portchecksum.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10testsportcleantest">branches/new-help-system/base/src/port1.0/tests/portclean.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10testsportdeactivatetest">branches/new-help-system/base/src/port1.0/tests/portdeactivate.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10testsportdependstest">branches/new-help-system/base/src/port1.0/tests/portdepends.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10testsportdistchecktest">branches/new-help-system/base/src/port1.0/tests/portdistcheck.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10testsportinstalltest">branches/new-help-system/base/src/port1.0/tests/portinstall.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10testsportloadtest">branches/new-help-system/base/src/port1.0/tests/portload.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10testsportmaintest">branches/new-help-system/base/src/port1.0/tests/portmain.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10testsportpatchtest">branches/new-help-system/base/src/port1.0/tests/portpatch.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10testsporttesttest">branches/new-help-system/base/src/port1.0/tests/porttest.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10testsportuninstalltest">branches/new-help-system/base/src/port1.0/tests/portuninstall.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10testsportutiltest">branches/new-help-system/base/src/port1.0/tests/portutil.test</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10teststesttcl">branches/new-help-system/base/src/port1.0/tests/test.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcprogramsMakefilein">branches/new-help-system/base/src/programs/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcprogramsdaemondoMakefilein">branches/new-help-system/base/src/programs/daemondo/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20entryc">branches/new-help-system/base/src/registry2.0/entry.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20entryobjc">branches/new-help-system/base/src/registry2.0/entryobj.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20portimagetcl">branches/new-help-system/base/src/registry2.0/portimage.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20portuninstalltcl">branches/new-help-system/base/src/registry2.0/portuninstall.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20receipt_sqlitetcl">branches/new-help-system/base/src/registry2.0/receipt_sqlite.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20registryc">branches/new-help-system/base/src/registry2.0/registry.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20registryh">branches/new-help-system/base/src/registry2.0/registry.h</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20registry_utiltcl">branches/new-help-system/base/src/registry2.0/registry_util.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20testsdependstcl">branches/new-help-system/base/src/registry2.0/tests/depends.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20testsentrytcl">branches/new-help-system/base/src/registry2.0/tests/entry.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20utilc">branches/new-help-system/base/src/registry2.0/util.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20utilh">branches/new-help-system/base/src/registry2.0/util.h</a></li>
<li><a href="#branchesnewhelpsystembasesrctclobjc10Makefilein">branches/new-help-system/base/src/tclobjc1.0/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembaseteststeststatefileunknownversiontesttcl">branches/new-help-system/base/tests/test/statefile-unknown-version/test.tcl</a></li>
<li><a href="#branchesnewhelpsystembaseteststeststatefileversion1testtcl">branches/new-help-system/base/tests/test/statefile-version1/test.tcl</a></li>
<li><a href="#branchesnewhelpsystembaseteststeststatefileversion1outdatedtesttcl">branches/new-help-system/base/tests/test/statefile-version1-outdated/test.tcl</a></li>
<li><a href="#branchesnewhelpsystembaseteststeststatefileversion2testtcl">branches/new-help-system/base/tests/test/statefile-version2/test.tcl</a></li>
<li><a href="#branchesnewhelpsystembaseteststeststatefileversion2invalidtesttcl">branches/new-help-system/base/tests/test/statefile-version2-invalid/test.tcl</a></li>
<li><a href="#branchesnewhelpsystembaseteststeststatefileversion2outdatedtesttcl">branches/new-help-system/base/tests/test/statefile-version2-outdated/test.tcl</a></li>
<li><a href="#branchesnewhelpsystembaseteststestsvnandpatchsitesPortfile">branches/new-help-system/base/tests/test/svn-and-patchsites/Portfile</a></li>
<li><a href="#branchesnewhelpsystembaseteststestuniversaltesttcl">branches/new-help-system/base/tests/test/universal/test.tcl</a></li>
<li><a href="#branchesnewhelpsystembaseteststestxcodeversiontesttcl">branches/new-help-system/base/tests/test/xcodeversion/test.tcl</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#branchesnewhelpsystembasedocMakefilein">branches/new-help-system/base/doc/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembaseportmgrdmgpostflightin">branches/new-help-system/base/portmgr/dmg/postflight.in</a></li>
<li><a href="#branchesnewhelpsystembasesrccflib10Makefilein">branches/new-help-system/base/src/cflib1.0/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembasesrccregistryMakefilein">branches/new-help-system/base/src/cregistry/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembasesrccregistryportgroupc">branches/new-help-system/base/src/cregistry/portgroup.c</a></li>
<li><a href="#branchesnewhelpsystembasesrccregistryportgrouph">branches/new-help-system/base/src/cregistry/portgroup.h</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10Makefilein">branches/new-help-system/base/src/darwintracelib1.0/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcdedup_portfilestclin">branches/new-help-system/base/src/dedup_portfiles.tcl.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcimages_to_archivestclin">branches/new-help-system/base/src/images_to_archives.tcl.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcmacports10Makefilein">branches/new-help-system/base/src/macports1.0/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10Makefilein">branches/new-help-system/base/src/package1.0/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcportMakefilein">branches/new-help-system/base/src/port/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10Makefilein">branches/new-help-system/base/src/port1.0/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20Makefilein">branches/new-help-system/base/src/registry2.0/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20portgroupc">branches/new-help-system/base/src/registry2.0/portgroup.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20portgrouph">branches/new-help-system/base/src/registry2.0/portgroup.h</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20portgroupobjc">branches/new-help-system/base/src/registry2.0/portgroupobj.c</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20portgroupobjh">branches/new-help-system/base/src/registry2.0/portgroupobj.h</a></li>
<li><a href="#branchesnewhelpsystembasesrcupgrade_sources_conf_defaulttclin">branches/new-help-system/base/src/upgrade_sources_conf_default.tcl.in</a></li>
<li><a href="#branchesnewhelpsystembasestandard_configuresh">branches/new-help-system/base/standard_configure.sh</a></li>
<li><a href="#branchesnewhelpsystembasetestsMakefilein">branches/new-help-system/base/tests/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembaseteststestlibrarytclin">branches/new-help-system/base/tests/test/library.tcl.in</a></li>
<li><a href="#branchesnewhelpsystembaseteststesttracetesttclin">branches/new-help-system/base/tests/test/trace/test.tcl.in</a></li>
<li><a href="#branchesnewhelpsystembaseteststesttclin">branches/new-help-system/base/tests/test.tcl.in</a></li>
<li>branches/new-help-system/base/vendor/</li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#branchesnewhelpsystembasedocMakefile">branches/new-help-system/base/doc/Makefile</a></li>
<li><a href="#branchesnewhelpsystembaseportmgrdmgpostflight">branches/new-help-system/base/portmgr/dmg/postflight</a></li>
<li><a href="#branchesnewhelpsystembasesrccflib10Makefile">branches/new-help-system/base/src/cflib1.0/Makefile</a></li>
<li><a href="#branchesnewhelpsystembasesrccregistryMakefile">branches/new-help-system/base/src/cregistry/Makefile</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10Makefile">branches/new-help-system/base/src/darwintracelib1.0/Makefile</a></li>
<li><a href="#branchesnewhelpsystembasesrcimages_to_archivestcl">branches/new-help-system/base/src/images_to_archives.tcl</a></li>
<li><a href="#branchesnewhelpsystembasesrcmacports10Makefile">branches/new-help-system/base/src/macports1.0/Makefile</a></li>
<li><a href="#branchesnewhelpsystembasesrcmacports10macports_fastloadtclin">branches/new-help-system/base/src/macports1.0/macports_fastload.tcl.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10Makefile">branches/new-help-system/base/src/package1.0/Makefile</a></li>
<li><a href="#branchesnewhelpsystembasesrcportMakefile">branches/new-help-system/base/src/port/Makefile</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10Makefile">branches/new-help-system/base/src/port1.0/Makefile</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20Makefile">branches/new-help-system/base/src/registry2.0/Makefile</a></li>
<li><a href="#branchesnewhelpsystembasesrcthread26diff">branches/new-help-system/base/src/thread2.6.diff</a></li>
<li><a href="#branchesnewhelpsystembasesrcthread26targz">branches/new-help-system/base/src/thread2.6.tar.gz</a></li>
<li><a href="#branchesnewhelpsystembasesrcupgrade_sources_conf_defaulttcl">branches/new-help-system/base/src/upgrade_sources_conf_default.tcl</a></li>
<li><a href="#branchesnewhelpsystembasetestsMakefile">branches/new-help-system/base/tests/Makefile</a></li>
<li><a href="#branchesnewhelpsystembaseteststestlibrarytcl">branches/new-help-system/base/tests/test/library.tcl</a></li>
<li><a href="#branchesnewhelpsystembaseteststesttracetesttcl">branches/new-help-system/base/tests/test/trace/test.tcl</a></li>
<li><a href="#branchesnewhelpsystembaseteststesttcl">branches/new-help-system/base/tests/test.tcl</a></li>
</ul>
<h3>Property Changed</h3>
<ul>
<li><a href="#branchesnewhelpsystembase">branches/new-help-system/base/</a></li>
<li><a href="#branchesnewhelpsystembasedoc">branches/new-help-system/base/doc/</a></li>
<li><a href="#branchesnewhelpsystembaseportmgrdmg">branches/new-help-system/base/portmgr/dmg/</a></li>
<li><a href="#branchesnewhelpsystembasesrc">branches/new-help-system/base/src/</a></li>
<li><a href="#branchesnewhelpsystembasesrccflib10">branches/new-help-system/base/src/cflib1.0/</a></li>
<li><a href="#branchesnewhelpsystembasesrccregistry">branches/new-help-system/base/src/cregistry/</a></li>
<li><a href="#branchesnewhelpsystembasesrcdarwintracelib10">branches/new-help-system/base/src/darwintracelib1.0/</a></li>
<li><a href="#branchesnewhelpsystembasesrcmacports10">branches/new-help-system/base/src/macports1.0/</a></li>
<li><a href="#branchesnewhelpsystembasesrcpackage10">branches/new-help-system/base/src/package1.0/</a></li>
<li><a href="#branchesnewhelpsystembasesrcpextlib10Makefilein">branches/new-help-system/base/src/pextlib1.0/Makefile.in</a></li>
<li><a href="#branchesnewhelpsystembasesrcport">branches/new-help-system/base/src/port/</a></li>
<li><a href="#branchesnewhelpsystembasesrcport10">branches/new-help-system/base/src/port1.0/</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20">branches/new-help-system/base/src/registry2.0/</a></li>
<li><a href="#branchesnewhelpsystembasesrcregistry20receipt_sqlitetcl">branches/new-help-system/base/src/registry2.0/receipt_sqlite.tcl</a></li>
<li><a href="#branchesnewhelpsystembasetests">branches/new-help-system/base/tests/</a></li>
<li><a href="#branchesnewhelpsystembaseteststest">branches/new-help-system/base/tests/test/</a></li>
<li><a href="#branchesnewhelpsystembaseteststesttrace">branches/new-help-system/base/tests/test/trace/</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchesnewhelpsystembase"></a>
<div class="propset"><h4>Property changes: branches/new-help-system/base</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="modfile"><h4>Modified: svn:ignore</h4></div>
<span class="cx">config.log
</span><span class="cx">config.status
</span><span class="cx">Makefile
</span><span class="cx">Doxyfile
</span><span class="cx">tcldox
</span><span class="cx">setupenv.bash
</span><span class="cx"> + autom4te.cache
</span><span class="cx">config.log
</span><span class="cx">config.status
</span><span class="cx">Makefile
</span><span class="cx">Doxyfile
</span><span class="cx">docs
</span><span class="cx">setupenv.bash
</span><a id="svnmergeinfo"></a>
<div class="modfile"><h4>Modified: svn:mergeinfo</h4></div>
<span class="cx">/branches/gsoc09-logging/base:51231-60371
</span><span class="cx">/branches/gsoc11-rev-upgrade/base:78828-88375
</span><span class="cx">/branches/gsoc11-statistics/base:79520,79666
</span><span class="cx">/branches/gsoc13-tests:106692-111324
</span><span class="cx">/branches/universal-sanity/base:51872-52323
</span><span class="cx">/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
</span><span class="cx">/trunk/base:49341-117083
</span><span class="cx">/users/perry/base-bugs_and_notes:45682-46060
</span><span class="cx">/users/perry/base-select:44044-44692
</span><span class="cx"> + /branches/gsoc08-privileges/base:37343-46937
</span><span class="cx">/branches/gsoc09-logging/base:51231-60371
</span><span class="cx">/branches/gsoc11-rev-upgrade/base:78828-88375
</span><span class="cx">/branches/gsoc11-statistics/base:79520,79666
</span><span class="cx">/branches/gsoc13-tests:106692-111324
</span><span class="cx">/branches/universal-sanity/base:51872-52323
</span><span class="cx">/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
</span><span class="cx">/trunk/base:49341-122997
</span><span class="cx">/users/perry/base-bugs_and_notes:45682-46060
</span><span class="cx">/users/perry/base-select:44044-44692
</span><a id="branchesnewhelpsystembaseChangeLog"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/ChangeLog (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/ChangeLog        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/ChangeLog        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -3,15 +3,53 @@
</span><span class="cx"> # $Id$
</span><span class="cx"> ###
</span><span class="cx">
</span><del>-Release 2.3 (unreleased)
</del><ins>+Release 2.4 (unreleased)
+ - Display notes for installed or updated ports at the end of the
+ installation to prevent them from getting lost in the scrolling output.
+ (#24507, cal in r118304, patch by snc)
+
+ - Handle SIGTERM and SIGINT (^C) in MacPorts to prevent inconsistencies in
+ the registry database when MacPorts is aborted during a critical
+ operation. (cal in r118297 and r118298)
+
+Release 2.3.1 (2014-06-26 by jmr)
+ - Added macports-clang-3.4 to compiler fallback lists
+ (#43932, jeremyhu in r118735, r119034)
+
+ - Added quoting to PATH and MANPATH variables set by the installer, to
+ accomodate paths containing spaces (#43798, jmr in r121311)
+
+ - Update for automatic dependencies for fetch.type git, needed due to the
+ git-core port being renamed to git (#44052, ciserlohn in r120928)
+
+ - Fixed failure to sync using daily tarball (#43821, cal in r120382)
+
+Release 2.3 (2014-05-24 by jmr)
+ - Use a private copy of Tcl 8.5 for MacPorts. Starting with this change
+ features introduced with Tcl 8.5 can be used in Portfiles while still
+ keeping support for Tiger and Leopard. (cal in r117621)
+
+ - Add select --summary option. (#36179, snc in r117607)
+
</ins><span class="cx"> - Display a progress indicator for slow downloads. (cal in r117044)
</span><span class="cx">
</span><ins>+ - Attempt to use HTTP pipelining when downloading. (cal in r117022)
+
</ins><span class="cx"> - Allow ports to select a specific version of the Mac OS X SDK
</span><span class="cx"> for builds. (larryv in r116437)
</span><span class="cx">
</span><ins>+ - Check for Command Line Tools presence and Xcode license agreement
+ acceptance and print helpful warnings if they aren't detected. (cal in
+ r115900)
+
+ - Support using .tar.lz archives using use_lzip (mww in r114652)
+
</ins><span class="cx"> - Enhance the "move" Portfile builtin to support case-only renames
</span><span class="cx"> on case-insensitive filesystems. (#41679, ryandesign in r114289)
</span><span class="cx">
</span><ins>+ - Fix a regression that caused problems with sandboxing when the MacPorts
+ prefix contained a symlink. (#39850, cal in r113704)
+
</ins><span class="cx"> - Disable Spotlight indexing on build directories, distfiles,
</span><span class="cx"> registry, log files, archives, base source and the default ports
</span><span class="cx"> tree. (cal in r113649)
</span><span class="lines">@@ -20,6 +58,9 @@
</span><span class="cx"> it was configured for and refer user to migration instructions.
</span><span class="cx"> (raimue in r113478)
</span><span class="cx">
</span><ins>+ - Merge curl HTTP POST support required for MacPorts port statistics
+ developed in GSoC 2011 (jmr in r113396, original code by derek)
+
</ins><span class="cx"> - In debug output, sort environment variables and print one per
</span><span class="cx"> line. (#40703, ryandesign in r113037)
</span><span class="cx">
</span><span class="lines">@@ -29,6 +70,17 @@
</span><span class="cx"> - Add "-prepend" command for Portfile options (similar to existing
</span><span class="cx"> "-append" command). (#40655, ryandesign in r111990)
</span><span class="cx">
</span><ins>+ - Merge new test framework developed in GSoC 2013 (mariusc in r111325)
+
+ - Support clang's -stdlib option explicitly using configure.cxx_stdlib
+ rather than relying on its default value. This can be used to make
+ MacPorts use libc++ on OS X < 10.9. (larryv in r110519)
+
+ - Support syncing git-svn working copies. (jeremyhu in r109747)
+
+ - Remove support for mports:// and non-tarball HTTP/FTP port tree sources.
+ (cal in r109659)
+
</ins><span class="cx"> Release 2.2.1 (2013-10-26 by jmr)
</span><span class="cx"> - Fixed a problem where dependency calculation could sometimes fail for
</span><span class="cx"> ports that only support 32-bit architectures when the configured
</span></span></pre></div>
<a id="branchesnewhelpsystembaseDoxyfilein"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/Doxyfile.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/Doxyfile.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/Doxyfile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,236 +1,2283 @@
</span><del>-# Doxyfile 1.5.4
</del><ins>+# Doxyfile 1.8.5
</ins><span class="cx">
</span><ins>+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><span class="cx"> # Project related configuration options
</span><span class="cx"> #---------------------------------------------------------------------------
</span><ins>+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
</ins><span class="cx"> DOXYFILE_ENCODING = UTF-8
</span><ins>+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
</ins><span class="cx"> PROJECT_NAME = @PACKAGE_NAME@
</span><ins>+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
</ins><span class="cx"> PROJECT_NUMBER = @PACKAGE_VERSION@
</span><del>-OUTPUT_DIRECTORY =
</del><ins>+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
+# the documentation. The maximum height of the logo should not exceed 55 pixels
+# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
+# to the output directory.
+
+PROJECT_LOGO =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY =
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
</ins><span class="cx"> CREATE_SUBDIRS = NO
</span><ins>+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-
+# Traditional, Croatian, Czech, Danish, Dutch, English, Esperanto, Farsi,
+# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en,
+# Korean, Korean-en, Latvian, Norwegian, Macedonian, Persian, Polish,
+# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish,
+# Turkish, Ukrainian and Vietnamese.
+# The default value is: English.
+
</ins><span class="cx"> OUTPUT_LANGUAGE = English
</span><ins>+
+# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
</ins><span class="cx"> BRIEF_MEMBER_DESC = YES
</span><ins>+
+# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
</ins><span class="cx"> REPEAT_BRIEF = YES
</span><del>-ABBREVIATE_BRIEF =
</del><ins>+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
</ins><span class="cx"> ALWAYS_DETAILED_SEC = NO
</span><ins>+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
</ins><span class="cx"> INLINE_INHERITED_MEMB = NO
</span><ins>+
+# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
</ins><span class="cx"> FULL_PATH_NAMES = YES
</span><del>-STRIP_FROM_PATH =
-STRIP_FROM_INC_PATH =
</del><ins>+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
</ins><span class="cx"> SHORT_NAMES = NO
</span><ins>+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
</ins><span class="cx"> JAVADOC_AUTOBRIEF = NO
</span><ins>+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
</ins><span class="cx"> QT_AUTOBRIEF = NO
</span><ins>+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
</ins><span class="cx"> MULTILINE_CPP_IS_BRIEF = NO
</span><del>-DETAILS_AT_TOP = NO
</del><ins>+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
</ins><span class="cx"> INHERIT_DOCS = YES
</span><ins>+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
+# new page for each member. If set to NO, the documentation of a member will be
+# part of the file/class/namespace that contains it.
+# The default value is: NO.
+
</ins><span class="cx"> SEPARATE_MEMBER_PAGES = NO
</span><ins>+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
</ins><span class="cx"> TAB_SIZE = 8
</span><del>-ALIASES =
</del><ins>+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
</ins><span class="cx"> OPTIMIZE_OUTPUT_FOR_C = NO
</span><ins>+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
</ins><span class="cx"> OPTIMIZE_OUTPUT_JAVA = NO
</span><ins>+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C.
+#
+# Note For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by by putting a % sign in front of the word
+# or globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
</ins><span class="cx"> BUILTIN_STL_SUPPORT = NO
</span><ins>+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
</ins><span class="cx"> CPP_CLI_SUPPORT = NO
</span><ins>+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
</ins><span class="cx"> SIP_SUPPORT = NO
</span><ins>+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
</ins><span class="cx"> DISTRIBUTE_GROUP_DOC = NO
</span><ins>+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
</ins><span class="cx"> SUBGROUPING = YES
</span><ins>+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
</ins><span class="cx"> TYPEDEF_HIDES_STRUCT = NO
</span><ins>+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE = 0
+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><span class="cx"> # Build related configuration options
</span><span class="cx"> #---------------------------------------------------------------------------
</span><ins>+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
</ins><span class="cx"> EXTRACT_ALL = YES
</span><del>-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
</del><ins>+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE = YES
+
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
</ins><span class="cx"> EXTRACT_LOCAL_CLASSES = YES
</span><ins>+
+# This flag is only useful for Objective-C code. When set to YES local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO only methods in the interface are
+# included.
+# The default value is: NO.
+
</ins><span class="cx"> EXTRACT_LOCAL_METHODS = NO
</span><ins>+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
</ins><span class="cx"> EXTRACT_ANON_NSPACES = NO
</span><ins>+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
</ins><span class="cx"> HIDE_UNDOC_MEMBERS = NO
</span><ins>+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO these classes will be included in the various overviews. This option has
+# no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
</ins><span class="cx"> HIDE_UNDOC_CLASSES = NO
</span><ins>+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
</ins><span class="cx"> HIDE_FRIEND_COMPOUNDS = NO
</span><ins>+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
</ins><span class="cx"> HIDE_IN_BODY_DOCS = NO
</span><del>-INTERNAL_DOCS = NO
</del><ins>+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS = YES
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
</ins><span class="cx"> CASE_SENSE_NAMES = NO
</span><ins>+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES the
+# scope will be hidden.
+# The default value is: NO.
+
</ins><span class="cx"> HIDE_SCOPE_NAMES = NO
</span><ins>+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
</ins><span class="cx"> SHOW_INCLUDE_FILES = YES
</span><ins>+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
</ins><span class="cx"> INLINE_INFO = YES
</span><ins>+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: YES.
+
</ins><span class="cx"> SORT_MEMBER_DOCS = YES
</span><ins>+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: NO.
+
</ins><span class="cx"> SORT_BRIEF_DOCS = NO
</span><ins>+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
</ins><span class="cx"> SORT_BY_SCOPE_NAME = NO
</span><ins>+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
+# todo list. This list is created by putting \todo commands in the
+# documentation.
+# The default value is: YES.
+
</ins><span class="cx"> GENERATE_TODOLIST = YES
</span><ins>+
+# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
+# test list. This list is created by putting \test commands in the
+# documentation.
+# The default value is: YES.
+
</ins><span class="cx"> GENERATE_TESTLIST = YES
</span><ins>+
+# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
</ins><span class="cx"> GENERATE_BUGLIST = YES
</span><ins>+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
</ins><span class="cx"> GENERATE_DEPRECATEDLIST= YES
</span><del>-ENABLED_SECTIONS =
</del><ins>+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
</ins><span class="cx"> MAX_INITIALIZER_LINES = 30
</span><ins>+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES the list
+# will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
</ins><span class="cx"> SHOW_USED_FILES = YES
</span><del>-SHOW_DIRECTORIES = YES
-FILE_VERSION_FILTER =
</del><ins>+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. Do not use file names with spaces, bibtex cannot handle them. See
+# also \cite for info how to create references.
+
+CITE_BIB_FILES =
+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><del>-# configuration options related to warning and progress messages
</del><ins>+# Configuration options related to warning and progress messages
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><ins>+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
</ins><span class="cx"> QUIET = NO
</span><ins>+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
</ins><span class="cx"> WARNINGS = YES
</span><ins>+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
</ins><span class="cx"> WARN_IF_UNDOCUMENTED = YES
</span><ins>+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
</ins><span class="cx"> WARN_IF_DOC_ERROR = YES
</span><ins>+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO doxygen will only warn about wrong or incomplete parameter
+# documentation, but not about the absence of documentation.
+# The default value is: NO.
+
</ins><span class="cx"> WARN_NO_PARAMDOC = NO
</span><ins>+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
</ins><span class="cx"> WARN_FORMAT = "$file:$line: $text "
</span><del>-WARN_LOGFILE =
</del><ins>+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE =
+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><del>-# configuration options related to the input files
</del><ins>+# Configuration options related to the input files
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><ins>+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces.
+# Note: If this tag is empty the current directory is searched.
+
</ins><span class="cx"> INPUT = src
</span><ins>+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
</ins><span class="cx"> INPUT_ENCODING = UTF-8
</span><ins>+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank the
+# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
+
</ins><span class="cx"> FILE_PATTERNS = *.tcl \
</span><span class="cx"> *.c \
</span><span class="cx"> *.m \
</span><span class="cx"> *.h
</span><ins>+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
</ins><span class="cx"> RECURSIVE = YES
</span><del>-EXCLUDE =
</del><ins>+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
</ins><span class="cx"> EXCLUDE_SYMLINKS = NO
</span><del>-EXCLUDE_PATTERNS =
-EXCLUDE_SYMBOLS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
</del><ins>+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
</ins><span class="cx"> EXAMPLE_RECURSIVE = NO
</span><del>-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS = *.tcl=@prefix@/bin/tcl-dox
</del><ins>+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER ) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
</ins><span class="cx"> FILTER_SOURCE_FILES = NO
</span><ins>+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><del>-# configuration options related to source browsing
</del><ins>+# Configuration options related to source browsing
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><ins>+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
</ins><span class="cx"> SOURCE_BROWSER = YES
</span><ins>+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
</ins><span class="cx"> INLINE_SOURCES = NO
</span><ins>+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
</ins><span class="cx"> STRIP_CODE_COMMENTS = NO
</span><ins>+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
</ins><span class="cx"> REFERENCED_BY_RELATION = YES
</span><ins>+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
</ins><span class="cx"> REFERENCES_RELATION = YES
</span><ins>+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
</ins><span class="cx"> REFERENCES_LINK_SOURCE = YES
</span><ins>+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
</ins><span class="cx"> USE_HTAGS = NO
</span><ins>+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
</ins><span class="cx"> VERBATIM_HEADERS = YES
</span><ins>+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><del>-# configuration options related to the alphabetical class index
</del><ins>+# Configuration options related to the alphabetical class index
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><ins>+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
</ins><span class="cx"> ALPHABETICAL_INDEX = NO
</span><ins>+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
</ins><span class="cx"> COLS_IN_ALPHA_INDEX = 5
</span><del>-IGNORE_PREFIX =
</del><ins>+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX =
+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><del>-# configuration options related to the HTML output
</del><ins>+# Configuration options related to the HTML output
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><ins>+
+# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# The default value is: YES.
+
</ins><span class="cx"> GENERATE_HTML = YES
</span><del>-HTML_OUTPUT = tcldox
</del><ins>+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT = docs
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
</ins><span class="cx"> HTML_FILE_EXTENSION = .html
</span><del>-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
</del><ins>+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
+# defined cascading style sheet that is included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefor more robust against future updates.
+# Doxygen will copy the style sheet file to the output directory. For an example
+# see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the stylesheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
</ins><span class="cx"> GENERATE_HTMLHELP = NO
</span><del>-HTML_DYNAMIC_SECTIONS = NO
-CHM_FILE =
-HHC_LOCATION =
</del><ins>+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated (
+# YES) or that it should be included in the master .chm file ( NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
</ins><span class="cx"> GENERATE_CHI = NO
</span><ins>+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated (
+# YES) or a normal table of contents ( NO) in the .chm file.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
</ins><span class="cx"> BINARY_TOC = NO
</span><ins>+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
</ins><span class="cx"> TOC_EXPAND = NO
</span><ins>+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
</ins><span class="cx"> DISABLE_INDEX = NO
</span><ins>+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
</ins><span class="cx"> ENUM_VALUES_PER_LINE = 4
</span><del>-GENERATE_TREEVIEW = NO
</del><ins>+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
</ins><span class="cx"> TREEVIEW_WIDTH = 250
</span><ins>+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE = NO
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavours of web server based searching depending on the
+# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
+# searching and an index file used by the script. When EXTERNAL_SEARCH is
+# enabled the indexing and searching needs to be provided by external tools. See
+# the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS =
+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><del>-# configuration options related to the LaTeX output
</del><ins>+# Configuration options related to the LaTeX output
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><ins>+
+# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+# The default value is: YES.
+
</ins><span class="cx"> GENERATE_LATEX = NO
</span><ins>+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
</ins><span class="cx"> LATEX_OUTPUT = latex
</span><ins>+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
</ins><span class="cx"> LATEX_CMD_NAME = latex
</span><ins>+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
</ins><span class="cx"> MAKEINDEX_CMD_NAME = makeindex
</span><ins>+
+# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
</ins><span class="cx"> COMPACT_LATEX = NO
</span><ins>+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
</ins><span class="cx"> PAPER_TYPE = a4wide
</span><del>-EXTRA_PACKAGES =
-LATEX_HEADER =
</del><ins>+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. To get the times font for
+# instance you can specify
+# EXTRA_PACKAGES=times
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
+# replace them by respectively the title of the page, the current date and time,
+# only the current date, the version number of doxygen, the project name (see
+# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
</ins><span class="cx"> PDF_HYPERLINKS = NO
</span><ins>+
+# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
</ins><span class="cx"> USE_PDFLATEX = NO
</span><ins>+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
</ins><span class="cx"> LATEX_BATCHMODE = NO
</span><ins>+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
</ins><span class="cx"> LATEX_HIDE_INDICES = NO
</span><ins>+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE = plain
+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><del>-# configuration options related to the RTF output
</del><ins>+# Configuration options related to the RTF output
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><ins>+
+# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
</ins><span class="cx"> GENERATE_RTF = NO
</span><ins>+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
</ins><span class="cx"> RTF_OUTPUT = rtf
</span><ins>+
+# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
</ins><span class="cx"> COMPACT_RTF = NO
</span><ins>+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
</ins><span class="cx"> RTF_HYPERLINKS = NO
</span><del>-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
</del><ins>+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE =
+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><del>-# configuration options related to the man page output
</del><ins>+# Configuration options related to the man page output
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><ins>+
+# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
</ins><span class="cx"> GENERATE_MAN = NO
</span><ins>+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
</ins><span class="cx"> MAN_OUTPUT = man
</span><ins>+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
</ins><span class="cx"> MAN_EXTENSION = .3
</span><ins>+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
</ins><span class="cx"> MAN_LINKS = NO
</span><ins>+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><del>-# configuration options related to the XML output
</del><ins>+# Configuration options related to the XML output
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><ins>+
+# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
</ins><span class="cx"> GENERATE_XML = NO
</span><ins>+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
</ins><span class="cx"> XML_OUTPUT = xml
</span><del>-XML_SCHEMA =
-XML_DTD =
</del><ins>+
+# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify a XML DTD, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
</ins><span class="cx"> XML_PROGRAMLISTING = YES
</span><ins>+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><del>-# configuration options for the AutoGen Definitions output
</del><ins>+# Configuration options related to the DOCBOOK output
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><ins>+
+# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT = docbook
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
+# Definitions (see http://autogen.sf.net) file that captures the structure of
+# the code including all documentation. Note that this feature is still
+# experimental and incomplete at the moment.
+# The default value is: NO.
+
</ins><span class="cx"> GENERATE_AUTOGEN_DEF = NO
</span><ins>+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><del>-# configuration options related to the Perl module output
</del><ins>+# Configuration options related to the Perl module output
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><ins>+
+# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
</ins><span class="cx"> GENERATE_PERLMOD = NO
</span><ins>+
+# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
</ins><span class="cx"> PERLMOD_LATEX = NO
</span><ins>+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
</ins><span class="cx"> PERLMOD_PRETTY = YES
</span><del>-PERLMOD_MAKEVAR_PREFIX =
</del><ins>+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><del>-# Configuration options related to the preprocessor
</del><ins>+# Configuration options related to the preprocessor
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><ins>+
+# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
</ins><span class="cx"> ENABLE_PREPROCESSING = YES
</span><ins>+
+# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
+# in the source code. If set to NO only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
</ins><span class="cx"> MACRO_EXPANSION = NO
</span><ins>+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
</ins><span class="cx"> EXPAND_ONLY_PREDEF = NO
</span><ins>+
+# If the SEARCH_INCLUDES tag is set to YES the includes files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
</ins><span class="cx"> SEARCH_INCLUDES = YES
</span><del>-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
</del><ins>+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all refrences to function-like macros that are alone on a line, have an
+# all uppercase name, and do not end with a semicolon. Such function macros are
+# typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
</ins><span class="cx"> SKIP_FUNCTION_MACROS = YES
</span><ins>+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><del>-# Configuration::additions related to external references
</del><ins>+# Configuration options related to external references
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><del>-TAGFILES =
-GENERATE_TAGFILE =
</del><ins>+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have an unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
+# class index. If set to NO only the inherited external classes will be listed.
+# The default value is: NO.
+
</ins><span class="cx"> ALLEXTERNALS = NO
</span><ins>+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
+# the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
</ins><span class="cx"> EXTERNAL_GROUPS = YES
</span><ins>+
+# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
</ins><span class="cx"> PERL_PATH = /usr/bin/perl
</span><ins>+
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><del>-# Configuration options related to the dot tool
</del><ins>+# Configuration options related to the dot tool
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><ins>+
+# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
</ins><span class="cx"> CLASS_DIAGRAMS = YES
</span><del>-MSCGEN_PATH =
</del><ins>+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
</ins><span class="cx"> HIDE_UNDOC_RELATIONS = YES
</span><ins>+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
</ins><span class="cx"> HAVE_DOT = YES
</span><ins>+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS = 0
+
+# When you want a differently looking font n the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> CLASS_GRAPH = YES
</span><ins>+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> COLLABORATION_GRAPH = YES
</span><ins>+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> GROUP_GRAPHS = YES
</span><ins>+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> UML_LOOK = NO
</span><ins>+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> TEMPLATE_RELATIONS = NO
</span><ins>+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> INCLUDE_GRAPH = YES
</span><ins>+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> INCLUDED_BY_GRAPH = YES
</span><ins>+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> CALL_GRAPH = NO
</span><ins>+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> CALLER_GRAPH = NO
</span><ins>+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> GRAPHICAL_HIERARCHY = YES
</span><ins>+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> DIRECTORY_GRAPH = YES
</span><ins>+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot.
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif and svg.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> DOT_IMAGE_FORMAT = png
</span><ins>+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> DOT_PATH = @prefix@/bin/
</span><del>-DOTFILE_DIRS =
</del><ins>+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> DOT_GRAPH_MAX_NODES = 50
</span><ins>+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> MAX_DOT_GRAPH_DEPTH = 0
</span><ins>+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> DOT_TRANSPARENT = NO
</span><ins>+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> DOT_MULTI_TARGETS = NO
</span><ins>+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> GENERATE_LEGEND = YES
</span><ins>+
+# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
</ins><span class="cx"> DOT_CLEANUP = YES
</span><del>-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
</del></span></pre></div>
<a id="branchesnewhelpsystembaseLICENSE"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/LICENSE (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/LICENSE        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/LICENSE        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> Copyright (c) 2002 - 2003, Apple Inc.
</span><del>-Copyright (c) 2004 - 2013, The MacPorts Project.
</del><ins>+Copyright (c) 2004 - 2014, The MacPorts Project.
</ins><span class="cx"> All rights reserved.
</span><span class="cx">
</span><span class="cx"> Redistribution and use in source and binary forms, with or without
</span></span></pre></div>
<a id="branchesnewhelpsystembaseMakefilein"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/Makefile.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/Makefile.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,7 +1,10 @@
</span><span class="cx"> # $Id$
</span><span class="cx">
</span><ins>+srcdir = @srcdir@
+VPATH = @srcdir@
+
</ins><span class="cx"> PATH                = @PATH_CLEANED@
</span><del>-SUBDIR                = doc src tests
</del><ins>+SUBDIR                = vendor doc src tests
</ins><span class="cx"> DISTDIR                = dist
</span><span class="cx"> DISTVER                =
</span><span class="cx"> DISTTAG                = release_${subst .,_,${DISTVER}}
</span><span class="lines">@@ -16,7 +19,7 @@
</span><span class="cx">
</span><span class="cx"> all:: Mk/macports.autoconf.mk
</span><span class="cx">
</span><del>-Mk/macports.autoconf.mk: Mk/macports.autoconf.mk.in src/config.h.in Makefile.in config.status
</del><ins>+Mk/macports.autoconf.mk: Mk/macports.autoconf.mk.in src/config.h.in Makefile.in doc/Makefile.in src/cflib1.0/Makefile.in src/cregistry/Makefile.in src/darwintracelib1.0/Makefile.in src/macports1.0/Makefile.in src/package1.0/Makefile.in src/port/Makefile.in src/port1.0/Makefile.in src/registry2.0/Makefile.in tests/Makefile.in config.status
</ins><span class="cx">         ./config.status
</span><span class="cx">         ${MAKE} clean
</span><span class="cx">
</span><span class="lines">@@ -29,71 +32,72 @@
</span><span class="cx">                 echo "Source tree not configured. Use ./configure" ; \
</span><span class="cx">         fi
</span><span class="cx">
</span><del>-include Mk/macports.subdir.mk
</del><ins>+include $(srcdir)/Mk/macports.subdir.mk
</ins><span class="cx">
</span><span class="cx"> install::
</span><span class="cx">         [ ! -f "$(DESTDIR)${sysconfdir}/macports/mp_version" ] || rm -vf "$(DESTDIR)${sysconfdir}/macports/mp_version"
</span><del>-        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "$(DESTDIR)${datadir}/macports/"
-        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 setupenv.bash "$(DESTDIR)${datadir}/macports/"
-        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 macports-pubkey.pem "$(DESTDIR)${datadir}/macports/"
</del><ins>+        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "$(DESTDIR)${datadir}/macports/"
+        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 setupenv.bash "$(DESTDIR)${datadir}/macports/"
+        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 $(srcdir)/macports-pubkey.pem "$(DESTDIR)${datadir}/macports/"
</ins><span class="cx"> # Only run these scripts when not building in a destroot
</span><span class="cx"> ifeq ($(DESTDIR),)
</span><span class="cx"> # create run user if it doesn't exist
</span><span class="cx">         @if test -n "${DSCL}" -a -n "${DSEDITGROUP}" ; then \
</span><del>- if ! ${DSCL} -q . -read /Groups/${RUNUSR} > /dev/null 2>&1 ; then \
</del><ins>+ if ! ${DSCL} -q . -read "/Groups/${RUNUSR}" > /dev/null 2>&1 ; then \
</ins><span class="cx"> if test `id -u` -eq 0; then \
</span><span class="cx"> echo "Creating group \"${RUNUSR}\"" ; \
</span><del>- ${DSEDITGROUP} -q -o create ${RUNUSR} ; \
</del><ins>+ ${DSEDITGROUP} -q -o create "${RUNUSR}" ; \
</ins><span class="cx"> else \
</span><span class="cx"> echo "Not creating group \"${RUNUSR}\" (not root)" ; \
</span><span class="cx"> fi ; \
</span><span class="cx"> fi ; \
</span><del>- if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then \
</del><ins>+ if ! ${DSCL} -q . -list "/Users/${RUNUSR}" > /dev/null 2>&1 ; then \
</ins><span class="cx"> if test `id -u` -eq 0; then \
</span><span class="cx"> echo "Creating user \"${RUNUSR}\"" ; \
</span><span class="cx"> NEXTUID=501; \
</span><span class="cx"> while test -n "`${DSCL} -q /Search -search /Users UniqueID $$NEXTUID`"; do \
</span><span class="cx"> let "NEXTUID=NEXTUID+1"; \
</span><span class="cx"> done; \
</span><del>- ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $$NEXTUID ; \
</del><ins>+ ${DSCL} -q . -create "/Users/${RUNUSR}" UniqueID $$NEXTUID ; \
</ins><span class="cx"> \
</span><del>- ${DSCL} -q . -delete /Users/${RUNUSR} AuthenticationAuthority ; \
- ${DSCL} -q . -delete /Users/${RUNUSR} PasswordPolicyOptions ; \
- ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:KerberosKeys ; \
- ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:ShadowHashData ; \
</del><ins>+ ${DSCL} -q . -delete "/Users/${RUNUSR}" AuthenticationAuthority ; \
+ ${DSCL} -q . -delete "/Users/${RUNUSR}" PasswordPolicyOptions ; \
+ ${DSCL} -q . -delete "/Users/${RUNUSR}" dsAttrTypeNative:KerberosKeys ; \
+ ${DSCL} -q . -delete "/Users/${RUNUSR}" dsAttrTypeNative:ShadowHashData ; \
</ins><span class="cx"> \
</span><del>- ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts ; \
- ${DSCL} -q . -create /Users/${RUNUSR} Password \* ; \
- ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $$(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $$2}') ; \
- ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory "${localstatedir}/macports/home" ; \
- ${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false ; \
</del><ins>+ ${DSCL} -q . -create "/Users/${RUNUSR}" RealName MacPorts ; \
+ ${DSCL} -q . -create "/Users/${RUNUSR}" Password \* ; \
+ ${DSCL} -q . -create "/Users/${RUNUSR}" PrimaryGroupID $$(${DSCL} -q . -read "/Groups/${RUNUSR}" PrimaryGroupID | /usr/bin/awk '{print $$2}') ; \
+ ${DSCL} -q . -create "/Users/${RUNUSR}" NFSHomeDirectory "${localstatedir}/macports/home" ; \
+ ${DSCL} -q . -create "/Users/${RUNUSR}" UserShell /usr/bin/false ; \
</ins><span class="cx"> else \
</span><span class="cx"> echo "Not creating user \"${RUNUSR}\" (not root)" ; \
</span><span class="cx"> fi ; \
</span><span class="cx"> fi ; \
</span><del>- if test "$$(${DSCL} -q . -read /Users/${RUNUSR} NFSHomeDirectory)" = "NFSHomeDirectory: /var/empty" ; then \
</del><ins>+ if test "$$(${DSCL} -q . -read "/Users/${RUNUSR}" NFSHomeDirectory)" = "NFSHomeDirectory: /var/empty" ; then \
</ins><span class="cx"> if test `id -u` -eq 0; then \
</span><span class="cx"> echo "Updating home directory location for user \"${RUNUSR}\"" ; \
</span><del>- ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory "${localstatedir}/macports/home" ; \
</del><ins>+ ${DSCL} -q . -create "/Users/${RUNUSR}" NFSHomeDirectory "${localstatedir}/macports/home" ; \
</ins><span class="cx"> else \
</span><span class="cx"> echo "Not updating home directory location for user \"${RUNUSR}\" (not root)" ; \
</span><span class="cx"> fi ; \
</span><span class="cx"> fi ; \
</span><span class="cx"> if test `sw_vers -productVersion | /usr/bin/awk -F . '{print $$2}'` -eq 4 -a `id -u` -eq 0; then \
</span><del>- GID=`${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $$2}'` ; \
- if test "`${DSCL} -q . -read /Users/${RUNUSR} PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $$2}'`" != "$$GID"; then \
</del><ins>+ GID=`${DSCL} -q . -read "/Groups/${RUNUSR}" PrimaryGroupID | /usr/bin/awk '{print $$2}'` ; \
+ if test "`${DSCL} -q . -read "/Users/${RUNUSR}" PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $$2}'`" != "$$GID"; then \
</ins><span class="cx"> echo "Fixing PrimaryGroupID for user \"${RUNUSR}\"" ; \
</span><del>- ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $$GID ; \
- ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts ; \
</del><ins>+ ${DSCL} -q . -create "/Users/${RUNUSR}" PrimaryGroupID $$GID ; \
+ ${DSCL} -q . -create "/Users/${RUNUSR}" RealName MacPorts ; \
</ins><span class="cx"> fi ; \
</span><span class="cx"> fi ; \
</span><span class="cx"> else \
</span><span class="cx"> echo "Can't find ${DSCL} / ${DSEDITGROUP}, not creating user \"${RUNUSR}\"" ; \
</span><span class="cx"> fi
</span><span class="cx"> # Add [default] tag to the central MacPorts repository, if it isn't already
</span><del>-        $(TCLSH) src/upgrade_sources_conf_default.tcl "${prefix}"
</del><ins>+        $(TCLSH) $(srcdir)/src/upgrade_sources_conf_default.tcl "${prefix}"
</ins><span class="cx"> # Convert image directories (and direct mode installs) to image archives
</span><del>-        $(TCLSH) src/images_to_archives.tcl "${macports_tcl_dir}"
</del><ins>+        $(TCLSH) $(srcdir)/src/images_to_archives.tcl
+        $(TCLSH) $(srcdir)/src/dedup_portfiles.tcl
</ins><span class="cx"> endif
</span><span class="cx"> ifndef SELFUPDATING
</span><span class="cx">         @echo ""; echo "Congratulations, you have successfully installed the MacPorts system. To get the Portfiles and update the system, add ${prefix}/bin to your PATH and run:"; echo ""
</span><span class="lines">@@ -111,6 +115,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> clean::
</span><ins>+        rm -rf docs
</ins><span class="cx">
</span><span class="cx"> distclean::
</span><span class="cx">         rm -f config.log config.status configure.lineno
</span><span class="lines">@@ -118,6 +123,7 @@
</span><span class="cx">         rm -f Makefile Mk/macports.autoconf.mk portmgr/freebsd/Makefile
</span><span class="cx">         rm -f Doxyfile
</span><span class="cx">         rm -f setupenv.bash
</span><ins>+        rm -f portmgr/dmg/postflight
</ins><span class="cx">
</span><span class="cx"> _gettag:
</span><span class="cx">         cd ${DISTDIR}; svn co ${SVNURL}/tags/${SVNTAG} ${PKGNAME}-svn
</span><span class="lines">@@ -145,16 +151,11 @@
</span><span class="cx">         ${MAKE} SVNTAG=${DISTARCTAG} PKGNAME=${DISTARCNAME} _dopkg
</span><span class="cx"> endif
</span><span class="cx">
</span><del>-tcldoc:
-        @[ -e "${prefix}/bin/tcldoc" ] \
-                || { echo "Install tcldoc with MacPorts in ${prefix} first."; exit 1; }
-        find src -name '*.tcl' | xargs ${TCLDOC} --verbose --title "MacPorts Documentation" --force tcldoc
-
-tcldox:
-        @[ -e "${prefix}/bin/doxygen" -a -e "${prefix}/bin/tcl-dox" -a -e "${prefix}/bin/dot" ] \
-                || { echo "Install doxygen, tcl-dox and graphviz with MacPorts in ${prefix} first."; exit 1; }
</del><ins>+docs:
+        @[ -e "${prefix}/bin/doxygen" -a -e "${prefix}/bin/dot" ] \
+                || { echo "Install doxygen and graphviz with MacPorts in ${prefix} first."; exit 1; }
</ins><span class="cx">         ${prefix}/bin/doxygen
</span><span class="cx">
</span><span class="cx"> test::
</span><span class="cx">
</span><del>-.PHONY: dist _gettag _pkgdist _dopkg tcldoc tcldox
</del><ins>+.PHONY: dist _gettag _pkgdist _dopkg docs
</ins></span></pre></div>
<a id="branchesnewhelpsystembaseMkmacportsautoconfmkin"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/Mk/macports.autoconf.mk.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/Mk/macports.autoconf.mk.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/Mk/macports.autoconf.mk.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,17 +1,12 @@
</span><span class="cx"> # $Id$
</span><ins>+# vim:ts=8:noet:sts=8:sw=8
</ins><span class="cx">
</span><span class="cx"> SHELL                        = @SHELL@
</span><span class="cx">
</span><del>-
-srcdir                        = @srcdir@
-VPATH                        = @srcdir@
-
</del><span class="cx"> CC                        = @CC@
</span><span class="cx"> CFLAGS                        = @CFLAGS@ -std=c99 $(CFLAGS_QUICHEEATERS) $(CFLAGS_PEDANTIC) $(CFLAGS_WERROR)
</span><span class="cx"> OBJCFLAGS                = @OBJCFLAGS@ $(CFLAGS_QUICHEEATERS) $(CFLAGS_PEDANTIC) $(CFLAGS_WERROR)
</span><del>-CPPFLAGS                = @CPPFLAGS@ @DEFS@ @INCLUDES@ @TCL_INCLUDES@
-TCL_DEFS                = @TCL_DEFS@
-SHLIB_CFLAGS                = @SHLIB_CFLAGS@
</del><ins>+CPPFLAGS                = @CPPFLAGS@ @DEFS@ -I@abs_top_builddir@/src -I@abs_top_srcdir@/src -I. -I@abs_top_builddir@/@VENDOR_DESTROOT@/@TCL_PREFIX@/include
</ins><span class="cx"> CFLAGS_QUICHEEATERS        = @CFLAGS_QUICHEEATERS@
</span><span class="cx"> CFLAGS_PEDANTIC                = @CFLAGS_PEDANTIC@
</span><span class="cx"> CFLAGS_WERROR                = @CFLAGS_WERROR@
</span><span class="lines">@@ -32,11 +27,11 @@
</span><span class="cx"> OBJC_FOUNDATION_LDFLAGS                = @OBJC_FOUNDATION_LDFLAGS@
</span><span class="cx"> OBJC_FOUNDATION_LIBS                = @OBJC_FOUNDATION_LIBS@
</span><span class="cx">
</span><del>-TCL_CC                        = @TCL_CC@
</del><ins>+LDFLAGS                        = @LDFLAGS@
</ins><span class="cx"> SHLIB_LD                = @SHLIB_LD@
</span><span class="cx"> STLIB_LD                = @STLIB_LD@
</span><del>-LDFLAGS                        = @LDFLAGS@
-SHLIB_LDFLAGS                = @SHLIB_LDFLAGS@ ${LDFLAGS}
</del><ins>+SHLIB_CFLAGS                = @SHLIB_CFLAGS@
+SHLIB_LDFLAGS                = @LDFLAGS@
</ins><span class="cx"> SHLIB_SUFFIX                = @SHLIB_SUFFIX@
</span><span class="cx"> TCL_STUB_LIB_SPEC        = @TCL_STUB_LIB_SPEC@
</span><span class="cx">
</span><span class="lines">@@ -51,9 +46,9 @@
</span><span class="cx"> XCODEBUILD                = @XCODEBUILD@
</span><span class="cx"> BZIP2                        = @BZIP2@
</span><span class="cx">
</span><ins>+INTREE_TCLSH                = @INTREE_TCLSH@
</ins><span class="cx"> TCLSH                        = @TCLSH@
</span><del>-TCL_PACKAGE_DIR                = @TCL_PACKAGE_DIR@
-macports_tcl_dir        = @macports_tcl_dir@
</del><ins>+TCL_PACKAGE_PATH        = @TCL_PACKAGE_PATH@
</ins><span class="cx">
</span><span class="cx"> DSCL                        = @DSCL@
</span><span class="cx"> DSEDITGROUP                = @DSEDITGROUP@
</span></span></pre></div>
<a id="branchesnewhelpsystembaseMkmacportssubdirmk"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/Mk/macports.subdir.mk (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/Mk/macports.subdir.mk        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/Mk/macports.subdir.mk        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -3,6 +3,7 @@
</span><span class="cx"> .PHONY : all
</span><span class="cx"> .PHONY : clean distclean
</span><span class="cx"> .PHONY : install
</span><ins>+.PHONY : test
</ins><span class="cx">
</span><span class="cx"> all::
</span><span class="cx">         @for subdir in $(SUBDIR); do\
</span></span></pre></div>
<a id="branchesnewhelpsystembaseaclocalm4"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/aclocal.m4 (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/aclocal.m4        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/aclocal.m4        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -3,6 +3,319 @@
</span><span class="cx"> builtin(include,m4/pthread.m4)
</span><span class="cx"> builtin(include,m4/foundation.m4)
</span><span class="cx">
</span><ins>+dnl Search for a variable in a list. Run ACTION-IF-FOUND if it is in the list,
+dnl ACTION-IF-NOT-FOUND otherwise.
+dnl
+dnl Parameters:
+dnl - The name of the list.
+dnl - The name of the variable that should be searched in the list.
+dnl - An optional action to be run if found
+dnl - An optional action to be run if not found
+dnl
+dnl _MP_LIST_CONTAINS_QUOTED([listname], [varname], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([_MP_LIST_CONTAINS], [dnl
+        mp_list_contains_present=
+        eval "mp_list_contains_list=\"$$1\""
+        for mp_list_contains_entry in $mp_list_contains_list; do
+                test -z "$mp_list_contains_entry" && continue
+                if test "x$$2" = "x$mp_list_contains_entry"; then
+                        mp_list_contains_present=1
+                        break
+                fi
+        done
+        if test "x$mp_list_contains_present" = "x"; then
+                m4_ifvaln([$3], [$3], [:])dnl
+                m4_ifvaln([$4], [else $4])dnl
+        fi
+])
+
+dnl Quote a variable and prepend it to a list.
+dnl
+dnl Parameters:
+dnl - The name of the list.
+dnl - The name of the variable that should be quoted and prepended to the
+dnl list.
+AC_DEFUN([_MP_LIST_PREPEND_QUOTED], [dnl
+        _MP_QUOTE([$2])
+        _MP_VAR_PREPEND([$1], ["$$2 "])
+])
+
+
+dnl Quote a variable and append it to a list.
+dnl
+dnl Parameters:
+dnl - The name of the list.
+dnl - The name of the variable that should be quoted and appended to the list.
+AC_DEFUN([_MP_LIST_APPEND_QUOTED], [dnl
+        _MP_QUOTE([$2])
+        AS_VAR_APPEND([$1], [" $$2"])
+])
+
+dnl Prepend the shell expansion of a value to a variable.
+dnl
+dnl Parameters:
+dnl - The name of the variable to which the second argument should be
+dnl prepended.
+dnl - The value that should be expanded using the shell expansion rules and
+dnl prepended to the variable given in the first argument.
+AC_DEFUN([_MP_VAR_PREPEND], [dnl
+        AC_REQUIRE([_MP_VAR_PREPEND_PREPARE])dnl
+        mp_fn_var_prepend $1 $2
+])
+
+dnl Define the function required for _MP_VAR_PREPEND
+AC_DEFUN([_MP_VAR_PREPEND_PREPARE], [dnl
+        mp_fn_var_prepend() {
+                eval "$[]1=\"$[]2\$$[]1\""
+        }
+])
+
+dnl Quote a variable in single quotes (escaping any existing single quotes) and
+dnl store it in itself.
+dnl
+dnl Parameters:
+dnl - The name of the variable that should be quoted using single quotes.
+AC_DEFUN([_MP_QUOTE], [dnl
+        case $$1 in
+                *\'*)
+                        $1=$(AS_ECHO(["$$1"]) | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        $1="'$$1'"dnl
+])
+
+
+dnl Extract the key part of a key-value pair given as string in the form
+dnl --key=value or
+dnl -key=value
+dnl
+dnl Parameters:
+dnl - The variable name to assign to
+dnl - The (quoted, if necessary) key-value pair
+AC_DEFUN([_MP_EXTRACT_KEY], [dnl
+        $1=$(AS_ECHO([$2]) | sed -E 's/^--?([[^=]]+)=.*$/\1/')dnl
+])
+
+dnl Similar to AC_ARG_VAR, but implemented with --with-pkg=PATH for PKG.
+dnl
+dnl Parameters: Similar to AC_ARG_VAR ($2 gets some boiler plate around it)
+AC_DEFUN([MP_TOOL_PATH], [dnl
+        AC_ARG_WITH([m4_tolower($1)], [AS_HELP_STRING([--with-m4_tolower($1)=PATH],
+                        [Path to alternate $2 command])], [$1=$withval],dnl
+                [])dnl
+])
+
+dnl Configure a project contained in a .tar.gz, .tgz or .tar.bz2 tarball,
+dnl extracting it previously, if necessary. Different from AC_CONFIG_SUBDIRS
+dnl (on which this macro is based), you can pass parameters to the
+dnl sub-configure script.
+dnl
+dnl Parameters:
+dnl - The relative path to the tarball
+dnl - The relative path to the directory that will be extracted from the
+dnl tarball and contains the configure script to be run (can be a sub directory of the extracted directory)
+dnl - Parameters to pass to the configure script
+dnl
+dnl MP_CONFIG_TARBALL([path-to-tarball], [dir-extracted-from-tarball-with-configure], [configure-parameters])
+AC_DEFUN([MP_CONFIG_TARBALL], [
+        AC_PATH_PROG(GZIP, [gzip], [])
+        AC_PATH_PROG(BZIP2, [bzip2], [])
+
+        mp_tarball="$1"
+        ac_dir=$2
+
+        mp_popdir=$(pwd)
+        if ! test -d "$ac_dir"; then
+                mp_tarball_vendordir="$(dirname "$mp_tarball")"
+                AS_MKDIR_P(["$mp_tarball_vendordir"])
+                AC_MSG_NOTICE([=== extracting $mp_tarball])
+                mp_tarball_extract_cmd=
+                case "$mp_tarball" in
+                        *.tar.gz | *.tgz)
+                                if test "x$GZIP" = "x"; then
+                                        AC_MSG_ERROR([gzip not found])
+                                fi
+                                mp_tarball_extract_cmd="$GZIP"
+                                ;
+                        *.tar.bz2 | *.tbz2)
+                                if test "x$BZIP2" = "x"; then
+                                        AC_MSG_ERROR([bzip2 not found])
+                                fi
+                                mp_tarball_extract_cmd="$BZIP2"
+                                ;
+                        *)
+                                AC_MSG_ERROR([Don't know how to extract tarball $mp_tarball])
+                                ;
+                esac
+                (cd "$mp_tarball_vendordir"; umask 0022; "$mp_tarball_extract_cmd" -d < "$ac_abs_confdir/$mp_tarball" | tar xf - || AC_MSG_ERROR([failed to extract $mp_tarball]))
+        fi
+        if ! test -d "$ac_dir"; then
+                AC_MSG_ERROR([tarball $mp_tarball did not extract to $ac_dir])
+        fi
+
+        AS_MKDIR_P(["$ac_dir"])
+        _AC_SRCDIRS(["$ac_dir"])
+        cd "$ac_dir"
+
+        if test "$no_recursion" != yes || test ! -f "$ac_srcdir/config.status"; then
+                AC_MSG_NOTICE([=== configuring in $ac_dir ($mp_popdir/$ac_dir)])
+                if test -f "$ac_srcdir/configure"; then
+                        mp_sub_configure_args=
+                        mp_sub_configure_keys=
+                        # Compile a list of keys that have been given to the MP_CONFIG_TARBALL
+                        # macro; we want to skip copying those parameters from the original
+                        # configure invocation.
+                        for mp_arg in $3; do
+                                case $mp_arg in
+                                        --*=* | -*=*)
+                                                _MP_EXTRACT_KEY([mp_arg_key], ["$mp_arg"])
+                                                _MP_LIST_APPEND_QUOTED([mp_sub_configure_keys], [mp_arg_key])
+                                        ;
+                                esac
+                                _MP_LIST_APPEND_QUOTED([mp_sub_configure_args], [mp_arg])
+                        done
+                        # Walk the list of arguments given to the original configure script;
+                        # filter out a few common ones we likely would not want to pass along,
+                        # add --disable-option-checking and filter those already given as
+                        # argument to MP_CONFIG_TARBALL.
+                        # Most of this code is adapted from _AC_OUTPUT_SUBDIRS in
+                        # $prefix/share/autoconf/autoconf/status.m4.
+                        mp_prev=
+                        eval "set x $ac_configure_args"
+                        shift
+                        for mp_arg; do
+                                if test -n "$mp_prev"; then
+                                        mp_prev=
+                                        continue
+                                fi
+                                case $mp_arg in
+                                         -cache-file \
+                                        | --cache-file \
+                                        | --cache-fil \
+                                        | --cache-fi \
+                                        | --cache-f \
+                                        | --cache- \
+                                        | --cache \
+                                        | --cach \
+                                        | --cac \
+                                        | --ca \
+                                        | --c)
+                                                mp_prev=cache_file
+                                        ;
+                                         -cache-file=* \
+                                        | --cache-file=* \
+                                        | --cache-fil=* \
+                                        | --cache-fi=* \
+                                        | --cache-f=* \
+                                        | --cache-=* \
+                                        | --cache=* \
+                                        | --cach=* \
+                                        | --cac=* \
+                                        | --ca=* \
+                                        | --c=*)
+                                                # ignore --cache-file
+                                        ;
+                                         --config-cache \
+                                        | -C)
+                                                # ignore -C
+                                        ;
+                                         -srcdir \
+                                        | --srcdir \
+                                        | -srcdi \
+                                        | -srcd \
+                                        | -src \
+                                        | -sr)
+                                                mp_prev=srcdir
+                                        ;
+                                         -srcdir=* \
+                                        | --srcdir=* \
+                                        | --srcdi=* \
+                                        | --srcd=* \
+                                        | --src=* \
+                                        | --sr=*)
+                                                # ignore --srcdir
+                                        ;
+                                         -prefix \
+                                        | --prefix \
+                                        | --prefi \
+                                        | --pref \
+                                        | --pre \
+                                        | --pr \
+                                        | --p)
+                                                mp_prev=prefix
+                                        ;
+                                         -prefix=* \
+                                        | --prefix=* \
+                                        | --prefi=* \
+                                        | --pref=* \
+                                        | --pre=* \
+                                        | --pr=* \
+                                        | --p=*)
+                                                # ignore --prefix
+                                        ;
+                                        --disable-option-checking)
+                                                # ignore --disable-option-checking
+                                        ;
+                                        --*=* | -*=*)
+                                                _MP_EXTRACT_KEY([mp_arg_key], ["$mp_arg"])
+                                                _MP_LIST_CONTAINS([mp_sub_configure_keys], [mp_arg_key], [], [
+                                                        _MP_LIST_APPEND_QUOTED([mp_sub_configure_args], [mp_arg])
+                                                ])
+                                        ;
+                                        *)
+                                                # always pass positional arguments
+                                                _MP_LIST_APPEND_QUOTED([mp_sub_configure_args], [mp_arg])
+                                        ;
+                                esac
+                        done
+
+                        # Now prepend some arguments that should always be present unless
+                        # overriden, such as --prefix, --silent, --disable-option-checking,
+                        # --cache-file, --srcdir
+                        # Pass --prefix unless already given
+                        mp_arg_key=prefix
+                        _MP_LIST_CONTAINS([mp_sub_configure_args], [mp_arg_key], [], [
+                                mp_arg="--prefix=$prefix"
+                                _MP_LIST_PREPEND_QUOTED([mp_sub_configure_args], [mp_arg])
+                        ])
+
+                        # Pass --silent
+                        if test "$silent" = yes; then
+                                mp_arg="--silent"
+                                _MP_LIST_PREPEND_QUOTED([mp_sub_configure_args], [mp_arg])
+                        fi
+
+                        # Always prepend --disable-option-checking to silence warnings, since
+                        # different subdirs can have different --enable and --with options.
+                        mp_arg="--disable-option-checking"
+                        _MP_LIST_PREPEND_QUOTED([mp_sub_configure_args], [mp_arg])
+
+                        # Make the cache file name correct relative to the subdirectory.
+                        case $cache_file in
+                                [[\\/]]* | ?:[[\\/]]* )
+                                        mp_sub_cache_file=$cache_file
+                                ;
+                                *) # Relative name.
+                                        mp_sub_cache_file=$ac_top_build_prefix$cache_file
+                                ;
+                        esac
+                        mp_arg="--cache-file=$mp_sub_cache_file"
+                        _MP_LIST_PREPEND_QUOTED([mp_sub_configure_args], [mp_arg])
+
+                        mp_arg="--srcdir=$ac_srcdir"
+                        _MP_LIST_APPEND_QUOTED([mp_sub_configure_args], [mp_arg])
+
+                        AC_MSG_NOTICE([running $SHELL $ac_srcdir/configure $mp_sub_configure_args in $ac_dir])
+                        eval "\$SHELL \$ac_srcdir/configure $mp_sub_configure_args" || AC_MSG_ERROR([configure failed for $ac_dir])
+                else
+                        AC_MSG_ERROR([no configure script found in $ac_dir])
+                fi
+                AC_MSG_NOTICE([=== finished configuring in $ac_dir ($mp_popdir/$ac_dir)])
+        fi
+        cd "$mp_popdir"
+])
+
+
</ins><span class="cx"> #------------------------------------------------------------------------
</span><span class="cx"> # MP_CHECK_FRAMEWORK_COREFOUNDATION --
</span><span class="cx"> #
</span><span class="lines">@@ -309,18 +622,17 @@
</span><span class="cx">         dnl if with user specifies --with-no-root-privileges,
</span><span class="cx">         dnl use current user and group.
</span><span class="cx">         dnl use ~/Library/Tcl as Tcl package directory
</span><del>-                AC_REQUIRE([MP_PATH_MPCONFIGDIR])
</del><ins>+        AC_REQUIRE([MP_PATH_MPCONFIGDIR])
</ins><span class="cx">
</span><span class="cx">         AC_ARG_WITH(no-root-privileges, [AS_HELP_STRING([--with-no-root-privileges],[Specify that MacPorts should be installed in your home directory])], [ROOTPRIVS=$withval] )
</span><span class="cx">
</span><span class="cx">         if test "${ROOTPRIVS+set}" = set; then
</span><del>-
</del><span class="cx">                 # Set install-user to current user
</span><span class="cx">                 AC_MSG_CHECKING([for install user])
</span><span class="cx">                 DSTUSR=`id -un`
</span><span class="cx">                 AC_MSG_RESULT([$DSTUSR])
</span><span class="cx">                 AC_SUBST(DSTUSR)
</span><del>-                
</del><ins>+
</ins><span class="cx">                 # Set install-group to current user
</span><span class="cx">                 AC_MSG_CHECKING([for install group])
</span><span class="cx">                 DSTGRP=`id -gn`
</span><span class="lines">@@ -332,19 +644,6 @@
</span><span class="cx">                 RUNUSR=`id -un`
</span><span class="cx">                 AC_MSG_RESULT([$RUNUSR])
</span><span class="cx">                 AC_SUBST(RUNUSR)
</span><del>-
-                # Set Tcl package directory to ~/Library/Tcl
-         AC_MSG_CHECKING(for Tcl package directory)
-                ac_cv_c_tclpkgd=`eval echo ~$DSTUSR/Library/Tcl`
-         # Convert to a native path and substitute into the output files.
-         PACKAGE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclpkgd}`
-         TCL_PACKAGE_DIR=${PACKAGE_DIR_NATIVE}
-         AC_SUBST(TCL_PACKAGE_DIR)
-                if test x"${ac_cv_c_tclpkgd}" = x ; then
-                        AC_MSG_ERROR(Tcl package directory not found. Please specify its location with --with-tclpackage)
-         else
-                        AC_MSG_RESULT(${ac_cv_c_tclpkgd})
-         fi
</del><span class="cx">         fi
</span><span class="cx">
</span><span class="cx"> ])
</span><span class="lines">@@ -354,13 +653,13 @@
</span><span class="cx"> AC_DEFUN([MP_CHECK_RUNUSER],[
</span><span class="cx">         dnl if with user specifies --with-macports-user,
</span><span class="cx">         dnl use it. otherwise default to platform defaults
</span><del>- AC_REQUIRE([MP_PATH_MPCONFIGDIR])
</del><ins>+        AC_REQUIRE([MP_PATH_MPCONFIGDIR])
</ins><span class="cx">
</span><span class="cx">         AC_ARG_WITH(macports-user, [AS_HELP_STRING([--with-macports-user=USER],[Specify user to drop privileges to, if possible, during compiles etc.])], [ RUNUSR=$withval ] )
</span><span class="cx">         
</span><span class="cx">         AC_MSG_CHECKING([for macports user])
</span><span class="cx">         if test "x$RUNUSR" = "x" ; then
</span><del>-         RUNUSR=macports
</del><ins>+                RUNUSR=macports
</ins><span class="cx">         fi
</span><span class="cx">
</span><span class="cx">         AC_MSG_RESULT([$RUNUSR])
</span><span class="lines">@@ -373,13 +672,13 @@
</span><span class="cx"> AC_DEFUN([MP_SHARED_DIRECTORY],[
</span><span class="cx">         dnl if with user specifies --with-shared-directory,
</span><span class="cx">         dnl use 0775 permissions for ${prefix} directories
</span><del>- AC_REQUIRE([MP_PATH_MPCONFIGDIR])
</del><ins>+        AC_REQUIRE([MP_PATH_MPCONFIGDIR])
</ins><span class="cx">
</span><span class="cx">         AC_ARG_WITH(shared-directory, [AS_HELP_STRING([--with-shared-directory],[Use 0775 permissions for installed directories])], [ SHAREDIR=$withval ] )
</span><span class="cx">
</span><span class="cx">         if test "${SHAREDIR+set}" = set; then        
</span><span class="cx">                 AC_MSG_CHECKING([whether to share the install directory with all members of the install group])
</span><del>-         DSTMODE=0775
</del><ins>+                DSTMODE=0775
</ins><span class="cx">
</span><span class="cx">                 AC_MSG_RESULT([$DSTMODE])
</span><span class="cx">                 AC_SUBST(DSTMODE)
</span><span class="lines">@@ -391,13 +690,13 @@
</span><span class="cx"> AC_DEFUN([MP_CHECK_INSTALLUSER],[
</span><span class="cx">         dnl if with user specifies --with-install-user,
</span><span class="cx">         dnl use it. otherwise default to platform defaults
</span><del>- AC_REQUIRE([MP_PATH_MPCONFIGDIR])
</del><ins>+        AC_REQUIRE([MP_PATH_MPCONFIGDIR])
</ins><span class="cx">
</span><span class="cx">         AC_ARG_WITH(install-user, [AS_HELP_STRING([--with-install-user=USER],[Specify user ownership of installed files])], [ DSTUSR=$withval ] )
</span><span class="cx">         
</span><span class="cx">         AC_MSG_CHECKING([for install user])
</span><span class="cx">         if test "x$DSTUSR" = "x" ; then
</span><del>-         DSTUSR=root
</del><ins>+                DSTUSR=root
</ins><span class="cx">         fi
</span><span class="cx">
</span><span class="cx">         AC_MSG_RESULT([$DSTUSR])
</span><span class="lines">@@ -409,27 +708,26 @@
</span><span class="cx"> AC_DEFUN([MP_CHECK_INSTALLGROUP],[
</span><span class="cx">         dnl if with user specifies --with-install-group,
</span><span class="cx">         dnl use it. otherwise default to platform defaults
</span><del>- AC_REQUIRE([MP_CHECK_INSTALLUSER])
</del><ins>+        AC_REQUIRE([MP_CHECK_INSTALLUSER])
</ins><span class="cx">
</span><span class="cx">         AC_ARG_WITH(install-group, [AS_HELP_STRING([--with-install-group=GROUP],[Specify group ownership of installed files])], [ DSTGRP=$withval ] )
</span><span class="cx">
</span><span class="cx">         AC_MSG_CHECKING([for install group])
</span><span class="cx">         if test "x$DSTGRP" = "x" ; then
</span><del>-        
-         case $host_os in
-         darwin*)
-                DSTGRP="admin"
-                ;
-         freebsd*)
-                DSTGRP="wheel"
-                ;
-         linux*)
-                DSTGRP="root"
-                ;
-         *)
-                DSTGRP="wheel"
-                ;
-         esac
</del><ins>+                case $host_os in
+                        darwin*)
+                                DSTGRP="admin"
+                        ;
+                        freebsd*)
+                                DSTGRP="wheel"
+                        ;
+                        linux*)
+                                DSTGRP="root"
+                        ;
+                        *)
+                                DSTGRP="wheel"
+                        ;
+                esac
</ins><span class="cx">         fi
</span><span class="cx">
</span><span class="cx">         AC_MSG_RESULT([$DSTGRP])
</span><span class="lines">@@ -442,13 +740,13 @@
</span><span class="cx">         dnl if with user specifies --with-directory-mode,
</span><span class="cx">         dnl use the specified permissions for ${prefix} directories
</span><span class="cx">         dnl otherwise use 0755
</span><del>- AC_REQUIRE([MP_PATH_MPCONFIGDIR])
</del><ins>+        AC_REQUIRE([MP_PATH_MPCONFIGDIR])
</ins><span class="cx">
</span><span class="cx">         AC_ARG_WITH(directory-mode, [AS_HELP_STRING([--with-directory-mode=MODE],[Specify directory mode of installed directories])], [ DSTMODE=$withval ] )
</span><span class="cx">         
</span><span class="cx">         AC_MSG_CHECKING([what permissions to use for installation directories])
</span><span class="cx">         if test "x$DSTMODE" = "x" ; then
</span><del>-         DSTMODE=0755
</del><ins>+                DSTMODE=0755
</ins><span class="cx">         fi
</span><span class="cx">
</span><span class="cx">         AC_MSG_RESULT([$DSTMODE])
</span><span class="lines">@@ -458,87 +756,85 @@
</span><span class="cx"> # MP_PATH_APPLICATIONS
</span><span class="cx"> #---------------------------------------
</span><span class="cx"> AC_DEFUN([MP_PATH_APPLICATIONS],[
</span><del>- AC_REQUIRE([MP_CHECK_INSTALLUSER])
</del><ins>+        AC_REQUIRE([MP_CHECK_INSTALLUSER])
</ins><span class="cx">
</span><del>- AC_ARG_WITH(applications-dir,[AS_HELP_STRING([--with-applications-dir],[Applications installation directory.])], MPAPPLICATIONSDIR=${withval})
</del><ins>+        AC_ARG_WITH(applications-dir,[AS_HELP_STRING([--with-applications-dir],[Applications installation directory.])], MPAPPLICATIONSDIR=${withval})
</ins><span class="cx">
</span><del>- oldprefix=$prefix
- if test "x$prefix" = "xNONE" ; then
-        prefix=$ac_default_prefix
- fi
- AC_MSG_CHECKING([for Applications installation directory])
</del><ins>+        oldprefix=$prefix
+        if test "x$prefix" = "xNONE" ; then
+                prefix=$ac_default_prefix
+        fi
+        AC_MSG_CHECKING([for Applications installation directory])
</ins><span class="cx">
</span><span class="cx">         if test "x$MPAPPLICATIONSDIR" = "x" ; then
</span><del>-         if test "$DSTUSR" = "root" ; then
-                MPAPPLICATIONSDIR="/Applications/MacPorts"
-         else
-                MPAPPLICATIONSDIR="$(eval echo ~$DSTUSR)/Applications/MacPorts"
-         fi
</del><ins>+                if test "$DSTUSR" = "root" ; then
+                        MPAPPLICATIONSDIR="/Applications/MacPorts"
+                else
+                        MPAPPLICATIONSDIR="$(eval echo ~$DSTUSR)/Applications/MacPorts"
+                fi
</ins><span class="cx">         fi
</span><span class="cx">
</span><span class="cx">         AC_MSG_RESULT([$MPAPPLICATIONSDIR])
</span><del>- AC_SUBST(MPAPPLICATIONSDIR)
- prefix=$oldprefix
</del><ins>+        AC_SUBST(MPAPPLICATIONSDIR)
+        prefix=$oldprefix
</ins><span class="cx"> ])
</span><span class="cx">
</span><span class="cx"> # MP_PATH_FRAMEWORKS
</span><span class="cx"> #---------------------------------------
</span><span class="cx"> AC_DEFUN([MP_PATH_FRAMEWORKS],[
</span><del>- AC_REQUIRE([MP_CHECK_INSTALLUSER])
</del><ins>+        AC_REQUIRE([MP_CHECK_INSTALLUSER])
</ins><span class="cx">
</span><del>- AC_ARG_WITH(frameworks-dir,[AS_HELP_STRING([--with-frameworks-dir],[Frameworks installation directory.])], MPFRAMEWORKSDIR=${withval})
</del><ins>+        AC_ARG_WITH(frameworks-dir,[AS_HELP_STRING([--with-frameworks-dir],[Frameworks installation directory.])], MPFRAMEWORKSDIR=${withval})
</ins><span class="cx">
</span><del>- oldprefix=$prefix
- if test "x$prefix" = "xNONE" ; then
-        prefix=$ac_default_prefix
- fi
- AC_MSG_CHECKING([for Frameworks installation directory])
</del><ins>+        oldprefix=$prefix
+        if test "x$prefix" = "xNONE" ; then
+                prefix=$ac_default_prefix
+        fi
+        AC_MSG_CHECKING([for Frameworks installation directory])
</ins><span class="cx">
</span><span class="cx">         if test "x$MPFRAMEWORKSDIR" = "x" ; then
</span><span class="cx">                 MPFRAMEWORKSDIR="${prefix}/Library/Frameworks"
</span><span class="cx">         fi
</span><span class="cx">
</span><span class="cx">         AC_MSG_RESULT([$MPFRAMEWORKSDIR])
</span><del>- AC_SUBST(MPFRAMEWORKSDIR)
- prefix=$oldprefix
</del><ins>+        AC_SUBST(MPFRAMEWORKSDIR)
+        prefix=$oldprefix
</ins><span class="cx"> ])
</span><span class="cx">
</span><del>-
</del><span class="cx"> # MP_UNIVERSAL_OPTIONS
</span><span class="cx"> #---------------------------------------
</span><span class="cx"> AC_DEFUN([MP_UNIVERSAL_OPTIONS],[
</span><del>- AC_ARG_WITH(universal-archs,[AS_HELP_STRING([--with-universal-archs="CPU"],[Universal CPU architectures (space separated)])], UNIVERSAL_ARCHS=${withval})
</del><ins>+        AC_ARG_WITH(universal-archs,[AS_HELP_STRING([--with-universal-archs="CPU"],[Universal CPU architectures (space separated)])], UNIVERSAL_ARCHS=${withval})
</ins><span class="cx">
</span><del>- if test "x$UNIVERSAL_ARCHS" = "x"; then
- case "$MACOSX_VERSION" in
- 10.1[[0-9]]*)
- UNIVERSAL_ARCHS="x86_64 i386"
- ;;
- 10.[[0-5]]*)
- UNIVERSAL_ARCHS="i386 ppc"
- ;;
- *)
- UNIVERSAL_ARCHS="x86_64 i386"
- ;;
- esac
- fi
</del><ins>+        if test "x$UNIVERSAL_ARCHS" = "x"; then
+                case "$MACOSX_VERSION" in
+                        10.1[[0-9]]*)
+                                UNIVERSAL_ARCHS="x86_64 i386"
+                        ;
+                        10.[[0-5]]*)
+                                UNIVERSAL_ARCHS="i386 ppc"
+                        ;
+                        *)
+                                UNIVERSAL_ARCHS="x86_64 i386"
+                        ;
+                esac
+        fi
</ins><span class="cx">
</span><del>- UNIVERSAL_ARCHFLAGS=
- for arch in $UNIVERSAL_ARCHS; do
- UNIVERSAL_ARCHFLAGS="$UNIVERSAL_ARCHFLAGS -arch $arch"
- done
</del><ins>+        UNIVERSAL_ARCHFLAGS=
+        for arch in $UNIVERSAL_ARCHS; do
+                UNIVERSAL_ARCHFLAGS="$UNIVERSAL_ARCHFLAGS -arch $arch"
+        done
</ins><span class="cx">
</span><del>- AC_MSG_CHECKING([for Universal CPU architectures])
- AC_MSG_RESULT([$UNIVERSAL_ARCHS])
- AC_SUBST(UNIVERSAL_ARCHS)
- AC_SUBST(UNIVERSAL_ARCHFLAGS)
</del><ins>+        AC_MSG_CHECKING([for Universal CPU architectures])
+        AC_MSG_RESULT([$UNIVERSAL_ARCHS])
+        AC_SUBST(UNIVERSAL_ARCHS)
+        AC_SUBST(UNIVERSAL_ARCHFLAGS)
</ins><span class="cx"> ])
</span><span class="cx">
</span><span class="cx"> # MP_LIB_MD5
</span><span class="cx"> #---------------------------------------
</span><span class="cx"> # Check for an md5 implementation
</span><span class="cx"> AC_DEFUN([MP_LIB_MD5],[
</span><del>-
</del><span class="cx">         # Check for libmd from FreeBSD, which is preferred
</span><span class="cx">         AC_CHECK_LIB([md], [MD5File],[
</span><span class="cx">                 AC_CHECK_HEADERS([md5.h sha.h], ,[
</span><span class="lines">@@ -581,181 +877,24 @@
</span><span class="cx">         AC_REQUIRE([MP_CHECK_FRAMEWORK_IOKIT])
</span><span class="cx">         AC_REQUIRE([MP_CHECK_FUNCTION_CFNOTIFICATIONCENTERGETDARWINNOTIFYCENTER])
</span><span class="cx">         
</span><del>- AC_MSG_CHECKING(for whether we will build daemondo)
- result=no
</del><ins>+        AC_MSG_CHECKING(for whether we will build daemondo)
+        result=no
</ins><span class="cx">         case $host_os in
</span><del>-        darwin*)
-                if test "x$mp_cv_have_framework_corefoundation" == "xyes" &&
-                 test "x$mp_cv_have_framework_systemconfiguration" == "xyes" &&
-                 test "x$mp_cv_have_framework_iokit" == "xyes" &&
-                 test "x$mp_cv_have_function_cfnotificationcentergetdarwinnotifycenter" == "xyes"; then
-                        result=yes
-                        EXTRA_PROGS="$EXTRA_PROGS daemondo"
-                        AC_CONFIG_FILES([src/programs/daemondo/Makefile])
-                fi
</del><ins>+                darwin*)
+                        if test "x$mp_cv_have_framework_corefoundation" == "xyes" &&
+                         test "x$mp_cv_have_framework_systemconfiguration" == "xyes" &&
+                         test "x$mp_cv_have_framework_iokit" == "xyes" &&
+                         test "x$mp_cv_have_function_cfnotificationcentergetdarwinnotifycenter" == "xyes"; then
+                                result=yes
+                                EXTRA_PROGS="$EXTRA_PROGS daemondo"
+                                AC_CONFIG_FILES([src/programs/daemondo/Makefile])
+                        fi
</ins><span class="cx">                 ;
</span><del>-        *)
</del><ins>+                *)
</ins><span class="cx">         esac
</span><span class="cx">         AC_MSG_RESULT(${result})
</span><span class="cx"> ])
</span><span class="cx">
</span><del>-#------------------------------------------------------------------------
-# MP_TCL_PACKAGE_DIR --
-#
-#        Locate the correct directory for Tcl package installation
-#
-# Arguments:
-#        None.
-#
-# Requires:
-#        TCLVERSION must be set
-#        CYGPATH must be set
-#        TCLSH must be set
-#
-# Results:
-#
-#        Adds a --with-tclpackage switch to configure.
-#        Result is cached.
-#
-#        Substs the following vars:
-#                TCL_PACKAGE_DIR
-#------------------------------------------------------------------------
-
-AC_DEFUN(MP_TCL_PACKAGE_DIR, [
-        AC_REQUIRE([MP_CHECK_INSTALLUSER])
-
- AC_MSG_CHECKING(for Tcl package directory)
-
- AC_ARG_WITH(tclpackage, [ --with-tclpackage Tcl package installation directory.], with_tclpackagedir=${withval})
-
- if test x"${with_tclpackagedir}" != x ; then
-        ac_cv_c_tclpkgd=${with_tclpackagedir}
- else
-        AC_CACHE_VAL(ac_cv_c_tclpkgd, [
-         # Use the value from --with-tclpackage, if it was given
-
-         if test x"${with_tclpackagedir}" != x ; then
-                echo "tclpackagedir"
-                ac_cv_c_tclpkgd=${with_tclpackagedir}
-         else
-                # On darwin we can do some intelligent guessing
-                case $host_os in
-                 darwin*)
-                         tcl_autopath=`echo 'puts -nonewline \$auto_path' | $TCLSH`
-                        for path in $tcl_autopath; do
-                        if test "$DSTUSR" = "root" ; then
-                         if test "$path" = "/Library/Tcl"; then
-                                ac_cv_c_tclpkgd="$path"
-                                break
-                         fi
-                         if test "$path" = "/System/Library/Tcl"; then
-                                if test -d "$path"; then
-                                 ac_cv_c_tclpkgd="$path"
-                                 break
-                         fi
-                         fi
-                        elif test "$path" = "~/Library/Tcl"; then
-                         ac_cv_c_tclpkgd=`eval echo ~$DSTUSR/Library/Tcl`
-                         break
-                        fi
-                        done
-                 ;;
-                esac
-                 if test x"${ac_cv_c_tclpkgd}" = x ; then
-                 # Fudge a path from the first entry in the auto_path
-                 tcl_pkgpath=`echo 'puts -nonewline [[lindex \$auto_path 0]]' | $TCLSH`
-                 if test -d "$tcl_pkgpath"; then
-                        ac_cv_c_tclpkgd="$tcl_pkgpath"
-                 fi
-                 # If the first entry does not exist, do nothing
-                fi
-         fi
-        ])
- fi
-
- if test x"${ac_cv_c_tclpkgd}" = x ; then
-        AC_MSG_ERROR(Tcl package directory not found. Please specify its location with --with-tclpackage)
- else
-        AC_MSG_RESULT(${ac_cv_c_tclpkgd})
- fi
-
- # Convert to a native path and substitute into the output files.
-
- PACKAGE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclpkgd}`
-
- TCL_PACKAGE_DIR=${PACKAGE_DIR_NATIVE}
-
- AC_SUBST(TCL_PACKAGE_DIR)
-])
-
-# MP_PROG_TCLSH
-#---------------------------------------
-AC_DEFUN([MP_PROG_TCLSH],[
-
-
-        case $host_os in
-                freebsd*)
-                        # FreeBSD installs a dummy tclsh (annoying)
-                        # Look for a real versioned tclsh with threads first
-                        # Look for a real versioned tclsh without threads second
-                        AC_PATH_PROG([TCLSH], [tclsh${TCL_VERSION}-threads tclsh${TCL_VERSION} tclsh])
-                        ;
-                *)
-                        # Otherwise, look for a non-versioned tclsh
-                        AC_PATH_PROG([TCLSH], [tclsh tclsh${TCL_VERSION}])
-                        ;
-        esac
-        if test "x$TCLSH" = "x" ; then
-                AC_MSG_ERROR([Could not find tclsh])
-        fi
-
-        AC_SUBST(TCLSH)
-])
-
-# MP_TCL_PACKAGE
-#        Determine if a Tcl package is present.
-#
-# Arguments:
-#        Package name (may include the version)
-#
-# Syntax:
-# MP_TCL_PACKAGE (package, [action-if-found], [action-if-not-found])
-#
-# Requires:
-#        TCLSH must be set
-#
-# Results:
-#        Execute action-if-found or action-if-not-found
-#---------------------------------------
-AC_DEFUN([MP_TCL_PACKAGE],[
-        AC_MSG_CHECKING([for Tcl $1 package])
-        package_present=`echo 'if {[[catch {package require $1}]]} {puts -nonewline 0} else {puts -nonewline 1}' | $TCLSH`
-        AS_IF([test "$package_present" = "1"], [$2], [$3])[]
-])
-
-# MP_TCL_THREAD_SUPPORT
-#        Determine if thread support is available in tclsh.
-#
-# Arguments:
-#        None.
-#
-# Requires:
-#        TCLSH must be set
-#
-# Results:
-# Fails if thread support isn't available.
-#---------------------------------------
-AC_DEFUN([MP_TCL_THREAD_SUPPORT],[
-        AC_MSG_CHECKING([whether tclsh was compiled with threads])
-        tcl_threadenabled=`echo 'puts -nonewline [[info exists tcl_platform(threaded)]]' | $TCLSH`
-        if test "$tcl_threadenabled" = "1" ; then
-                AC_MSG_RESULT([yes])
-        else
-                AC_MSG_RESULT([no])
-                AC_MSG_ERROR([tcl wasn't compiled with threads enabled])
-        fi
-])
-
</del><span class="cx"> # MP_LIBCURL_FLAGS
</span><span class="cx"> #        Sets the flags to compile with libcurl.
</span><span class="cx"> #
</span><span class="lines">@@ -841,42 +980,14 @@
</span><span class="cx">                 LDFLAGS_SQLITE3="-L${sqlite3prefix}/lib -lsqlite3"
</span><span class="cx">         fi
</span><span class="cx">
</span><del>- # check if we have sqlite3ext.h, using the appropriate cppflags
- CPPFLAGS_OLD="${CPPFLAGS}"
- CPPFLAGS="${CPPFLAGS} ${CFLAGS_SQLITE3}"
- AC_CHECK_HEADERS(sqlite3ext.h)
- CPPFLAGS="${CPPFLAGS_OLD}"
</del><ins>+        # check if we have sqlite3ext.h, using the appropriate cppflags
+        CPPFLAGS_OLD="${CPPFLAGS}"
+        CPPFLAGS="${CPPFLAGS} ${CFLAGS_SQLITE3}"
+        AC_CHECK_HEADERS(sqlite3ext.h)
+        CPPFLAGS="${CPPFLAGS_OLD}"
</ins><span class="cx">
</span><span class="cx">         AC_SUBST(CFLAGS_SQLITE3)
</span><span class="cx">         AC_SUBST(LDFLAGS_SQLITE3)
</span><del>-
-        # now the sqlite Tcl bindings
-        AC_ARG_WITH(tcl-sqlite3,
-                AS_HELP_STRING([--with-tcl-sqlite3=DIR],
-                        [directory for Tcl sqlite3 (default /usr/lib/sqlite3)]),
-                [mp_sqlite3_dir=$withval])
-
- if test "x$mp_sqlite3_dir" = "x"; then
- case $host_os in
- darwin*)
- mp_sqlite3_dir="/usr/lib/sqlite3"
- ;;
- freebsd*)
- mp_sqlite3_dir="/usr/local/lib/sqlite"
- ;;
- *)
- mp_sqlite3_dir="/usr/share/tcl${TCL_VERSION}/sqlite3"
- ;;
- esac
- fi
-
-        AC_CACHE_CHECK([for Tcl sqlite3 location], [mp_cv_sqlite3_dir],
-                [mp_cv_sqlite3_dir=
-                test -r "${mp_sqlite3_dir}/pkgIndex.tcl" && mp_cv_sqlite3_dir=$mp_sqlite3_dir
-                ])
-
-        SQLITE3_TCL_DIR=$mp_cv_sqlite3_dir
-        AC_SUBST(SQLITE3_TCL_DIR)
</del><span class="cx"> ])
</span><span class="cx">
</span><span class="cx"> dnl This macro tests if the compiler supports GCC's
</span><span class="lines">@@ -892,6 +1003,90 @@
</span><span class="cx">         
</span><span class="cx"> ])
</span><span class="cx">
</span><ins>+dnl This macro ensures MP installation prefix paths are NOT in CFLAGS,
+dnl CPPFLAGS, OBJCFLAGS, LDFLAGS for configure to prevent potential problems
+dnl when base/ code is updated and ports are installed that would match needed
+dnl items.
+AC_DEFUN([MP_FLAGS_SCAN],[
+        AC_ARG_ENABLE(
+                [flag-sanitization],
+                AS_HELP_STRING([--disable-flag-sanitization], [Do not sanitize CPPFLAGS, CFLAGS, OBJCFLAGS and LDFLAGS]),
+                [disable_mp_flags_scan=yes],
+                [disable_mp_flags_scan=no])
+
+        if test x"$disable_mp_flags_scan" != "xyes"; then
+                # Get a value for $prefix
+                oldprefix=$prefix
+                if test "x$prefix" = "xNONE" ; then
+                        prefix=$ac_default_prefix
+                fi
+
+                mp_flags_scan_found=
+
+                # Clean CFLAGS CPPFLAGS OBJCFLAGS and LDFLAGS
+                for mp_flags_flagname in CFLAGS CPPFLAGS OBJCFLAGS LDFLAGS; do
+                        mp_flags_scan_flag_cleaned=
+                        eval "set x \$$mp_flags_flagname"
+                        shift
+                        for mp_flags_scan_val; do
+                                case "$mp_flags_scan_val" in
+                                        -I$prefix/* | -L$prefix/*)
+                                                AC_MSG_NOTICE([Removing `$mp_flags_scan_val' from \$$mp_flags_flagname because it might cause a self-dependency])
+                                                mp_flags_scan_found=1
+                                                ; #(
+                                        *)
+                                                if test -z "$mp_flags_scan_flag_cleaned"; then
+                                                        mp_flags_scan_flag_cleaned=$mp_flags_scan_val
+                                                else
+                                                        AS_VAR_APPEND([mp_flags_scan_flag_cleaned], [" $mp_flags_scan_val"])
+                                                fi
+                                                ;
+                                esac
+                        done
+                        if test -z "$mp_flags_scan_flag_cleaned"; then
+                                (unset $mp_flags_flagname) >/dev/null 2>&1 && unset $mp_flags_flagname
+                                (export -n $mp_flags_flagname) >/dev/null 2>&1 && export -n $mp_flags_flagname
+                        else
+                                eval "$mp_flags_flagname=\"$mp_flags_scan_flag_cleaned\""
+                                export $mp_flags_flagname
+                        fi
+                        eval "ac_env_${mp_flags_flagname}_set=\${${mp_flags_flagname}+set}"
+                        eval "ac_env_${mp_flags_flagname}_value=\${${mp_flags_flagname}}"
+                        eval "ac_cv_env_${mp_flags_flagname}_set=\${${mp_flags_flagname}+set}"
+                        eval "ac_cv_env_${mp_flags_flagname}_value=\${${mp_flags_flagname}}"
+                done
+
+                # Since those are all precious variables they have been saved into config.cache and put into $ac_configure_args
+                # We need to remove them at least from $ac_configure_args, because that's being passed to sub-configures
+                eval "set x $ac_configure_args"
+                shift
+                ac_configure_args=
+                for mp_flags_configure_arg; do
+                        case "$mp_flags_configure_arg" in
+                                CFLAGS=* | CPPFLAGS=* | OBJCFLAGS=* | LDFLAGS=*)
+                                        mp_flags_configure_arg_key=$(AS_ECHO(["$mp_flags_configure_arg"]) | sed -E 's/^([[^=]]+)=.*$/\1/')
+                                        eval "mp_flags_configure_arg_newval=\$$mp_flags_configure_arg_key"
+                                        if test -n "$mp_flags_configure_arg_newval"; then
+                                                AS_VAR_APPEND([ac_configure_args], [" '$mp_flags_configure_arg_key=$mp_flags_configure_arg_newval'"])
+                                        fi
+                                        ;
+                                *)
+                                        AS_VAR_APPEND([ac_configure_args], [" '$mp_flags_configure_arg'"])
+                                        ;
+                        esac
+                done
+
+                if ! test -z "$mp_flags_scan_found"; then
+                        AC_MSG_NOTICE([See https://trac.macports.org/ticket/42756 for rationale on why this script is removing these values])
+                        AC_MSG_NOTICE([Pass --disable-flag-sanitization if you're aware of the potential problems and want to risk them anyway])
+                fi
+
+                # Restore $prefix
+                prefix=$oldprefix
+        fi
+])
+
+
</ins><span class="cx"> dnl This macro ensures MP installation prefix paths are NOT in PATH
</span><span class="cx"> dnl for configure to prevent potential problems when base/ code is updated
</span><span class="cx"> dnl and ports are installed that would match needed items.
</span><span class="lines">@@ -1151,7 +1346,7 @@
</span><span class="cx"> ])
</span><span class="cx">
</span><span class="cx"> #------------------------------------------------------------------------
</span><del>-# MP_TCL_PLATFORM --
</del><ins>+# MP_PLATFORM --
</ins><span class="cx"> #
</span><span class="cx"> # Export target platform and major version
</span><span class="cx"> #
</span><span class="lines">@@ -1159,7 +1354,7 @@
</span><span class="cx"> # none.
</span><span class="cx"> #
</span><span class="cx"> # Requires:
</span><del>-# TCLSH must be set.
</del><ins>+# none.
</ins><span class="cx"> #
</span><span class="cx"> # Depends:
</span><span class="cx"> # none.
</span><span class="lines">@@ -1168,10 +1363,10 @@
</span><span class="cx"> # Defines OS_PLATFORM and OS_MAJOR.
</span><span class="cx"> #
</span><span class="cx"> #------------------------------------------------------------------------
</span><del>-AC_DEFUN([MP_TCL_PLATFORM],[
- AC_MSG_CHECKING([for Tcl target platform])
- OS_PLATFORM=`echo 'puts -nonewline [[string tolower \$tcl_platform(os)]]' | $TCLSH`
- OS_MAJOR=`echo 'puts -nonewline [[lindex [split \$tcl_platform(osVersion) .] 0]]' | $TCLSH`
</del><ins>+AC_DEFUN([MP_PLATFORM],[
+ AC_MSG_CHECKING([for target platform])
+ OS_PLATFORM=`uname -s | tr '[[:upper:]]' '[[:lower:]]'`
+                OS_MAJOR=`uname -r | cut -d '.' -f 1`
</ins><span class="cx"> AC_MSG_RESULT($OS_PLATFORM $OS_MAJOR)
</span><span class="cx"> AC_SUBST(OS_PLATFORM)
</span><span class="cx"> AC_SUBST(OS_MAJOR)
</span><span class="lines">@@ -1186,7 +1381,7 @@
</span><span class="cx"> # none.
</span><span class="cx"> #
</span><span class="cx"> # Requires:
</span><del>-# OS_PLATOFRM and OS_MAJOR from MP_TCL_PLATFORM.
</del><ins>+# OS_PLATOFRM and OS_MAJOR from MP_PLATFORM.
</ins><span class="cx"> #
</span><span class="cx"> # Depends:
</span><span class="cx"> # none.
</span><span class="lines">@@ -1197,7 +1392,7 @@
</span><span class="cx"> #
</span><span class="cx"> #------------------------------------------------------------------------
</span><span class="cx"> AC_DEFUN([MP_TRACEMODE_SUPPORT],[
</span><del>-                AC_REQUIRE([MP_TCL_PLATFORM])
</del><ins>+                AC_REQUIRE([MP_PLATFORM])
</ins><span class="cx">
</span><span class="cx">                 AC_CHECK_FUNCS([kqueue kevent])
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembaseconfigRELEASE_URL"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/config/RELEASE_URL (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/config/RELEASE_URL        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/config/RELEASE_URL        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1 +1 @@
</span><del>-https://svn.macports.org/repository/macports/tags/release_2_2_1/base
</del><ins>+https://svn.macports.org/repository/macports/tags/release_2_3_1/base
</ins></span></pre></div>
<a id="branchesnewhelpsystembaseconfigmacports_version"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/config/macports_version (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/config/macports_version        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/config/macports_version        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1 +1 @@
</span><del>-2.2.99
</del><ins>+2.3.99
</ins></span></pre></div>
<a id="branchesnewhelpsystembaseconfigure"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/configure (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/configure        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/configure        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> #! /bin/sh
</span><span class="cx"> # Guess values for system-dependent variables and create Makefiles.
</span><del>-# Generated by GNU Autoconf 2.69 for MacPorts 2.2.99.
</del><ins>+# Generated by GNU Autoconf 2.69 for MacPorts 2.3.99.
</ins><span class="cx"> #
</span><span class="cx"> # Report bugs to <macports-dev@lists.macosforge.org>.
</span><span class="cx"> #
</span><span class="lines">@@ -580,8 +580,8 @@
</span><span class="cx"> # Identity of this package.
</span><span class="cx"> PACKAGE_NAME='MacPorts'
</span><span class="cx"> PACKAGE_TARNAME='macports'
</span><del>-PACKAGE_VERSION='2.2.99'
-PACKAGE_STRING='MacPorts 2.2.99'
</del><ins>+PACKAGE_VERSION='2.3.99'
+PACKAGE_STRING='MacPorts 2.3.99'
</ins><span class="cx"> PACKAGE_BUGREPORT='macports-dev@lists.macosforge.org'
</span><span class="cx"> PACKAGE_URL=''
</span><span class="cx">
</span><span class="lines">@@ -623,25 +623,39 @@
</span><span class="cx"> #endif"
</span><span class="cx">
</span><span class="cx"> ac_default_prefix=/opt/local
</span><del>-enable_option_checking=no
</del><span class="cx"> ac_subst_vars='LTLIBOBJS
</span><span class="cx"> LIBOBJS
</span><del>-macports_tcl_dir
</del><ins>+INCLUDES
+INTREE_TCLSH
+TCLSH
+TCL_PACKAGE_PATH
+TCL_PREFIX
+SHLIB_SUFFIX
+SHLIB_CFLAGS
+STLIB_LD
+SHLIB_LD
+TCL_STUB_LIB_SPEC
+TCL_STUB_LIB_FLAG
+TCL_STUB_LIB_FILE
+TCL_LIB_SPEC
+TCL_LIB_FLAG
+TCL_LIB_FILE
+TCL_SRC_DIR
+TCL_BIN_DIR
+TCL_VERSION
+VENDOR_TCLLIB_INSTALL
+VENDOR_TCLLIB_SUBDIR
+VENDOR_TCLX_INSTALL
+VENDOR_TCLX_SUBDIR
+VENDOR_TCLTHREAD_INSTALL
+VENDOR_TCLTHREAD_SUBDIR
+VENDOR_DESTROOT
+VENDOR_TCL_INSTALL
+VENDOR_TCL_SUBDIR
</ins><span class="cx"> localstatedir_expanded
</span><span class="cx"> MPCONFIGDIR_EXPANDED
</span><span class="cx"> prefix_expanded
</span><del>-OUR_INCLUDED_PACKAGES
-TCL_CC
-TCL_DEFS
-SHLIB_SUFFIX
-SHLIB_LDFLAGS
-SHLIB_CFLAGS
-SHLIB_LD
-STLIB_LD
-INCLUDES
-subdirs
</del><span class="cx"> TRACEMODE_SUPPORT
</span><del>-SQLITE3_TCL_DIR
</del><span class="cx"> LDFLAGS_SQLITE3
</span><span class="cx"> CFLAGS_SQLITE3
</span><span class="cx"> PKG_CONFIG
</span><span class="lines">@@ -650,17 +664,6 @@
</span><span class="cx"> CURL_CONFIG
</span><span class="cx"> OS_MAJOR
</span><span class="cx"> OS_PLATFORM
</span><del>-TCLSH
-TCL_INCLUDES
-TCL_STUB_LIB_SPEC
-TCL_STUB_LIB_FLAG
-TCL_STUB_LIB_FILE
-TCL_LIB_SPEC
-TCL_LIB_FLAG
-TCL_LIB_FILE
-TCL_SRC_DIR
-TCL_BIN_DIR
-TCL_VERSION
</del><span class="cx"> READLINE_LIBS
</span><span class="cx"> MD5_LIBS
</span><span class="cx"> READLINK_IS_NOT_P1003_1A
</span><span class="lines">@@ -671,7 +674,6 @@
</span><span class="cx"> MPFRAMEWORKSDIR
</span><span class="cx"> MPAPPLICATIONSDIR
</span><span class="cx"> DSTMODE
</span><del>-TCL_PACKAGE_DIR
</del><span class="cx"> RUNUSR
</span><span class="cx"> DSTGRP
</span><span class="cx"> DSTUSR
</span><span class="lines">@@ -824,6 +826,24 @@
</span><span class="cx"> ac_subst_files=''
</span><span class="cx"> ac_user_opts='
</span><span class="cx"> enable_option_checking
</span><ins>+enable_flag_sanitization
+with_bsdmake
+with_bzip2
+with_cvs
+with_gnumake
+with_gnutar
+with_lzma
+with_make
+with_mtree
+with_open
+with_openssl
+with_rsync
+with_sed
+with_svn
+with_swig
+with_tar
+with_xar
+with_xz
</ins><span class="cx"> enable_werror
</span><span class="cx"> with_objc_runtime
</span><span class="cx"> with_objc_foundation
</span><span class="lines">@@ -839,13 +859,8 @@
</span><span class="cx"> with_frameworks_dir
</span><span class="cx"> with_universal_archs
</span><span class="cx"> enable_readline
</span><del>-with_tcl
-with_tclinclude
-with_tclpackage
</del><span class="cx"> with_curlprefix
</span><span class="cx"> with_sqlite3prefix
</span><del>-with_tcl_sqlite3
-with_included_tclthread
</del><span class="cx"> enable_shared
</span><span class="cx"> '
</span><span class="cx"> ac_precious_vars='build_alias
</span><span class="lines">@@ -858,28 +873,10 @@
</span><span class="cx"> CPPFLAGS
</span><span class="cx"> OBJC
</span><span class="cx"> OBJCFLAGS
</span><del>-BSDMAKE
-BZIP2
-CVS
-GNUMAKE
-GNUTAR
-LZMA
-MAKE
-MAN
-MTREE
-OPEN
-OPENSSL
-RSYNC
-SED
-SVN
-SWIG
-TAR
-XAR
-XZ
</del><span class="cx"> OBJCPP
</span><span class="cx"> CPP'
</span><del>-ac_subdirs_all='src/thread2.6'
</del><span class="cx">
</span><ins>+
</ins><span class="cx"> # Initialize some variables set by options.
</span><span class="cx"> ac_init_help=
</span><span class="cx"> ac_init_version=false
</span><span class="lines">@@ -1418,7 +1415,7 @@
</span><span class="cx"> # Omit some internal or obsolete options to make the list less imposing.
</span><span class="cx"> # This message is too long to be a string in the A/UX 3.1 sh.
</span><span class="cx"> cat <<_ACEOF
</span><del>-\`configure' configures MacPorts 2.2.99 to adapt to many kinds of systems.
</del><ins>+\`configure' configures MacPorts 2.3.99 to adapt to many kinds of systems.
</ins><span class="cx">
</span><span class="cx"> Usage: $0 [OPTION]... [VAR=VALUE]...
</span><span class="cx">
</span><span class="lines">@@ -1484,7 +1481,7 @@
</span><span class="cx">
</span><span class="cx"> if test -n "$ac_init_help"; then
</span><span class="cx"> case $ac_init_help in
</span><del>- short | recursive ) echo "Configuration of MacPorts 2.2.99:";;
</del><ins>+ short | recursive ) echo "Configuration of MacPorts 2.3.99:";;
</ins><span class="cx"> esac
</span><span class="cx"> cat <<\_ACEOF
</span><span class="cx">
</span><span class="lines">@@ -1492,6 +1489,9 @@
</span><span class="cx"> --disable-option-checking ignore unrecognized --enable/--with options
</span><span class="cx"> --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
</span><span class="cx"> --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
</span><ins>+ --disable-flag-sanitization
+ Do not sanitize CPPFLAGS, CFLAGS, OBJCFLAGS and
+ LDFLAGS
</ins><span class="cx"> --enable-werror Add -Werror to CFLAGS. Used for development.
</span><span class="cx"> --enable-readline Enable addition of readline support, if readline
</span><span class="cx"> present.
</span><span class="lines">@@ -1500,6 +1500,23 @@
</span><span class="cx"> Optional Packages:
</span><span class="cx"> --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
</span><span class="cx"> --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
</span><ins>+ --with-bsdmake=PATH Path to alternate bsdmake/pmake command
+ --with-bzip2=PATH Path to alternate bzip2 command
+ --with-cvs=PATH Path to alternate cvs command
+ --with-gnumake=PATH Path to alternate gnumake command
+ --with-gnutar=PATH Path to alternate gnutar command
+ --with-lzma=PATH Path to alternate lzma command
+ --with-make=PATH Path to alternate make command
+ --with-mtree=PATH Path to alternate mtree command
+ --with-open=PATH Path to alternate open command
+ --with-openssl=PATH Path to alternate openssl command
+ --with-rsync=PATH Path to alternate rsync command
+ --with-sed=PATH Path to alternate sed command
+ --with-svn=PATH Path to alternate svn command
+ --with-swig=PATH Path to alternate swig command
+ --with-tar=PATH Path to alternate tar command
+ --with-xar=PATH Path to alternate xar command
+ --with-xz=PATH Path to alternate xz command
</ins><span class="cx"> --with-objc-runtime Specify either "GNU" or "apple"
</span><span class="cx"> --with-objc-foundation Specify either "GNUstep" or "apple"
</span><span class="cx"> --with-unsupported-prefix
</span><span class="lines">@@ -1523,14 +1540,8 @@
</span><span class="cx"> --with-frameworks-dir Frameworks installation directory.
</span><span class="cx"> --with-universal-archs="CPU"
</span><span class="cx"> Universal CPU architectures (space separated)
</span><del>- --with-tcl directory containing tcl configuration (tclConfig.sh)
- --with-tclinclude directory containing the public Tcl header files.
- --with-tclpackage Tcl package installation directory.
</del><span class="cx"> --with-curlprefix base directory for the cURL install '/usr', '/usr/local',...
</span><span class="cx"> --with-sqlite3prefix base directory for the sqlite3 install '/usr', '/usr/local',...
</span><del>- --with-tcl-sqlite3=DIR directory for Tcl sqlite3 (default /usr/lib/sqlite3)
- --with-included-tclthread
- install included Thread package.
</del><span class="cx">
</span><span class="cx"> Some influential environment variables:
</span><span class="cx"> CC C compiler command
</span><span class="lines">@@ -1542,24 +1553,6 @@
</span><span class="cx"> you have headers in a nonstandard directory <include dir>
</span><span class="cx"> OBJC Objective C compiler command
</span><span class="cx"> OBJCFLAGS Objective C compiler flags
</span><del>- BSDMAKE path to bsdmake/pmake command
- BZIP2 path to bzip2 command
- CVS path to cvs command
- GNUMAKE path to gnumake command
- GNUTAR path to gnutar command
- LZMA path to lzma command
- MAKE path to make command
- MAN path to man command
- MTREE path to mtree command
- OPEN path to open command
- OPENSSL path to openssl command
- RSYNC path to rsync command
- SED path to sed command
- SVN path to svn command
- SWIG path to swig command
- TAR path to tar command
- XAR path to xar command
- XZ path to xz command
</del><span class="cx"> OBJCPP Objective C preprocessor
</span><span class="cx"> CPP C preprocessor
</span><span class="cx">
</span><span class="lines">@@ -1629,7 +1622,7 @@
</span><span class="cx"> test -n "$ac_init_help" && exit $ac_status
</span><span class="cx"> if $ac_init_version; then
</span><span class="cx"> cat <<\_ACEOF
</span><del>-MacPorts configure 2.2.99
</del><ins>+MacPorts configure 2.3.99
</ins><span class="cx"> generated by GNU Autoconf 2.69
</span><span class="cx">
</span><span class="cx"> Copyright (C) 2012 Free Software Foundation, Inc.
</span><span class="lines">@@ -2298,7 +2291,7 @@
</span><span class="cx"> This file contains any messages produced by compilers while
</span><span class="cx"> running configure, to aid debugging if configure makes a mistake.
</span><span class="cx">
</span><del>-It was created by MacPorts $as_me 2.2.99, which was
</del><ins>+It was created by MacPorts $as_me 2.3.99, which was
</ins><span class="cx"> generated by GNU Autoconf 2.69. Invocation command line was
</span><span class="cx">
</span><span class="cx"> $ $0 $@
</span><span class="lines">@@ -2793,7 +2786,7 @@
</span><span class="cx"> # Read in the MacPorts version from the base/config/macports_version file
</span><span class="cx"> { $as_echo "$as_me:${as_lineno-$LINENO}: checking MacPorts version" >&5
</span><span class="cx"> $as_echo_n "checking MacPorts version... " >&6; }
</span><del>-MACPORTS_VERSION=2.2.99
</del><ins>+MACPORTS_VERSION=2.3.99
</ins><span class="cx"> { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACPORTS_VERSION" >&5
</span><span class="cx"> $as_echo "$MACPORTS_VERSION" >&6; }
</span><span class="cx">
</span><span class="lines">@@ -2828,6 +2821,89 @@
</span><span class="cx">         prefix=$oldprefix
</span><span class="cx">
</span><span class="cx">
</span><ins>+        # Check whether --enable-flag-sanitization was given.
+if test "${enable_flag_sanitization+set}" = set; then :
+ enableval=$enable_flag_sanitization; disable_mp_flags_scan=yes
+else
+ disable_mp_flags_scan=no
+fi
+
+
+        if test x"$disable_mp_flags_scan" != "xyes"; then
+                # Get a value for $prefix
+                oldprefix=$prefix
+                if test "x$prefix" = "xNONE" ; then
+                        prefix=$ac_default_prefix
+                fi
+
+                mp_flags_scan_found=
+
+                # Clean CFLAGS CPPFLAGS OBJCFLAGS and LDFLAGS
+                for mp_flags_flagname in CFLAGS CPPFLAGS OBJCFLAGS LDFLAGS; do
+                        mp_flags_scan_flag_cleaned=
+                        eval "set x \$$mp_flags_flagname"
+                        shift
+                        for mp_flags_scan_val; do
+                                case "$mp_flags_scan_val" in
+                                        -I$prefix/* | -L$prefix/*)
+                                                { $as_echo "$as_me:${as_lineno-$LINENO}: Removing \`$mp_flags_scan_val' from \$$mp_flags_flagname because it might cause a self-dependency" >&5
+$as_echo "$as_me: Removing \`$mp_flags_scan_val' from \$$mp_flags_flagname because it might cause a self-dependency" >&6;}
+                                                mp_flags_scan_found=1
+                                                ; #(
+                                        *)
+                                                if test -z "$mp_flags_scan_flag_cleaned"; then
+                                                        mp_flags_scan_flag_cleaned=$mp_flags_scan_val
+                                                else
+                                                        as_fn_append mp_flags_scan_flag_cleaned " $mp_flags_scan_val"
+                                                fi
+                                                ;
+                                esac
+                        done
+                        if test -z "$mp_flags_scan_flag_cleaned"; then
+                                (unset $mp_flags_flagname) >/dev/null 2>&1 && unset $mp_flags_flagname
+                                (export -n $mp_flags_flagname) >/dev/null 2>&1 && export -n $mp_flags_flagname
+                        else
+                                eval "$mp_flags_flagname=\"$mp_flags_scan_flag_cleaned\""
+                                export $mp_flags_flagname
+                        fi
+                        eval "ac_env_${mp_flags_flagname}_set=\${${mp_flags_flagname}+set}"
+                        eval "ac_env_${mp_flags_flagname}_value=\${${mp_flags_flagname}}"
+                        eval "ac_cv_env_${mp_flags_flagname}_set=\${${mp_flags_flagname}+set}"
+                        eval "ac_cv_env_${mp_flags_flagname}_value=\${${mp_flags_flagname}}"
+                done
+
+                # Since those are all precious variables they have been saved into config.cache and put into $ac_configure_args
+                # We need to remove them at least from $ac_configure_args, because that's being passed to sub-configures
+                eval "set x $ac_configure_args"
+                shift
+                ac_configure_args=
+                for mp_flags_configure_arg; do
+                        case "$mp_flags_configure_arg" in
+                                CFLAGS=* | CPPFLAGS=* | OBJCFLAGS=* | LDFLAGS=*)
+                                        mp_flags_configure_arg_key=$($as_echo "$mp_flags_configure_arg" | sed -E 's/^([^=]+)=.*$/\1/')
+                                        eval "mp_flags_configure_arg_newval=\$$mp_flags_configure_arg_key"
+                                        if test -n "$mp_flags_configure_arg_newval"; then
+                                                as_fn_append ac_configure_args " '$mp_flags_configure_arg_key=$mp_flags_configure_arg_newval'"
+                                        fi
+                                        ;
+                                *)
+                                        as_fn_append ac_configure_args " '$mp_flags_configure_arg'"
+                                        ;
+                        esac
+                done
+
+                if ! test -z "$mp_flags_scan_found"; then
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: See https://trac.macports.org/ticket/42756 for rationale on why this script is removing these values" >&5
+$as_echo "$as_me: See https://trac.macports.org/ticket/42756 for rationale on why this script is removing these values" >&6;}
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: Pass --disable-flag-sanitization if you're aware of the potential problems and want to risk them anyway" >&5
+$as_echo "$as_me: Pass --disable-flag-sanitization if you're aware of the potential problems and want to risk them anyway" >&6;}
+                fi
+
+                # Restore $prefix
+                prefix=$oldprefix
+        fi
+
+
</ins><span class="cx"> # Extract the first word of "sw_vers", so it can be a program name with args.
</span><span class="cx"> set dummy sw_vers; ac_word=$2
</span><span class="cx"> { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
</span><span class="lines">@@ -4016,6 +4092,111 @@
</span><span class="cx"> ac_compiler_gnu=$ac_cv_c_compiler_gnu
</span><span class="cx">
</span><span class="cx">
</span><ins>+# Check for user-supplied paths before searching
+
+# Check whether --with-bsdmake was given.
+if test "${with_bsdmake+set}" = set; then :
+ withval=$with_bsdmake; BSDMAKE=$withval
+fi
+
+
+# Check whether --with-bzip2 was given.
+if test "${with_bzip2+set}" = set; then :
+ withval=$with_bzip2; BZIP2=$withval
+fi
+
+
+# Check whether --with-cvs was given.
+if test "${with_cvs+set}" = set; then :
+ withval=$with_cvs; CVS=$withval
+fi
+
+
+# Check whether --with-gnumake was given.
+if test "${with_gnumake+set}" = set; then :
+ withval=$with_gnumake; GNUMAKE=$withval
+fi
+
+
+# Check whether --with-gnutar was given.
+if test "${with_gnutar+set}" = set; then :
+ withval=$with_gnutar; GNUTAR=$withval
+fi
+
+
+# Check whether --with-lzma was given.
+if test "${with_lzma+set}" = set; then :
+ withval=$with_lzma; LZMA=$withval
+fi
+
+
+# Check whether --with-make was given.
+if test "${with_make+set}" = set; then :
+ withval=$with_make; MAKE=$withval
+fi
+
+
+# Check whether --with-mtree was given.
+if test "${with_mtree+set}" = set; then :
+ withval=$with_mtree; MTREE=$withval
+fi
+
+
+# Check whether --with-open was given.
+if test "${with_open+set}" = set; then :
+ withval=$with_open; OPEN=$withval
+fi
+
+
+# Check whether --with-openssl was given.
+if test "${with_openssl+set}" = set; then :
+ withval=$with_openssl; OPENSSL=$withval
+fi
+
+
+# Check whether --with-rsync was given.
+if test "${with_rsync+set}" = set; then :
+ withval=$with_rsync; RSYNC=$withval
+fi
+
+
+# Check whether --with-sed was given.
+if test "${with_sed+set}" = set; then :
+ withval=$with_sed; SED=$withval
+fi
+
+
+# Check whether --with-svn was given.
+if test "${with_svn+set}" = set; then :
+ withval=$with_svn; SVN=$withval
+fi
+
+
+# Check whether --with-swig was given.
+if test "${with_swig+set}" = set; then :
+ withval=$with_swig; SWIG=$withval
+fi
+
+
+# Check whether --with-tar was given.
+if test "${with_tar+set}" = set; then :
+ withval=$with_tar; TAR=$withval
+fi
+
+
+# Check whether --with-xar was given.
+if test "${with_xar+set}" = set; then :
+ withval=$with_xar; XAR=$withval
+fi
+
+
+# Check whether --with-xz was given.
+if test "${with_xz+set}" = set; then :
+ withval=$with_xz; XZ=$withval
+fi
+
+
+# Search for tool paths. Any set above (via --with-pkg=PATH) will be retained
</ins><span class="cx"> for ac_prog in bsdmake pmake
</span><span class="cx"> do
</span><span class="cx"> # Extract the first word of "$ac_prog", so it can be a program name with args.
</span><span class="lines">@@ -4395,7 +4576,8 @@
</span><span class="cx"> ;;
</span><span class="cx"> *)
</span><span class="cx"> as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
</span><del>-for as_dir in $PATH
</del><ins>+as_dummy="$PATH:/usr/sbin"
+for as_dir in $as_dummy
</ins><span class="cx"> do
</span><span class="cx"> IFS=$as_save_IFS
</span><span class="cx"> test -z "$as_dir" && as_dir=.
</span><span class="lines">@@ -4557,8 +4739,7 @@
</span><span class="cx"> ;;
</span><span class="cx"> *)
</span><span class="cx"> as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
</span><del>-as_dummy="$PATH:/usr/local/bin"
-for as_dir in $as_dummy
</del><ins>+for as_dir in $PATH
</ins><span class="cx"> do
</span><span class="cx"> IFS=$as_save_IFS
</span><span class="cx"> test -z "$as_dir" && as_dir=.
</span><span class="lines">@@ -4603,8 +4784,7 @@
</span><span class="cx"> ;;
</span><span class="cx"> *)
</span><span class="cx"> as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
</span><del>-as_dummy="$PATH:/usr/local/bin"
-for as_dir in $as_dummy
</del><ins>+for as_dir in $PATH
</ins><span class="cx"> do
</span><span class="cx"> IFS=$as_save_IFS
</span><span class="cx"> test -z "$as_dir" && as_dir=.
</span><span class="lines">@@ -4649,8 +4829,7 @@
</span><span class="cx"> ;;
</span><span class="cx"> *)
</span><span class="cx"> as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
</span><del>-as_dummy="$PATH:/usr/local/bin"
-for as_dir in $as_dummy
</del><ins>+for as_dir in $PATH
</ins><span class="cx"> do
</span><span class="cx"> IFS=$as_save_IFS
</span><span class="cx"> test -z "$as_dir" && as_dir=.
</span><span class="lines">@@ -5160,8 +5339,10 @@
</span><span class="cx"> fi
</span><span class="cx">
</span><span class="cx">
</span><del>-# Extract the first word of "mtree", so it can be a program name with args.
-set dummy mtree; ac_word=$2
</del><ins>+for ac_prog in mtree fmtree
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
</ins><span class="cx"> { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
</span><span class="cx"> $as_echo_n "checking for $ac_word... " >&6; }
</span><span class="cx"> if ${ac_cv_path_MTREE+:} false; then :
</span><span class="lines">@@ -5201,6 +5382,9 @@
</span><span class="cx"> fi
</span><span class="cx">
</span><span class="cx">
</span><ins>+ test -n "$MTREE" && break
+done
+
</ins><span class="cx"> # Extract the first word of "open", so it can be a program name with args.
</span><span class="cx"> set dummy open; ac_word=$2
</span><span class="cx"> { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
</span><span class="lines">@@ -5574,8 +5758,7 @@
</span><span class="cx"> ;;
</span><span class="cx"> *)
</span><span class="cx"> as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
</span><del>-as_dummy="$PATH:/usr/local/bin"
-for as_dir in $as_dummy
</del><ins>+for as_dir in $PATH
</ins><span class="cx"> do
</span><span class="cx"> IFS=$as_save_IFS
</span><span class="cx"> test -z "$as_dir" && as_dir=.
</span><span class="lines">@@ -5894,7 +6077,7 @@
</span><span class="cx"> ac_cv_prog_HAVE_LAUNCHD="$HAVE_LAUNCHD" # Let the user override the test.
</span><span class="cx"> else
</span><span class="cx"> as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
</span><del>-for as_dir in $PATH
</del><ins>+for as_dir in /sbin
</ins><span class="cx"> do
</span><span class="cx"> IFS=$as_save_IFS
</span><span class="cx"> test -z "$as_dir" && as_dir=.
</span><span class="lines">@@ -5921,26 +6104,6 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-# Define some precious variables allowing user to override PATH for some programs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
</del><span class="cx"> if test "x$MTREE" = "x"; then
</span><span class="cx"> as_fn_error $? "mtree not found" "$LINENO" 5
</span><span class="cx"> fi
</span><span class="lines">@@ -7289,7 +7452,6 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">                                                         #include <objc/objc.h>
</span><del>-                                                        #include <objc/objc-api.h>
</del><span class="cx">
</span><span class="cx"> int
</span><span class="cx"> main ()
</span><span class="lines">@@ -7408,7 +7570,7 @@
</span><span class="cx">
</span><span class="cx">         if test x"${with_objc_foundation}" != x"no"; then
</span><span class="cx">
</span><del>-        if test x"${with_objc_foundation}" == x || test x"${with_objc_foundation}" == x"apple"; then
</del><ins>+        if test x"${with_objc_foundation}" = x || test x"${with_objc_foundation}" = x"apple"; then
</ins><span class="cx">                 # '[' = '['
</span><span class="cx">                 # ']' = ']'
</span><span class="cx">                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Apple Foundation library" >&5
</span><span class="lines">@@ -7471,10 +7633,10 @@
</span><span class="cx">                 ac_cv_objc_foundation_apple="no"
</span><span class="cx">         fi
</span><span class="cx">
</span><del>-        if test x"${with_objc_foundation}" == x || test x${with_objc_foundation} == x"GNUstep"; then
</del><ins>+        if test x"${with_objc_foundation}" = x || test x"${with_objc_foundation}" = x"GNUstep"; then
</ins><span class="cx">                 GNUSTEP_CONFIG=/usr/bin/gnustep-config
</span><del>-                if test ! -x "${GNUSTEP_CONFIG}" -a x"${GNUSTEP_SYSTEM_ROOT}" == x; then
-                        if test x"${with_objc_foundation}" == x"GNUstep"; then
</del><ins>+                if test ! -x "${GNUSTEP_CONFIG}" -a x"${GNUSTEP_SYSTEM_ROOT}" = x; then
+                        if test x"${with_objc_foundation}" = x"GNUstep"; then
</ins><span class="cx">                                 as_fn_error $? "GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library" "$LINENO" 5
</span><span class="cx">                         else
</span><span class="cx">                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library" >&5
</span><span class="lines">@@ -7556,7 +7718,7 @@
</span><span class="cx">         fi
</span><span class="cx">
</span><span class="cx">         # NeXT Foundation is prefered
</span><del>-        if test x"${ac_cv_objc_foundation_apple}" == x"yes"; then
</del><ins>+        if test x"${ac_cv_objc_foundation_apple}" = x"yes"; then
</ins><span class="cx">                 OBJC_FOUNDATION="Apple"
</span><span class="cx">                 OBJC_FOUNDATION_CPPFLAGS="${APPLE_FOUNDATION_CFLAGS}"
</span><span class="cx">                 OBJC_FOUNDATION_LIBS="${APPLE_FOUNDATION_LIBS}"
</span><span class="lines">@@ -7566,7 +7728,7 @@
</span><span class="cx">
</span><span class="cx">                 { $as_echo "$as_me:${as_lineno-$LINENO}: Using Apple Foundation library" >&5
</span><span class="cx"> $as_echo "$as_me: Using Apple Foundation library" >&6;}
</span><del>-        elif test x"${ac_cv_objc_foundation_gnustep}" == x"yes"; then
</del><ins>+        elif test x"${ac_cv_objc_foundation_gnustep}" = x"yes"; then
</ins><span class="cx">                 OBJC_FOUNDATION="GNUstep"
</span><span class="cx">                 OBJC_FOUNDATION_CPPFLAGS="${GNUSTEP_CPPFLAGS}"
</span><span class="cx">                 OBJC_FOUNDATION_LIBS="${GNUSTEP_LIBS}"
</span><span class="lines">@@ -7576,7 +7738,7 @@
</span><span class="cx">
</span><span class="cx">                 { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNUstep Foundation library" >&5
</span><span class="cx"> $as_echo "$as_me: Using GNUstep Foundation library" >&6;}
</span><del>-        elif test x"${with_objc_foundation}" = x"no"; then
</del><ins>+        elif test x"${with_objc_foundation}" = x"no" || test x"$MACOSX_VERSION" = x; then
</ins><span class="cx">                 OBJC_FOUNDATION="none"
</span><span class="cx">                 { $as_echo "$as_me:${as_lineno-$LINENO}: Not using Foundation implementation" >&5
</span><span class="cx"> $as_echo "$as_me: Not using Foundation implementation" >&6;}
</span><span class="lines">@@ -7842,22 +8004,22 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for whether we will build daemondo" >&5
</del><ins>+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for whether we will build daemondo" >&5
</ins><span class="cx"> $as_echo_n "checking for whether we will build daemondo... " >&6; }
</span><del>- result=no
</del><ins>+        result=no
</ins><span class="cx">         case $host_os in
</span><del>-        darwin*)
-                if test "x$mp_cv_have_framework_corefoundation" == "xyes" &&
-                 test "x$mp_cv_have_framework_systemconfiguration" == "xyes" &&
-                 test "x$mp_cv_have_framework_iokit" == "xyes" &&
-                 test "x$mp_cv_have_function_cfnotificationcentergetdarwinnotifycenter" == "xyes"; then
-                        result=yes
-                        EXTRA_PROGS="$EXTRA_PROGS daemondo"
-                        ac_config_files="$ac_config_files src/programs/daemondo/Makefile"
</del><ins>+                darwin*)
+                        if test "x$mp_cv_have_framework_corefoundation" == "xyes" &&
+                         test "x$mp_cv_have_framework_systemconfiguration" == "xyes" &&
+                         test "x$mp_cv_have_framework_iokit" == "xyes" &&
+                         test "x$mp_cv_have_function_cfnotificationcentergetdarwinnotifycenter" == "xyes"; then
+                                result=yes
+                                EXTRA_PROGS="$EXTRA_PROGS daemondo"
+                                ac_config_files="$ac_config_files src/programs/daemondo/Makefile"
</ins><span class="cx">
</span><del>-                fi
</del><ins>+                        fi
</ins><span class="cx">                 ;
</span><del>-        *)
</del><ins>+                *)
</ins><span class="cx">         esac
</span><span class="cx">         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${result}" >&5
</span><span class="cx"> $as_echo "${result}" >&6; }
</span><span class="lines">@@ -7947,7 +8109,6 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">         if test "${ROOTPRIVS+set}" = set; then
</span><del>-
</del><span class="cx">                 # Set install-user to current user
</span><span class="cx">                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for install user" >&5
</span><span class="cx"> $as_echo_n "checking for install user... " >&6; }
</span><span class="lines">@@ -7971,21 +8132,6 @@
</span><span class="cx">                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUNUSR" >&5
</span><span class="cx"> $as_echo "$RUNUSR" >&6; }
</span><span class="cx">
</span><del>-
-                # Set Tcl package directory to ~/Library/Tcl
-         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl package directory" >&5
-$as_echo_n "checking for Tcl package directory... " >&6; }
-                ac_cv_c_tclpkgd=`eval echo ~$DSTUSR/Library/Tcl`
-         # Convert to a native path and substitute into the output files.
-         PACKAGE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclpkgd}`
-         TCL_PACKAGE_DIR=${PACKAGE_DIR_NATIVE}
-
-                if test x"${ac_cv_c_tclpkgd}" = x ; then
-                        as_fn_error $? "Tcl package directory not found. Please specify its location with --with-tclpackage" "$LINENO" 5
-         else
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclpkgd}" >&5
-$as_echo "${ac_cv_c_tclpkgd}" >&6; }
-         fi
</del><span class="cx">         fi
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -8004,7 +8150,7 @@
</span><span class="cx">         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for install user" >&5
</span><span class="cx"> $as_echo_n "checking for install user... " >&6; }
</span><span class="cx">         if test "x$DSTUSR" = "x" ; then
</span><del>-         DSTUSR=root
</del><ins>+                DSTUSR=root
</ins><span class="cx">         fi
</span><span class="cx">
</span><span class="cx">         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSTUSR" >&5
</span><span class="lines">@@ -8024,21 +8170,20 @@
</span><span class="cx">         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for install group" >&5
</span><span class="cx"> $as_echo_n "checking for install group... " >&6; }
</span><span class="cx">         if test "x$DSTGRP" = "x" ; then
</span><del>-
-         case $host_os in
-         darwin*)
-                DSTGRP="admin"
-                ;
-         freebsd*)
-                DSTGRP="wheel"
-                ;
-         linux*)
-                DSTGRP="root"
-                ;
-         *)
-                DSTGRP="wheel"
-                ;
-         esac
</del><ins>+                case $host_os in
+                        darwin*)
+                                DSTGRP="admin"
+                        ;
+                        freebsd*)
+                                DSTGRP="wheel"
+                        ;
+                        linux*)
+                                DSTGRP="root"
+                        ;
+                        *)
+                                DSTGRP="wheel"
+                        ;
+                esac
</ins><span class="cx">         fi
</span><span class="cx">
</span><span class="cx">         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSTGRP" >&5
</span><span class="lines">@@ -8058,7 +8203,7 @@
</span><span class="cx">         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for macports user" >&5
</span><span class="cx"> $as_echo_n "checking for macports user... " >&6; }
</span><span class="cx">         if test "x$RUNUSR" = "x" ; then
</span><del>-         RUNUSR=macports
</del><ins>+                RUNUSR=macports
</ins><span class="cx">         fi
</span><span class="cx">
</span><span class="cx">         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUNUSR" >&5
</span><span class="lines">@@ -8078,7 +8223,7 @@
</span><span class="cx">         { $as_echo "$as_me:${as_lineno-$LINENO}: checking what permissions to use for installation directories" >&5
</span><span class="cx"> $as_echo_n "checking what permissions to use for installation directories... " >&6; }
</span><span class="cx">         if test "x$DSTMODE" = "x" ; then
</span><del>-         DSTMODE=0755
</del><ins>+                DSTMODE=0755
</ins><span class="cx">         fi
</span><span class="cx">
</span><span class="cx">         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSTMODE" >&5
</span><span class="lines">@@ -8098,7 +8243,7 @@
</span><span class="cx">         if test "${SHAREDIR+set}" = set; then
</span><span class="cx">                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to share the install directory with all members of the install group" >&5
</span><span class="cx"> $as_echo_n "checking whether to share the install directory with all members of the install group... " >&6; }
</span><del>-         DSTMODE=0775
</del><ins>+                DSTMODE=0775
</ins><span class="cx">
</span><span class="cx">                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSTMODE" >&5
</span><span class="cx"> $as_echo "$DSTMODE" >&6; }
</span><span class="lines">@@ -8117,25 +8262,25 @@
</span><span class="cx"> fi
</span><span class="cx">
</span><span class="cx">
</span><del>- oldprefix=$prefix
- if test "x$prefix" = "xNONE" ; then
-        prefix=$ac_default_prefix
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Applications installation directory" >&5
</del><ins>+        oldprefix=$prefix
+        if test "x$prefix" = "xNONE" ; then
+                prefix=$ac_default_prefix
+        fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Applications installation directory" >&5
</ins><span class="cx"> $as_echo_n "checking for Applications installation directory... " >&6; }
</span><span class="cx">
</span><span class="cx">         if test "x$MPAPPLICATIONSDIR" = "x" ; then
</span><del>-         if test "$DSTUSR" = "root" ; then
-                MPAPPLICATIONSDIR="/Applications/MacPorts"
-         else
-                MPAPPLICATIONSDIR="$(eval echo ~$DSTUSR)/Applications/MacPorts"
-         fi
</del><ins>+                if test "$DSTUSR" = "root" ; then
+                        MPAPPLICATIONSDIR="/Applications/MacPorts"
+                else
+                        MPAPPLICATIONSDIR="$(eval echo ~$DSTUSR)/Applications/MacPorts"
+                fi
</ins><span class="cx">         fi
</span><span class="cx">
</span><span class="cx">         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPAPPLICATIONSDIR" >&5
</span><span class="cx"> $as_echo "$MPAPPLICATIONSDIR" >&6; }
</span><span class="cx">
</span><del>- prefix=$oldprefix
</del><ins>+        prefix=$oldprefix
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -8147,11 +8292,11 @@
</span><span class="cx"> fi
</span><span class="cx">
</span><span class="cx">
</span><del>- oldprefix=$prefix
- if test "x$prefix" = "xNONE" ; then
-        prefix=$ac_default_prefix
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Frameworks installation directory" >&5
</del><ins>+        oldprefix=$prefix
+        if test "x$prefix" = "xNONE" ; then
+                prefix=$ac_default_prefix
+        fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Frameworks installation directory" >&5
</ins><span class="cx"> $as_echo_n "checking for Frameworks installation directory... " >&6; }
</span><span class="cx">
</span><span class="cx">         if test "x$MPFRAMEWORKSDIR" = "x" ; then
</span><span class="lines">@@ -8161,7 +8306,7 @@
</span><span class="cx">         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPFRAMEWORKSDIR" >&5
</span><span class="cx"> $as_echo "$MPFRAMEWORKSDIR" >&6; }
</span><span class="cx">
</span><del>- prefix=$oldprefix
</del><ins>+        prefix=$oldprefix
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> # Check for universal options
</span><span class="lines">@@ -8173,28 +8318,28 @@
</span><span class="cx"> fi
</span><span class="cx">
</span><span class="cx">
</span><del>- if test "x$UNIVERSAL_ARCHS" = "x"; then
- case "$MACOSX_VERSION" in
- 10.1[0-9]*)
- UNIVERSAL_ARCHS="x86_64 i386"
- ;;
- 10.[0-5]*)
- UNIVERSAL_ARCHS="i386 ppc"
- ;;
- *)
- UNIVERSAL_ARCHS="x86_64 i386"
- ;;
- esac
- fi
</del><ins>+        if test "x$UNIVERSAL_ARCHS" = "x"; then
+                case "$MACOSX_VERSION" in
+                        10.1[0-9]*)
+                                UNIVERSAL_ARCHS="x86_64 i386"
+                        ;
+                        10.[0-5]*)
+                                UNIVERSAL_ARCHS="i386 ppc"
+                        ;
+                        *)
+                                UNIVERSAL_ARCHS="x86_64 i386"
+                        ;
+                esac
+        fi
</ins><span class="cx">
</span><del>- UNIVERSAL_ARCHFLAGS=
- for arch in $UNIVERSAL_ARCHS; do
- UNIVERSAL_ARCHFLAGS="$UNIVERSAL_ARCHFLAGS -arch $arch"
- done
</del><ins>+        UNIVERSAL_ARCHFLAGS=
+        for arch in $UNIVERSAL_ARCHS; do
+                UNIVERSAL_ARCHFLAGS="$UNIVERSAL_ARCHFLAGS -arch $arch"
+        done
</ins><span class="cx">
</span><del>- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Universal CPU architectures" >&5
</del><ins>+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Universal CPU architectures" >&5
</ins><span class="cx"> $as_echo_n "checking for Universal CPU architectures... " >&6; }
</span><del>- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIVERSAL_ARCHS" >&5
</del><ins>+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIVERSAL_ARCHS" >&5
</ins><span class="cx"> $as_echo "$UNIVERSAL_ARCHS" >&6; }
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -8666,11 +8811,10 @@
</span><span class="cx"> done
</span><span class="cx">
</span><span class="cx">
</span><del>-INCLUDES="-I.. -I. $INCLUDES"
-
</del><span class="cx"> # Checks for library functions.
</span><del>-for ac_func in OSAtomicCompareAndSwap32 OSAtomicCompareAndSwap64 OSAtomicCompareAndSwapPtr bzero \
-        clearenv copyfile fgetln flock fls kqueue lockf memset posix_spawn setmode strcasecmp strlcat \
</del><ins>+for ac_func in OSAtomicCompareAndSwap32 OSAtomicCompareAndSwap64 \
+        OSAtomicCompareAndSwapPtr __getdirentries64 bzero clearenv copyfile fgetln \
+        flock fls kqueue lockf memset posix_spawn setmode strcasecmp strlcat \
</ins><span class="cx">         strlcpy strncasecmp sysctlbyname
</span><span class="cx"> do :
</span><span class="cx"> as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
</span><span class="lines">@@ -8745,7 +8889,6 @@
</span><span class="cx">
</span><span class="cx"> else
</span><span class="cx">
</span><del>-
</del><span class="cx">         # Check for libmd from FreeBSD, which is preferred
</span><span class="cx">         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5File in -lmd" >&5
</span><span class="cx"> $as_echo_n "checking for MD5File in -lmd... " >&6; }
</span><span class="lines">@@ -9095,428 +9238,18 @@
</span><span class="cx"> $as_echo "#define MIN_USABLE_GID 500" >>confdefs.h
</span><span class="cx">
</span><span class="cx">
</span><del>-# Load tclConfig.sh
</del><ins>+# Substitute platform for base compatibility check
</ins><span class="cx">
</span><del>- #
- # Ok, lets find the tcl configuration
- # First, look for one uninstalled.
- # the alternative search directory is invoked by --with-tcl
- #
-
- if test x"${no_tcl}" = x ; then
-        # we reset no_tcl in case something fails here
-        no_tcl=true
-
-# Check whether --with-tcl was given.
-if test "${with_tcl+set}" = set; then :
- withval=$with_tcl; with_tclconfig=${withval}
-fi
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
-$as_echo_n "checking for Tcl configuration... " >&6; }
-        if ${ac_cv_c_tclconfig+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
-
-         # First check to see if --with-tcl was specified.
-         if test x"${with_tclconfig}" != x ; then
-                if test -f "${with_tclconfig}/tclConfig.sh" ; then
-                 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-                else
-                 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
-                fi
-         fi
-
-         # then check for a private Tcl installation
-         if test x"${ac_cv_c_tclconfig}" = x ; then
-                for i in \
-                        ../tcl \
-                        `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-                        ../../tcl \
-                        `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-                        ../../../tcl \
-                        `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-                 if test -f "$i/unix/tclConfig.sh" ; then
-                        ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-                        break
-                 fi
-                done
-         fi
-
-         # check in a few common install locations
-         if test x"${ac_cv_c_tclconfig}" = x ; then
-                for i in `ls -d ${libdir} 2>/dev/null` \
-                        `ls -d /usr/lib 2>/dev/null` \
-                        `ls -d /usr/local/lib 2>/dev/null` \
-                        `ls -d /usr/contrib/lib 2>/dev/null` \
-                        `ls -d /usr/pkg/lib 2>/dev/null` \
-                        `ls -d /usr/local/lib/tcl8.6 2>/dev/null` \
-                        `ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
-                        `ls -d /usr/local/lib/tcl8.4 2>/dev/null` \
-                        `ls -d /usr/lib/tcl8.6 2>/dev/null` \
-                        `ls -d /usr/lib/tcl8.5 2>/dev/null` \
-                        `ls -d /usr/lib/tcl8.4 2>/dev/null` \
-                        do
-                 if test -f "$i/tclConfig.sh" ; then
-                        ac_cv_c_tclconfig=`(cd $i; pwd)`
-                        break
-                 fi
-                done
-         fi
-
-         # check in a few other private locations
-         if test x"${ac_cv_c_tclconfig}" = x ; then
-                for i in \
-                        ${srcdir}/../tcl \
-                        `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-                 if test -f "$i/unix/tclConfig.sh" ; then
-                 ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-                 break
-                fi
-                done
-         fi
-
-fi
-
-
-        if test x"${ac_cv_c_tclconfig}" = x ; then
-         TCL_BIN_DIR="# no Tcl configs found"
-         as_fn_error $? "Can't find Tcl configuration definitions" "$LINENO" 5
-        else
-         no_tcl=
-         TCL_BIN_DIR=${ac_cv_c_tclconfig}
-         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $TCL_BIN_DIR/tclConfig.sh" >&5
-$as_echo "found $TCL_BIN_DIR/tclConfig.sh" >&6; }
-        fi
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-$as_echo_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh... " >&6; }
-
- if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
-$as_echo "loading" >&6; }
-        . $TCL_BIN_DIR/tclConfig.sh
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
-$as_echo "file not found" >&6; }
- fi
-
- #
- # If the TCL_BIN_DIR is the build directory (not the install directory),
- # then set the common variable name to the value of the build variables.
- # For example, the variable TCL_LIB_SPEC will be set to the value
- # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
- # instead of TCL_BUILD_LIB_SPEC since it will work with both an
- # installed and uninstalled version of Tcl.
- #
-
- if test -f $TCL_BIN_DIR/Makefile ; then
- TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
- TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
- TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
- fi
-
- #
- # eval is required to do the TCL_DBGX substitution
- #
-
- eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
- eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
- eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
- eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
- eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
- eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check for Tcl public headers
-CYGPATH=echo
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5
-$as_echo_n "checking for Tcl public headers... " >&6; }
-
-
-# Check whether --with-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then :
- withval=$with_tclinclude; with_tclinclude=${withval}
-fi
-
-
- if test x"${with_tclinclude}" != x ; then
-        if test -f "${with_tclinclude}/tcl.h" ; then
-         ac_cv_c_tclh=${with_tclinclude}
-        else
-         as_fn_error $? "${with_tclinclude} directory does not contain Tcl public header file tcl.h" "$LINENO" 5
-        fi
- else
-        if ${ac_cv_c_tclh+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
-         # Use the value from --with-tclinclude, if it was given
-
-         if test x"${with_tclinclude}" != x ; then
-                ac_cv_c_tclh=${with_tclinclude}
-         else
-                # Do NOT check in $includedir, we need to prevent automatic
-                # location of Tcl headers in $prefix/include unless explicitly
-                # specified with the --with-tclinclude option. But go ahead and
-                # check some other possible local system locations.
-
-                for i in \
-                        /usr/include /usr/local/include /usr/local/include/tcl${TCL_VERSION} /usr/include/tcl${TCL_VERSION}; do
-                 if test -f "$i/tcl.h" ; then
-                        ac_cv_c_tclh=$i
-                        break
-                 fi
-                done
-         fi
-
-fi
-
- fi
-
- # Print a message based on how we determined the include path
-
- if test x"${ac_cv_c_tclh}" = x ; then
-        as_fn_error $? "tcl.h not found. Please specify its location with --with-tclinclude" "$LINENO" 5
- else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5
-$as_echo "${ac_cv_c_tclh}" >&6; }
- fi
-
- # Convert to a native path and substitute into the output files.
-
- INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
- TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-
-
-
-# Check for tclsh binary
-
-
-
-        case $host_os in
-                freebsd*)
-                        # FreeBSD installs a dummy tclsh (annoying)
-                        # Look for a real versioned tclsh with threads first
-                        # Look for a real versioned tclsh without threads second
-                        # Extract the first word of "tclsh${TCL_VERSION}-threads tclsh${TCL_VERSION} tclsh", so it can be a program name with args.
-set dummy tclsh${TCL_VERSION}-threads tclsh${TCL_VERSION} tclsh; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_TCLSH+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $TCLSH in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-TCLSH=$ac_cv_path_TCLSH
-if test -n "$TCLSH"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
-$as_echo "$TCLSH" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-                        ;
-                *)
-                        # Otherwise, look for a non-versioned tclsh
-                        # Extract the first word of "tclsh tclsh${TCL_VERSION}", so it can be a program name with args.
-set dummy tclsh tclsh${TCL_VERSION}; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_TCLSH+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $TCLSH in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-TCLSH=$ac_cv_path_TCLSH
-if test -n "$TCLSH"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
-$as_echo "$TCLSH" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-                        ;
-        esac
-        if test "x$TCLSH" = "x" ; then
-                as_fn_error $? "Could not find tclsh" "$LINENO" 5
-        fi
-
-
-
-
-# Substitute Tcl platform for base compatibility check
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl target platform" >&5
-$as_echo_n "checking for Tcl target platform... " >&6; }
- OS_PLATFORM=`echo 'puts -nonewline [string tolower \$tcl_platform(os)]' | $TCLSH`
- OS_MAJOR=`echo 'puts -nonewline [lindex [split \$tcl_platform(osVersion) .] 0]' | $TCLSH`
</del><ins>+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target platform" >&5
+$as_echo_n "checking for target platform... " >&6; }
+ OS_PLATFORM=`uname -s | tr '[:upper:]' '[:lower:]'`
+                OS_MAJOR=`uname -r | cut -d '.' -f 1`
</ins><span class="cx"> { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OS_PLATFORM $OS_MAJOR" >&5
</span><span class="cx"> $as_echo "$OS_PLATFORM $OS_MAJOR" >&6; }
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-# Check for Tcl package path
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl package directory" >&5
-$as_echo_n "checking for Tcl package directory... " >&6; }
-
-
-# Check whether --with-tclpackage was given.
-if test "${with_tclpackage+set}" = set; then :
- withval=$with_tclpackage; with_tclpackagedir=${withval}
-fi
-
-
- if test x"${with_tclpackagedir}" != x ; then
-        ac_cv_c_tclpkgd=${with_tclpackagedir}
- else
-        if ${ac_cv_c_tclpkgd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
-         # Use the value from --with-tclpackage, if it was given
-
-         if test x"${with_tclpackagedir}" != x ; then
-                echo "tclpackagedir"
-                ac_cv_c_tclpkgd=${with_tclpackagedir}
-         else
-                # On darwin we can do some intelligent guessing
-                case $host_os in
-                 darwin*)
-                         tcl_autopath=`echo 'puts -nonewline \$auto_path' | $TCLSH`
-                        for path in $tcl_autopath; do
-                        if test "$DSTUSR" = "root" ; then
-                         if test "$path" = "/Library/Tcl"; then
-                                ac_cv_c_tclpkgd="$path"
-                                break
-                         fi
-                         if test "$path" = "/System/Library/Tcl"; then
-                                if test -d "$path"; then
-                                 ac_cv_c_tclpkgd="$path"
-                                 break
-                         fi
-                         fi
-                        elif test "$path" = "~/Library/Tcl"; then
-                         ac_cv_c_tclpkgd=`eval echo ~$DSTUSR/Library/Tcl`
-                         break
-                        fi
-                        done
-                 ;;
-                esac
-                 if test x"${ac_cv_c_tclpkgd}" = x ; then
-                 # Fudge a path from the first entry in the auto_path
-                 tcl_pkgpath=`echo 'puts -nonewline [lindex \$auto_path 0]' | $TCLSH`
-                 if test -d "$tcl_pkgpath"; then
-                        ac_cv_c_tclpkgd="$tcl_pkgpath"
-                 fi
-                 # If the first entry does not exist, do nothing
-                fi
-         fi
-
-fi
-
- fi
-
- if test x"${ac_cv_c_tclpkgd}" = x ; then
-        as_fn_error $? "Tcl package directory not found. Please specify its location with --with-tclpackage" "$LINENO" 5
- else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclpkgd}" >&5
-$as_echo "${ac_cv_c_tclpkgd}" >&6; }
- fi
-
- # Convert to a native path and substitute into the output files.
-
- PACKAGE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclpkgd}`
-
- TCL_PACKAGE_DIR=${PACKAGE_DIR_NATIVE}
-
-
-
-
-# Check if thread is enabled.
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tclsh was compiled with threads" >&5
-$as_echo_n "checking whether tclsh was compiled with threads... " >&6; }
-        tcl_threadenabled=`echo 'puts -nonewline [info exists tcl_platform(threaded)]' | $TCLSH`
-        if test "$tcl_threadenabled" = "1" ; then
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-        else
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                as_fn_error $? "tcl wasn't compiled with threads enabled" "$LINENO" 5
-        fi
-
-
</del><span class="cx"> ## libcurl
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -9708,10 +9441,10 @@
</span><span class="cx">                 LDFLAGS_SQLITE3="-L${sqlite3prefix}/lib -lsqlite3"
</span><span class="cx">         fi
</span><span class="cx">
</span><del>- # check if we have sqlite3ext.h, using the appropriate cppflags
- CPPFLAGS_OLD="${CPPFLAGS}"
- CPPFLAGS="${CPPFLAGS} ${CFLAGS_SQLITE3}"
- for ac_header in sqlite3ext.h
</del><ins>+        # check if we have sqlite3ext.h, using the appropriate cppflags
+        CPPFLAGS_OLD="${CPPFLAGS}"
+        CPPFLAGS="${CPPFLAGS} ${CFLAGS_SQLITE3}"
+        for ac_header in sqlite3ext.h
</ins><span class="cx"> do :
</span><span class="cx"> ac_fn_c_check_header_mongrel "$LINENO" "sqlite3ext.h" "ac_cv_header_sqlite3ext_h" "$ac_includes_default"
</span><span class="cx"> if test "x$ac_cv_header_sqlite3ext_h" = xyes; then :
</span><span class="lines">@@ -9723,52 +9456,15 @@
</span><span class="cx">
</span><span class="cx"> done
</span><span class="cx">
</span><del>- CPPFLAGS="${CPPFLAGS_OLD}"
</del><ins>+        CPPFLAGS="${CPPFLAGS_OLD}"
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-        # now the sqlite Tcl bindings
</del><span class="cx">
</span><del>-# Check whether --with-tcl-sqlite3 was given.
-if test "${with_tcl_sqlite3+set}" = set; then :
- withval=$with_tcl_sqlite3; mp_sqlite3_dir=$withval
-fi
</del><span class="cx">
</span><span class="cx">
</span><del>- if test "x$mp_sqlite3_dir" = "x"; then
- case $host_os in
- darwin*)
- mp_sqlite3_dir="/usr/lib/sqlite3"
- ;;
- freebsd*)
- mp_sqlite3_dir="/usr/local/lib/sqlite"
- ;;
- *)
- mp_sqlite3_dir="/usr/share/tcl${TCL_VERSION}/sqlite3"
- ;;
- esac
- fi
</del><span class="cx">
</span><del>-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl sqlite3 location" >&5
-$as_echo_n "checking for Tcl sqlite3 location... " >&6; }
-if ${mp_cv_sqlite3_dir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- mp_cv_sqlite3_dir=
-                test -r "${mp_sqlite3_dir}/pkgIndex.tcl" && mp_cv_sqlite3_dir=$mp_sqlite3_dir
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mp_cv_sqlite3_dir" >&5
-$as_echo "$mp_cv_sqlite3_dir" >&6; }
-
-        SQLITE3_TCL_DIR=$mp_cv_sqlite3_dir
-
-
-
-
-
-
</del><span class="cx">         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLite >= 3003011" >&5
</span><span class="cx"> $as_echo_n "checking for SQLite >= 3003011... " >&6; }
</span><span class="cx">
</span><span class="lines">@@ -9911,50 +9607,1752 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-# Determine if we need to install some bundled packages
-OUR_INCLUDED_PACKAGES=
</del><ins>+# misc variables that need to be expanded for substitution into tcl
+oldprefix=$prefix
+oldexec_prefix=$exec_prefix
+if test "x$prefix" = "xNONE" ; then
+ prefix=$ac_default_prefix
+fi
+if test "x$exec_prefix" = "xNONE" ; then
+        exec_prefix=$prefix
+fi
+eval "prefix_expanded=$prefix"
+eval "exec_prefix_expanded=$exec_prefix"
</ins><span class="cx">
</span><del>-## Thread package.
</del><ins>+# do this twice, since there is a nested variable of
+# ${prefix} inside of ${sysconfdir}
+eval "MPCONFIGDIR_EXPANDED=$MPCONFIGDIR"
+eval "MPCONFIGDIR_EXPANDED=$MPCONFIGDIR_EXPANDED"
</ins><span class="cx">
</span><del>-# Check whether --with-included-tclthread was given.
-if test "${with_included_tclthread+set}" = set; then :
- withval=$with_included_tclthread; with_included_tclthread=$withval
</del><ins>+eval "localstatedir_expanded=$localstatedir"
+
+# Compute the libexec dir for the vendor packages
+eval "macports_libexec_dir=${libexecdir}/macports"
+eval "macports_libexec_dir=$macports_libexec_dir"
+prefix=$oldprefix
+exec_prefix=$oldexec_prefix
+
+## Tcl package
+tcl_version=8.5.15
+tcl_thread_version=2.7.0
+tclx_version=8.4.1
+tcllib_version=1.15
+        mp_fn_var_prepend() {
+                eval "$1=\"$2\$$1\""
+        }
+
+
+        # Extract the first word of "gzip", so it can be a program name with args.
+set dummy gzip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GZIP+:} false; then :
+ $as_echo_n "(cached) " >&6
</ins><span class="cx"> else
</span><del>- with_included_tclthread="unspecified"
</del><ins>+ case $GZIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
</ins><span class="cx"> fi
</span><ins>+GZIP=$ac_cv_path_GZIP
+if test -n "$GZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
+$as_echo "$GZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
</ins><span class="cx">
</span><span class="cx">
</span><del>-# Check if thread package is already installed.
-if test "x$with_included_tclthread" = "xunspecified" ; then
</del><ins>+        # Extract the first word of "bzip2", so it can be a program name with args.
+set dummy bzip2; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_BZIP2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $BZIP2 in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_BZIP2="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
</ins><span class="cx">
</span><del>-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl Thread package" >&5
-$as_echo_n "checking for Tcl Thread package... " >&6; }
-        package_present=`echo 'if {[catch {package require Thread}]} {puts -nonewline 0} else {puts -nonewline 1}' | $TCLSH`
-        if test "$package_present" = "1"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }; with_included_tclthread=no
</del><ins>+ ;;
+esac
+fi
+BZIP2=$ac_cv_path_BZIP2
+if test -n "$BZIP2"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BZIP2" >&5
+$as_echo "$BZIP2" >&6; }
</ins><span class="cx"> else
</span><span class="cx"> { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
</span><del>-$as_echo "no" >&6; }; with_included_tclthread=yes
</del><ins>+$as_echo "no" >&6; }
</ins><span class="cx"> fi
</span><span class="cx">
</span><ins>+
+
+        mp_tarball="vendor/tcl${tcl_version}-src.tar.gz"
+        ac_dir=vendor/tcl${tcl_version}/unix
+
+        mp_popdir=$(pwd)
+        if ! test -d "$ac_dir"; then
+                mp_tarball_vendordir="$(dirname "$mp_tarball")"
+                as_dir="$mp_tarball_vendordir"; as_fn_mkdir_p
+                { $as_echo "$as_me:${as_lineno-$LINENO}: === extracting $mp_tarball" >&5
+$as_echo "$as_me: === extracting $mp_tarball" >&6;}
+                mp_tarball_extract_cmd=
+                case "$mp_tarball" in
+                        *.tar.gz | *.tgz)
+                                if test "x$GZIP" = "x"; then
+                                        as_fn_error $? "gzip not found" "$LINENO" 5
+                                fi
+                                mp_tarball_extract_cmd="$GZIP"
+                                ;
+                        *.tar.bz2 | *.tbz2)
+                                if test "x$BZIP2" = "x"; then
+                                        as_fn_error $? "bzip2 not found" "$LINENO" 5
+                                fi
+                                mp_tarball_extract_cmd="$BZIP2"
+                                ;
+                        *)
+                                as_fn_error $? "Don't know how to extract tarball $mp_tarball" "$LINENO" 5
+                                ;
+                esac
+                (cd "$mp_tarball_vendordir"; umask 0022; "$mp_tarball_extract_cmd" -d < "$ac_abs_confdir/$mp_tarball" | tar xf - || as_fn_error $? "failed to extract $mp_tarball" "$LINENO" 5)
+        fi
+        if ! test -d "$ac_dir"; then
+                as_fn_error $? "tarball $mp_tarball did not extract to $ac_dir" "$LINENO" 5
+        fi
+
+        as_dir="$ac_dir"; as_fn_mkdir_p
+        ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+        cd "$ac_dir"
+
+        if test "$no_recursion" != yes || test ! -f "$ac_srcdir/config.status"; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: === configuring in $ac_dir ($mp_popdir/$ac_dir)" >&5
+$as_echo "$as_me: === configuring in $ac_dir ($mp_popdir/$ac_dir)" >&6;}
+                if test -f "$ac_srcdir/configure"; then
+                        mp_sub_configure_args=
+                        mp_sub_configure_keys=
+                        # Compile a list of keys that have been given to the MP_CONFIG_TARBALL
+                        # macro; we want to skip copying those parameters from the original
+                        # configure invocation.
+                        for mp_arg in --prefix=${macports_libexec_dir} --enable-threads; do
+                                case $mp_arg in
+                                        --*=* | -*=*)
+                                                        mp_arg_key=$($as_echo "$mp_arg" | sed -E 's/^--?([^=]+)=.*$/\1/')
+                                                                case $mp_arg_key in
+                *\'*)
+                        mp_arg_key=$($as_echo "$mp_arg_key" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg_key="'$mp_arg_key'"
+        as_fn_append mp_sub_configure_keys " $mp_arg_key"
+
+                                        ;
+                                esac
+                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+                        done
+                        # Walk the list of arguments given to the original configure script;
+                        # filter out a few common ones we likely would not want to pass along,
+                        # add --disable-option-checking and filter those already given as
+                        # argument to MP_CONFIG_TARBALL.
+                        # Most of this code is adapted from _AC_OUTPUT_SUBDIRS in
+                        # $prefix/share/autoconf/autoconf/status.m4.
+                        mp_prev=
+                        eval "set x $ac_configure_args"
+                        shift
+                        for mp_arg; do
+                                if test -n "$mp_prev"; then
+                                        mp_prev=
+                                        continue
+                                fi
+                                case $mp_arg in
+                                         -cache-file \
+                                        | --cache-file \
+                                        | --cache-fil \
+                                        | --cache-fi \
+                                        | --cache-f \
+                                        | --cache- \
+                                        | --cache \
+                                        | --cach \
+                                        | --cac \
+                                        | --ca \
+                                        | --c)
+                                                mp_prev=cache_file
+                                        ;
+                                         -cache-file=* \
+                                        | --cache-file=* \
+                                        | --cache-fil=* \
+                                        | --cache-fi=* \
+                                        | --cache-f=* \
+                                        | --cache-=* \
+                                        | --cache=* \
+                                        | --cach=* \
+                                        | --cac=* \
+                                        | --ca=* \
+                                        | --c=*)
+                                                # ignore --cache-file
+                                        ;
+                                         --config-cache \
+                                        | -C)
+                                                # ignore -C
+                                        ;
+                                         -srcdir \
+                                        | --srcdir \
+                                        | -srcdi \
+                                        | -srcd \
+                                        | -src \
+                                        | -sr)
+                                                mp_prev=srcdir
+                                        ;
+                                         -srcdir=* \
+                                        | --srcdir=* \
+                                        | --srcdi=* \
+                                        | --srcd=* \
+                                        | --src=* \
+                                        | --sr=*)
+                                                # ignore --srcdir
+                                        ;
+                                         -prefix \
+                                        | --prefix \
+                                        | --prefi \
+                                        | --pref \
+                                        | --pre \
+                                        | --pr \
+                                        | --p)
+                                                mp_prev=prefix
+                                        ;
+                                         -prefix=* \
+                                        | --prefix=* \
+                                        | --prefi=* \
+                                        | --pref=* \
+                                        | --pre=* \
+                                        | --pr=* \
+                                        | --p=*)
+                                                # ignore --prefix
+                                        ;
+                                        --disable-option-checking)
+                                                # ignore --disable-option-checking
+                                        ;
+                                        --*=* | -*=*)
+                                                        mp_arg_key=$($as_echo "$mp_arg" | sed -E 's/^--?([^=]+)=.*$/\1/')
+                                                        mp_list_contains_present=
+        eval "mp_list_contains_list=\"$mp_sub_configure_keys\""
+        for mp_list_contains_entry in $mp_list_contains_list; do
+                test -z "$mp_list_contains_entry" && continue
+                if test "x$mp_arg_key" = "x$mp_list_contains_entry"; then
+                        mp_list_contains_present=1
+                        break
+                fi
+        done
+        if test "x$mp_list_contains_present" = "x"; then
+                :
+                else
+                                                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+
+        fi
+
+                                        ;
+                                        *)
+                                                # always pass positional arguments
+                                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+                                        ;
+                                esac
+                        done
+
+                        # Now prepend some arguments that should always be present unless
+                        # overriden, such as --prefix, --silent, --disable-option-checking,
+                        # --cache-file, --srcdir
+                        # Pass --prefix unless already given
+                        mp_arg_key=prefix
+                                mp_list_contains_present=
+        eval "mp_list_contains_list=\"$mp_sub_configure_args\""
+        for mp_list_contains_entry in $mp_list_contains_list; do
+                test -z "$mp_list_contains_entry" && continue
+                if test "x$mp_arg_key" = "x$mp_list_contains_entry"; then
+                        mp_list_contains_present=1
+                        break
+                fi
+        done
+        if test "x$mp_list_contains_present" = "x"; then
+                :
+                else
+                                mp_arg="--prefix=$prefix"
+                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+
+        fi
+
+
+                        # Pass --silent
+                        if test "$silent" = yes; then
+                                mp_arg="--silent"
+                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+                        fi
+
+                        # Always prepend --disable-option-checking to silence warnings, since
+                        # different subdirs can have different --enable and --with options.
+                        mp_arg="--disable-option-checking"
+                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+
+                        # Make the cache file name correct relative to the subdirectory.
+                        case $cache_file in
+                                [\\/]* | ?:[\\/]* )
+                                        mp_sub_cache_file=$cache_file
+                                ;
+                                *) # Relative name.
+                                        mp_sub_cache_file=$ac_top_build_prefix$cache_file
+                                ;
+                        esac
+                        mp_arg="--cache-file=$mp_sub_cache_file"
+                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+
+                        mp_arg="--srcdir=$ac_srcdir"
+                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_srcdir/configure $mp_sub_configure_args in $ac_dir" >&5
+$as_echo "$as_me: running $SHELL $ac_srcdir/configure $mp_sub_configure_args in $ac_dir" >&6;}
+                        eval "\$SHELL \$ac_srcdir/configure $mp_sub_configure_args" || as_fn_error $? "configure failed for $ac_dir" "$LINENO" 5
+                else
+                        as_fn_error $? "no configure script found in $ac_dir" "$LINENO" 5
+                fi
+                { $as_echo "$as_me:${as_lineno-$LINENO}: === finished configuring in $ac_dir ($mp_popdir/$ac_dir)" >&5
+$as_echo "$as_me: === finished configuring in $ac_dir ($mp_popdir/$ac_dir)" >&6;}
+        fi
+        cd "$mp_popdir"
+
+VENDOR_TCL_SUBDIR=tcl${tcl_version}/unix
+VENDOR_TCL_INSTALL="install-binaries install-libraries"
+
+
+
+# Set up some variables needed by MacPorts' Tcl setup
+VENDOR_DESTROOT=vendor/vendor-destroot
+
+
+## Tcl Thread package
+# Tcl supports Threads internally, but to use threads from Tcl code we need
+# this package
+
+        # Extract the first word of "gzip", so it can be a program name with args.
+set dummy gzip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GZIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GZIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
</ins><span class="cx"> fi
</span><ins>+GZIP=$ac_cv_path_GZIP
+if test -n "$GZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
+$as_echo "$GZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
</ins><span class="cx">
</span><del>-# If thread package isn't installed, configure and install thread package.
-if test "$with_included_tclthread" = "yes"; then
-        OUR_INCLUDED_PACKAGES="$OUR_INCLUDED_PACKAGES thread2.6"
</del><span class="cx">
</span><ins>+        # Extract the first word of "bzip2", so it can be a program name with args.
+set dummy bzip2; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_BZIP2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $BZIP2 in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_BZIP2="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
</ins><span class="cx">
</span><del>-subdirs="$subdirs src/thread2.6"
</del><ins>+ ;;
+esac
+fi
+BZIP2=$ac_cv_path_BZIP2
+if test -n "$BZIP2"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BZIP2" >&5
+$as_echo "$BZIP2" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
</ins><span class="cx">
</span><del>-        # Extract thread package
-        (cd src/; gzip -d < thread2.6.tar.gz | tar xf -)
-        # Patch thread package (so thread2.6 is the vanilla distribution directory)
-        patch -p0 < src/thread2.6.diff
</del><ins>+
+
+        mp_tarball="vendor/thread${tcl_thread_version}.tar.gz"
+        ac_dir=vendor/thread${tcl_thread_version}
+
+        mp_popdir=$(pwd)
+        if ! test -d "$ac_dir"; then
+                mp_tarball_vendordir="$(dirname "$mp_tarball")"
+                as_dir="$mp_tarball_vendordir"; as_fn_mkdir_p
+                { $as_echo "$as_me:${as_lineno-$LINENO}: === extracting $mp_tarball" >&5
+$as_echo "$as_me: === extracting $mp_tarball" >&6;}
+                mp_tarball_extract_cmd=
+                case "$mp_tarball" in
+                        *.tar.gz | *.tgz)
+                                if test "x$GZIP" = "x"; then
+                                        as_fn_error $? "gzip not found" "$LINENO" 5
+                                fi
+                                mp_tarball_extract_cmd="$GZIP"
+                                ;
+                        *.tar.bz2 | *.tbz2)
+                                if test "x$BZIP2" = "x"; then
+                                        as_fn_error $? "bzip2 not found" "$LINENO" 5
+                                fi
+                                mp_tarball_extract_cmd="$BZIP2"
+                                ;
+                        *)
+                                as_fn_error $? "Don't know how to extract tarball $mp_tarball" "$LINENO" 5
+                                ;
+                esac
+                (cd "$mp_tarball_vendordir"; umask 0022; "$mp_tarball_extract_cmd" -d < "$ac_abs_confdir/$mp_tarball" | tar xf - || as_fn_error $? "failed to extract $mp_tarball" "$LINENO" 5)
+        fi
+        if ! test -d "$ac_dir"; then
+                as_fn_error $? "tarball $mp_tarball did not extract to $ac_dir" "$LINENO" 5
+        fi
+
+        as_dir="$ac_dir"; as_fn_mkdir_p
+        ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+        cd "$ac_dir"
+
+        if test "$no_recursion" != yes || test ! -f "$ac_srcdir/config.status"; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: === configuring in $ac_dir ($mp_popdir/$ac_dir)" >&5
+$as_echo "$as_me: === configuring in $ac_dir ($mp_popdir/$ac_dir)" >&6;}
+                if test -f "$ac_srcdir/configure"; then
+                        mp_sub_configure_args=
+                        mp_sub_configure_keys=
+                        # Compile a list of keys that have been given to the MP_CONFIG_TARBALL
+                        # macro; we want to skip copying those parameters from the original
+                        # configure invocation.
+                        for mp_arg in --prefix=${macports_libexec_dir}; do
+                                case $mp_arg in
+                                        --*=* | -*=*)
+                                                        mp_arg_key=$($as_echo "$mp_arg" | sed -E 's/^--?([^=]+)=.*$/\1/')
+                                                                case $mp_arg_key in
+                *\'*)
+                        mp_arg_key=$($as_echo "$mp_arg_key" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg_key="'$mp_arg_key'"
+        as_fn_append mp_sub_configure_keys " $mp_arg_key"
+
+                                        ;
+                                esac
+                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+                        done
+                        # Walk the list of arguments given to the original configure script;
+                        # filter out a few common ones we likely would not want to pass along,
+                        # add --disable-option-checking and filter those already given as
+                        # argument to MP_CONFIG_TARBALL.
+                        # Most of this code is adapted from _AC_OUTPUT_SUBDIRS in
+                        # $prefix/share/autoconf/autoconf/status.m4.
+                        mp_prev=
+                        eval "set x $ac_configure_args"
+                        shift
+                        for mp_arg; do
+                                if test -n "$mp_prev"; then
+                                        mp_prev=
+                                        continue
+                                fi
+                                case $mp_arg in
+                                         -cache-file \
+                                        | --cache-file \
+                                        | --cache-fil \
+                                        | --cache-fi \
+                                        | --cache-f \
+                                        | --cache- \
+                                        | --cache \
+                                        | --cach \
+                                        | --cac \
+                                        | --ca \
+                                        | --c)
+                                                mp_prev=cache_file
+                                        ;
+                                         -cache-file=* \
+                                        | --cache-file=* \
+                                        | --cache-fil=* \
+                                        | --cache-fi=* \
+                                        | --cache-f=* \
+                                        | --cache-=* \
+                                        | --cache=* \
+                                        | --cach=* \
+                                        | --cac=* \
+                                        | --ca=* \
+                                        | --c=*)
+                                                # ignore --cache-file
+                                        ;
+                                         --config-cache \
+                                        | -C)
+                                                # ignore -C
+                                        ;
+                                         -srcdir \
+                                        | --srcdir \
+                                        | -srcdi \
+                                        | -srcd \
+                                        | -src \
+                                        | -sr)
+                                                mp_prev=srcdir
+                                        ;
+                                         -srcdir=* \
+                                        | --srcdir=* \
+                                        | --srcdi=* \
+                                        | --srcd=* \
+                                        | --src=* \
+                                        | --sr=*)
+                                                # ignore --srcdir
+                                        ;
+                                         -prefix \
+                                        | --prefix \
+                                        | --prefi \
+                                        | --pref \
+                                        | --pre \
+                                        | --pr \
+                                        | --p)
+                                                mp_prev=prefix
+                                        ;
+                                         -prefix=* \
+                                        | --prefix=* \
+                                        | --prefi=* \
+                                        | --pref=* \
+                                        | --pre=* \
+                                        | --pr=* \
+                                        | --p=*)
+                                                # ignore --prefix
+                                        ;
+                                        --disable-option-checking)
+                                                # ignore --disable-option-checking
+                                        ;
+                                        --*=* | -*=*)
+                                                        mp_arg_key=$($as_echo "$mp_arg" | sed -E 's/^--?([^=]+)=.*$/\1/')
+                                                        mp_list_contains_present=
+        eval "mp_list_contains_list=\"$mp_sub_configure_keys\""
+        for mp_list_contains_entry in $mp_list_contains_list; do
+                test -z "$mp_list_contains_entry" && continue
+                if test "x$mp_arg_key" = "x$mp_list_contains_entry"; then
+                        mp_list_contains_present=1
+                        break
+                fi
+        done
+        if test "x$mp_list_contains_present" = "x"; then
+                :
+                else
+                                                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+
+        fi
+
+                                        ;
+                                        *)
+                                                # always pass positional arguments
+                                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+                                        ;
+                                esac
+                        done
+
+                        # Now prepend some arguments that should always be present unless
+                        # overriden, such as --prefix, --silent, --disable-option-checking,
+                        # --cache-file, --srcdir
+                        # Pass --prefix unless already given
+                        mp_arg_key=prefix
+                                mp_list_contains_present=
+        eval "mp_list_contains_list=\"$mp_sub_configure_args\""
+        for mp_list_contains_entry in $mp_list_contains_list; do
+                test -z "$mp_list_contains_entry" && continue
+                if test "x$mp_arg_key" = "x$mp_list_contains_entry"; then
+                        mp_list_contains_present=1
+                        break
+                fi
+        done
+        if test "x$mp_list_contains_present" = "x"; then
+                :
+                else
+                                mp_arg="--prefix=$prefix"
+                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+
+        fi
+
+
+                        # Pass --silent
+                        if test "$silent" = yes; then
+                                mp_arg="--silent"
+                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+                        fi
+
+                        # Always prepend --disable-option-checking to silence warnings, since
+                        # different subdirs can have different --enable and --with options.
+                        mp_arg="--disable-option-checking"
+                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+
+                        # Make the cache file name correct relative to the subdirectory.
+                        case $cache_file in
+                                [\\/]* | ?:[\\/]* )
+                                        mp_sub_cache_file=$cache_file
+                                ;
+                                *) # Relative name.
+                                        mp_sub_cache_file=$ac_top_build_prefix$cache_file
+                                ;
+                        esac
+                        mp_arg="--cache-file=$mp_sub_cache_file"
+                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+
+                        mp_arg="--srcdir=$ac_srcdir"
+                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_srcdir/configure $mp_sub_configure_args in $ac_dir" >&5
+$as_echo "$as_me: running $SHELL $ac_srcdir/configure $mp_sub_configure_args in $ac_dir" >&6;}
+                        eval "\$SHELL \$ac_srcdir/configure $mp_sub_configure_args" || as_fn_error $? "configure failed for $ac_dir" "$LINENO" 5
+                else
+                        as_fn_error $? "no configure script found in $ac_dir" "$LINENO" 5
+                fi
+                { $as_echo "$as_me:${as_lineno-$LINENO}: === finished configuring in $ac_dir ($mp_popdir/$ac_dir)" >&5
+$as_echo "$as_me: === finished configuring in $ac_dir ($mp_popdir/$ac_dir)" >&6;}
+        fi
+        cd "$mp_popdir"
+
+VENDOR_TCLTHREAD_SUBDIR=thread${tcl_thread_version}
+VENDOR_TCLTHREAD_INSTALL="install-binaries install-libraries"
+
+
+
+## TclX package
+# TclX is required for signal handling
+
+        # Extract the first word of "gzip", so it can be a program name with args.
+set dummy gzip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GZIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GZIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
</ins><span class="cx"> fi
</span><ins>+GZIP=$ac_cv_path_GZIP
+if test -n "$GZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
+$as_echo "$GZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
</ins><span class="cx">
</span><del>-# Allows building of shared libraries
</del><span class="cx">
</span><ins>+        # Extract the first word of "bzip2", so it can be a program name with args.
+set dummy bzip2; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_BZIP2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $BZIP2 in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_BZIP2="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+BZIP2=$ac_cv_path_BZIP2
+if test -n "$BZIP2"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BZIP2" >&5
+$as_echo "$BZIP2" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+        mp_tarball="vendor/tclx${tclx_version}.tar.bz2"
+        ac_dir=vendor/tclx8.4
+
+        mp_popdir=$(pwd)
+        if ! test -d "$ac_dir"; then
+                mp_tarball_vendordir="$(dirname "$mp_tarball")"
+                as_dir="$mp_tarball_vendordir"; as_fn_mkdir_p
+                { $as_echo "$as_me:${as_lineno-$LINENO}: === extracting $mp_tarball" >&5
+$as_echo "$as_me: === extracting $mp_tarball" >&6;}
+                mp_tarball_extract_cmd=
+                case "$mp_tarball" in
+                        *.tar.gz | *.tgz)
+                                if test "x$GZIP" = "x"; then
+                                        as_fn_error $? "gzip not found" "$LINENO" 5
+                                fi
+                                mp_tarball_extract_cmd="$GZIP"
+                                ;
+                        *.tar.bz2 | *.tbz2)
+                                if test "x$BZIP2" = "x"; then
+                                        as_fn_error $? "bzip2 not found" "$LINENO" 5
+                                fi
+                                mp_tarball_extract_cmd="$BZIP2"
+                                ;
+                        *)
+                                as_fn_error $? "Don't know how to extract tarball $mp_tarball" "$LINENO" 5
+                                ;
+                esac
+                (cd "$mp_tarball_vendordir"; umask 0022; "$mp_tarball_extract_cmd" -d < "$ac_abs_confdir/$mp_tarball" | tar xf - || as_fn_error $? "failed to extract $mp_tarball" "$LINENO" 5)
+        fi
+        if ! test -d "$ac_dir"; then
+                as_fn_error $? "tarball $mp_tarball did not extract to $ac_dir" "$LINENO" 5
+        fi
+
+        as_dir="$ac_dir"; as_fn_mkdir_p
+        ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+        cd "$ac_dir"
+
+        if test "$no_recursion" != yes || test ! -f "$ac_srcdir/config.status"; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: === configuring in $ac_dir ($mp_popdir/$ac_dir)" >&5
+$as_echo "$as_me: === configuring in $ac_dir ($mp_popdir/$ac_dir)" >&6;}
+                if test -f "$ac_srcdir/configure"; then
+                        mp_sub_configure_args=
+                        mp_sub_configure_keys=
+                        # Compile a list of keys that have been given to the MP_CONFIG_TARBALL
+                        # macro; we want to skip copying those parameters from the original
+                        # configure invocation.
+                        for mp_arg in --prefix=${macports_libexec_dir}; do
+                                case $mp_arg in
+                                        --*=* | -*=*)
+                                                        mp_arg_key=$($as_echo "$mp_arg" | sed -E 's/^--?([^=]+)=.*$/\1/')
+                                                                case $mp_arg_key in
+                *\'*)
+                        mp_arg_key=$($as_echo "$mp_arg_key" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg_key="'$mp_arg_key'"
+        as_fn_append mp_sub_configure_keys " $mp_arg_key"
+
+                                        ;
+                                esac
+                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+                        done
+                        # Walk the list of arguments given to the original configure script;
+                        # filter out a few common ones we likely would not want to pass along,
+                        # add --disable-option-checking and filter those already given as
+                        # argument to MP_CONFIG_TARBALL.
+                        # Most of this code is adapted from _AC_OUTPUT_SUBDIRS in
+                        # $prefix/share/autoconf/autoconf/status.m4.
+                        mp_prev=
+                        eval "set x $ac_configure_args"
+                        shift
+                        for mp_arg; do
+                                if test -n "$mp_prev"; then
+                                        mp_prev=
+                                        continue
+                                fi
+                                case $mp_arg in
+                                         -cache-file \
+                                        | --cache-file \
+                                        | --cache-fil \
+                                        | --cache-fi \
+                                        | --cache-f \
+                                        | --cache- \
+                                        | --cache \
+                                        | --cach \
+                                        | --cac \
+                                        | --ca \
+                                        | --c)
+                                                mp_prev=cache_file
+                                        ;
+                                         -cache-file=* \
+                                        | --cache-file=* \
+                                        | --cache-fil=* \
+                                        | --cache-fi=* \
+                                        | --cache-f=* \
+                                        | --cache-=* \
+                                        | --cache=* \
+                                        | --cach=* \
+                                        | --cac=* \
+                                        | --ca=* \
+                                        | --c=*)
+                                                # ignore --cache-file
+                                        ;
+                                         --config-cache \
+                                        | -C)
+                                                # ignore -C
+                                        ;
+                                         -srcdir \
+                                        | --srcdir \
+                                        | -srcdi \
+                                        | -srcd \
+                                        | -src \
+                                        | -sr)
+                                                mp_prev=srcdir
+                                        ;
+                                         -srcdir=* \
+                                        | --srcdir=* \
+                                        | --srcdi=* \
+                                        | --srcd=* \
+                                        | --src=* \
+                                        | --sr=*)
+                                                # ignore --srcdir
+                                        ;
+                                         -prefix \
+                                        | --prefix \
+                                        | --prefi \
+                                        | --pref \
+                                        | --pre \
+                                        | --pr \
+                                        | --p)
+                                                mp_prev=prefix
+                                        ;
+                                         -prefix=* \
+                                        | --prefix=* \
+                                        | --prefi=* \
+                                        | --pref=* \
+                                        | --pre=* \
+                                        | --pr=* \
+                                        | --p=*)
+                                                # ignore --prefix
+                                        ;
+                                        --disable-option-checking)
+                                                # ignore --disable-option-checking
+                                        ;
+                                        --*=* | -*=*)
+                                                        mp_arg_key=$($as_echo "$mp_arg" | sed -E 's/^--?([^=]+)=.*$/\1/')
+                                                        mp_list_contains_present=
+        eval "mp_list_contains_list=\"$mp_sub_configure_keys\""
+        for mp_list_contains_entry in $mp_list_contains_list; do
+                test -z "$mp_list_contains_entry" && continue
+                if test "x$mp_arg_key" = "x$mp_list_contains_entry"; then
+                        mp_list_contains_present=1
+                        break
+                fi
+        done
+        if test "x$mp_list_contains_present" = "x"; then
+                :
+                else
+                                                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+
+        fi
+
+                                        ;
+                                        *)
+                                                # always pass positional arguments
+                                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+                                        ;
+                                esac
+                        done
+
+                        # Now prepend some arguments that should always be present unless
+                        # overriden, such as --prefix, --silent, --disable-option-checking,
+                        # --cache-file, --srcdir
+                        # Pass --prefix unless already given
+                        mp_arg_key=prefix
+                                mp_list_contains_present=
+        eval "mp_list_contains_list=\"$mp_sub_configure_args\""
+        for mp_list_contains_entry in $mp_list_contains_list; do
+                test -z "$mp_list_contains_entry" && continue
+                if test "x$mp_arg_key" = "x$mp_list_contains_entry"; then
+                        mp_list_contains_present=1
+                        break
+                fi
+        done
+        if test "x$mp_list_contains_present" = "x"; then
+                :
+                else
+                                mp_arg="--prefix=$prefix"
+                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+
+        fi
+
+
+                        # Pass --silent
+                        if test "$silent" = yes; then
+                                mp_arg="--silent"
+                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+                        fi
+
+                        # Always prepend --disable-option-checking to silence warnings, since
+                        # different subdirs can have different --enable and --with options.
+                        mp_arg="--disable-option-checking"
+                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+
+                        # Make the cache file name correct relative to the subdirectory.
+                        case $cache_file in
+                                [\\/]* | ?:[\\/]* )
+                                        mp_sub_cache_file=$cache_file
+                                ;
+                                *) # Relative name.
+                                        mp_sub_cache_file=$ac_top_build_prefix$cache_file
+                                ;
+                        esac
+                        mp_arg="--cache-file=$mp_sub_cache_file"
+                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+
+                        mp_arg="--srcdir=$ac_srcdir"
+                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_srcdir/configure $mp_sub_configure_args in $ac_dir" >&5
+$as_echo "$as_me: running $SHELL $ac_srcdir/configure $mp_sub_configure_args in $ac_dir" >&6;}
+                        eval "\$SHELL \$ac_srcdir/configure $mp_sub_configure_args" || as_fn_error $? "configure failed for $ac_dir" "$LINENO" 5
+                else
+                        as_fn_error $? "no configure script found in $ac_dir" "$LINENO" 5
+                fi
+                { $as_echo "$as_me:${as_lineno-$LINENO}: === finished configuring in $ac_dir ($mp_popdir/$ac_dir)" >&5
+$as_echo "$as_me: === finished configuring in $ac_dir ($mp_popdir/$ac_dir)" >&6;}
+        fi
+        cd "$mp_popdir"
+
+VENDOR_TCLX_SUBDIR=tclx8.4
+VENDOR_TCLX_INSTALL="install-binaries install-libraries"
+
+
+
+## Tcllib package
+# Note that Tcllib needs a Tcl interpreter during installation; it will *not*
+# be the one we configure above, because that one isn't built yet. That's not
+# a problem, though -- it's only used during installation.
+
+        # Extract the first word of "gzip", so it can be a program name with args.
+set dummy gzip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GZIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GZIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+GZIP=$ac_cv_path_GZIP
+if test -n "$GZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
+$as_echo "$GZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+        # Extract the first word of "bzip2", so it can be a program name with args.
+set dummy bzip2; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_BZIP2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $BZIP2 in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_BZIP2="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+BZIP2=$ac_cv_path_BZIP2
+if test -n "$BZIP2"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BZIP2" >&5
+$as_echo "$BZIP2" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+        mp_tarball="vendor/tcllib-${tcllib_version}.tar.gz"
+        ac_dir=vendor/tcllib-${tcllib_version}
+
+        mp_popdir=$(pwd)
+        if ! test -d "$ac_dir"; then
+                mp_tarball_vendordir="$(dirname "$mp_tarball")"
+                as_dir="$mp_tarball_vendordir"; as_fn_mkdir_p
+                { $as_echo "$as_me:${as_lineno-$LINENO}: === extracting $mp_tarball" >&5
+$as_echo "$as_me: === extracting $mp_tarball" >&6;}
+                mp_tarball_extract_cmd=
+                case "$mp_tarball" in
+                        *.tar.gz | *.tgz)
+                                if test "x$GZIP" = "x"; then
+                                        as_fn_error $? "gzip not found" "$LINENO" 5
+                                fi
+                                mp_tarball_extract_cmd="$GZIP"
+                                ;
+                        *.tar.bz2 | *.tbz2)
+                                if test "x$BZIP2" = "x"; then
+                                        as_fn_error $? "bzip2 not found" "$LINENO" 5
+                                fi
+                                mp_tarball_extract_cmd="$BZIP2"
+                                ;
+                        *)
+                                as_fn_error $? "Don't know how to extract tarball $mp_tarball" "$LINENO" 5
+                                ;
+                esac
+                (cd "$mp_tarball_vendordir"; umask 0022; "$mp_tarball_extract_cmd" -d < "$ac_abs_confdir/$mp_tarball" | tar xf - || as_fn_error $? "failed to extract $mp_tarball" "$LINENO" 5)
+        fi
+        if ! test -d "$ac_dir"; then
+                as_fn_error $? "tarball $mp_tarball did not extract to $ac_dir" "$LINENO" 5
+        fi
+
+        as_dir="$ac_dir"; as_fn_mkdir_p
+        ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+        cd "$ac_dir"
+
+        if test "$no_recursion" != yes || test ! -f "$ac_srcdir/config.status"; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: === configuring in $ac_dir ($mp_popdir/$ac_dir)" >&5
+$as_echo "$as_me: === configuring in $ac_dir ($mp_popdir/$ac_dir)" >&6;}
+                if test -f "$ac_srcdir/configure"; then
+                        mp_sub_configure_args=
+                        mp_sub_configure_keys=
+                        # Compile a list of keys that have been given to the MP_CONFIG_TARBALL
+                        # macro; we want to skip copying those parameters from the original
+                        # configure invocation.
+                        for mp_arg in --prefix=${macports_libexec_dir}; do
+                                case $mp_arg in
+                                        --*=* | -*=*)
+                                                        mp_arg_key=$($as_echo "$mp_arg" | sed -E 's/^--?([^=]+)=.*$/\1/')
+                                                                case $mp_arg_key in
+                *\'*)
+                        mp_arg_key=$($as_echo "$mp_arg_key" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg_key="'$mp_arg_key'"
+        as_fn_append mp_sub_configure_keys " $mp_arg_key"
+
+                                        ;
+                                esac
+                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+                        done
+                        # Walk the list of arguments given to the original configure script;
+                        # filter out a few common ones we likely would not want to pass along,
+                        # add --disable-option-checking and filter those already given as
+                        # argument to MP_CONFIG_TARBALL.
+                        # Most of this code is adapted from _AC_OUTPUT_SUBDIRS in
+                        # $prefix/share/autoconf/autoconf/status.m4.
+                        mp_prev=
+                        eval "set x $ac_configure_args"
+                        shift
+                        for mp_arg; do
+                                if test -n "$mp_prev"; then
+                                        mp_prev=
+                                        continue
+                                fi
+                                case $mp_arg in
+                                         -cache-file \
+                                        | --cache-file \
+                                        | --cache-fil \
+                                        | --cache-fi \
+                                        | --cache-f \
+                                        | --cache- \
+                                        | --cache \
+                                        | --cach \
+                                        | --cac \
+                                        | --ca \
+                                        | --c)
+                                                mp_prev=cache_file
+                                        ;
+                                         -cache-file=* \
+                                        | --cache-file=* \
+                                        | --cache-fil=* \
+                                        | --cache-fi=* \
+                                        | --cache-f=* \
+                                        | --cache-=* \
+                                        | --cache=* \
+                                        | --cach=* \
+                                        | --cac=* \
+                                        | --ca=* \
+                                        | --c=*)
+                                                # ignore --cache-file
+                                        ;
+                                         --config-cache \
+                                        | -C)
+                                                # ignore -C
+                                        ;
+                                         -srcdir \
+                                        | --srcdir \
+                                        | -srcdi \
+                                        | -srcd \
+                                        | -src \
+                                        | -sr)
+                                                mp_prev=srcdir
+                                        ;
+                                         -srcdir=* \
+                                        | --srcdir=* \
+                                        | --srcdi=* \
+                                        | --srcd=* \
+                                        | --src=* \
+                                        | --sr=*)
+                                                # ignore --srcdir
+                                        ;
+                                         -prefix \
+                                        | --prefix \
+                                        | --prefi \
+                                        | --pref \
+                                        | --pre \
+                                        | --pr \
+                                        | --p)
+                                                mp_prev=prefix
+                                        ;
+                                         -prefix=* \
+                                        | --prefix=* \
+                                        | --prefi=* \
+                                        | --pref=* \
+                                        | --pre=* \
+                                        | --pr=* \
+                                        | --p=*)
+                                                # ignore --prefix
+                                        ;
+                                        --disable-option-checking)
+                                                # ignore --disable-option-checking
+                                        ;
+                                        --*=* | -*=*)
+                                                        mp_arg_key=$($as_echo "$mp_arg" | sed -E 's/^--?([^=]+)=.*$/\1/')
+                                                        mp_list_contains_present=
+        eval "mp_list_contains_list=\"$mp_sub_configure_keys\""
+        for mp_list_contains_entry in $mp_list_contains_list; do
+                test -z "$mp_list_contains_entry" && continue
+                if test "x$mp_arg_key" = "x$mp_list_contains_entry"; then
+                        mp_list_contains_present=1
+                        break
+                fi
+        done
+        if test "x$mp_list_contains_present" = "x"; then
+                :
+                else
+                                                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+
+        fi
+
+                                        ;
+                                        *)
+                                                # always pass positional arguments
+                                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+                                        ;
+                                esac
+                        done
+
+                        # Now prepend some arguments that should always be present unless
+                        # overriden, such as --prefix, --silent, --disable-option-checking,
+                        # --cache-file, --srcdir
+                        # Pass --prefix unless already given
+                        mp_arg_key=prefix
+                                mp_list_contains_present=
+        eval "mp_list_contains_list=\"$mp_sub_configure_args\""
+        for mp_list_contains_entry in $mp_list_contains_list; do
+                test -z "$mp_list_contains_entry" && continue
+                if test "x$mp_arg_key" = "x$mp_list_contains_entry"; then
+                        mp_list_contains_present=1
+                        break
+                fi
+        done
+        if test "x$mp_list_contains_present" = "x"; then
+                :
+                else
+                                mp_arg="--prefix=$prefix"
+                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+
+        fi
+
+
+                        # Pass --silent
+                        if test "$silent" = yes; then
+                                mp_arg="--silent"
+                                                case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+                        fi
+
+                        # Always prepend --disable-option-checking to silence warnings, since
+                        # different subdirs can have different --enable and --with options.
+                        mp_arg="--disable-option-checking"
+                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+
+                        # Make the cache file name correct relative to the subdirectory.
+                        case $cache_file in
+                                [\\/]* | ?:[\\/]* )
+                                        mp_sub_cache_file=$cache_file
+                                ;
+                                *) # Relative name.
+                                        mp_sub_cache_file=$ac_top_build_prefix$cache_file
+                                ;
+                        esac
+                        mp_arg="--cache-file=$mp_sub_cache_file"
+                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+                        mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+
+                        mp_arg="--srcdir=$ac_srcdir"
+                                        case $mp_arg in
+                *\'*)
+                        mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+                ;
+        esac
+        mp_arg="'$mp_arg'"
+        as_fn_append mp_sub_configure_args " $mp_arg"
+
+
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_srcdir/configure $mp_sub_configure_args in $ac_dir" >&5
+$as_echo "$as_me: running $SHELL $ac_srcdir/configure $mp_sub_configure_args in $ac_dir" >&6;}
+                        eval "\$SHELL \$ac_srcdir/configure $mp_sub_configure_args" || as_fn_error $? "configure failed for $ac_dir" "$LINENO" 5
+                else
+                        as_fn_error $? "no configure script found in $ac_dir" "$LINENO" 5
+                fi
+                { $as_echo "$as_me:${as_lineno-$LINENO}: === finished configuring in $ac_dir ($mp_popdir/$ac_dir)" >&5
+$as_echo "$as_me: === finished configuring in $ac_dir ($mp_popdir/$ac_dir)" >&6;}
+        fi
+        cd "$mp_popdir"
+
+VENDOR_TCLLIB_SUBDIR=tcllib-${tcllib_version}
+VENDOR_TCLLIB_INSTALL="install-libraries"
+
+
+
+# Load tclConfig.sh from our private install of Tcl
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
+$as_echo_n "checking for Tcl configuration... " >&6; }
+TCL_BIN_DIR=`(cd vendor/tcl${tcl_version}/unix; pwd)`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found $TCL_BIN_DIR/tclConfig.sh" >&5
+$as_echo "found $TCL_BIN_DIR/tclConfig.sh" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
+$as_echo_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh... " >&6; }
+
+ if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
+$as_echo "loading" >&6; }
+        . $TCL_BIN_DIR/tclConfig.sh
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
+$as_echo "file not found" >&6; }
+ fi
+
+ #
+ # If the TCL_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TCL_LIB_SPEC will be set to the value
+ # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
+ # instead of TCL_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ #
+
+ if test -f $TCL_BIN_DIR/Makefile ; then
+ TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
+ TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
+ TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
+ fi
+
+ #
+ # eval is required to do the TCL_DBGX substitution
+ #
+
+ eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+ eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+ eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+
+ eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+ eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
+ eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
</ins><span class="cx"> { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
</span><span class="cx"> $as_echo_n "checking how to build libraries... " >&6; }
</span><span class="cx"> # Check whether --enable-shared was given.
</span><span class="lines">@@ -9986,13 +11384,15 @@
</span><span class="cx"> fi
</span><span class="cx">
</span><span class="cx">
</span><del>-# Pull compiler / linker values from tclConfig.sh
-LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
-LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
</del><ins>+# Pull compiler/linker values from tclConfig.sh
</ins><span class="cx"> SHLIB_LD=${TCL_SHLIB_LD}
</span><span class="cx"> STLIB_LD=${TCL_STLIB_LD}
</span><span class="cx"> SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
</span><span class="cx"> SHLIB_SUFFIX=${TCL_SHLIB_SUFFIX}
</span><ins>+TCLSH=${TCL_EXEC_PREFIX}/bin/tclsh${TCL_VERSION}
+INTREE_TCLSH=${TCL_BIN_DIR}/tclsh
+# strip possible whitespace at the end of TCL_PACKAGE_PATH
+eval "TCL_PACKAGE_PATH=${TCL_PACKAGE_PATH}"
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -10005,13 +11405,10 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-# misc variables that need to be expanded for substitution into tcl
</del><span class="cx">
</span><del>-oldprefix=$prefix
-if test "x$prefix" = "xNONE" ; then
- prefix=$ac_default_prefix
-fi
</del><ins>+INCLUDES="-I.. -I. $INCLUDES"
</ins><span class="cx">
</span><ins>+
</ins><span class="cx"> # Check if there's an existing DP/MP install too old to upgrade
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -10028,29 +11425,19 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-eval "prefix_expanded=$prefix"
</del><ins>+# Output
+ac_config_files="$ac_config_files Doxyfile Makefile Mk/macports.autoconf.mk doc/Makefile doc/base.mtree doc/macosx.mtree doc/macports.conf doc/prefix.mtree doc/pubkeys.conf portmgr/freebsd/Makefile portmgr/dmg/postflight setupenv.bash src/Makefile src/cregistry/Makefile src/darwintracelib1.0/Makefile src/machista1.0/Makefile src/macports1.0/Makefile src/macports1.0/macports_autoconf.tcl src/macports1.0/macports_test_autoconf.tcl src/package1.0/Makefile src/package1.0/package_test_autoconf.tcl src/pextlib1.0/Makefile src/port/Makefile src/port1.0/Makefile src/port1.0/port_autoconf.tcl src/port1.0/port_test_autoconf.tcl src/programs/Makefile src/registry2.0/Makefile src/registry2.0/registry_autoconf.tcl tests/Makefile tests/test.tcl tests/test/library.tcl tests/test/trace/test.tcl vendor/Makefile"
</ins><span class="cx">
</span><del>-# do this twice, since there is a nested variable of
-# ${prefix} inside of ${sysconfdir}
-eval "MPCONFIGDIR_EXPANDED=$MPCONFIGDIR"
-eval "MPCONFIGDIR_EXPANDED=$MPCONFIGDIR_EXPANDED"
</del><span class="cx">
</span><del>-eval "localstatedir_expanded=$localstatedir"
</del><ins>+ac_config_files="$ac_config_files src/dedup_portfiles.tcl"
</ins><span class="cx">
</span><del>-eval "macports_tcl_dir=${datadir}/macports/Tcl"
-eval "macports_tcl_dir=$macports_tcl_dir"
</del><ins>+ac_config_files="$ac_config_files src/images_to_archives.tcl"
</ins><span class="cx">
</span><ins>+ac_config_files="$ac_config_files src/pkg_mkindex.sh"
</ins><span class="cx">
</span><del>-prefix=$oldprefix
</del><ins>+ac_config_files="$ac_config_files src/upgrade_sources_conf_default.tcl"
</ins><span class="cx">
</span><span class="cx">
</span><del>-# Output
-ac_config_files="$ac_config_files Doxyfile Makefile Mk/macports.autoconf.mk doc/base.mtree doc/macosx.mtree doc/macports.conf doc/prefix.mtree doc/pubkeys.conf portmgr/freebsd/Makefile setupenv.bash src/Makefile src/machista1.0/Makefile src/macports1.0/macports_autoconf.tcl src/macports1.0/macports_test_autoconf.tcl src/macports1.0/macports_fastload.tcl src/package1.0/package_test_autoconf.tcl src/pextlib1.0/Makefile src/port1.0/port_autoconf.tcl src/port1.0/port_test_autoconf.tcl src/programs/Makefile src/registry2.0/registry_autoconf.tcl"
-
-
-ac_config_files="$ac_config_files src/pkg_mkindex.sh"
-
-
</del><span class="cx"> cat >confcache <<\_ACEOF
</span><span class="cx"> # This file is a shell script that caches the results of configure
</span><span class="cx"> # tests run on this system so they can be shared between configure
</span><span class="lines">@@ -10557,7 +11944,7 @@
</span><span class="cx"> # report actual input values of CONFIG_FILES etc. instead of their
</span><span class="cx"> # values after options handling.
</span><span class="cx"> ac_log="
</span><del>-This file was extended by MacPorts $as_me 2.2.99, which was
</del><ins>+This file was extended by MacPorts $as_me 2.3.99, which was
</ins><span class="cx"> generated by GNU Autoconf 2.69. Invocation command line was
</span><span class="cx">
</span><span class="cx"> CONFIG_FILES = $CONFIG_FILES
</span><span class="lines">@@ -10619,7 +12006,7 @@
</span><span class="cx"> cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
</span><span class="cx"> ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
</span><span class="cx"> ac_cs_version="\\
</span><del>-MacPorts config.status 2.2.99
</del><ins>+MacPorts config.status 2.3.99
</ins><span class="cx"> configured by $0, generated by GNU Autoconf 2.69,
</span><span class="cx"> with options \\"\$ac_cs_config\\"
</span><span class="cx">
</span><span class="lines">@@ -10746,25 +12133,41 @@
</span><span class="cx"> "Doxyfile") CONFIG_FILES="$CONFIG_FILES Doxyfile" ;;
</span><span class="cx"> "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
</span><span class="cx"> "Mk/macports.autoconf.mk") CONFIG_FILES="$CONFIG_FILES Mk/macports.autoconf.mk" ;;
</span><ins>+ "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
</ins><span class="cx"> "doc/base.mtree") CONFIG_FILES="$CONFIG_FILES doc/base.mtree" ;;
</span><span class="cx"> "doc/macosx.mtree") CONFIG_FILES="$CONFIG_FILES doc/macosx.mtree" ;;
</span><span class="cx"> "doc/macports.conf") CONFIG_FILES="$CONFIG_FILES doc/macports.conf" ;;
</span><span class="cx"> "doc/prefix.mtree") CONFIG_FILES="$CONFIG_FILES doc/prefix.mtree" ;;
</span><span class="cx"> "doc/pubkeys.conf") CONFIG_FILES="$CONFIG_FILES doc/pubkeys.conf" ;;
</span><span class="cx"> "portmgr/freebsd/Makefile") CONFIG_FILES="$CONFIG_FILES portmgr/freebsd/Makefile" ;;
</span><ins>+ "portmgr/dmg/postflight") CONFIG_FILES="$CONFIG_FILES portmgr/dmg/postflight" ;;
</ins><span class="cx"> "setupenv.bash") CONFIG_FILES="$CONFIG_FILES setupenv.bash" ;;
</span><span class="cx"> "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
</span><ins>+ "src/cregistry/Makefile") CONFIG_FILES="$CONFIG_FILES src/cregistry/Makefile" ;;
+ "src/darwintracelib1.0/Makefile") CONFIG_FILES="$CONFIG_FILES src/darwintracelib1.0/Makefile" ;;
</ins><span class="cx"> "src/machista1.0/Makefile") CONFIG_FILES="$CONFIG_FILES src/machista1.0/Makefile" ;;
</span><ins>+ "src/macports1.0/Makefile") CONFIG_FILES="$CONFIG_FILES src/macports1.0/Makefile" ;;
</ins><span class="cx"> "src/macports1.0/macports_autoconf.tcl") CONFIG_FILES="$CONFIG_FILES src/macports1.0/macports_autoconf.tcl" ;;
</span><span class="cx"> "src/macports1.0/macports_test_autoconf.tcl") CONFIG_FILES="$CONFIG_FILES src/macports1.0/macports_test_autoconf.tcl" ;;
</span><del>- "src/macports1.0/macports_fastload.tcl") CONFIG_FILES="$CONFIG_FILES src/macports1.0/macports_fastload.tcl" ;;
</del><ins>+ "src/package1.0/Makefile") CONFIG_FILES="$CONFIG_FILES src/package1.0/Makefile" ;;
</ins><span class="cx"> "src/package1.0/package_test_autoconf.tcl") CONFIG_FILES="$CONFIG_FILES src/package1.0/package_test_autoconf.tcl" ;;
</span><span class="cx"> "src/pextlib1.0/Makefile") CONFIG_FILES="$CONFIG_FILES src/pextlib1.0/Makefile" ;;
</span><ins>+ "src/port/Makefile") CONFIG_FILES="$CONFIG_FILES src/port/Makefile" ;;
+ "src/port1.0/Makefile") CONFIG_FILES="$CONFIG_FILES src/port1.0/Makefile" ;;
</ins><span class="cx"> "src/port1.0/port_autoconf.tcl") CONFIG_FILES="$CONFIG_FILES src/port1.0/port_autoconf.tcl" ;;
</span><span class="cx"> "src/port1.0/port_test_autoconf.tcl") CONFIG_FILES="$CONFIG_FILES src/port1.0/port_test_autoconf.tcl" ;;
</span><span class="cx"> "src/programs/Makefile") CONFIG_FILES="$CONFIG_FILES src/programs/Makefile" ;;
</span><ins>+ "src/registry2.0/Makefile") CONFIG_FILES="$CONFIG_FILES src/registry2.0/Makefile" ;;
</ins><span class="cx"> "src/registry2.0/registry_autoconf.tcl") CONFIG_FILES="$CONFIG_FILES src/registry2.0/registry_autoconf.tcl" ;;
</span><ins>+ "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+ "tests/test.tcl") CONFIG_FILES="$CONFIG_FILES tests/test.tcl" ;;
+ "tests/test/library.tcl") CONFIG_FILES="$CONFIG_FILES tests/test/library.tcl" ;;
+ "tests/test/trace/test.tcl") CONFIG_FILES="$CONFIG_FILES tests/test/trace/test.tcl" ;;
+ "vendor/Makefile") CONFIG_FILES="$CONFIG_FILES vendor/Makefile" ;;
+ "src/dedup_portfiles.tcl") CONFIG_FILES="$CONFIG_FILES src/dedup_portfiles.tcl" ;;
+ "src/images_to_archives.tcl") CONFIG_FILES="$CONFIG_FILES src/images_to_archives.tcl" ;;
</ins><span class="cx"> "src/pkg_mkindex.sh") CONFIG_FILES="$CONFIG_FILES src/pkg_mkindex.sh" ;;
</span><ins>+ "src/upgrade_sources_conf_default.tcl") CONFIG_FILES="$CONFIG_FILES src/upgrade_sources_conf_default.tcl" ;;
</ins><span class="cx">
</span><span class="cx"> *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
</span><span class="cx"> esac
</span><span class="lines">@@ -11317,7 +12720,10 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> case $ac_file$ac_mode in
</span><ins>+ "src/dedup_portfiles.tcl":F) chmod +x src/dedup_portfiles.tcl ;;
+ "src/images_to_archives.tcl":F) chmod +x src/images_to_archives.tcl ;;
</ins><span class="cx"> "src/pkg_mkindex.sh":F) chmod +x src/pkg_mkindex.sh ;;
</span><ins>+ "src/upgrade_sources_conf_default.tcl":F) chmod +x src/upgrade_sources_conf_default.tcl ;;
</ins><span class="cx">
</span><span class="cx"> esac
</span><span class="cx"> done # for ac_tag
</span><span class="lines">@@ -11351,151 +12757,6 @@
</span><span class="cx"> # would make configure fail if this is the last instruction.
</span><span class="cx"> $ac_cs_success || as_fn_exit 1
</span><span class="cx"> fi
</span><del>-
-#
-# CONFIG_SUBDIRS section.
-#
-if test "$no_recursion" != yes; then
-
- # Remove --cache-file, --srcdir, and --disable-option-checking arguments
- # so they do not pile up.
- ac_sub_configure_args=
- ac_prev=
- eval "set x $ac_configure_args"
- shift
- for ac_arg
- do
- if test -n "$ac_prev"; then
- ac_prev=
- continue
- fi
- case $ac_arg in
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
- | --c=*)
- ;;
- --config-cache | -C)
- ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- ;;
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- ;;
- --disable-option-checking)
- ;;
- *)
- case $ac_arg in
- *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
- esac
- done
-
- # Always prepend --prefix to ensure using the same prefix
- # in subdir configurations.
- ac_arg="--prefix=$prefix"
- case $ac_arg in
- *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
-
- # Pass --silent
- if test "$silent" = yes; then
- ac_sub_configure_args="--silent $ac_sub_configure_args"
- fi
-
- # Always prepend --disable-option-checking to silence warnings, since
- # different subdirs can have different --enable and --with options.
- ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
-
- ac_popdir=`pwd`
- for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
-
- # Do not complain, so a configure script can configure whichever
- # parts of a large source tree are present.
- test -d "$srcdir/$ac_dir" || continue
-
- ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
- $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
- $as_echo "$ac_msg" >&6
- as_dir="$ac_dir"; as_fn_mkdir_p
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- cd "$ac_dir"
-
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- ac_sub_configure=$ac_srcdir/configure.gnu
- elif test -f "$ac_srcdir/configure"; then
- ac_sub_configure=$ac_srcdir/configure
- elif test -f "$ac_srcdir/configure.in"; then
- # This should be Cygnus configure.
- ac_sub_configure=$ac_aux_dir/configure
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
-$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
- ac_sub_configure=
- fi
-
- # The recursion is here.
- if test -n "$ac_sub_configure"; then
- # Make the cache file name correct relative to the subdirectory.
- case $cache_file in
- [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
- *) # Relative name.
-        ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
- esac
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
- # The eval makes quoting arguments work.
- eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
-         --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
-        as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
- fi
-
- cd "$ac_popdir"
- done
-fi
</del><span class="cx"> if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
</span><span class="cx"> { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
</span><span class="cx"> $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
</span></span></pre></div>
<a id="branchesnewhelpsystembaseconfigureac"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/configure.ac (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/configure.ac        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/configure.ac        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -16,6 +16,7 @@
</span><span class="cx">
</span><span class="cx"> # Check user PATH for MP paths, and remove as necessary.
</span><span class="cx"> MP_PATH_SCAN
</span><ins>+MP_FLAGS_SCAN
</ins><span class="cx">
</span><span class="cx"> AC_PATH_PROG(SW_VERS, sw_vers)
</span><span class="cx"> AC_PATH_PROG(DEFAULTS, defaults)
</span><span class="lines">@@ -100,6 +101,26 @@
</span><span class="cx"> AC_PROG_MAKE_SET
</span><span class="cx"> AC_PROG_OBJC([clang cc gcc])
</span><span class="cx">
</span><ins>+# Check for user-supplied paths before searching
+MP_TOOL_PATH(BSDMAKE, [bsdmake/pmake])
+MP_TOOL_PATH(BZIP2, [bzip2])
+MP_TOOL_PATH(CVS, [cvs])
+MP_TOOL_PATH(GNUMAKE, [gnumake])
+MP_TOOL_PATH(GNUTAR, [gnutar])
+MP_TOOL_PATH(LZMA, [lzma])
+MP_TOOL_PATH(MAKE, [make])
+MP_TOOL_PATH(MTREE, [mtree])
+MP_TOOL_PATH(OPEN, [open])
+MP_TOOL_PATH(OPENSSL, [openssl])
+MP_TOOL_PATH(RSYNC, [rsync])
+MP_TOOL_PATH(SED, [sed])
+MP_TOOL_PATH(SVN, [svn])
+MP_TOOL_PATH(SWIG, [swig])
+MP_TOOL_PATH(TAR, [tar])
+MP_TOOL_PATH(XAR, [xar])
+MP_TOOL_PATH(XZ, [xz])
+
+# Search for tool paths. Any set above (via --with-pkg=PATH) will be retained
</ins><span class="cx"> AC_PATH_PROGS(BSDMAKE, [bsdmake pmake], [])
</span><span class="cx"> AC_PATH_PROG(BZIP2, [bzip2], [])
</span><span class="cx"> AC_PATH_PROG(BZR, [bzr], [])
</span><span class="lines">@@ -109,13 +130,13 @@
</span><span class="cx"> AC_PATH_PROG(CVS, [cvs], [])
</span><span class="cx"> AC_PATH_PROG(DIFF, [diff], [])
</span><span class="cx"> AC_PATH_PROG(DSCL, [dscl], [])
</span><del>-AC_PATH_PROG(DSEDITGROUP, [dseditgroup], [])
</del><ins>+AC_PATH_PROG(DSEDITGROUP, [dseditgroup], [], [$PATH:/usr/sbin])
</ins><span class="cx"> AC_PATH_PROG(FILE, [file], [])
</span><span class="cx"> AC_PATH_PROG(FIND, [find], [])
</span><span class="cx"> AC_PATH_PROG(GIT, [git], [])
</span><del>-AC_PATH_PROGS(GNUMAKE, [gnumake gmake], [], [$PATH:/usr/local/bin])
-AC_PATH_PROGS(GNUPATCH, [gnupatch gpatch], [], [$PATH:/usr/local/bin])
-AC_PATH_PROGS(GNUTAR, [gnutar gtar], [], [$PATH:/usr/local/bin])
</del><ins>+AC_PATH_PROGS(GNUMAKE, [gnumake gmake], [])
+AC_PATH_PROGS(GNUPATCH, [gnupatch gpatch], [])
+AC_PATH_PROGS(GNUTAR, [gnutar gtar], [])
</ins><span class="cx"> AC_PATH_PROG(GZIP, [gzip], [])
</span><span class="cx"> AC_PATH_PROG(HDIUTIL, [hdiutil], [])
</span><span class="cx"> AC_PATH_PROG(HG, [hg], [])
</span><span class="lines">@@ -128,7 +149,7 @@
</span><span class="cx"> AC_PATH_PROG(MDFIND, [mdfind], [])
</span><span class="cx"> AC_PATH_PROG(MDLS, [mdls], [])
</span><span class="cx"> AC_PATH_PROG(MKBOM, [mkbom], [])
</span><del>-AC_PATH_PROG(MTREE, [mtree], [], [$PATH:/usr/sbin])
</del><ins>+AC_PATH_PROGS(MTREE, [mtree fmtree], [], [$PATH:/usr/sbin])
</ins><span class="cx"> AC_PATH_PROG(OPEN, [open], [])
</span><span class="cx"> AC_PATH_PROG(OPENSSL, [openssl], [])
</span><span class="cx"> AC_PATH_PROG(PATCH, [patch], [])
</span><span class="lines">@@ -138,7 +159,7 @@
</span><span class="cx"> AC_PATH_PROG(SANDBOX_EXEC, [sandbox-exec], [], [/usr/bin])
</span><span class="cx"> AC_PATH_PROG(SED, [sed])
</span><span class="cx"> AC_PATH_PROG(SVN, [svn], [])
</span><del>-AC_PATH_PROG(SWIG, [swig], [], [$PATH:/usr/local/bin])
</del><ins>+AC_PATH_PROG(SWIG, [swig], [])
</ins><span class="cx"> AC_PATH_PROG(TAR, [tar])
</span><span class="cx"> AC_PATH_PROG(UNZIP, [unzip])
</span><span class="cx"> AC_PATH_PROG(XAR, [xar], [])
</span><span class="lines">@@ -147,28 +168,8 @@
</span><span class="cx"> AC_PATH_PROG(XZ, [xz], [])
</span><span class="cx"> AC_PATH_PROG(ZIP, [zip])
</span><span class="cx">
</span><del>-AC_CHECK_PROG(HAVE_LAUNCHD, [launchd], [yes], [])
</del><ins>+AC_CHECK_PROG(HAVE_LAUNCHD, [launchd], [yes], [], [/sbin])
</ins><span class="cx">
</span><del>-# Define some precious variables allowing user to override PATH for some programs
-AC_ARG_VAR(BSDMAKE, [path to bsdmake/pmake command])
-AC_ARG_VAR(BZIP2, [path to bzip2 command])
-AC_ARG_VAR(CVS, [path to cvs command])
-AC_ARG_VAR(GNUMAKE, [path to gnumake command])
-AC_ARG_VAR(GNUTAR, [path to gnutar command])
-AC_ARG_VAR(LZMA, [path to lzma command])
-AC_ARG_VAR(MAKE, [path to make command])
-AC_ARG_VAR(MAN, [path to man command])
-AC_ARG_VAR(MTREE, [path to mtree command])
-AC_ARG_VAR(OPEN, [path to open command])
-AC_ARG_VAR(OPENSSL, [path to openssl command])
-AC_ARG_VAR(RSYNC, [path to rsync command])
-AC_ARG_VAR(SED, [path to sed command])
-AC_ARG_VAR(SVN, [path to svn command])
-AC_ARG_VAR(SWIG, [path to swig command])
-AC_ARG_VAR(TAR, [path to tar command])
-AC_ARG_VAR(XAR, [path to xar command])
-AC_ARG_VAR(XZ, [path to xz command])
-
</del><span class="cx"> if test "x$MTREE" = "x"; then
</span><span class="cx"> AC_MSG_ERROR([mtree not found])
</span><span class="cx"> fi
</span><span class="lines">@@ -243,11 +244,10 @@
</span><span class="cx">         readline/history.h readline/readline.h spawn.h sys/cdefs.h sys/event.h sys/fcntl.h sys/file.h \
</span><span class="cx">         sys/paths.h sys/socket.h sys/sysctl.h utime.h])
</span><span class="cx">
</span><del>-INCLUDES="-I.. -I. $INCLUDES"
-
</del><span class="cx"> # Checks for library functions.
</span><del>-AC_CHECK_FUNCS([OSAtomicCompareAndSwap32 OSAtomicCompareAndSwap64 OSAtomicCompareAndSwapPtr bzero \
-        clearenv copyfile fgetln flock fls kqueue lockf memset posix_spawn setmode strcasecmp strlcat \
</del><ins>+AC_CHECK_FUNCS([OSAtomicCompareAndSwap32 OSAtomicCompareAndSwap64 \
+        OSAtomicCompareAndSwapPtr __getdirentries64 bzero clearenv copyfile fgetln \
+        flock fls kqueue lockf memset posix_spawn setmode strcasecmp strlcat \
</ins><span class="cx">         strlcpy strncasecmp sysctlbyname])
</span><span class="cx"> AC_SUBST([ac_cv_func_strlcat])
</span><span class="cx">
</span><span class="lines">@@ -277,27 +277,9 @@
</span><span class="cx"> AC_DEFINE([MIN_USABLE_UID], [500], [Lowest non-system-reserved UID.])
</span><span class="cx"> AC_DEFINE([MIN_USABLE_GID], [500], [Lowest non-system-reserved GID.])
</span><span class="cx">
</span><del>-# Load tclConfig.sh
-SC_PATH_TCLCONFIG
-SC_LOAD_TCLCONFIG
</del><ins>+# Substitute platform for base compatibility check
+MP_PLATFORM
</ins><span class="cx">
</span><del>-# Check for Tcl public headers
-dnl XXX         hardwire CYGPATH (CYGPATH must be set for SC_PUBLIC_TCL_HEADERS)
-CYGPATH=echo
-SC_PUBLIC_TCL_HEADERS
-
-# Check for tclsh binary
-MP_PROG_TCLSH
-
-# Substitute Tcl platform for base compatibility check
-MP_TCL_PLATFORM
-
-# Check for Tcl package path
-MP_TCL_PACKAGE_DIR
-
-# Check if thread is enabled.
-MP_TCL_THREAD_SUPPORT
-
</del><span class="cx"> ## libcurl
</span><span class="cx"> MP_LIBCURL_FLAGS
</span><span class="cx">
</span><span class="lines">@@ -312,111 +294,149 @@
</span><span class="cx"> # check whether trace mode is supported on this platform
</span><span class="cx"> MP_TRACEMODE_SUPPORT
</span><span class="cx">
</span><del>-# Determine if we need to install some bundled packages
-OUR_INCLUDED_PACKAGES=
</del><ins>+# misc variables that need to be expanded for substitution into tcl
+oldprefix=$prefix
+oldexec_prefix=$exec_prefix
+if test "x$prefix" = "xNONE" ; then
+ prefix=$ac_default_prefix
+fi
+if test "x$exec_prefix" = "xNONE" ; then
+        exec_prefix=$prefix
+fi
+eval "prefix_expanded=$prefix"
+eval "exec_prefix_expanded=$exec_prefix"
+AC_SUBST(prefix_expanded)
+# do this twice, since there is a nested variable of
+# ${prefix} inside of ${sysconfdir}
+eval "MPCONFIGDIR_EXPANDED=$MPCONFIGDIR"
+eval "MPCONFIGDIR_EXPANDED=$MPCONFIGDIR_EXPANDED"
+AC_SUBST(MPCONFIGDIR_EXPANDED)
+eval "localstatedir_expanded=$localstatedir"
+AC_SUBST(localstatedir_expanded)
+# Compute the libexec dir for the vendor packages
+eval "macports_libexec_dir=${libexecdir}/macports"
+eval "macports_libexec_dir=$macports_libexec_dir"
+prefix=$oldprefix
+exec_prefix=$oldexec_prefix
</ins><span class="cx">
</span><del>-## Thread package.
-AC_ARG_WITH(
-                included-tclthread,
-                AS_HELP_STRING([--with-included-tclthread],
-                        [install included Thread package.]),
-                [with_included_tclthread=$withval],
-                [with_included_tclthread="unspecified"])
</del><ins>+## Tcl package
+tcl_version=8.5.15
+tcl_thread_version=2.7.0
+tclx_version=8.4.1
+tcllib_version=1.15
+MP_CONFIG_TARBALL([vendor/tcl${tcl_version}-src.tar.gz], [vendor/tcl${tcl_version}/unix], [--prefix=${macports_libexec_dir} --enable-threads])
+VENDOR_TCL_SUBDIR=tcl${tcl_version}/unix
+VENDOR_TCL_INSTALL="install-binaries install-libraries"
+AC_SUBST(VENDOR_TCL_SUBDIR)
+AC_SUBST(VENDOR_TCL_INSTALL)
</ins><span class="cx">
</span><del>-# Check if thread package is already installed.
-if test "x$with_included_tclthread" = "xunspecified" ; then
-        MP_TCL_PACKAGE(
-                [Thread],
-                [AC_MSG_RESULT([yes]); with_included_tclthread=no],
-                [AC_MSG_RESULT([no]); with_included_tclthread=yes])
-fi
</del><ins>+# Set up some variables needed by MacPorts' Tcl setup
+VENDOR_DESTROOT=vendor/vendor-destroot
+AC_SUBST(VENDOR_DESTROOT)
</ins><span class="cx">
</span><del>-# If thread package isn't installed, configure and install thread package.
-if test "$with_included_tclthread" = "yes"; then
-        OUR_INCLUDED_PACKAGES="$OUR_INCLUDED_PACKAGES thread2.6"
-        AC_CONFIG_SUBDIRS([src/thread2.6])
-        # Extract thread package
-        (cd src/; gzip -d < thread2.6.tar.gz | tar xf -)
-        # Patch thread package (so thread2.6 is the vanilla distribution directory)
-        patch -p0 < src/thread2.6.diff
-fi
</del><ins>+## Tcl Thread package
+# Tcl supports Threads internally, but to use threads from Tcl code we need
+# this package
+MP_CONFIG_TARBALL([vendor/thread${tcl_thread_version}.tar.gz], [vendor/thread${tcl_thread_version}], [--prefix=${macports_libexec_dir}])
+VENDOR_TCLTHREAD_SUBDIR=thread${tcl_thread_version}
+VENDOR_TCLTHREAD_INSTALL="install-binaries install-libraries"
+AC_SUBST(VENDOR_TCLTHREAD_SUBDIR)
+AC_SUBST(VENDOR_TCLTHREAD_INSTALL)
</ins><span class="cx">
</span><del>-# Allows building of shared libraries
</del><ins>+## TclX package
+# TclX is required for signal handling
+MP_CONFIG_TARBALL([vendor/tclx${tclx_version}.tar.bz2], [vendor/tclx8.4], [--prefix=${macports_libexec_dir}])
+VENDOR_TCLX_SUBDIR=tclx8.4
+VENDOR_TCLX_INSTALL="install-binaries install-libraries"
+AC_SUBST(VENDOR_TCLX_SUBDIR)
+AC_SUBST(VENDOR_TCLX_INSTALL)
+
+## Tcllib package
+# Note that Tcllib needs a Tcl interpreter during installation; it will *not*
+# be the one we configure above, because that one isn't built yet. That's not
+# a problem, though -- it's only used during installation.
+MP_CONFIG_TARBALL([vendor/tcllib-${tcllib_version}.tar.gz], [vendor/tcllib-${tcllib_version}], [--prefix=${macports_libexec_dir}])
+VENDOR_TCLLIB_SUBDIR=tcllib-${tcllib_version}
+VENDOR_TCLLIB_INSTALL="install-libraries"
+AC_SUBST(VENDOR_TCLLIB_SUBDIR)
+AC_SUBST(VENDOR_TCLLIB_INSTALL)
+
+# Load tclConfig.sh from our private install of Tcl
+AC_MSG_CHECKING([for Tcl configuration])
+TCL_BIN_DIR=`(cd vendor/tcl${tcl_version}/unix; pwd)`
+AC_MSG_RESULT([found $TCL_BIN_DIR/tclConfig.sh])
+SC_LOAD_TCLCONFIG
</ins><span class="cx"> SC_ENABLE_SHARED
</span><span class="cx">
</span><del>-# Pull compiler / linker values from tclConfig.sh
-LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
-LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
</del><ins>+# Pull compiler/linker values from tclConfig.sh
</ins><span class="cx"> SHLIB_LD=${TCL_SHLIB_LD}
</span><span class="cx"> STLIB_LD=${TCL_STLIB_LD}
</span><span class="cx"> SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
</span><span class="cx"> SHLIB_SUFFIX=${TCL_SHLIB_SUFFIX}
</span><ins>+TCLSH=${TCL_EXEC_PREFIX}/bin/tclsh${TCL_VERSION}
+INTREE_TCLSH=${TCL_BIN_DIR}/tclsh
+# strip possible whitespace at the end of TCL_PACKAGE_PATH
+eval "TCL_PACKAGE_PATH=${TCL_PACKAGE_PATH}"
</ins><span class="cx">
</span><del>-AC_SUBST(INCLUDES)
</del><ins>+AC_SUBST(SHLIB_LD)
</ins><span class="cx"> AC_SUBST(STLIB_LD)
</span><del>-AC_SUBST(SHLIB_LD)
</del><span class="cx"> AC_SUBST(SHLIB_CFLAGS)
</span><del>-AC_SUBST(SHLIB_LDFLAGS)
</del><span class="cx"> AC_SUBST(SHLIB_SUFFIX)
</span><del>-AC_SUBST(TCL_DEFS)
</del><ins>+AC_SUBST(TCL_PREFIX)
+AC_SUBST(TCL_VERSION)
+AC_SUBST(TCL_PACKAGE_PATH)
</ins><span class="cx"> AC_SUBST(TCL_STUB_LIB_SPEC)
</span><del>-AC_SUBST(TCL_CC)
-AC_SUBST(OUR_INCLUDED_PACKAGES)
</del><ins>+AC_SUBST(TCL_SRC_DIR)
+AC_SUBST(TCLSH)
+AC_SUBST(INTREE_TCLSH)
</ins><span class="cx">
</span><del>-# misc variables that need to be expanded for substitution into tcl
</del><ins>+INCLUDES="-I.. -I. $INCLUDES"
+AC_SUBST(INCLUDES)
</ins><span class="cx">
</span><del>-oldprefix=$prefix
-if test "x$prefix" = "xNONE" ; then
- prefix=$ac_default_prefix
-fi
-
</del><span class="cx"> # Check if there's an existing DP/MP install too old to upgrade
</span><span class="cx"> MP_CHECK_OLDLAYOUT
</span><span class="cx">
</span><del>-eval "prefix_expanded=$prefix"
-AC_SUBST(prefix_expanded)
-# do this twice, since there is a nested variable of
-# ${prefix} inside of ${sysconfdir}
-eval "MPCONFIGDIR_EXPANDED=$MPCONFIGDIR"
-eval "MPCONFIGDIR_EXPANDED=$MPCONFIGDIR_EXPANDED"
-AC_SUBST(MPCONFIGDIR_EXPANDED)
-eval "localstatedir_expanded=$localstatedir"
-AC_SUBST(localstatedir_expanded)
-eval "macports_tcl_dir=${datadir}/macports/Tcl"
-eval "macports_tcl_dir=$macports_tcl_dir"
-AC_SUBST(macports_tcl_dir)
-
-prefix=$oldprefix
-
-dnl man page settings (compressed, links, etc)
-dnl
-dnl SC_CONFIG_MANPAGES
-
</del><span class="cx"> # Output
</span><span class="cx"> AC_CONFIG_FILES([
</span><span class="cx">         Doxyfile
</span><span class="cx">         Makefile
</span><span class="cx">         Mk/macports.autoconf.mk
</span><ins>+        doc/Makefile
</ins><span class="cx">         doc/base.mtree
</span><span class="cx">         doc/macosx.mtree
</span><span class="cx">         doc/macports.conf
</span><span class="cx">         doc/prefix.mtree
</span><span class="cx">         doc/pubkeys.conf
</span><span class="cx">         portmgr/freebsd/Makefile
</span><ins>+        portmgr/dmg/postflight
</ins><span class="cx">         setupenv.bash
</span><span class="cx">         src/Makefile
</span><ins>+        src/cregistry/Makefile
+        src/darwintracelib1.0/Makefile
</ins><span class="cx">         src/machista1.0/Makefile
</span><ins>+        src/macports1.0/Makefile
</ins><span class="cx">         src/macports1.0/macports_autoconf.tcl
</span><span class="cx">         src/macports1.0/macports_test_autoconf.tcl
</span><del>-        src/macports1.0/macports_fastload.tcl
</del><ins>+        src/package1.0/Makefile
</ins><span class="cx">         src/package1.0/package_test_autoconf.tcl
</span><span class="cx">         src/pextlib1.0/Makefile
</span><ins>+        src/port/Makefile
+        src/port1.0/Makefile
</ins><span class="cx">         src/port1.0/port_autoconf.tcl
</span><span class="cx">         src/port1.0/port_test_autoconf.tcl
</span><span class="cx">         src/programs/Makefile
</span><ins>+        src/registry2.0/Makefile
</ins><span class="cx">         src/registry2.0/registry_autoconf.tcl
</span><ins>+        tests/Makefile
+        tests/test.tcl
+        tests/test/library.tcl
+        tests/test/trace/test.tcl
+        vendor/Makefile
</ins><span class="cx"> ])
</span><span class="cx">
</span><ins>+AC_CONFIG_FILES([src/dedup_portfiles.tcl], [chmod +x src/dedup_portfiles.tcl])
+AC_CONFIG_FILES([src/images_to_archives.tcl], [chmod +x src/images_to_archives.tcl])
</ins><span class="cx"> AC_CONFIG_FILES([src/pkg_mkindex.sh], [chmod +x src/pkg_mkindex.sh])
</span><ins>+AC_CONFIG_FILES([src/upgrade_sources_conf_default.tcl], [chmod +x src/upgrade_sources_conf_default.tcl])
</ins><span class="cx">
</span><span class="cx"> AC_OUTPUT
</span></span></pre></div>
<a id="branchesnewhelpsystembasedoc"></a>
<div class="propset"><h4>Property changes: branches/new-help-system/base/doc</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="modfile"><h4>Modified: svn:ignore</h4></div>
<span class="cx">pubkeys.conf
</span><span class="cx">base.mtree
</span><span class="cx">prefix.mtree
</span><span class="cx">macosx.mtree
</span><span class="cx">asciidoc.conf
</span><span class="cx">*[0-9].gz
</span><span class="cx">*[0-9].xml
</span><span class="cx">*[0-9].html
</span><span class="cx">.dep
</span><span class="cx"> + Makefile
</span><span class="cx">macports.conf
</span><span class="cx">pubkeys.conf
</span><span class="cx">base.mtree
</span><span class="cx">prefix.mtree
</span><span class="cx">macosx.mtree
</span><span class="cx">asciidoc.conf
</span><span class="cx">*[0-9].gz
</span><span class="cx">*[0-9].xml
</span><span class="cx">*[0-9].html
</span><span class="cx">.dep
</span><a id="branchesnewhelpsystembasedocMakefile"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/doc/Makefile (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/doc/Makefile        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/doc/Makefile        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,139 +0,0 @@
</span><del>-# If this is a selfupdate, we never want to run any tools from the target
-# prefix (could be broken or wrong architecture), otherwise try to use the
-# tools from the target prefix for generating man pages if they exist
-ifeq ($(SELFUPDATING),1)
-ASCIIDOC=
-XSLTPROC=
-else
-ASCIIDOC=        $(wildcard ${prefix}/bin/asciidoc)
-XSLTPROC=        $(wildcard ${prefix}/bin/xsltproc)
-endif
-
-ASCIIDOCFLAGS=        -f asciidoc.conf -a manversion=${MACPORTS_VERSION}
-XSLTFLAGS=        -nonet
-
-MAN1=                port.1 \
-                port-activate.1 \
-                port-build.1 \
-                port-checksum.1 \
-                port-configure.1 \
-                port-deactivate.1 \
-                port-destroot.1 \
-                port-edit.1 \
-                port-extract.1 \
-                port-fetch.1 \
-                port-install.1 \
-                port-patch.1 \
-                port-uninstall.1
-MAN5=                macports.conf.5
-MAN7=                portfile.7 portstyle.7 porthier.7 portgroup.7 portundocumented.7
-MAN=                ${MAN1} ${MAN5} ${MAN7}
-
-# Filter man pages with existing source files
-MANTXT=                $(wildcard ${MAN:%=%.txt})
-# Only those can be transformed into XML
-MANXML=                ${MANTXT:.txt=.xml}
-# HTML version for all man pages
-MANHTML=        ${MAN:%=%.html}
-
-CONF=         archive_sites.conf macports.conf pubkeys.conf sources.conf variants.conf
-INSTALLDIR=        ${DESTDIR}${prefix}
-TOPSRCDIR=        ..
-
-ifneq ($(MAKECMDGOALS),distclean)
-include ../Mk/macports.autoconf.mk
-endif
-
-all: man
-
-# Update "include::" dependencies
-.dep: $(wildcard *.txt) asciidoc-deps.tcl
-        $(TCLSH) ./asciidoc-deps.tcl *.txt > $@
-
--include .dep
-
-.PHONY: man xml html
-
-man: ${MAN} ${MAN:%=%.gz}
-
-xml: ${MANXML}
-
-html: ${MANHTML}
-
-clean:
-        rm -f *.{1,5,7}.html
-        rm -f *.{1,5,7}.xml
-        rm -f *.{1,5,7}.gz
-        rm -f .dep
-
-test:
-
-distclean: clean
-        rm -f macports.conf base.mtree macosx.mtree prefix.mtree pubkeys.conf
-
-%.1.gz: %.1
-        gzip -c $^ > $@
-
-%.5.gz: %.5
-        gzip -c $^ > $@
-
-%.7.gz: %.7
-        gzip -c $^ > $@
-
-%: %.soelim
-        ln -f $< $@
-
-%.html: %.soelim
-        ln -sf $(shell basename $$(awk '{print $$2}' < $<)).html $@
-
-# Define these rules only if both asciidoc and xsltproc are available
-ifneq ($(ASCIIDOC)$(XSLTPROC),)
-%: %.xml manpage.xsl
-        $(XSLTPROC) $(XSLTFLAGS) manpage.xsl $<
-
-%.xml: %.txt asciidoc.conf
-        $(ASCIIDOC) $(ASCIIDOCFLAGS) -d manpage -b docbook $<
-
-%.html: %.txt asciidoc.conf
-        $(ASCIIDOC) $(ASCIIDOCFLAGS) -d manpage -b xhtml11 $<
-else
-man: ${MAN} ${MAN:%=%.gz}
-        @echo "* Warning: Using pre-generated man pages only."
-        @echo "* asciidoc and xsltproc are required to generate man pages from source."
-
-%.xml %.html: | %.txt
-        @echo "* In order to modify and generate output from these source files,"
-        @echo "* please install asciidoc and xsltproc or use"
-        @echo "* $(MAKE) ASCIIDOC=.../bin/asciidoc XSLTPROC=../bin/xsltproc"
-        @echo "* with appropriate paths."
-        @exit 1
-endif
-
-install: all
-        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${INSTALLDIR}"
-        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${DESTDIR}${mpconfigdir}"
-
-        < prefix.mtree $(MTREE) -U -e -p "${INSTALLDIR}" > /dev/null
-        < base.mtree $(MTREE) -U -e -p "${INSTALLDIR}" > /dev/null
-
-        for f in ${CONF}; do \
-                $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$f "${DESTDIR}${mpconfigdir}/$${f}.default"; \
-                if test ! -e "${DESTDIR}${mpconfigdir}/$$f" ; then \
-                        set -x; \
-                        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 $$f "${DESTDIR}${mpconfigdir}"; \
-                fi; \
-        done
-
-        # delete old uncompressed man pages if they exist
-        for m in ${MAN1}; do rm -f "${INSTALLDIR}/share/man/man1/$$m" ; done
-        for m in ${MAN5}; do rm -f "${INSTALLDIR}/share/man/man5/$$m" ; done
-        for m in ${MAN7}; do rm -f "${INSTALLDIR}/share/man/man7/$$m" ; done
-
-        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}/share/macports/install
-        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 base.mtree ${INSTALLDIR}/share/macports/install/
-        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 prefix.mtree ${INSTALLDIR}/share/macports/install/
-        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 macosx.mtree ${INSTALLDIR}/share/macports/install/
-
-        for page in ${MAN1} ${MAN5} ${MAN7}; do \
-                $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $${page}.gz ${INSTALLDIR}/share/man/man$$(echo $$page | sed -e 's/.*\.//'); \
-        done
</del></span></pre></div>
<a id="branchesnewhelpsystembasedocMakefileinfromrev122997trunkbasedocMakefilein"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/doc/Makefile.in (from rev 122997, trunk/base/doc/Makefile.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/doc/Makefile.in         (rev 0)
+++ branches/new-help-system/base/doc/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,150 @@
</span><ins>+srcdir = @srcdir@
+VPATH = @srcdir@
+
+# If this is a selfupdate, we never want to run any tools from the target
+# prefix (could be broken or wrong architecture), otherwise try to use the
+# tools from the target prefix for generating man pages if they exist
+ifeq ($(SELFUPDATING),1)
+ASCIIDOC=
+XSLTPROC=
+else
+ASCIIDOC=        $(wildcard ${prefix}/bin/asciidoc)
+XSLTPROC=        $(wildcard ${prefix}/bin/xsltproc)
+endif
+
+ASCIIDOCFLAGS=        -f asciidoc.conf -a manversion=${MACPORTS_VERSION}
+XSLTFLAGS=        -nonet
+
+MAN1=                port.1 \
+                port-activate.1 \
+                port-build.1 \
+                port-checksum.1 \
+                port-configure.1 \
+                port-deactivate.1 \
+                port-destroot.1 \
+                port-edit.1 \
+                port-extract.1 \
+                port-fetch.1 \
+                port-install.1 \
+                port-patch.1 \
+                port-uninstall.1
+MAN5=                macports.conf.5
+MAN7=                portfile.7 portstyle.7 porthier.7 portgroup.7 portundocumented.7
+MAN=                ${MAN1} ${MAN5} ${MAN7}
+
+# Filter man pages with existing source files
+MANTXT=                $(wildcard ${MAN:%=%.txt})
+# Only those can be transformed into XML
+MANXML=                ${MANTXT:.txt=.xml}
+# HTML version for all man pages
+MANHTML=        ${MAN:%=%.html}
+
+CONF=         archive_sites.conf macports.conf pubkeys.conf sources.conf variants.conf
+INSTALLDIR=        ${DESTDIR}${prefix}
+TOPSRCDIR=        ..
+
+ifneq ($(MAKECMDGOALS),distclean)
+include ../Mk/macports.autoconf.mk
+endif
+
+all: man
+
+# Update "include::" dependencies
+.dep: $(wildcard *.txt) asciidoc-deps.tcl
+        $(INTREE_TCLSH) ./asciidoc-deps.tcl *.txt > $@
+
+-include .dep
+
+.PHONY: man xml html
+
+man: ${MAN} ${MAN:%=%.gz}
+
+xml: ${MANXML}
+
+html: ${MANHTML}
+
+clean:
+        rm -f *.{1,5,7}.html
+        rm -f *.{1,5,7}.xml
+        rm -f *.{1,5,7}.gz
+        rm -f .dep
+
+test:
+
+distclean: clean
+        rm -f macports.conf base.mtree macosx.mtree prefix.mtree pubkeys.conf
+        rm -f Makefile
+
+%.1.gz: %.1
+        gzip -c $^ > $@
+
+%.5.gz: %.5
+        gzip -c $^ > $@
+
+%.7.gz: %.7
+        gzip -c $^ > $@
+
+%: %.soelim
+        ln -f $< $@
+
+%.html: %.soelim
+        ln -sf $(shell basename $$(awk '{print $$2}' < $<)).html $@
+
+# Define these rules only if both asciidoc and xsltproc are available
+ifneq ($(ASCIIDOC)$(XSLTPROC),)
+%: %.xml manpage.xsl
+        $(XSLTPROC) $(XSLTFLAGS) manpage.xsl $<
+
+%.xml: %.txt asciidoc.conf
+        $(ASCIIDOC) $(ASCIIDOCFLAGS) -d manpage -b docbook $<
+
+%.html: %.txt asciidoc.conf
+        $(ASCIIDOC) $(ASCIIDOCFLAGS) -d manpage -b xhtml11 $<
+else
+man: ${MAN} ${MAN:%=%.gz}
+        @echo "* Warning: Using pre-generated man pages only."
+        @echo "* asciidoc and xsltproc are required to generate man pages from source."
+
+%.xml %.html: | %.txt
+        @echo "* In order to modify and generate output from these source files,"
+        @echo "* please install asciidoc and xsltproc or use"
+        @echo "* $(MAKE) ASCIIDOC=.../bin/asciidoc XSLTPROC=../bin/xsltproc"
+        @echo "* with appropriate paths."
+        @exit 1
+endif
+
+install: all
+        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
+        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${DESTDIR}${mpconfigdir}"
+
+        < prefix.mtree $(MTREE) -U -e -p "${INSTALLDIR}" > /dev/null
+        < base.mtree $(MTREE) -U -e -p "${INSTALLDIR}" > /dev/null
+ifneq (,$(findstring darwin,@build_os@))
+ifneq (8,@OS_MAJOR@)
+# Tiger's chmod doesn't accept -h
+# mtree with umask 0077 doesn't get the permissions of the symlink right
+        chmod -h 755 "${INSTALLDIR}/man"
+endif
+endif
+
+        for f in ${CONF}; do \
+                $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$$f" "${DESTDIR}${mpconfigdir}/$${f}.default"; \
+                if test ! -e "${DESTDIR}${mpconfigdir}/$$f" ; then \
+                        set -x; \
+                        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 644 "$$f" "${DESTDIR}${mpconfigdir}"; \
+                fi; \
+        done
+
+        # delete old uncompressed man pages if they exist
+        for m in ${MAN1}; do rm -f "${INSTALLDIR}/share/man/man1/$$m" ; done
+        for m in ${MAN5}; do rm -f "${INSTALLDIR}/share/man/man5/$$m" ; done
+        for m in ${MAN7}; do rm -f "${INSTALLDIR}/share/man/man7/$$m" ; done
+
+        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}/share/macports/install"
+        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 644 base.mtree "${INSTALLDIR}/share/macports/install/"
+        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 644 prefix.mtree "${INSTALLDIR}/share/macports/install/"
+        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 644 macosx.mtree "${INSTALLDIR}/share/macports/install/"
+
+        for page in ${MAN1} ${MAN5} ${MAN7}; do \
+                $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$${page}.gz" "${INSTALLDIR}/share/man/man$$(echo $$page | sed -e 's/.*\.//')"; \
+        done
</ins></span></pre></div>
<a id="branchesnewhelpsystembasedocmacportsconf5"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/doc/macports.conf.5 (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/doc/macports.conf.5        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/doc/macports.conf.5        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> '\" t
</span><del>-.TH "MACPORTS\&.CONF" "5" "2013\-03\-10" "MacPorts 2\&.1\&.99" "MacPorts Manual"
</del><ins>+.TH "MACPORTS\&.CONF" "5" "2013\-03\-10" "MacPorts 2\&.3\&.99" "MacPorts Manual"
</ins><span class="cx"> .\" -----------------------------------------------------------------
</span><span class="cx"> .\" * Define some portability stuff
</span><span class="cx"> .\" -----------------------------------------------------------------
</span></span></pre></div>
<a id="branchesnewhelpsystembasedocmacportsconfin"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/doc/macports.conf.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/doc/macports.conf.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/doc/macports.conf.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx">
</span><span class="cx"> # Space-delimited list of CPU architectures to target when building
</span><span class="cx"> # universal. Defaults to "i386 ppc" on OS X 10.5 and earlier and
</span><del>-# "x64_64 i386" on OS X 10.6 and later.
</del><ins>+# "x86_64 i386" on OS X 10.6 and later.
</ins><span class="cx"> universal_archs         @UNIVERSAL_ARCHS@
</span><span class="cx">
</span><span class="cx"> # Use ccache, a compiler cache for C, C++, Objective-C, and
</span><span class="lines">@@ -105,8 +105,8 @@
</span><span class="cx"> #keeplogs         no
</span><span class="cx">
</span><span class="cx"> # The rsync server for fetching MacPorts base during selfupdate. This
</span><del>-# setting is NOT used when downloading the ports tree; the sources for
-# the ports tree are set in sources.conf. See
</del><ins>+# setting is NOT used when downloading ports trees; ports trees are
+# configured using the file referenced by sources_conf. See
</ins><span class="cx"> # https://trac.macports.org/wiki/Mirrors#MacPortsSource for a list of
</span><span class="cx"> # available servers.
</span><span class="cx"> #rsync_server         rsync.macports.org
</span><span class="lines">@@ -128,11 +128,13 @@
</span><span class="cx"> # - default: Create StartupItems for launchd on OS X and for rc.d on
</span><span class="cx"> # other platforms.
</span><span class="cx"> # - none: Disable creation of StartupItems.
</span><ins>+# This setting only applies when building ports from source.
</ins><span class="cx"> #startupitem_type         default
</span><span class="cx">
</span><span class="cx"> # Create system-level symlinks to generated StartupItems. If set to
</span><span class="cx"> # "no", symlinks will not be created; otherwise, symlinks will be placed
</span><span class="cx"> # in /Library/LaunchDaemons or /Library/LaunchAgents as appropriate.
</span><ins>+# This setting only applies when building ports from source.
</ins><span class="cx"> #startupitem_install        yes
</span><span class="cx">
</span><span class="cx"> # Extra environment variables to keep. MacPorts sanitizes its
</span></span></pre></div>
<a id="branchesnewhelpsystembasedocportactivate1"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/doc/port-activate.1 (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/doc/port-activate.1        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/doc/port-activate.1        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> '\" t
</span><del>-.TH "PORT\-ACTIVATE" "1" "2013\-03\-10" "MacPorts 2\&.1\&.99" "MacPorts Manual"
</del><ins>+.TH "PORT\-ACTIVATE" "1" "2013\-03\-10" "MacPorts 2\&.3\&.99" "MacPorts Manual"
</ins><span class="cx"> .\" -----------------------------------------------------------------
</span><span class="cx"> .\" * Define some portability stuff
</span><span class="cx"> .\" -----------------------------------------------------------------
</span></span></pre></div>
<a id="branchesnewhelpsystembasedocportedit1"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/doc/port-edit.1 (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/doc/port-edit.1        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/doc/port-edit.1        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> '\" t
</span><del>-.TH "PORT\-EDIT" "1" "2013\-03\-10" "MacPorts 2\&.1\&.99" "MacPorts Manual"
</del><ins>+.TH "PORT\-EDIT" "1" "2013\-03\-10" "MacPorts 2\&.3\&.99" "MacPorts Manual"
</ins><span class="cx"> .\" -----------------------------------------------------------------
</span><span class="cx"> .\" * Define some portability stuff
</span><span class="cx"> .\" -----------------------------------------------------------------
</span></span></pre></div>
<a id="branchesnewhelpsystembasedocportfetch1"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/doc/port-fetch.1 (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/doc/port-fetch.1        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/doc/port-fetch.1        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> '\" t
</span><del>-.TH "PORT\-FETCH" "1" "2013\-03\-10" "MacPorts 2\&.1\&.99" "MacPorts Manual"
</del><ins>+.TH "PORT\-FETCH" "1" "2013\-03\-10" "MacPorts 2\&.3\&.99" "MacPorts Manual"
</ins><span class="cx"> .\" -----------------------------------------------------------------
</span><span class="cx"> .\" * Define some portability stuff
</span><span class="cx"> .\" -----------------------------------------------------------------
</span></span></pre></div>
<a id="branchesnewhelpsystembasedocportinstall1"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/doc/port-install.1 (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/doc/port-install.1        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/doc/port-install.1        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> '\" t
</span><del>-.TH "PORT\-INSTALL" "1" "2013\-03\-10" "MacPorts 2\&.1\&.99" "MacPorts Manual"
</del><ins>+.TH "PORT\-INSTALL" "1" "2013\-03\-10" "MacPorts 2\&.3\&.99" "MacPorts Manual"
</ins><span class="cx"> .\" -----------------------------------------------------------------
</span><span class="cx"> .\" * Define some portability stuff
</span><span class="cx"> .\" -----------------------------------------------------------------
</span></span></pre></div>
<a id="branchesnewhelpsystembasedocportuninstall1"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/doc/port-uninstall.1 (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/doc/port-uninstall.1        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/doc/port-uninstall.1        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> '\" t
</span><del>-.TH "PORT\-INSTALL" "1" "2013\-03\-10" "MacPorts 2\&.1\&.99" "MacPorts Manual"
</del><ins>+.TH "PORT\-INSTALL" "1" "2013\-03\-10" "MacPorts 2\&.3\&.99" "MacPorts Manual"
</ins><span class="cx"> .\" -----------------------------------------------------------------
</span><span class="cx"> .\" * Define some portability stuff
</span><span class="cx"> .\" -----------------------------------------------------------------
</span></span></pre></div>
<a id="branchesnewhelpsystembasedocport1"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/doc/port.1 (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/doc/port.1        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/doc/port.1        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> '\" t
</span><del>-.TH "PORT" "1" "2013\-09\-07" "MacPorts 2\&.2\&.99" "MacPorts Manual"
</del><ins>+.TH "PORT" "1" "2013\-09\-07" "MacPorts 2\&.3\&.99" "MacPorts Manual"
</ins><span class="cx"> .\" -----------------------------------------------------------------
</span><span class="cx"> .\" * Define some portability stuff
</span><span class="cx"> .\" -----------------------------------------------------------------
</span><span class="lines">@@ -48,7 +48,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIall\fR: all the ports in each ports tree listed in
</span><span class="cx"> \fIsources\&.conf\fR
</span><span class="cx"> .RE
</span><span class="lines">@@ -61,7 +60,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIcurrent\fR: the port in the current working directory
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -73,7 +71,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIactive\fR: set of installed and active ports
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -85,7 +82,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIinactive\fR: set of installed but inactive ports
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -97,7 +93,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIinstalled\fR: set of all installed ports
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -109,7 +104,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIuninstalled\fR: ports in the ports tree(s) that are not installed
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -121,7 +115,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIoutdated\fR: installed ports that are out of date with respect to their current version/revision in the ports tree(s)
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -133,7 +126,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIobsolete\fR: set of ports that are installed but no longer exist in any port tree
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -145,7 +137,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIrequested\fR: installed ports that were explicitly asked for
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -157,7 +148,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIunrequested\fR: installed ports that were installed only to satisfy dependencies
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -169,7 +159,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIleaves\fR: installed ports that are unrequested and have no dependents
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -185,7 +174,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIname\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -197,7 +185,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIversion\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -209,7 +196,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIrevision\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -221,7 +207,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIepoch\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -233,7 +218,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIvariant\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -245,7 +229,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIvariants\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -257,7 +240,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIcategory\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -269,7 +251,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIcategories\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -281,7 +262,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fImaintainer\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -293,7 +273,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fImaintainers\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -305,7 +284,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIplatform\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -317,7 +295,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIplatforms\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -329,7 +306,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIdescription\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -341,7 +317,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIlong_description\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -353,7 +328,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIhomepage\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -365,7 +339,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIlicense\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -377,7 +350,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIportdir\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -391,7 +363,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIdepof\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -403,7 +374,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIrdepof\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -415,7 +385,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIdependentof\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -427,7 +396,6 @@
</span><span class="cx"> .sp -1
</span><span class="cx"> .IP \(bu 2.3
</span><span class="cx"> .\}
</span><del>-
</del><span class="cx"> \fIrdependentof\fR
</span><span class="cx"> .RE
</span><span class="cx"> .sp
</span><span class="lines">@@ -713,7 +681,11 @@
</span><span class="cx"> .PP
</span><span class="cx"> select
</span><span class="cx"> .RS 4
</span><del>-For a given group, selects a version to be the default by creating appropriate symbolic links\&. For instance, python might be linked to python2\&.6\&. Available select groups are installed as subdirec\- tories of ${prefix}/etc/select/\&. To list the available versions in a group, use \-\-list\&. To see which version is currently selected for a group, use \-\-show\&. To change the selected version for a group, use \-\-set\&.
</del><ins>+For a given group, selects a version to be the default by creating appropriate symbolic links\&. For instance, python might be linked to python2\&.6\&. Available select groups are installed as subdirectories of ${prefix}/etc/select/ and can be listed using
+\fB\-\-summary\fR\&. To list the available versions in a group, use
+\fB\-\-list\fR\&. To see which version is currently selected for a group, use
+\fB\-\-show\fR\&. To change the selected version for a group, use
+\fB\-\-set\fR\&.
</ins><span class="cx"> .sp
</span><span class="cx"> For example:
</span><span class="cx"> .sp
</span><span class="lines">@@ -721,9 +693,10 @@
</span><span class="cx"> .RS 4
</span><span class="cx"> .\}
</span><span class="cx"> .nf
</span><ins>+port select \-\-summary
+port select \-\-show python
</ins><span class="cx"> port select \-\-list python
</span><del>-port select \-\-show gcc
-port select \-\-set gcc mp\-gcc47
</del><ins>+port select \-\-set python python34
</ins><span class="cx"> .fi
</span><span class="cx"> .if n \{\
</span><span class="cx"> .RE
</span><span class="lines">@@ -934,8 +907,7 @@
</span><span class="cx"> .RS 4
</span><span class="cx"> Clean the files used for building
</span><span class="cx"> \fIportname\fR\&. To just remove the work files, use the
</span><del>-\fB\-\-work\fR
-\fIactionflag\fR\&. This is the default when no flag is given\&. To remove the distribution files (fetched tarballs, patches, etc), specify
</del><ins>+\fB\-\-work\fR\fIactionflag\fR\&. This is the default when no flag is given\&. To remove the distribution files (fetched tarballs, patches, etc), specify
</ins><span class="cx"> \fB\-\-dist\fR\&. To remove any archive(s) of a port than remain in the temporary download directory, pass
</span><span class="cx"> \fB\-\-archive\fR\&. (This does not remove archives from the installed location\&.) To remove log files for a port, pass
</span><span class="cx"> \fB\-\-logs\fR\&. To remove the work files, distribution files, temporary archives and logs pass
</span></span></pre></div>
<a id="branchesnewhelpsystembasedocport1txt"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/doc/port.1.txt (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/doc/port.1.txt        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/doc/port.1.txt        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -290,17 +290,19 @@
</span><span class="cx"> select::
</span><span class="cx"> For a given group, selects a version to be the default by creating
</span><span class="cx"> appropriate symbolic links. For instance, python might be linked to
</span><del>- python2.6. Available select groups are installed as subdirec- tories of
- $\{prefix\}/etc/select/. To list the available versions in a group, use
- --list. To see which version is currently selected for a group, use --show.
- To change the selected version for a group, use --set.
</del><ins>+ python2.6. Available select groups are installed as subdirectories of
+ $\{prefix\}/etc/select/ and can be listed using *--summary*. To list the
+ available versions in a group, use *--list*. To see which version is currently
+ selected for a group, use *--show*. To change the selected version for
+ a group, use *--set*.
</ins><span class="cx"> +
</span><span class="cx"> For example:
</span><span class="cx"> +
</span><span class="cx"> --------
</span><ins>+port select --summary
+port select --show python
</ins><span class="cx"> port select --list python
</span><del>-port select --show gcc
-port select --set gcc mp-gcc47
</del><ins>+port select --set python python34
</ins><span class="cx"> --------
</span><span class="cx">
</span><span class="cx"> activate::
</span></span></pre></div>
<a id="branchesnewhelpsystembasedocportfile7"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/doc/portfile.7 (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/doc/portfile.7        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/doc/portfile.7        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1132,7 +1132,7 @@
</span><span class="cx"> .Em optional
</span><span class="cx"> .br
</span><span class="cx"> .Sy Default:
</span><del>-.Em -isystem${prefix}/include
</del><ins>+.Em -I${prefix}/include
</ins><span class="cx"> .It Ic configure.cxxflags
</span><span class="cx"> Flags to put in the CXXFLAGS environment variable when invoking the configure script.
</span><span class="cx"> .br
</span></span></pre></div>
<a id="branchesnewhelpsystembasedocportgroup7"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/doc/portgroup.7 (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/doc/portgroup.7        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/doc/portgroup.7        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> '\" t
</span><del>-.TH "PORTGROUP" "7" "2013\-03\-10" "MacPorts 2\&.1\&.99" "MacPorts Manual"
</del><ins>+.TH "PORTGROUP" "7" "2013\-03\-10" "MacPorts 2\&.3\&.99" "MacPorts Manual"
</ins><span class="cx"> .\" -----------------------------------------------------------------
</span><span class="cx"> .\" * Define some portability stuff
</span><span class="cx"> .\" -----------------------------------------------------------------
</span><span class="lines">@@ -46,21 +46,18 @@
</span><span class="cx"> .PP
</span><span class="cx"> categories
</span><span class="cx"> .RS 4
</span><del>-
</del><span class="cx"> \fBDefault:\fR
</span><span class="cx"> aqua
</span><span class="cx"> .RE
</span><span class="cx"> .PP
</span><span class="cx"> platforms
</span><span class="cx"> .RS 4
</span><del>-
</del><span class="cx"> \fBDefault:\fR
</span><span class="cx"> macosx
</span><span class="cx"> .RE
</span><span class="cx"> .PP
</span><span class="cx"> use_configure
</span><span class="cx"> .RS 4
</span><del>-
</del><span class="cx"> \fBDefault:\fR
</span><span class="cx"> no
</span><span class="cx"> .RE
</span><span class="lines">@@ -440,84 +437,71 @@
</span><span class="cx"> .PP
</span><span class="cx"> categories
</span><span class="cx"> .RS 4
</span><del>-
</del><span class="cx"> \fBDefault:\fR
</span><span class="cx"> gnustep
</span><span class="cx"> .RE
</span><span class="cx"> .PP
</span><span class="cx"> homepage
</span><span class="cx"> .RS 4
</span><del>-
-\fBDefault:\fR
-\m[blue]\fBhttp://www\&.gnustep\&.org/\fR\m[]
</del><ins>+\fBDefault:\fR\m[blue]\fBhttp://www\&.gnustep\&.org/\fR\m[]
</ins><span class="cx"> .RE
</span><span class="cx"> .PP
</span><span class="cx"> master_sites
</span><span class="cx"> .RS 4
</span><del>-
</del><span class="cx"> \fBDefault:\fR
</span><span class="cx"> gnustep:core
</span><span class="cx"> .RE
</span><span class="cx"> .PP
</span><span class="cx"> depends_lib
</span><span class="cx"> .RS 4
</span><del>-
</del><span class="cx"> \fBDefault:\fR
</span><span class="cx"> gnustep\-core
</span><span class="cx"> .RE
</span><span class="cx"> .PP
</span><span class="cx"> use_configure
</span><span class="cx"> .RS 4
</span><del>-
</del><span class="cx"> \fBDefault:\fR
</span><span class="cx"> no
</span><span class="cx"> .RE
</span><span class="cx"> .PP
</span><span class="cx"> configure\&.env
</span><span class="cx"> .RS 4
</span><del>-
</del><span class="cx"> \fBDefault:\fR
</span><span class="cx"> DYLD_LIBRARY_PATH PATH
</span><span class="cx"> .RE
</span><span class="cx"> .PP
</span><span class="cx"> configure\&.pre_args\-append
</span><span class="cx"> .RS 4
</span><del>-
</del><span class="cx"> \fBDefault:\fR
</span><span class="cx"> CC=gcc\-mp\-4\&.2 GNUSTEP_MAKEFILES
</span><span class="cx"> .RE
</span><span class="cx"> .PP
</span><span class="cx"> build\&.type
</span><span class="cx"> .RS 4
</span><del>-
</del><span class="cx"> \fBDefault:\fR
</span><span class="cx"> gnu
</span><span class="cx"> .RE
</span><span class="cx"> .PP
</span><span class="cx"> build\&.env
</span><span class="cx"> .RS 4
</span><del>-
</del><span class="cx"> \fBDefault:\fR
</span><span class="cx"> DYLD_LIBRARY_PATH PATH
</span><span class="cx"> .RE
</span><span class="cx"> .PP
</span><span class="cx"> build\&.pre_args\-append
</span><span class="cx"> .RS 4
</span><del>-
</del><span class="cx"> \fBDefault:\fR
</span><span class="cx"> messages=yes
</span><span class="cx"> .RE
</span><span class="cx"> .PP
</span><span class="cx"> destroot\&.env
</span><span class="cx"> .RS 4
</span><del>-
</del><span class="cx"> \fBDefault:\fR
</span><span class="cx"> DYLD_LIBRARY_PATH PATH
</span><span class="cx"> .RE
</span><span class="cx"> .PP
</span><span class="cx"> destroot\&.pre_args\-append
</span><span class="cx"> .RS 4
</span><del>-
</del><span class="cx"> \fBDefault:\fR
</span><span class="cx"> messages=yes
</span><span class="cx"> .RE
</span></span></pre></div>
<a id="branchesnewhelpsystembasedocportundocumented7"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/doc/portundocumented.7 (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/doc/portundocumented.7        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/doc/portundocumented.7        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> '\" t
</span><del>-.TH "PORTUNDOCUMENTED" "7" "2013\-03\-10" "MacPorts 2\&.1\&.99" "MacPorts Manual"
</del><ins>+.TH "PORTUNDOCUMENTED" "7" "2013\-03\-10" "MacPorts 2\&.3\&.99" "MacPorts Manual"
</ins><span class="cx"> .\" -----------------------------------------------------------------
</span><span class="cx"> .\" * Define some portability stuff
</span><span class="cx"> .\" -----------------------------------------------------------------
</span></span></pre></div>
<a id="branchesnewhelpsystembasem4foundationm4"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/m4/foundation.m4 (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/m4/foundation.m4        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/m4/foundation.m4        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -208,7 +208,6 @@
</span><span class="cx">                         AC_LINK_IFELSE([
</span><span class="cx">                                         AC_LANG_PROGRAM([
</span><span class="cx">                                                         #include <objc/objc.h>
</span><del>-                                                        #include <objc/objc-api.h>
</del><span class="cx">                                                 ], [
</span><span class="cx">                                                         id class = objc_lookup_class("Object");
</span><span class="cx">                                                         id obj = @<:@class alloc@:>@;
</span><span class="lines">@@ -314,7 +313,7 @@
</span><span class="cx">
</span><span class="cx">         if test x"${with_objc_foundation}" != x"no"; then
</span><span class="cx">         
</span><del>-        if test x"${with_objc_foundation}" == x || test x"${with_objc_foundation}" == x"apple"; then
</del><ins>+        if test x"${with_objc_foundation}" = x || test x"${with_objc_foundation}" = x"apple"; then
</ins><span class="cx">                 # '@<:@' = '['
</span><span class="cx">                 # '@:>@' = ']'
</span><span class="cx">                 AC_MSG_CHECKING([for Apple Foundation library])
</span><span class="lines">@@ -353,10 +352,10 @@
</span><span class="cx">                 ac_cv_objc_foundation_apple="no"
</span><span class="cx">         fi
</span><span class="cx">
</span><del>-        if test x"${with_objc_foundation}" == x || test x${with_objc_foundation} == x"GNUstep"; then
</del><ins>+        if test x"${with_objc_foundation}" = x || test x"${with_objc_foundation}" = x"GNUstep"; then
</ins><span class="cx">                 GNUSTEP_CONFIG=/usr/bin/gnustep-config
</span><del>-                if test ! -x "${GNUSTEP_CONFIG}" -a x"${GNUSTEP_SYSTEM_ROOT}" == x; then
-                        if test x"${with_objc_foundation}" == x"GNUstep"; then
</del><ins>+                if test ! -x "${GNUSTEP_CONFIG}" -a x"${GNUSTEP_SYSTEM_ROOT}" = x; then
+                        if test x"${with_objc_foundation}" = x"GNUstep"; then
</ins><span class="cx">                                 AC_MSG_ERROR([GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library])
</span><span class="cx">                         else
</span><span class="cx">                                 AC_MSG_WARN([GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library])
</span><span class="lines">@@ -413,21 +412,21 @@
</span><span class="cx">         fi
</span><span class="cx">         
</span><span class="cx">         # NeXT Foundation is prefered
</span><del>-        if test x"${ac_cv_objc_foundation_apple}" == x"yes"; then
</del><ins>+        if test x"${ac_cv_objc_foundation_apple}" = x"yes"; then
</ins><span class="cx">                 OBJC_FOUNDATION="Apple"
</span><span class="cx">                 OBJC_FOUNDATION_CPPFLAGS="${APPLE_FOUNDATION_CFLAGS}"
</span><span class="cx">                 OBJC_FOUNDATION_LIBS="${APPLE_FOUNDATION_LIBS}"
</span><span class="cx">                 OBJC_FOUNDATION_LDFLAGS=""
</span><span class="cx">                 AC_DEFINE([APPLE_FOUNDATION], 1, [Define if using the Apple Foundation framework])
</span><span class="cx">                 AC_MSG_NOTICE([Using Apple Foundation library])
</span><del>-        elif test x"${ac_cv_objc_foundation_gnustep}" == x"yes"; then
</del><ins>+        elif test x"${ac_cv_objc_foundation_gnustep}" = x"yes"; then
</ins><span class="cx">                 OBJC_FOUNDATION="GNUstep"
</span><span class="cx">                 OBJC_FOUNDATION_CPPFLAGS="${GNUSTEP_CPPFLAGS}"
</span><span class="cx">                 OBJC_FOUNDATION_LIBS="${GNUSTEP_LIBS}"
</span><span class="cx">                 OBJC_FOUNDATION_LDFLAGS="${GNUSTEP_LDFLAGS}"
</span><span class="cx">                 AC_DEFINE([GNUSTEP_FOUNDATION], 1, [Define if using the GNUstep Foundation library])
</span><span class="cx">                 AC_MSG_NOTICE([Using GNUstep Foundation library])
</span><del>-        elif test x"${with_objc_foundation}" = x"no"; then
</del><ins>+        elif test x"${with_objc_foundation}" = x"no" || test x"$MACOSX_VERSION" = x; then
</ins><span class="cx">                 OBJC_FOUNDATION="none"
</span><span class="cx">                 AC_MSG_NOTICE([Not using Foundation implementation])
</span><span class="cx">         else
</span></span></pre></div>
<a id="branchesnewhelpsystembasem4tclm4"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/m4/tcl.m4 (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/m4/tcl.m4        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/m4/tcl.m4        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -110,10 +110,8 @@
</span><span class="cx">                         `ls -d /usr/local/lib 2>/dev/null` \
</span><span class="cx">                         `ls -d /usr/contrib/lib 2>/dev/null` \
</span><span class="cx">                         `ls -d /usr/pkg/lib 2>/dev/null` \
</span><del>-                        `ls -d /usr/local/lib/tcl8.6 2>/dev/null` \
</del><span class="cx">                         `ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
</span><span class="cx">                         `ls -d /usr/local/lib/tcl8.4 2>/dev/null` \
</span><del>-                        `ls -d /usr/lib/tcl8.6 2>/dev/null` \
</del><span class="cx">                         `ls -d /usr/lib/tcl8.5 2>/dev/null` \
</span><span class="cx">                         `ls -d /usr/lib/tcl8.4 2>/dev/null` \
</span><span class="cx">                         do
</span></span></pre></div>
<a id="branchesnewhelpsystembaseportmgrReleaseProcess"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/portmgr/ReleaseProcess (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/portmgr/ReleaseProcess        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/portmgr/ReleaseProcess        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -103,14 +103,13 @@
</span><span class="cx"> tag URL. For instance:
</span><span class="cx">
</span><span class="cx"> svn co [-r<rev>] https://svn.macports.org/repository/macports/trunk release_2.0.0-archive
</span><del>- cd release_2.0.0-archive/base
- svn switch https://svn.macports.org/repository/macports/tags/release_2_0_0/base
</del><ins>+ cd release_2.0.0-archive
+ svn rm base
+ svn cp https://svn.macports.org/repository/macports/tags/release_2_0_0/base base
</ins><span class="cx">
</span><span class="cx"> And finally we tag the entire directory as release_2_0_0-archive:
</span><span class="cx">
</span><del>-FIXME: this doesn't seem to work any more. The base subdir in the tag ends up being from trunk.
-
- cd ../../
</del><ins>+ cd ..
</ins><span class="cx"> svn cp -m "commit-message" release_2.0.0-archive https://svn.macports.org/repository/macports/tags/release_2_0_0-archive
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -233,7 +232,6 @@
</span><span class="cx"> appropriate in the trunk/www/includes/common.inc file.
</span><span class="cx"> * The &macports-version; entity in trunk/doc-new/guide/xml/installing.xml.
</span><span class="cx"> * [https://trac.macports.org/news/] The MacOSforge news section (submitter: portmgr@)
</span><del>- * [http://freecode.com/projects/macports/ Freecode] (submitter: mww@)
</del><span class="cx"> * [http://www.versiontracker.com/dyn/moreinfo/macosx/26679 VersionTracker] (submitter: mij@)
</span><span class="cx"> * [http://sourceforge.net/projects/macports/ sourceforge] (submitted: rhwood@)
</span><span class="cx"> * [http://www.macupdate.com/info.php/id/21309/macports MacUpdate] (submitter: ???)
</span><span class="lines">@@ -247,5 +245,3 @@
</span><span class="cx"> Using new features introduced by a release should be delayed for 14 days. This
</span><span class="cx"> should allow users to upgrade their installations to the new release. This
</span><span class="cx"> delay matches the warning about outdated ports tree sources.
</span><del>-
-
</del></span></pre></div>
<a id="branchesnewhelpsystembaseportmgrdmg"></a>
<div class="propset"><h4>Property changes: branches/new-help-system/base/portmgr/dmg</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="addfile"><h4>Added: svn:ignore</h4></div>
<a id="branchesnewhelpsystembaseportmgrdmgLicensehtml"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/portmgr/dmg/License.html (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/portmgr/dmg/License.html        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/portmgr/dmg/License.html        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx">
</span><span class="cx"> <body>
</span><span class="cx">
</span><del>- <p>Copyright (c) 2002 - 2003, Apple Inc.<br>Copyright (c) 2004 - 2013, The MacPorts Project.</p>
</del><ins>+ <p>Copyright (c) 2002 - 2003, Apple Inc.<br>Copyright (c) 2004 - 2014, The MacPorts Project.</p>
</ins><span class="cx"> <p>All rights reserved.</p>
</span><span class="cx"> <p><br></p>
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembaseportmgrdmgpostflight"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/portmgr/dmg/postflight (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/portmgr/dmg/postflight        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/portmgr/dmg/postflight        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,280 +0,0 @@
</span><del>-#!/bin/bash
-# -*- coding: utf-8; mode: shell-script-mode; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=sh:et:sw=4:ts=4:sts=4
-#
-# Copyright (c) 2008-2012 The MacPorts Project
-# Copyright (c) 2002-2007 Juan Manuel Palacios <jmpp@macports.org>, The MacPorts Project.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of The MacPorts Project nor the
-# names of its contributors may be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# postflight
-# $Id$
-
-
-#set -x
-
-# Script identification ('cause more often than not the svn Id is not expanded):
-VERSION=2.1.0
-
-# Abstraction variables:
-PREFIX=__PREFIX__
-BINPATH=${PREFIX}/bin
-SBINPATH=${PREFIX}/sbin
-CONFIGPATH=${PREFIX}/etc/macports
-MANPAGES=${PREFIX}/share/man
-MACPORTS_TCL_DIR=${PREFIX}/share/macports/Tcl
-REG1DIR=${MACPORTS_TCL_DIR}/registry1.0
-DSCL=/usr/bin/dscl
-RUNUSR=macports
-TCLSH=/usr/bin/tclsh
-TCL_PACKAGE_DIR=/Library/Tcl
-TIMESTAMP=$(date +"%Y-%m-%d_at_%H:%M:%S")
-BACKUP_SUFFIX=macports-saved_${TIMESTAMP}
-OUR_STRING="MacPorts Installer addition on ${TIMESTAMP}"
-
-# Create config files from defaults if not present
-function setup_configs {
- for f in archive_sites.conf macports.conf pubkeys.conf sources.conf variants.conf ; do
- if [[ ! -f ${CONFIGPATH}/${f} ]]; then
- echo "Copying ${f}.default to ${f}"
- /bin/cp ${CONFIGPATH}/${f}.default ${CONFIGPATH}/${f}
- /bin/chmod 644 ${CONFIGPATH}/${f}
- fi
- done
-}
-
-# Command to update the MacPorts installation through "selfupdate":
-function update_macports {
- SCRIPT_DIR=$(dirname $0)
- # Add [default] tag to the central MacPorts repository, if it isn't already
- echo "Adding [default] tag to sources.conf if needed..."
- ${TCLSH} ${SCRIPT_DIR}/upgrade_sources_conf_default.tcl ${PREFIX}
- # Convert image directories (and direct mode installs) to image archives
- echo "Updating port image format..."
- ${TCLSH} ${SCRIPT_DIR}/images_to_archives.tcl ${MACPORTS_TCL_DIR}
-
- echo "Synchronizing the MacPorts installation with the project's rsync server..."
- if ! ${BINPATH}/port -v selfupdate; then
- echo "An attempt to synchronize your recent MacPorts installation with the project's rsync server failed!"
- echo "Please run 'sudo port -d selfupdate' manually to find out the cause of the error."
- else
- echo "Successful!"
- fi
-}
-
-# Through this command we write an environment variable to an appropriate shell configuration file,
-# backing up the original only if it exists and if it doesn't contain the ${OUR_STRING} identification string,
-# which hints that we've already tweaked it and therefore already backed it up.
-function write_setting () {
- if [[ -f "${HOME}/.${CONF_FILE}" ]] && ! grep "${OUR_STRING}" "${HOME}/.${CONF_FILE}" > /dev/null; then
- echo "Backing up your ${HOME}/.${CONF_FILE} shell confguration file as ${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX} before adapting it for MacPorts."
- /bin/cp -fp "${HOME}/.${CONF_FILE}" "${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX}" || {
- echo "An attempt to backup your original configuration file failed! Please set your MacPorts compatible environment manually."
- update_macports
- exit 1
- }
- echo -e "\n##\n# Your previous ${HOME}/.${CONF_FILE} file was backed up as ${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX}\n##" >> "${HOME}/.${CONF_FILE}"
- fi
- echo -e "\n# ${OUR_STRING}: adding an appropriate ${1} variable for use with MacPorts." >> "${HOME}/.${CONF_FILE}"
- echo "${ENV_COMMAND} ${1}${ASSIGN}${2}" >> "${HOME}/.${CONF_FILE}"
- echo -e "# Finished adapting your ${1} environment variable for use with MacPorts.\n" >> "${HOME}/.${CONF_FILE}"
- chown ${USER} "${HOME}/.${CONF_FILE}" || echo "Warning: unable to adapt permissions on your ${HOME}/.${CONF_FILE} shell configuration file!"
- echo "An appropriate ${1} variable has been added to your shell environment by the MacPorts installer."
-}
-
-function cleanup_man () {
- # Remove old non-compressed man pages
- echo -e "\nRemoving old man pages..."
- MAN1="port.1"
- MAN5="macports.conf.5"
- MAN7="portfile.7 portstyle.7 porthier.7 portgroup.7"
- for m in ${MAN1}; do rm -vf ${MANPAGES}/man1/$m ; done
- for m in ${MAN5}; do rm -vf ${MANPAGES}/man5/$m ; done
- for m in ${MAN7}; do rm -vf ${MANPAGES}/man7/$m ; done
- echo -e "Done.\n"
-}
-
-# Delete the old registry1.0 directory
-function delete_reg1 {
- if [[ -d ${REG1DIR} ]]; then
- rm -vrf ${REG1DIR}
- fi
-}
-
-# link macports1.0 into tcl package dir if possible
-function link_tcl_package {
- # delete old directory if present
- if [[ ! -L "${TCL_PACKAGE_DIR}/macports1.0" ]]; then
- if [[ ! -e "${TCL_PACKAGE_DIR}" ]]; then
- /usr/bin/install -d "${TCL_PACKAGE_DIR}" || true
- fi
- if [[ -d "${TCL_PACKAGE_DIR}/macports1.0" ]]; then
- rm -vrf "${TCL_PACKAGE_DIR}/macports1.0" || true
- fi
- if [[ ! -e "${TCL_PACKAGE_DIR}/macports1.0" && -d "${TCL_PACKAGE_DIR}" ]]; then
- ln -vs "${MACPORTS_TCL_DIR}/macports1.0" "${TCL_PACKAGE_DIR}/macports1.0" || true
- fi
-        fi
-}
-
-# create the user to use for privilege dropping
-function create_run_user {
- DSEDITGROUP=/usr/sbin/dseditgroup
- if ! ${DSCL} -q . -read /Groups/${RUNUSR} > /dev/null 2>&1 ; then
- echo "Creating group \"${RUNUSR}\""
- ${DSEDITGROUP} -q -o create ${RUNUSR}
- fi
- if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then
- echo "Creating user \"${RUNUSR}\""
- NEXTUID=501
- while [[ -n "`${DSCL} -q /Search -search /Users UniqueID $NEXTUID`" ]]; do
- let "NEXTUID=NEXTUID+1"
- done
- ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $NEXTUID
-
- # These are implicitly added on Mac OSX Lion. AuthenticationAuthority
- # causes the user to be visible in the Users & Groups Preference Pane,
- # and the others are just noise, so delete them.
- # https://trac.macports.org/ticket/30168
- ${DSCL} -q . -delete /Users/${RUNUSR} AuthenticationAuthority
- ${DSCL} -q . -delete /Users/${RUNUSR} PasswordPolicyOptions
- ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:KerberosKeys
- ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:ShadowHashData
-
- ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts
- ${DSCL} -q . -create /Users/${RUNUSR} Password \*
- ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $2}')
- ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory ${PREFIX}/var/macports/home
- ${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false
- fi
- if [[ $(sw_vers -productVersion | /usr/bin/awk -F . '{print $2}') -eq 4 ]]; then
- GID=$(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $2}')
- if [[ "$(${DSCL} -q . -read /Users/${RUNUSR} PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $2}')" != "$GID" ]]; then
- echo "Fixing PrimaryGroupID for user \"${RUNUSR}\""
- ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $GID
- ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts
- fi
- fi
- if [[ "$(${DSCL} -q . -read /Users/${RUNUSR} NFSHomeDirectory)" = "NFSHomeDirectory: /var/empty" ]]; then
- echo "Updating home directory location for user \"${RUNUSR}\""
- ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory ${PREFIX}/var/macports/home
- fi
-}
-
-echo "The MacPorts Project, postflight script version ${VERSION}: checking the shell environment for user \"${USER}\"."
-
-# create macports user
-create_run_user
-# Set up config files
-setup_configs
-# link macports1.0 pkg
-link_tcl_package
-
-# Remove old stuff
-cleanup_man
-delete_reg1
-
-# Determine the user's shell, in order to choose an appropriate configuration file we'll be tweaking.
-# Exit nicely if the shell is any other than bash or tcsh, as that's considered non-standard.
-USHELL=$(${DSCL} . -read /Users/${USER} shell | awk -F'/' '{print $NF}') || {
- echo "An attempt to determine your shell name failed! Please set your MacPorts compatible environment manually."
- update_macports
- exit 1
-}
-case "${USHELL}" in
- tcsh)
- echo "Detected the tcsh shell."
- LOGIN_FLAG=""
- ENV_COMMAND="setenv"
- ASSIGN=" "
- if [[ -f "${HOME}/.tcshrc" ]]; then
- CONF_FILE=tcshrc
- elif [[ -f "${HOME}/.cshrc" ]]; then
- CONF_FILE=cshrc
- else
- CONF_FILE=tcshrc
- fi
- ;;
- bash)
- echo "Detected the bash shell."
- LOGIN_FLAG="-l"
- ENV_COMMAND="export"
- ASSIGN="="
- if [[ -f "${HOME}/.bash_profile" ]]; then
- CONF_FILE=bash_profile
- elif [[ -f "${HOME}/.bash_login" ]]; then
- CONF_FILE=bash_login
- else
- CONF_FILE=profile
- fi
- ;;
- *)
- echo "Unknown shell ($USHELL)! Please set your MacPorts compatible environment manually."
- update_macports
- exit 0
- ;;
-esac
-
-
-# Adding our setting to the PATH variable if not already there:
-if ${SHELL} ${LOGIN_FLAG} -c "/usr/bin/printenv PATH" | grep ${PREFIX} > /dev/null; then
- echo "Your shell already has the right PATH environment variable for use with MacPorts!"
-else
- write_setting PATH "${BINPATH}:${SBINPATH}:\$PATH"
-fi
-
-# We gather the path into a variable of our own for faster operation:
-ORIGINAL_MANPATH="$(${SHELL} ${LOGIN_FLAG} -c "/usr/bin/printenv MANPATH")"
-# Adding our setting to the MANPATH variable only if it exists:
-if ! ${SHELL} ${LOGIN_FLAG} -c "/usr/bin/env | grep MANPATH" > /dev/null || \
-# and following that, if it's not empty:
- [[ -z "${ORIGINAL_MANPATH}" ]] || \
-# or if it doesn't already contain our path:
- echo "${ORIGINAL_MANPATH}" | grep ${MANPAGES} > /dev/null || \
-# or if there's no empty component somewhere in the middle of it:
- echo "${ORIGINAL_MANPATH}" | grep :: > /dev/null || \
-# or at the start of it:
- [[ -z "$(echo "${ORIGINAL_MANPATH}" | awk -F : '{print $1}')" ]] || \
-# or at the end of it:
- [[ -z "$(echo "${ORIGINAL_MANPATH}" | awk -F : '{print $NF}')" ]]; then
- echo "Your shell already has the right MANPATH environment variable for use with MacPorts!"
-else
- write_setting MANPATH "${MANPAGES}:\$MANPATH"
-fi
-
-# Adding a DISPLAY variable only if we're running on Tiger or less and if it doesn't already exist:
-if (($(sw_vers -productVersion | awk -F . '{print $2}') >= 5)) || ${SHELL} ${LOGIN_FLAG} -c "/usr/bin/env | grep DISPLAY" > /dev/null; then
- echo "Your shell already has the right DISPLAY environment variable for use with MacPorts!"
-else
- write_setting DISPLAY ":0"
-fi
-
-
-# Postflight script is done with its job, update MacPorts and exit gracefully!
-update_macports
-echo "You have successfully installed the MacPorts system. Launch a terminal and try it out!"
-echo "Read the port(1) manual page and http://guide.macports.org/ for help."
-echo "See http://www.macports.org/contact.php if you need to get in touch with The MacPorts Project."
-exit 0
</del></span></pre></div>
<a id="branchesnewhelpsystembaseportmgrdmgpostflightinfromrev122997trunkbaseportmgrdmgpostflightin"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/portmgr/dmg/postflight.in (from rev 122997, trunk/base/portmgr/dmg/postflight.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/portmgr/dmg/postflight.in         (rev 0)
+++ branches/new-help-system/base/portmgr/dmg/postflight.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,278 @@
</span><ins>+#!/bin/bash
+# -*- coding: utf-8; mode: shell-script-mode; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=sh:et:sw=4:ts=4:sts=4
+#
+# Copyright (c) 2008-2012 The MacPorts Project
+# Copyright (c) 2002-2007 Juan Manuel Palacios <jmpp@macports.org>, The MacPorts Project.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of The MacPorts Project nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# postflight
+# $Id$
+
+
+#set -x
+
+# Script identification ('cause more often than not the svn Id is not expanded):
+VERSION=2.3.1
+
+# Abstraction variables:
+PREFIX=@prefix@
+BINPATH=${PREFIX}/bin
+SBINPATH=${PREFIX}/sbin
+CONFIGPATH=${PREFIX}/etc/macports
+MANPAGES=${PREFIX}/share/man
+DSCL=/usr/bin/dscl
+RUNUSR=macports
+TCLSH=@TCLSH@
+TCL_PACKAGE_PATH=@TCL_PACKAGE_PATH@
+TIMESTAMP=$(date +"%Y-%m-%d_at_%H:%M:%S")
+BACKUP_SUFFIX=macports-saved_${TIMESTAMP}
+OUR_STRING="MacPorts Installer addition on ${TIMESTAMP}"
+
+OLD_MACPORTS_TCL_DIR=${PREFIX}/share/macports/Tcl
+OLD_TCL_PACKAGE_DIR=/Library/Tcl
+
+# Create config files from defaults if not present
+function setup_configs {
+ for f in archive_sites.conf macports.conf pubkeys.conf sources.conf variants.conf ; do
+ if [[ ! -f ${CONFIGPATH}/${f} ]]; then
+ echo "Copying ${f}.default to ${f}"
+ /bin/cp ${CONFIGPATH}/${f}.default ${CONFIGPATH}/${f}
+ /bin/chmod 644 ${CONFIGPATH}/${f}
+ fi
+ done
+}
+
+# Command to update the MacPorts installation through "selfupdate":
+function update_macports {
+ SCRIPT_DIR=$(dirname $0)
+ # Add [default] tag to the central MacPorts repository, if it isn't already
+ echo "Adding [default] tag to sources.conf if needed..."
+ ${TCLSH} ${SCRIPT_DIR}/upgrade_sources_conf_default.tcl ${PREFIX}
+ # Convert image directories (and direct mode installs) to image archives
+ echo "Updating port image format..."
+ ${TCLSH} ${SCRIPT_DIR}/images_to_archives.tcl
+ ${TCLSH} ${SCRIPT_DIR}/dedup_portfiles.tcl
+
+ echo "Synchronizing the MacPorts installation with the project's rsync server..."
+ if ! ${BINPATH}/port -v selfupdate; then
+ echo "An attempt to synchronize your recent MacPorts installation with the project's rsync server failed!"
+ echo "Please run 'sudo port -d selfupdate' manually to find out the cause of the error."
+ else
+ echo "Successful!"
+ fi
+}
+
+# Through this command we write an environment variable to an appropriate shell configuration file,
+# backing up the original only if it exists and if it doesn't contain the ${OUR_STRING} identification string,
+# which hints that we've already tweaked it and therefore already backed it up.
+function write_setting () {
+ if [[ -f "${HOME}/.${CONF_FILE}" ]] && ! grep "${OUR_STRING}" "${HOME}/.${CONF_FILE}" > /dev/null; then
+ echo "Backing up your ${HOME}/.${CONF_FILE} shell confguration file as ${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX} before adapting it for MacPorts."
+ /bin/cp -fp "${HOME}/.${CONF_FILE}" "${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX}" || {
+ echo "An attempt to backup your original configuration file failed! Please set your MacPorts compatible environment manually."
+ update_macports
+ exit 1
+ }
+ echo -e "\n##\n# Your previous ${HOME}/.${CONF_FILE} file was backed up as ${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX}\n##" >> "${HOME}/.${CONF_FILE}"
+ fi
+ echo -e "\n# ${OUR_STRING}: adding an appropriate ${1} variable for use with MacPorts." >> "${HOME}/.${CONF_FILE}"
+ echo "${ENV_COMMAND} ${1}${ASSIGN}${2}" >> "${HOME}/.${CONF_FILE}"
+ echo -e "# Finished adapting your ${1} environment variable for use with MacPorts.\n" >> "${HOME}/.${CONF_FILE}"
+ chown ${USER} "${HOME}/.${CONF_FILE}" || echo "Warning: unable to adapt permissions on your ${HOME}/.${CONF_FILE} shell configuration file!"
+ echo "An appropriate ${1} variable has been added to your shell environment by the MacPorts installer."
+}
+
+function cleanup_man () {
+ # Remove old non-compressed man pages
+ echo -e "\nRemoving old man pages..."
+ MAN1="port.1"
+ MAN5="macports.conf.5"
+ MAN7="portfile.7 portstyle.7 porthier.7 portgroup.7"
+ for m in ${MAN1}; do rm -vf ${MANPAGES}/man1/$m ; done
+ for m in ${MAN5}; do rm -vf ${MANPAGES}/man5/$m ; done
+ for m in ${MAN7}; do rm -vf ${MANPAGES}/man7/$m ; done
+ echo -e "Done.\n"
+}
+
+# delete macports1.0 link from old tcl package dir
+function delete_old_tcl_package_link {
+ # delete old link if present
+ if [[ -e "${OLD_TCL_PACKAGE_DIR}/macports1.0" ]]; then
+ rm -vrf "${OLD_TCL_PACKAGE_DIR}/macports1.0"
+        fi
+
+ # delete old macports1.0 link from new tcl package dir if present
+ if [[ -L "${TCL_PACKAGE_PATH}/macports1.0" ]]; then
+ rm -vrf "${TCL_PACKAGE_PATH}/macports1.0"
+ fi
+}
+
+# delete the old tcl package location in share/macports/Tcl
+function delete_old_tcl_packages {
+ if [[ -d "${OLD_MACPORTS_TCL_DIR}" ]]; then
+ rm -vrf "${OLD_MACPORTS_TCL_DIR}"
+ fi
+}
+
+# create the user to use for privilege dropping
+function create_run_user {
+ DSEDITGROUP=/usr/sbin/dseditgroup
+ if ! ${DSCL} -q . -read /Groups/${RUNUSR} > /dev/null 2>&1 ; then
+ echo "Creating group \"${RUNUSR}\""
+ ${DSEDITGROUP} -q -o create ${RUNUSR}
+ fi
+ if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then
+ echo "Creating user \"${RUNUSR}\""
+ NEXTUID=501
+ while [[ -n "`${DSCL} -q /Search -search /Users UniqueID $NEXTUID`" ]]; do
+ let "NEXTUID=NEXTUID+1"
+ done
+ ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $NEXTUID
+
+ # These are implicitly added on Mac OSX Lion. AuthenticationAuthority
+ # causes the user to be visible in the Users & Groups Preference Pane,
+ # and the others are just noise, so delete them.
+ # https://trac.macports.org/ticket/30168
+ ${DSCL} -q . -delete /Users/${RUNUSR} AuthenticationAuthority
+ ${DSCL} -q . -delete /Users/${RUNUSR} PasswordPolicyOptions
+ ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:KerberosKeys
+ ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:ShadowHashData
+
+ ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts
+ ${DSCL} -q . -create /Users/${RUNUSR} Password \*
+ ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $2}')
+ ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory ${PREFIX}/var/macports/home
+ ${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false
+ fi
+ if [[ $(sw_vers -productVersion | /usr/bin/awk -F . '{print $2}') -eq 4 ]]; then
+ GID=$(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $2}')
+ if [[ "$(${DSCL} -q . -read /Users/${RUNUSR} PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $2}')" != "$GID" ]]; then
+ echo "Fixing PrimaryGroupID for user \"${RUNUSR}\""
+ ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $GID
+ ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts
+ fi
+ fi
+ if [[ "$(${DSCL} -q . -read /Users/${RUNUSR} NFSHomeDirectory)" = "NFSHomeDirectory: /var/empty" ]]; then
+ echo "Updating home directory location for user \"${RUNUSR}\""
+ ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory ${PREFIX}/var/macports/home
+ fi
+}
+
+echo "The MacPorts Project, postflight script version ${VERSION}: checking the shell environment for user \"${USER}\"."
+
+# create macports user
+create_run_user
+# Set up config files
+setup_configs
+
+# Remove old stuff
+cleanup_man
+delete_old_tcl_package_link
+delete_old_tcl_packages
+
+# Determine the user's shell, in order to choose an appropriate configuration file we'll be tweaking.
+# Exit nicely if the shell is any other than bash or tcsh, as that's considered non-standard.
+USHELL=$(${DSCL} . -read /Users/${USER} shell | awk -F'/' '{print $NF}') || {
+ echo "An attempt to determine your shell name failed! Please set your MacPorts compatible environment manually."
+ update_macports
+ exit 1
+}
+case "${USHELL}" in
+ tcsh)
+ echo "Detected the tcsh shell."
+ LOGIN_FLAG=""
+ ENV_COMMAND="setenv"
+ ASSIGN=" "
+ if [[ -f "${HOME}/.tcshrc" ]]; then
+ CONF_FILE=tcshrc
+ elif [[ -f "${HOME}/.cshrc" ]]; then
+ CONF_FILE=cshrc
+ else
+ CONF_FILE=tcshrc
+ fi
+ ;;
+ bash)
+ echo "Detected the bash shell."
+ LOGIN_FLAG="-l"
+ ENV_COMMAND="export"
+ ASSIGN="="
+ if [[ -f "${HOME}/.bash_profile" ]]; then
+ CONF_FILE=bash_profile
+ elif [[ -f "${HOME}/.bash_login" ]]; then
+ CONF_FILE=bash_login
+ else
+ CONF_FILE=profile
+ fi
+ ;;
+ *)
+ echo "Unknown shell ($USHELL)! Please set your MacPorts compatible environment manually."
+ update_macports
+ exit 0
+ ;;
+esac
+
+
+# Adding our setting to the PATH variable if not already there:
+if ${SHELL} ${LOGIN_FLAG} -c "/usr/bin/printenv PATH" | grep ${PREFIX} > /dev/null; then
+ echo "Your shell already has the right PATH environment variable for use with MacPorts!"
+else
+ write_setting PATH "\"${BINPATH}:${SBINPATH}:\$PATH\""
+fi
+
+# We gather the path into a variable of our own for faster operation:
+ORIGINAL_MANPATH="$(${SHELL} ${LOGIN_FLAG} -c "/usr/bin/printenv MANPATH")"
+# Adding our setting to the MANPATH variable only if it exists:
+if ! ${SHELL} ${LOGIN_FLAG} -c "/usr/bin/env | grep MANPATH" > /dev/null || \
+# and following that, if it's not empty:
+ [[ -z "${ORIGINAL_MANPATH}" ]] || \
+# or if it doesn't already contain our path:
+ echo "${ORIGINAL_MANPATH}" | grep ${MANPAGES} > /dev/null || \
+# or if there's no empty component somewhere in the middle of it:
+ echo "${ORIGINAL_MANPATH}" | grep :: > /dev/null || \
+# or at the start of it:
+ [[ -z "$(echo "${ORIGINAL_MANPATH}" | awk -F : '{print $1}')" ]] || \
+# or at the end of it:
+ [[ -z "$(echo "${ORIGINAL_MANPATH}" | awk -F : '{print $NF}')" ]]; then
+ echo "Your shell already has the right MANPATH environment variable for use with MacPorts!"
+else
+ write_setting MANPATH "\"${MANPAGES}:\$MANPATH\""
+fi
+
+# Adding a DISPLAY variable only if we're running on Tiger or less and if it doesn't already exist:
+if (($(sw_vers -productVersion | awk -F . '{print $2}') >= 5)) || ${SHELL} ${LOGIN_FLAG} -c "/usr/bin/env | grep DISPLAY" > /dev/null; then
+ echo "Your shell already has the right DISPLAY environment variable for use with MacPorts!"
+else
+ write_setting DISPLAY ":0"
+fi
+
+
+# Postflight script is done with its job, update MacPorts and exit gracefully!
+update_macports
+echo "You have successfully installed the MacPorts system. Launch a terminal and try it out!"
+echo "Read the port(1) manual page and http://guide.macports.org/ for help."
+echo "See http://www.macports.org/contact.php if you need to get in touch with The MacPorts Project."
+exit 0
</ins></span></pre></div>
<a id="branchesnewhelpsystembaseportmgrjobsMakefile"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/portmgr/jobs/Makefile (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/portmgr/jobs/Makefile        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/portmgr/jobs/Makefile        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> SCRIPTS=        PortIndex2MySQL
</span><span class="cx">
</span><span class="cx"> edit = sed \
</span><del>-        -e 's,@macports_tcl_dir@,$(macports_tcl_dir),g'
</del><ins>+        -e 's,@TCLSH@,$(TCLSH),g'
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> include ../../Mk/macports.autoconf.mk
</span></span></pre></div>
<a id="branchesnewhelpsystembaseportmgrjobsPortIndex2MySQLtcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/portmgr/jobs/PortIndex2MySQL.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/portmgr/jobs/PortIndex2MySQL.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/portmgr/jobs/PortIndex2MySQL.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-#!/opt/local/bin/tclsh
</del><ins>+#!/opt/local/bin/port-tclsh
</ins><span class="cx"> # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
</span><span class="cx"> #
</span><span class="cx"> # PortIndex2MySQL.tcl
</span><span class="lines">@@ -58,18 +58,31 @@
</span><span class="cx"> #####
</span><span class="cx">
</span><span class="cx">
</span><ins>+# Configuration variables. Fill in the blank strings.
+#
+# Email addresses that get failure notifications - e.g. "admin@macosforge.org"
+set SPAM_LOVERS ""
+# File to read the db password from - e.g. "/var/macports/script_data"
+set passwdfile ""
+# Database abstraction variables:
+# name of the mysql executable
+set mysql_exe "mysql"
+# path where the mysql executable is located (only needed if not in the default PATH)
+set mysql_exe_path ""
+set sqlfile "/tmp/portsdb.sql"
+set portsdb_host localhost
+set portsdb_name macports
+set portsdb_user macports
</ins><span class="cx">
</span><del>-# Runtime information log file and reciepient.
</del><ins>+# Runtime information log file and recipient.
</ins><span class="cx"> set runlog "/tmp/portsdb.log"
</span><span class="cx"> set runlog_fd [open $runlog w+]
</span><span class="cx"> set lockfile "/tmp/portsdb.lock"
</span><span class="cx"> set mailprog "/usr/sbin/sendmail"
</span><span class="cx"> set DATE [clock format [clock seconds] -format "%A %Y-%m-%d at %T"]
</span><span class="cx">
</span><del>-#set SPAM_LOVERS example@hostname.com
-
</del><span class="cx"> set SUBJECT "PortIndex2MySQL run failure on $DATE"
</span><del>-set FROM macports-mgr@lists.macosforge.org
</del><ins>+set FROM noreply@macports.org
</ins><span class="cx"> set HEADERS "To: $SPAM_LOVERS\r\nFrom: $FROM\r\nSubject: $SUBJECT\r\n\r\n"
</span><span class="cx">
</span><span class="cx"> # handle command line arguments
</span><span class="lines">@@ -141,6 +154,12 @@
</span><span class="cx">
</span><span class="cx"> # Procedure to catch the database password from a protected file.
</span><span class="cx"> proc getpasswd {passwdfile} {
</span><ins>+ if {$passwdfile eq ""} {
+ global lockfile lockfile_fd
+ ui_error "passwdfile is empty, did you forget to set it?"
+ cleanup lockfile
+ terminate 1
+ }
</ins><span class="cx"> if {[catch {open $passwdfile r} passwdfile_fd]} {
</span><span class="cx"> global lockfile lockfile_fd
</span><span class="cx"> ui_error "${::errorCode}: $passwdfile_fd"
</span><span class="lines">@@ -178,12 +197,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # Load macports1.0 so that we can use some of its procs and the portinfo array.
</span><del>-if {[catch { source [file join "@macports_tcl_dir@" macports1.0 macports_fastload.tcl] } errstr]} {
- puts $runlog_fd "${::errorInfo}"
- puts $runlog_fd "Failed to locate the macports1.0 Tcl package file: $errstr"
- cleanup lockfile
- terminate 1
-}
</del><span class="cx"> if {[catch { package require macports } errstr]} {
</span><span class="cx"> puts $runlog_fd "${::errorInfo}"
</span><span class="cx"> puts $runlog_fd "Failed to load the macports1.0 Tcl package: $errstr"
</span><span class="lines">@@ -203,14 +216,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-# Database abstraction variables:
-set sqlfile "/tmp/portsdb.sql"
-set portsdb_host localhost
-set portsdb_name macports
-set portsdb_user macports
-set passwdfile "/opt/local/share/macports/resources/portmgr/password_file"
</del><span class="cx"> set portsdb_passwd [getpasswd $passwdfile]
</span><del>-set portsdb_cmd [macports::findBinary mysql5]
</del><ins>+set portsdb_cmd [macports::findBinary $mysql_exe $mysql_exe_path]
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> # Flat text file to which sql statements are written.
</span></span></pre></div>
<a id="branchesnewhelpsystembaseportmgrjobsport_binary_distributabletcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/portmgr/jobs/port_binary_distributable.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/portmgr/jobs/port_binary_distributable.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/portmgr/jobs/port_binary_distributable.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><del>-#!/usr/bin/tclsh
</del><ins>+#!/bin/sh
</ins><span class="cx"> # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><del>-#
</del><ins>+# \
+if type -fp port-tclsh >/dev/null; then exec port-tclsh "$0" "$@"; else exec /usr/bin/tclsh "$0" "$@"; fi
</ins><span class="cx"> # $Id$
</span><span class="cx"> #
</span><span class="cx"> # Check that binaries of a port are distributable by looking at its license
</span><span class="lines">@@ -311,7 +312,6 @@
</span><span class="cx"> set ::argv [lrange $::argv 1 end]
</span><span class="cx"> }
</span><span class="cx">
</span><del>-source ${macportsTclPath}/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports
</span><span class="cx"> mportinit
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrc"></a>
<div class="propset"><h4>Property changes: branches/new-help-system/base/src</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="modfile"><h4>Modified: svn:ignore</h4></div>
<span class="cx">Makefile
</span><span class="cx">pkg_mkindex.sh
</span><span class="cx"> + config.h
</span><span class="cx">Makefile
</span><span class="cx">pkg_mkindex.sh
</span><span class="cx">dedup_portfiles.tcl
</span><span class="cx">images_to_archives.tcl
</span><span class="cx">upgrade_sources_conf_default.tcl
</span><a id="branchesnewhelpsystembasesrcMakefilein"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/Makefile.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/Makefile.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,5 +1,7 @@
</span><del>-TCLPKG=                @OUR_INCLUDED_PACKAGES@ \
-                        cregistry \
</del><ins>+srcdir = @srcdir@
+VPATH = @srcdir@
+
+TCLPKG=                cregistry \
</ins><span class="cx">                         registry2.0 \
</span><span class="cx">                         macports1.0 \
</span><span class="cx">                         port1.0 \
</span><span class="lines">@@ -18,7 +20,8 @@
</span><span class="cx">         rm -f config.h
</span><span class="cx">         rm -f Makefile
</span><span class="cx">         rm -f pkg_mkindex.sh
</span><ins>+        rm -f dedup_portfiles.tcl images_to_archives.tcl upgrade_sources_conf_default.tcl
</ins><span class="cx">
</span><span class="cx"> test::
</span><span class="cx">
</span><del>-include ../Mk/macports.subdir.mk
</del><ins>+include $(srcdir)/../Mk/macports.subdir.mk
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrccflib10"></a>
<div class="propset"><h4>Property changes: branches/new-help-system/base/src/cflib1.0</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="addfile"><h4>Added: svn:ignore</h4></div>
<a id="branchesnewhelpsystembasesrccflib10Makefile"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/src/cflib1.0/Makefile (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/cflib1.0/Makefile        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/cflib1.0/Makefile        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,7 +0,0 @@
</span><del>-OBJS=                CFLib.o
-SHLIB_NAME=        CFLib${SHLIB_SUFFIX}
-LIBS+=                -framework CoreFoundation
-INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/cflib1.0
-
-include ../../Mk/macports.autoconf.mk
-include ../../Mk/macports.tea.mk
</del></span></pre></div>
<a id="branchesnewhelpsystembasesrccflib10Makefileinfromrev122997trunkbasesrccflib10Makefilein"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/cflib1.0/Makefile.in (from rev 122997, trunk/base/src/cflib1.0/Makefile.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/cflib1.0/Makefile.in         (rev 0)
+++ branches/new-help-system/base/src/cflib1.0/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include ../../Mk/macports.autoconf.mk
+
+OBJS=                CFLib.o
+SHLIB_NAME=        CFLib${SHLIB_SUFFIX}
+LIBS+=                -framework CoreFoundation
+INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/cflib1.0
+
+include $(srcdir)/../../Mk/macports.tea.mk
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcconfighin"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/config.h.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/config.h.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/config.h.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -259,6 +259,9 @@
</span><span class="cx"> /* Define to 1 if you have the <utime.h> header file. */
</span><span class="cx"> #undef HAVE_UTIME_H
</span><span class="cx">
</span><ins>+/* Define to 1 if you have the `__getdirentries64' function. */
+#undef HAVE___GETDIRENTRIES64
+
</ins><span class="cx"> /* Lowest non-system-reserved GID. */
</span><span class="cx"> #undef MIN_USABLE_GID
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrccregistry"></a>
<div class="propset"><h4>Property changes: branches/new-help-system/base/src/cregistry</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="modfile"><h4>Modified: svn:ignore</h4></div>
<span class="cx">macports.sqlext
</span><span class="cx"> + Makefile
</span><span class="cx">cregistry.a
</span><span class="cx">macports.sqlext
</span><a id="branchesnewhelpsystembasesrccregistryMakefile"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/src/cregistry/Makefile (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/cregistry/Makefile        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/cregistry/Makefile        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,31 +0,0 @@
</span><del>-# $Id$
-
-OBJS = registry.o entry.o sql.o vercomp.o util.o file.o
-STLIB_NAME = cregistry.a
-RANLIB = ranlib
-
-SQLEXT_NAME = macports.sqlext
-SQLEXT_OBJS = sqlext.o vercomp.o
-
-include ../../Mk/macports.autoconf.mk
-
-all:: ${STLIB_NAME} ${SQLEXT_NAME}
-
-.c.o:
-        ${CC} -c -DUSE_TCL_STUBS ${CFLAGS} ${CPPFLAGS} ${SHLIB_CFLAGS} $< -o $@
-
-${STLIB_NAME}:: ${OBJS}
-        ${STLIB_LD} ${STLIB_NAME} ${OBJS}
-        ${RANLIB} ${STLIB_NAME}
-
-${SQLEXT_NAME}: ${SQLEXT_OBJS}
-        ${SHLIB_LD} ${SQLEXT_OBJS} -o $@
-
-clean::
-        rm -f ${STLIB_NAME} ${SQLEXT_NAME} ${SQLEXT_OBJS} ${OBJS}
-
-distclean:: clean
-
-test:
-
-install:: all
</del></span></pre></div>
<a id="branchesnewhelpsystembasesrccregistryMakefileinfromrev122997trunkbasesrccregistryMakefilein"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/cregistry/Makefile.in (from rev 122997, trunk/base/src/cregistry/Makefile.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/cregistry/Makefile.in         (rev 0)
+++ branches/new-help-system/base/src/cregistry/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+# $Id$
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+OBJS = registry.o entry.o sql.o vercomp.o util.o file.o portgroup.o
+STLIB_NAME = cregistry.a
+RANLIB = ranlib
+
+SQLEXT_NAME = macports.sqlext
+SQLEXT_OBJS = sqlext.o vercomp.o
+
+include ../../Mk/macports.autoconf.mk
+
+# required for strdup(3) on Linux and OS X
+CPPFLAGS+=-D_XOPEN_SOURCE=600
+
+all:: ${STLIB_NAME} ${SQLEXT_NAME}
+
+.c.o:
+        ${CC} -c -DUSE_TCL_STUBS ${CFLAGS} ${CPPFLAGS} ${SHLIB_CFLAGS} $< -o $@
+
+${STLIB_NAME}:: ${OBJS}
+        ${STLIB_LD} ${STLIB_NAME} ${OBJS}
+        ${RANLIB} ${STLIB_NAME}
+
+${SQLEXT_NAME}: ${SQLEXT_OBJS}
+        ${SHLIB_LD} ${SQLEXT_OBJS} -o $@
+
+clean::
+        rm -f ${STLIB_NAME} ${SQLEXT_NAME} ${SQLEXT_OBJS} ${OBJS}
+
+distclean:: clean
+        rm -f Makefile
+
+test:
+
+install:: all
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrccregistryentryc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/cregistry/entry.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/cregistry/entry.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/cregistry/entry.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> * entry.c
</span><span class="cx"> * $Id$
</span><span class="cx"> *
</span><del>- * Copyright (c) 2010-2011 The MacPorts Project
</del><ins>+ * Copyright (c) 2010-2011, 2014 The MacPorts Project
</ins><span class="cx"> * Copyright (c) 2007 Chris Pickel <sfiera@macports.org>
</span><span class="cx"> * All rights reserved.
</span><span class="cx"> *
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include <config.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#include "portgroup.h"
</ins><span class="cx"> #include "entry.h"
</span><span class="cx"> #include "registry.h"
</span><span class="cx"> #include "sql.h"
</span><span class="lines">@@ -246,9 +247,11 @@
</span><span class="cx"> sqlite3_stmt* ports = NULL;
</span><span class="cx"> sqlite3_stmt* files = NULL;
</span><span class="cx"> sqlite3_stmt* dependencies = NULL;
</span><ins>+ sqlite3_stmt* portgroups = NULL;
</ins><span class="cx"> char* ports_query = "DELETE FROM registry.ports WHERE id=?";
</span><span class="cx"> char* files_query = "DELETE FROM registry.files WHERE id=?";
</span><span class="cx"> char* dependencies_query = "DELETE FROM registry.dependencies WHERE id=?";
</span><ins>+ char* portgroups_query = "DELETE FROM registry.portgroups WHERE id=?";
</ins><span class="cx"> if ((sqlite3_prepare_v2(reg->db, ports_query, -1, &ports, NULL) == SQLITE_OK)
</span><span class="cx"> && (sqlite3_bind_int64(ports, 1, entry->id) == SQLITE_OK)
</span><span class="cx"> && (sqlite3_prepare_v2(reg->db, files_query, -1, &files, NULL)
</span><span class="lines">@@ -256,7 +259,10 @@
</span><span class="cx"> && (sqlite3_bind_int64(files, 1, entry->id) == SQLITE_OK)
</span><span class="cx"> && (sqlite3_prepare_v2(reg->db, dependencies_query, -1, &dependencies,
</span><span class="cx"> NULL) == SQLITE_OK)
</span><del>- && (sqlite3_bind_int64(dependencies, 1, entry->id) == SQLITE_OK)) {
</del><ins>+ && (sqlite3_bind_int64(dependencies, 1, entry->id) == SQLITE_OK)
+ && (sqlite3_prepare_v2(reg->db, portgroups_query, -1, &portgroups,
+ NULL) == SQLITE_OK)
+ && (sqlite3_bind_int64(portgroups, 1, entry->id) == SQLITE_OK)) {
</ins><span class="cx"> int r;
</span><span class="cx"> do {
</span><span class="cx"> r = sqlite3_step(ports);
</span><span class="lines">@@ -271,7 +277,20 @@
</span><span class="cx"> r = sqlite3_step(dependencies);
</span><span class="cx"> switch (r) {
</span><span class="cx"> case SQLITE_DONE:
</span><del>- result = 1;
</del><ins>+ do {
+ r = sqlite3_step(portgroups);
+ switch (r) {
+ case SQLITE_DONE:
+ result = 1;
+ break;
+ case SQLITE_BUSY:
+ break;
+ case SQLITE_ERROR:
+ reg_sqlite_error(reg->db,
+ errPtr, NULL);
+ break;
+ }
+ } while (r == SQLITE_BUSY);
</ins><span class="cx"> break;
</span><span class="cx"> case SQLITE_BUSY:
</span><span class="cx"> break;
</span><span class="lines">@@ -315,6 +334,9 @@
</span><span class="cx"> if (dependencies) {
</span><span class="cx"> sqlite3_finalize(dependencies);
</span><span class="cx"> }
</span><ins>+ if (portgroups) {
+ sqlite3_finalize(portgroups);
+ }
</ins><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -670,6 +692,73 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><ins>+ * Associates a portgroup with given port.
+ *
+ * @param [in] entry the entry to map the portgroup to
+ * @param [in] name the portgroup name (e.g. "muniversal")
+ * @param [in] version the portgroup version (e.g. "1.0")
+ * @param [in] sha256 the sha256 hash of the portgroup file
+ * @param [in] size the size of the portgroup file in bytes
+ * @param [out] errPtr on error, a description of the error that occurred
+ * @return true if success; false if failure
+ */
+int reg_entry_addgroup(reg_entry* entry, char* name, char *version,
+ char *sha256, sqlite_int64 size, reg_error* errPtr) {
+ reg_registry* reg = entry->reg;
+ int result = 1;
+ sqlite3_stmt* stmt = NULL;
+ char* insert = "INSERT INTO registry.portgroups (id, name, version, size, sha256) "
+ "VALUES (?, ?, ?, ?, ?)";
+ if ((sqlite3_prepare_v2(reg->db, insert, -1, &stmt, NULL) == SQLITE_OK)
+ && (sqlite3_bind_int64(stmt, 1, entry->id) == SQLITE_OK)
+ && (sqlite3_bind_text(stmt, 2, name, -1, SQLITE_STATIC) == SQLITE_OK)
+ && (sqlite3_bind_text(stmt, 3, version, -1, SQLITE_STATIC) == SQLITE_OK)
+ && (sqlite3_bind_int64(stmt, 4, size) == SQLITE_OK)
+ && (sqlite3_bind_text(stmt, 5, sha256, -1, SQLITE_STATIC) == SQLITE_OK)) {
+ int r;
+ do {
+ r = sqlite3_step(stmt);
+ switch (r) {
+ case SQLITE_DONE:
+ sqlite3_reset(stmt);
+ break;
+ case SQLITE_BUSY:
+ break;
+ default:
+ reg_sqlite_error(reg->db, errPtr, insert);
+ result = 0;
+ break;
+ }
+ } while (r == SQLITE_BUSY);
+ } else {
+ reg_sqlite_error(reg->db, errPtr, insert);
+ result = 0;
+ }
+ if (stmt) {
+ sqlite3_finalize(stmt);
+ }
+ return result;
+}
+
+/**
+ * Gets a list of portgroups that are used by this port.
+ *
+ * @param [in] entry a port
+ * @param [out] portgroups a list of portgroups used by the given port
+ * @param [out] errPtr on error, a description of the error that occurred
+ * @return true if success; false if failure
+ */
+int reg_entry_getgroups(reg_entry* entry, reg_portgroup*** portgroups, reg_error* errPtr) {
+ reg_registry* reg = entry->reg;
+ char* query = sqlite3_mprintf("SELECT ROWID FROM portgroups "
+ "WHERE id=%lld",
+ entry->id);
+ int result = reg_all_portgroups(reg, query, -1, portgroups, errPtr);
+ sqlite3_free(query);
+ return result;
+}
+
+/**
</ins><span class="cx"> * Maps files to the given port in the filemap. The list of files must not
</span><span class="cx"> * contain files that are already mapped to the given port.
</span><span class="cx"> *
</span><span class="lines">@@ -1179,7 +1268,7 @@
</span><span class="cx"> int entry_space = 10;
</span><span class="cx"> Tcl_HashEntry* hash;
</span><span class="cx"> Tcl_HashSearch search;
</span><del>- *entries = malloc(10*sizeof(void*));
</del><ins>+ *entries = malloc(entry_space * sizeof(reg_entry*));
</ins><span class="cx"> if (!*entries) {
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrccregistryentryh"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/cregistry/entry.h (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/cregistry/entry.h        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/cregistry/entry.h        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -71,6 +71,11 @@
</span><span class="cx"> int reg_entry_propset(reg_entry* entry, char* key, char* value,
</span><span class="cx"> reg_error* errPtr);
</span><span class="cx">
</span><ins>+int reg_entry_addgroup(reg_entry* entry, char* name, char *version,
+ char *sha256, sqlite_int64 size, reg_error* errPtr);
+int reg_entry_getgroups(reg_entry* entry, reg_portgroup*** portgroups,
+ reg_error* errPtr);
+
</ins><span class="cx"> int reg_entry_map(reg_entry* entry, char** files, int file_count,
</span><span class="cx"> reg_error* errPtr);
</span><span class="cx"> int reg_entry_unmap(reg_entry* entry, char** files, int file_count,
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrccregistryfilec"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/cregistry/file.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/cregistry/file.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/cregistry/file.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -336,7 +336,7 @@
</span><span class="cx"> int file_space = 10;
</span><span class="cx"> Tcl_HashEntry* hash;
</span><span class="cx"> Tcl_HashSearch search;
</span><del>- *files = malloc(10 * sizeof(void*));
</del><ins>+ *files = malloc(file_space * sizeof(reg_file*));
</ins><span class="cx"> if (!*files) {
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrccregistryportgroupcfromrev122997trunkbasesrccregistryportgroupc"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/cregistry/portgroup.c (from rev 122997, trunk/base/src/cregistry/portgroup.c) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/cregistry/portgroup.c         (rev 0)
+++ branches/new-help-system/base/src/cregistry/portgroup.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,318 @@
</span><ins>+/*
+ * vim:tw=80:expandtab
+ * $Id$
+ *
+ * Copyright (c) 2014 The MacPorts Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "portgroup.h"
+#include "util.h"
+#include "registry.h"
+#include "sql.h"
+
+#include <sqlite3.h>
+#include <stdlib.h>
+#include <string.h>
+
+/**
+ * Converts a `sqlite3_stmt` into a `reg_portgroup`. The first column of the stmt's
+ * row must be the id of a portgroup; the second either `SQLITE_NULL` or the
+ * address of the entry in memory.
+ *
+ * @param [in] userdata sqlite3 database
+ * @param [out] portgroup portgroup described by `stmt`
+ * @param [in] stmt `sqlite3_stmt` with appropriate columns
+ * @param [out] errPtr unused
+ * @return true if success; false if failure
+ */
+static int reg_stmt_to_portgroup(void* userdata, void** portgroup, void* stmt,
+ void* calldata UNUSED, reg_error* errPtr UNUSED) {
+ int is_new;
+ reg_registry* reg = (reg_registry*)userdata;
+ sqlite_int64 id = sqlite3_column_int64(stmt, 0);
+ Tcl_HashEntry* hash = Tcl_CreateHashEntry(&reg->open_portgroups,
+ (const char*)&id, &is_new);
+ if (is_new) {
+ reg_portgroup* p = malloc(sizeof(reg_portgroup));
+ if (!p) {
+ return 0;
+ }
+ p->reg = reg;
+ p->id = id;
+ p->proc = NULL;
+ *portgroup = p;
+ Tcl_SetHashValue(hash, p);
+ } else {
+ *portgroup = Tcl_GetHashValue(hash);
+ }
+ return 1;
+}
+
+/**
+ * Type-safe version of `reg_all_objects` for `reg_portgroup`.
+ *
+ * @param [in] reg registry to select entries from
+ * @param [in] query the select query to execute
+ * @param [in] query_len length of the query (or -1 for automatic)
+ * @param [out] objects the portgroups selected
+ * @param [out] errPtr on error, a description of the error that occurred
+ * @return the number of entries if success; negative if failure
+ */
+int reg_all_portgroups(reg_registry* reg, char* query, int query_len,
+ reg_portgroup*** objects, reg_error* errPtr) {
+ int lower_bound = 0;
+ return reg_all_objects(reg, query, query_len, (void***)objects,
+ reg_stmt_to_portgroup, &lower_bound, NULL, errPtr);
+}
+
+/**
+ * Searches the registry for portgroups for which each key's value is equal to the
+ * given value. To find all portgroups, pass a key_count of 0.
+ *
+ * Bad keys should cause sqlite3 errors but not permit SQL injection attacks.
+ * Pass it good keys anyway.
+ *
+ * @param [in] reg registry to search in
+ * @param [in] keys a list of keys to search by
+ * @param [in] vals a list of values to search by, matching keys
+ * @param [in] strats a list of strategies to use when searching
+ * @param [in] key_count the number of key/value pairs passed
+ * @param [out] portgroups a list of matching portgroups
+ * @param [out] errPtr on error, a description of the error that occurred
+ * @return the number of entries if success; false if failure
+ */
+int reg_portgroup_search(reg_registry* reg, char** keys, char** vals, int* strats,
+ int key_count, reg_portgroup*** portgroups, reg_error* errPtr) {
+ int i;
+ char* kwd = " WHERE ";
+ char* query;
+ size_t query_len, query_space;
+ int result;
+
+ /* build the query */
+ query = strdup("SELECT ROWID FROM registry.portgroups");
+ if (!query) {
+ return -1;
+ }
+ query_len = query_space = strlen(query);
+
+ for (i = 0; i < key_count; i++) {
+ char* op;
+ char* cond;
+
+ /* get the strategy */
+ if ((op = reg_strategy_op(strats[i], errPtr)) == NULL) {
+ free(query);
+ return -1;
+ }
+
+ cond = sqlite3_mprintf(op, keys[i], vals[i]);
+ if (!cond || !reg_strcat(&query, &query_len, &query_space, kwd)
+ || !reg_strcat(&query, &query_len, &query_space, cond)) {
+ free(query);
+ return -1;
+ }
+ sqlite3_free(cond);
+ kwd = " AND ";
+ }
+
+ /* do the query */
+ result = reg_all_portgroups(reg, query, -1, portgroups, errPtr);
+ free(query);
+ return result;
+}
+
+/**
+ * Gets a named property of a portgroup. That property can be set using
+ * `reg_portgroup_propset`. The property named must be one that exists in the table
+ * and must not be one with internal meaning such as `id` or `state`.
+ *
+ * @param [in] portgroup portgroup to get property from
+ * @param [in] key property to get
+ * @param [out] value the value of the property
+ * @param [out] errPtr on error, a description of the error that occurred
+ * @return true if success; false if failure
+ */
+int reg_portgroup_propget(reg_portgroup* portgroup, char* key, char** value,
+ reg_error* errPtr) {
+ reg_registry* reg = portgroup->reg;
+ int result = 0;
+ sqlite3_stmt* stmt = NULL;
+ char* query;
+ const char *text;
+ query = sqlite3_mprintf("SELECT %q FROM registry.portgroups WHERE ROWID=%lld", key,
+ portgroup->id);
+ if (sqlite3_prepare_v2(reg->db, query, -1, &stmt, NULL) == SQLITE_OK) {
+ int r;
+ do {
+ r = sqlite3_step(stmt);
+ switch (r) {
+ case SQLITE_ROW:
+ text = (const char*)sqlite3_column_text(stmt, 0);
+ if (text) {
+ *value = strdup(text);
+ result = 1;
+ } else {
+ reg_sqlite_error(reg->db, errPtr, query);
+ }
+ break;
+ case SQLITE_DONE:
+ errPtr->code = REG_INVALID;
+ errPtr->description = "an invalid portgroup was passed";
+ errPtr->free = NULL;
+ break;
+ case SQLITE_BUSY:
+ continue;
+ default:
+ reg_sqlite_error(reg->db, errPtr, query);
+ break;
+ }
+ } while (r == SQLITE_BUSY);
+ } else {
+ reg_sqlite_error(reg->db, errPtr, query);
+ }
+ if (stmt) {
+ sqlite3_finalize(stmt);
+ }
+ sqlite3_free(query);
+ return result;
+}
+
+/**
+ * Sets a named property of an portgroup. That property can be later retrieved using
+ * `reg_portgroup_propget`. The property named must be one that exists in the table
+ * and must not be one with internal meaning such as `id` or `state`. If `name`,
+ * `epoch`, `version`, `revision`, or `variants` is set, it could trigger a
+ * conflict if another port with the same combination of values for those
+ * columns exists.
+ *
+ * @param [in] portgroup portgroup to set property for
+ * @param [in] key property to set
+ * @param [in] value the desired value of the property
+ * @param [out] errPtr on error, a description of the error that occurred
+ * @return true if success; false if failure
+ */
+int reg_portgroup_propset(reg_portgroup* portgroup, char* key, char* value,
+ reg_error* errPtr) {
+ reg_registry* reg = portgroup->reg;
+ int result = 0;
+ sqlite3_stmt* stmt = NULL;
+ char* query;
+ query = sqlite3_mprintf("UPDATE registry.ports SET %q = '%q' WHERE ROWID=%lld",
+ key, value, portgroup->id);
+ if (sqlite3_prepare_v2(reg->db, query, -1, &stmt, NULL) == SQLITE_OK) {
+ int r;
+ do {
+ r = sqlite3_step(stmt);
+ switch (r) {
+ case SQLITE_DONE:
+ result = 1;
+ break;
+ case SQLITE_BUSY:
+ break;
+ default:
+ if (sqlite3_reset(stmt) == SQLITE_CONSTRAINT) {
+ errPtr->code = REG_CONSTRAINT;
+ errPtr->description = "a constraint was disobeyed";
+ errPtr->free = NULL;
+ } else {
+ reg_sqlite_error(reg->db, errPtr, query);
+ }
+ break;
+ }
+ } while (r == SQLITE_BUSY);
+ } else {
+ reg_sqlite_error(reg->db, errPtr, query);
+ }
+ if (stmt) {
+ sqlite3_finalize(stmt);
+ }
+ sqlite3_free(query);
+ return result;
+}
+
+/**
+ * Opens an existing portgroup in the registry.
+ *
+ * @param [in] reg registry to open portgroup in
+ * @param [in] id id of entry referencing portgroup
+ * @param [in] name name of portgroup
+ * @param [in] version version of portgroup
+ * @param [in] size size of portgroup
+ * @param [in] sha256 sha256 of portgroup
+ * @param [out] errPtr on error, a description of the error that occurred
+ * @return the portgroup if success; NULL if failure
+ */
+reg_portgroup* reg_portgroup_open(reg_registry* reg, char *id, char* name, char* version,
+ char* size, char* sha256, reg_error* errPtr) {
+ sqlite3_stmt* stmt = NULL;
+ reg_portgroup* portgroup = NULL;
+ int lower_bound = 0;
+ char* query;
+ query = "SELECT ROWID FROM registry.portgroups WHERE id=? AND name=? AND version=? "
+ "AND size=? AND sha256=?";
+ if ((sqlite3_prepare_v2(reg->db, query, -1, &stmt, NULL) == SQLITE_OK)
+ && (sqlite3_bind_text(stmt, 1, id, -1, SQLITE_STATIC)
+ == SQLITE_OK)
+ && (sqlite3_bind_text(stmt, 2, name, -1, SQLITE_STATIC)
+ == SQLITE_OK)
+ && (sqlite3_bind_text(stmt, 3, version, -1, SQLITE_STATIC)
+ == SQLITE_OK)
+ && (sqlite3_bind_text(stmt, 4, size, -1, SQLITE_STATIC)
+ == SQLITE_OK)
+ && (sqlite3_bind_text(stmt, 5, sha256, -1, SQLITE_STATIC)
+ == SQLITE_OK)) {
+ int r;
+ do {
+ r = sqlite3_step(stmt);
+ switch (r) {
+ case SQLITE_ROW:
+ reg_stmt_to_portgroup(reg, (void**)&portgroup, stmt, &lower_bound, errPtr);
+ break;
+ case SQLITE_DONE:
+ errPtr->code = REG_NOT_FOUND;
+ errPtr->description = sqlite3_mprintf("no matching portgroup found for: " \
+ "id=%s, name=%s, version=%s, size=%s, sha256=%s", \
+ id, name, version, size, sha256);
+ errPtr->free = (reg_error_destructor*) sqlite3_free;
+ break;
+ case SQLITE_BUSY:
+ continue;
+ default:
+ reg_sqlite_error(reg->db, errPtr, query);
+ break;
+ }
+ } while (r == SQLITE_BUSY);
+ } else {
+ reg_sqlite_error(reg->db, errPtr, query);
+ }
+ if (stmt) {
+ sqlite3_finalize(stmt);
+ }
+ return portgroup;
+}
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrccregistryportgrouphfromrev122997trunkbasesrccregistryportgrouph"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/cregistry/portgroup.h (from rev 122997, trunk/base/src/cregistry/portgroup.h) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/cregistry/portgroup.h         (rev 0)
+++ branches/new-help-system/base/src/cregistry/portgroup.h        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+/*
+ * vim:tw=80:expandtab
+ * $Id$
+ *
+ * Copyright (c) 2014 The MacPorts Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _CPORTGROUP_H
+#define _CPORTGROUP_H
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "registry.h"
+
+#include <sqlite3.h>
+
+typedef struct {
+ sqlite_int64 id; /* rowid in the database */
+ reg_registry* reg; /* associated registry */
+ char* proc; /* name of Tcl proc, if using Tcl */
+} reg_portgroup;
+
+int reg_portgroup_search(reg_registry* reg, char** keys, char** vals, int* strats,
+ int key_count, reg_portgroup*** portgroups, reg_error* errPtr);
+int reg_all_portgroups(reg_registry* reg, char* query, int query_len,
+ reg_portgroup*** objects, reg_error* errPtr);
+reg_portgroup* reg_portgroup_open(reg_registry* reg, char *id, char* name, char* version,
+ char* size, char* sha256, reg_error* errPtr);
+int reg_portgroup_propget(reg_portgroup* portgroup, char* key, char** value,
+ reg_error* errPtr);
+int reg_portgroup_propset(reg_portgroup* portgroup, char* key, char* value,
+ reg_error* errPtr);
+
+#endif /* _CPORTGROUP_H */
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrccregistryregistryc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/cregistry/registry.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/cregistry/registry.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/cregistry/registry.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> * vim:expandtab:tw=80
</span><span class="cx"> *
</span><span class="cx"> * Copyright (c) 2007 Chris Pickel <sfiera@macports.org>
</span><del>- * Copyright (c) 2012 The MacPorts Project
</del><ins>+ * Copyright (c) 2012, 2014 The MacPorts Project
</ins><span class="cx"> * All rights reserved.
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include <config.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#include "portgroup.h"
</ins><span class="cx"> #include "entry.h"
</span><span class="cx"> #include "file.h"
</span><span class="cx"> #include "sql.h"
</span><span class="lines">@@ -53,6 +54,21 @@
</span><span class="cx"> * alive at any given time.
</span><span class="cx"> */
</span><span class="cx">
</span><ins>+/*
+ * Error constants. Those need to be constants and cannot be string literals
+ * because we'll use address comparisons for those and compilers don't have to
+ * guarantee string literals always have the same address (they don't have to
+ * guarantee string literals will have an address at all, so comparing the
+ * address of a string with a string literal is undefined behavior).
+ */
+char *const registry_err_not_found = "registry::not-found";
+char *const registry_err_invalid = "registry::invalid";
+char *const registry_err_constraint = "registry::constraint";
+char *const registry_err_sqlite_error = "registry::sqlite-error";
+char *const registry_err_misuse = "registry::misuse";
+char *const registry_err_cannot_init = "registry::cannot-init";
+char *const registry_err_already_active = "registry::already-active";
+
</ins><span class="cx"> /**
</span><span class="cx"> * Destroys a `reg_error` object. This should be called on any reg_error when a
</span><span class="cx"> * registry function returns a failure condition; depending on the function,
</span><span class="lines">@@ -208,6 +224,8 @@
</span><span class="cx"> sizeof(sqlite_int64)/sizeof(int));
</span><span class="cx"> Tcl_InitHashTable(&reg->open_files,
</span><span class="cx"> TCL_STRING_KEYS);
</span><ins>+ Tcl_InitHashTable(&reg->open_portgroups,
+ sizeof(sqlite_int64)/sizeof(int));
</ins><span class="cx"> reg->status |= reg_attached;
</span><span class="cx"> result = 1;
</span><span class="cx"> }
</span><span class="lines">@@ -456,3 +474,147 @@
</span><span class="cx"> sqlite3_close(db);
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><ins>+
+/**
+ * Functions for access to the metadata table
+ */
+
+/**
+ * @param [in] reg registry to get value from
+ * @param [in] key metadata key to get
+ * @param [out] value the value of the metadata
+ * @param [out] errPtr on error, a description of the error that occurred
+ * @return true if success; false if failure
+ */
+int reg_get_metadata(reg_registry* reg, const char* key, char** value,
+ reg_error* errPtr) {
+ int result = 0;
+ sqlite3_stmt* stmt = NULL;
+ char* query = "SELECT value FROM registry.metadata WHERE key=?";
+ const char *text;
+ if (sqlite3_prepare_v2(reg->db, query, -1, &stmt, NULL) == SQLITE_OK
+ && (sqlite3_bind_text(stmt, 1, key, -1, SQLITE_STATIC) == SQLITE_OK)) {
+ int r;
+ do {
+ r = sqlite3_step(stmt);
+ switch (r) {
+ case SQLITE_ROW:
+ text = (const char*)sqlite3_column_text(stmt, 0);
+ if (text) {
+ *value = strdup(text);
+ result = 1;
+ } else {
+ reg_sqlite_error(reg->db, errPtr, query);
+ }
+ break;
+ case SQLITE_DONE:
+ errPtr->code = REG_NOT_FOUND;
+ errPtr->description = "no such key in metadata";
+ errPtr->free = NULL;
+ break;
+ case SQLITE_BUSY:
+ continue;
+ default:
+ reg_sqlite_error(reg->db, errPtr, query);
+ break;
+ }
+ } while (r == SQLITE_BUSY);
+ } else {
+ reg_sqlite_error(reg->db, errPtr, query);
+ }
+ if (stmt) {
+ sqlite3_finalize(stmt);
+ }
+ return result;
+}
+
+/**
+ * @param [in] reg registry to set value in
+ * @param [in] key metadata key to set
+ * @param [in] value the desired value for the key
+ * @param [out] errPtr on error, a description of the error that occurred
+ * @return true if success; false if failure
+ */
+int reg_set_metadata(reg_registry* reg, const char* key, const char* value,
+ reg_error* errPtr) {
+ int result = 0;
+ sqlite3_stmt* stmt = NULL;
+ char* query;
+ char *test_value;
+ int get_returnval = reg_get_metadata(reg, key, &test_value, errPtr);
+ if (get_returnval) {
+ free(test_value);
+ query = sqlite3_mprintf("UPDATE registry.metadata SET value = '%q' WHERE key='%q'",
+ value, key);
+ } else if (errPtr->code == REG_NOT_FOUND) {
+ query = sqlite3_mprintf("INSERT INTO registry.metadata (key, value) VALUES ('%q', '%q')",
+ key, value);
+ } else {
+ return get_returnval;
+ }
+ if (sqlite3_prepare_v2(reg->db, query, -1, &stmt, NULL) == SQLITE_OK) {
+ int r;
+ do {
+ r = sqlite3_step(stmt);
+ switch (r) {
+ case SQLITE_DONE:
+ result = 1;
+ break;
+ case SQLITE_BUSY:
+ break;
+ default:
+ reg_sqlite_error(reg->db, errPtr, query);
+ break;
+ }
+ } while (r == SQLITE_BUSY);
+ } else {
+ reg_sqlite_error(reg->db, errPtr, query);
+ }
+ if (stmt) {
+ sqlite3_finalize(stmt);
+ }
+ sqlite3_free(query);
+ return result;
+}
+
+/**
+ * @param [in] reg the registry to delete the metadata from
+ * @param [in] key the metadata key to delete
+ * @param [out] errPtr on error, a description of the error that occurred
+ * @return true if success; false if failure
+ */
+int reg_del_metadata(reg_registry* reg, const char* key, reg_error* errPtr) {
+ int result = 1;
+ sqlite3_stmt* stmt = NULL;
+ char* query = "DELETE FROM registry.metadata WHERE key=?";
+ if ((sqlite3_prepare_v2(reg->db, query, -1, &stmt, NULL) == SQLITE_OK)
+ && (sqlite3_bind_text(stmt, 1, key, -1, SQLITE_STATIC) == SQLITE_OK)) {
+ int r;
+ do {
+ r = sqlite3_step(stmt);
+ switch (r) {
+ case SQLITE_DONE:
+ if (sqlite3_changes(reg->db) == 0) {
+ reg_throw(errPtr, REG_INVALID, "no such metadata key");
+ result = 0;
+ } else {
+ sqlite3_reset(stmt);
+ }
+ break;
+ case SQLITE_BUSY:
+ break;
+ default:
+ reg_sqlite_error(reg->db, errPtr, query);
+ result = 0;
+ break;
+ }
+ } while (r == SQLITE_BUSY);
+ } else {
+ reg_sqlite_error(reg->db, errPtr, query);
+ result = 0;
+ }
+ if (stmt) {
+ sqlite3_finalize(stmt);
+ }
+ return result;
+}
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrccregistryregistryh"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/cregistry/registry.h (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/cregistry/registry.h        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/cregistry/registry.h        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> * $Id$
</span><span class="cx"> *
</span><span class="cx"> * Copyright (c) 2007 Chris Pickel <sfiera@macports.org>
</span><del>- * Copyright (c) 2012 The MacPorts Project
</del><ins>+ * Copyright (c) 2012, 2014 The MacPorts Project
</ins><span class="cx"> * All rights reserved.
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -37,14 +37,22 @@
</span><span class="cx"> #include <sqlite3.h>
</span><span class="cx"> #include <tcl.h>
</span><span class="cx">
</span><del>-#define REG_NOT_FOUND "registry::not-found"
-#define REG_INVALID "registry::invalid"
-#define REG_CONSTRAINT "registry::constraint"
-#define REG_SQLITE_ERROR "registry::sqlite-error"
-#define REG_MISUSE "registry::misuse"
-#define REG_CANNOT_INIT "registry::cannot-init"
-#define REG_ALREADY_ACTIVE "registry::already-active"
</del><ins>+#define REG_NOT_FOUND (registry_err_not_found)
+#define REG_INVALID (registry_err_invalid)
+#define REG_CONSTRAINT (registry_err_constraint)
+#define REG_SQLITE_ERROR (registry_err_sqlite_error)
+#define REG_MISUSE (registry_err_misuse)
+#define REG_CANNOT_INIT (registry_err_cannot_init)
+#define REG_ALREADY_ACTIVE (registry_err_already_active)
</ins><span class="cx">
</span><ins>+extern char *const registry_err_not_found;
+extern char *const registry_err_invalid;
+extern char *const registry_err_constraint;
+extern char *const registry_err_sqlite_error;
+extern char *const registry_err_misuse;
+extern char *const registry_err_cannot_init;
+extern char *const registry_err_already_active;
+
</ins><span class="cx"> typedef void reg_error_destructor(const char* description);
</span><span class="cx">
</span><span class="cx"> typedef struct {
</span><span class="lines">@@ -73,6 +81,7 @@
</span><span class="cx"> int status;
</span><span class="cx"> Tcl_HashTable open_entries;
</span><span class="cx"> Tcl_HashTable open_files;
</span><ins>+ Tcl_HashTable open_portgroups;
</ins><span class="cx"> } reg_registry;
</span><span class="cx">
</span><span class="cx"> int reg_open(reg_registry** regPtr, reg_error* errPtr);
</span><span class="lines">@@ -88,4 +97,8 @@
</span><span class="cx">
</span><span class="cx"> int reg_vacuum(char* db_path);
</span><span class="cx">
</span><ins>+int reg_get_metadata(reg_registry* reg, const char* key, char** value, reg_error* errPtr);
+int reg_set_metadata(reg_registry* reg, const char* key, const char* value, reg_error* errPtr);
+int reg_del_metadata(reg_registry* reg, const char* key, reg_error* errPtr);
+
</ins><span class="cx"> #endif /* _CREG_H */
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrccregistrysqlc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/cregistry/sql.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/cregistry/sql.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/cregistry/sql.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> * $Id$
</span><span class="cx"> *
</span><span class="cx"> * Copyright (c) 2007 Chris Pickel <sfiera@macports.org>
</span><del>- * Copyright (c) 2012 The MacPorts Project
</del><ins>+ * Copyright (c) 2012, 2014 The MacPorts Project
</ins><span class="cx"> * All rights reserved.
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -129,13 +129,13 @@
</span><span class="cx">
</span><span class="cx"> /* metadata table */
</span><span class="cx"> "CREATE TABLE registry.metadata (key UNIQUE, value)",
</span><del>- "INSERT INTO registry.metadata (key, value) VALUES ('version', 1.100)",
</del><ins>+ "INSERT INTO registry.metadata (key, value) VALUES ('version', '1.200')",
</ins><span class="cx"> "INSERT INTO registry.metadata (key, value) VALUES ('created', strftime('%s', 'now'))",
</span><span class="cx">
</span><span class="cx"> /* ports table */
</span><span class="cx"> "CREATE TABLE registry.ports ("
</span><del>- "id INTEGER PRIMARY KEY AUTOINCREMENT, "
- "name TEXT COLLATE NOCASE, portfile CLOB, url TEXT, "
</del><ins>+ "id INTEGER PRIMARY KEY, "
+ "name TEXT COLLATE NOCASE, portfile TEXT, url TEXT, "
</ins><span class="cx"> "location TEXT, epoch INTEGER, version TEXT COLLATE VERSION, "
</span><span class="cx"> "revision INTEGER, variants TEXT, negated_variants TEXT, "
</span><span class="cx"> "state TEXT, date DATETIME, installtype TEXT, archs TEXT, "
</span><span class="lines">@@ -163,6 +163,11 @@
</span><span class="cx"> "FOREIGN KEY(id) REFERENCES ports(id))",
</span><span class="cx"> "CREATE INDEX registry.dep_name ON dependencies (name)",
</span><span class="cx">
</span><ins>+ /* portgroups table */
+ "CREATE TABLE registry.portgroups (id INTEGER, "
+ "name TEXT, version TEXT COLLATE VERSION, size INTEGER, sha256 TEXT, "
+ "FOREIGN KEY(id) REFERENCES ports(id))",
+
</ins><span class="cx"> "COMMIT",
</span><span class="cx"> NULL
</span><span class="cx"> };
</span><span class="lines">@@ -259,6 +264,10 @@
</span><span class="cx">
</span><span class="cx"> /* we can't call vercmp directly because it's static, but we have
</span><span class="cx"> * sql_version, which is basically an alias */
</span><ins>+ /* There was a bug where the registry version was set as a float
+ * instead of a string on fresh installs, so some 1.100 registries
+ * will say 1.1. Fortunately, there were no other versions between
+ * 1.000 and 1.100. */
</ins><span class="cx"> if (sql_version(NULL, -1, version, -1, "1.1") < 0) {
</span><span class="cx"> /* we need to update to 1.1, add binary field and index to files
</span><span class="cx"> * table */
</span><span class="lines">@@ -321,6 +330,36 @@
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if (sql_version(NULL, -1, version, -1, "1.200") < 0) {
+ /* We need to add the portgroup table and move the portfiles out
+ of the db and into the filesystem. The latter is way easier to do
+ from Tcl, so here we'll just flag that it needs to be done. */
+ static char* version_1_2_queries[] = {
+ /* portgroups table */
+ "CREATE TABLE registry.portgroups (id INTEGER, "
+ "name TEXT, version TEXT COLLATE VERSION, size INTEGER, sha256 TEXT, "
+ "FOREIGN KEY(id) REFERENCES ports(id))",
+
+ "UPDATE registry.metadata SET value = '1.200' WHERE key = 'version'",
+
+ "INSERT INTO registry.metadata (key, value) VALUES ('portfiles_update_needed', 1)",
+
+ "COMMIT",
+ NULL
+ };
+
+ sqlite3_finalize(stmt);
+ stmt = NULL;
+
+ if (!do_queries(db, version_1_2_queries, errPtr)) {
+ rollback_db(db);
+ return 0;
+ }
+
+ did_update = 1;
+ continue;
+ }
+
</ins><span class="cx"> /* add new versions here, but remember to:
</span><span class="cx"> * - finalize the version query statement and set stmt to NULL
</span><span class="cx"> * - do _not_ use "BEGIN" in your query list, since a transaction has
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10"></a>
<div class="propset"><h4>Property changes: branches/new-help-system/base/src/darwintracelib1.0</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="modfile"><h4>Modified: svn:ignore</h4></div>
<span class="cx"> + Makefile
</span><span class="cx">darwintrace.dylib
</span><a id="branchesnewhelpsystembasesrcdarwintracelib10Makefile"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/src/darwintracelib1.0/Makefile (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/Makefile        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/darwintracelib1.0/Makefile        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,30 +0,0 @@
</span><del>-# This Makefile will only be run on Darwin systems; we can safely use
-# Apple-specifics here
-SRCS=                $(wildcard *.c)
-OBJS=                $(SRCS:%.c=%.o)
-SHLIB_NAME=        darwintrace${SHLIB_SUFFIX}
-INSTALLDIR=        ${DESTDIR}${datadir}/macports/Tcl/darwintrace1.0
-
-include ../../Mk/macports.autoconf.mk
-
-# Yes, we know having $ signs in identifiers is not a very good idea; in the
-# case of darwintrace we still need them, though.
-CFLAGS_PEDANTIC=
-CFLAGS+= -fPIC ${UNIVERSAL_ARCHFLAGS}
-SHLIB_LDFLAGS+=${UNIVERSAL_ARCHFLAGS}
-
-all:: ${SHLIB_NAME}
-
-$(SHLIB_NAME):: ${OBJS}
-        ${SHLIB_LD} ${OBJS} -o ${SHLIB_NAME} ${SHLIB_LDFLAGS} ${LIBS}
-
-clean::
-        rm -f ${OBJS} ${SHLIB_NAME} so_locations
-
-distclean:: clean
-
-install:: all
-        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
-        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 ${SHLIB_NAME} ${INSTALLDIR}
-
-test::
</del></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10Makefileinfromrev122997trunkbasesrcdarwintracelib10Makefilein"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/darwintracelib1.0/Makefile.in (from rev 122997, trunk/base/src/darwintracelib1.0/Makefile.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/Makefile.in         (rev 0)
+++ branches/new-help-system/base/src/darwintracelib1.0/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include ../../Mk/macports.autoconf.mk
+
+# This Makefile will only be run on Darwin systems; we can safely use
+# Apple-specifics here
+SRCS=                $(wildcard *.c)
+OBJS=                $(SRCS:%.c=%.o)
+SHLIB_NAME=        darwintrace${SHLIB_SUFFIX}
+INSTALLDIR=        ${DESTDIR}${TCL_PACKAGE_PATH}/darwintrace1.0
+
+# Yes, we know having $ signs in identifiers is not a very good idea; in the
+# case of darwintrace we still need them, though.
+CFLAGS_PEDANTIC=
+CFLAGS+= -fPIC ${UNIVERSAL_ARCHFLAGS}
+SHLIB_LDFLAGS+=${UNIVERSAL_ARCHFLAGS}
+
+all:: ${SHLIB_NAME}
+
+$(SHLIB_NAME):: ${OBJS}
+        ${SHLIB_LD} ${OBJS} -o ${SHLIB_NAME} ${SHLIB_LDFLAGS} ${LIBS}
+
+clean::
+        rm -f ${OBJS} ${SHLIB_NAME} so_locations
+
+distclean:: clean
+        rm -f Makefile
+
+install:: all
+        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
+        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "${SHLIB_NAME}" "${INSTALLDIR}"
+
+test::
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10accessc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/darwintracelib1.0/access.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/access.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/darwintracelib1.0/access.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> #include <sys/syscall.h>
</span><span class="cx"> #include <unistd.h>
</span><span class="cx">
</span><del>-int access(const char *path, int amode) {
</del><ins>+static int _dt_access(const char *path, int amode) {
</ins><span class="cx"> #define access(x, y) syscall(SYS_access, (x), (y))
</span><span class="cx">         __darwintrace_setup();
</span><span class="cx">
</span><span class="lines">@@ -59,3 +59,5 @@
</span><span class="cx">         return result;
</span><span class="cx"> #undef access
</span><span class="cx"> }
</span><ins>+
+DARWINTRACE_INTERPOSE(_dt_access, access);
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10closec"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/darwintracelib1.0/close.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/close.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/darwintracelib1.0/close.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> * need to. This possibility is the \c __darwintrace_close_sock variable, which
</span><span class="cx"> * will be set to the FD to be closed when closing should be allowed.
</span><span class="cx"> */
</span><del>-int close(int fd) {
</del><ins>+static int _dt_close(int fd) {
</ins><span class="cx"> #define close(x) syscall(SYS_close, (x))
</span><span class="cx">         __darwintrace_setup();
</span><span class="cx">
</span><span class="lines">@@ -66,3 +66,5 @@
</span><span class="cx">         return close(fd);
</span><span class="cx"> #undef close
</span><span class="cx"> }
</span><ins>+
+DARWINTRACE_INTERPOSE(_dt_close, close);
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10darwintracec"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/darwintracelib1.0/darwintrace.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/darwintrace.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/darwintracelib1.0/darwintrace.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -154,9 +154,11 @@
</span><span class="cx"> /**
</span><span class="cx"> * Convenience getter function for the thread ID
</span><span class="cx"> */
</span><ins>+/*
</ins><span class="cx"> static inline pthread_t __darwintrace_tid() {
</span><span class="cx">         return (pthread_t) pthread_getspecific(tid_key);
</span><span class="cx"> }
</span><ins>+*/
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Convenience setter function for the thread-local darwintrace socket
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10darwintraceh"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/darwintracelib1.0/darwintrace.h (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/darwintrace.h        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/darwintracelib1.0/darwintrace.h        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -44,6 +44,22 @@
</span><span class="cx"> #include <stdio.h>
</span><span class="cx">
</span><span class="cx"> /**
</span><ins>+ * DARWINTRACE_INTERPOSE: provides a way to override standard library functions
+ * with your own implementations.
+ */
+#ifndef DARWINTRACE_INTERPOSE
+#define DARWINTRACE_INTERPOSE(_replacement, _replacee) \
+__attribute__((used)) static struct { \
+        const void *replacement; \
+        const void *replacee; \
+} _interpose_##_replacee \
+__attribute__((section ("__DATA,__interpose"))) = { \
+        (const void *) (unsigned long) &_replacement, \
+        (const void *) (unsigned long) &_replacee \
+}
+#endif
+
+/**
</ins><span class="cx"> * DARWINTRACE_DEBUG: verbose output of operations to debug darwintrace
</span><span class="cx"> */
</span><span class="cx"> #ifndef DARWINTRACE_DEBUG
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10dup2c"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/darwintracelib1.0/dup2.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/dup2.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/darwintracelib1.0/dup2.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> * attempts to overwrite it using \c dup(2). Shells tend to do that a lot when
</span><span class="cx"> * FDs are numbered in ascending order.
</span><span class="cx"> */
</span><del>-int dup2(int filedes, int filedes2) {
</del><ins>+static int _dt_dup2(int filedes, int filedes2) {
</ins><span class="cx"> #define dup2(x, y) syscall(SYS_dup2, (x), (y))
</span><span class="cx">         __darwintrace_setup();
</span><span class="cx">
</span><span class="lines">@@ -75,3 +75,5 @@
</span><span class="cx">         return dup2(filedes, filedes2);
</span><span class="cx"> #undef dup2
</span><span class="cx"> }
</span><ins>+
+DARWINTRACE_INTERPOSE(_dt_dup2, dup2);
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10mkdirc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/darwintracelib1.0/mkdir.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/mkdir.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/darwintracelib1.0/mkdir.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx"> * the sandbox. Will silently do nothing and return success for directories
</span><span class="cx"> * outside the sandbox that already exist.
</span><span class="cx"> */
</span><del>-int mkdir(const char *path, mode_t mode) {
</del><ins>+static int _dt_mkdir(const char *path, mode_t mode) {
</ins><span class="cx"> #define mkdir(x,y) syscall(SYS_mkdir, (x), (y))
</span><span class="cx"> #define lstat(x,y) syscall(LSTATSYSNUM, (x), (y))
</span><span class="cx">         __darwintrace_setup();
</span><span class="lines">@@ -78,3 +78,5 @@
</span><span class="cx"> #undef lstat
</span><span class="cx"> #undef mkdir
</span><span class="cx"> }
</span><ins>+
+DARWINTRACE_INTERPOSE(_dt_mkdir, mkdir);
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10openc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/darwintracelib1.0/open.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/open.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/darwintracelib1.0/open.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> * Indicates the file does not exist on sandbox violation, or permission denied
</span><span class="cx"> * when attempting to create a file, i.e., when \c O_CREAT is set.
</span><span class="cx"> */
</span><del>-int open(const char *path, int flags, ...) {
</del><ins>+static int _dt_open(const char *path, int flags, ...) {
</ins><span class="cx"> #define open(x,y,z) syscall(SYS_open, (x), (y), (z))
</span><span class="cx">         __darwintrace_setup();
</span><span class="cx">         int result = 0;
</span><span class="lines">@@ -70,3 +70,5 @@
</span><span class="cx">         return result;
</span><span class="cx"> #undef open
</span><span class="cx"> }
</span><ins>+
+DARWINTRACE_INTERPOSE(_dt_open, open);
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10procc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/darwintracelib1.0/proc.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/proc.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/darwintracelib1.0/proc.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -254,7 +254,7 @@
</span><span class="cx"> * exist, if it's outside the sandbox. Also checks for potential interpreters
</span><span class="cx"> * using \c check_interpreter.
</span><span class="cx"> */
</span><del>-int execve(const char *path, char *const argv[], char *const envp[]) {
</del><ins>+static int _dt_execve(const char *path, char *const argv[], char *const envp[]) {
</ins><span class="cx"> #define execve(x,y,z) syscall(SYS_execve, (x), (y), (z))
</span><span class="cx">         __darwintrace_setup();
</span><span class="cx">
</span><span class="lines">@@ -289,25 +289,18 @@
</span><span class="cx"> #undef execve
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+DARWINTRACE_INTERPOSE(_dt_execve, execve);
+
</ins><span class="cx"> #if defined(HAVE_SPAWN_H) && defined(HAVE_POSIX_SPAWN)
</span><del>-// Let's save some typing work...
-typedef int (*posix_spawn_t)(
-                        pid_t *restrict,
-                        const char *restrict,
-                        const posix_spawn_file_actions_t *,
-                        const posix_spawnattr_t *restrict,
-                        char *const *restrict,
-                        char *const *restrict);
</del><span class="cx"> /**
</span><span class="cx"> * Wrapper for \c posix_spawn(2). Denies access and simulates the file does not
</span><span class="cx"> * exist, if it's outside the sandbox. Also checks for potential interpreters
</span><span class="cx"> * using \c check_interpreter.
</span><span class="cx"> */
</span><del>-int posix_spawn(pid_t *restrict pid, const char *restrict path, const posix_spawn_file_actions_t *file_actions,
</del><ins>+static int _dt_posix_spawn(pid_t *restrict pid, const char *restrict path, const posix_spawn_file_actions_t *file_actions,
</ins><span class="cx">                 const posix_spawnattr_t *restrict attrp, char *const argv[restrict], char *const envp[restrict]) {
</span><span class="cx">         __darwintrace_setup();
</span><span class="cx">
</span><del>-        static posix_spawn_t prev_posix_spawn = NULL;
</del><span class="cx">         int result = 0;
</span><span class="cx">
</span><span class="cx">         if (!__darwintrace_is_in_sandbox(path, DT_REPORT | DT_ALLOWDIR | DT_FOLLOWSYMS)) {
</span><span class="lines">@@ -339,13 +332,9 @@
</span><span class="cx">                          * We cannot override posix_spawn and call __posix_spawn from it
</span><span class="cx">                          * either, because that will fail with an invalid argument. Thus,
</span><span class="cx">                          * we need to call the original posix_spawn from here. */
</span><del>-                        // retrieve the original posix_spawn function
-                        if (prev_posix_spawn == NULL) {
-                                prev_posix_spawn = (posix_spawn_t) dlsym(RTLD_NEXT, "posix_spawn");
-                        }
</del><span class="cx">                         // call the original posix_spawn function, but restore environment
</span><span class="cx">                         char **newenv = restore_env(envp);
</span><del>-                        result = prev_posix_spawn(pid, path, file_actions, attrp, argv, newenv);
</del><ins>+                        result = posix_spawn(pid, path, file_actions, attrp, argv, newenv);
</ins><span class="cx">                         free(newenv);
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -354,4 +343,6 @@
</span><span class="cx">
</span><span class="cx">         return result;
</span><span class="cx"> }
</span><ins>+
+DARWINTRACE_INTERPOSE(_dt_posix_spawn, posix_spawn);
</ins><span class="cx"> #endif
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10readdirc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/darwintracelib1.0/readdir.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/readdir.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/darwintracelib1.0/readdir.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> * thus copy both structs and decide at runtime.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#if defined(__DARWIN_64_BIT_INO_T)
</del><ins>+#if defined(__DARWIN_64_BIT_INO_T) && defined(HAVE___GETDIRENTRIES64)
</ins><span class="cx">
</span><span class="cx"> struct dirent64 {
</span><span class="cx">         __uint64_t d_ino; /* file number of entry */
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">         char d_name[__DARWIN_MAXPATHLEN]; /* entry name (up to MAXPATHLEN bytes) */
</span><span class="cx"> };
</span><span class="cx">
</span><del>-size_t __getdirentries64(int fd, void *buf, size_t bufsize, __darwin_off_t *basep) {
</del><ins>+static size_t _dt_getdirentries64(int fd, void *buf, size_t bufsize, __darwin_off_t *basep) {
</ins><span class="cx"> #define __getdirentries64(w,x,y,z) syscall(SYS_getdirentries64, (w), (x), (y), (z))
</span><span class="cx">         __darwintrace_setup();
</span><span class="cx">
</span><span class="lines">@@ -105,8 +105,12 @@
</span><span class="cx"> #undef __getdirentries64
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#endif /* defined(__DARWIN_64_BIT_INO_T) */
</del><ins>+// __getdirentries64(2) is private API. There's no header for it.
+size_t __getdirentries64(int fd, void *buf, size_t bufsize, __darwin_off_t *basep);
+DARWINTRACE_INTERPOSE(_dt_getdirentries64, __getdirentries64);
</ins><span class="cx">
</span><ins>+#endif /* defined(__DARWIN_64_BIT_INO_T) && defined(HAVE___GETDIRENTRIES64) */
+
</ins><span class="cx"> #pragma pack(4)
</span><span class="cx"> struct dirent32 {
</span><span class="cx">         ino_t d_ino; /* file number of entry */
</span><span class="lines">@@ -117,7 +121,7 @@
</span><span class="cx"> };
</span><span class="cx"> #pragma pack()
</span><span class="cx">
</span><del>-int getdirentries(int fd, char *buf, int nbytes, long *basep) {
</del><ins>+static int _dt_getdirentries(int fd, char *buf, int nbytes, long *basep) {
</ins><span class="cx"> #define getdirentries(w,x,y,z) syscall(SYS_getdirentries, (w), (x), (y), (z))
</span><span class="cx">         __darwintrace_setup();
</span><span class="cx">
</span><span class="lines">@@ -154,3 +158,6 @@
</span><span class="cx">         return sz;
</span><span class="cx"> #undef getdirentries
</span><span class="cx"> }
</span><ins>+
+int getdirentries(int fd, char *buf, int nbytes, long *basep);
+DARWINTRACE_INTERPOSE(_dt_getdirentries, getdirentries);
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10readlinkc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/darwintracelib1.0/readlink.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/readlink.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/darwintracelib1.0/readlink.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -46,9 +46,9 @@
</span><span class="cx"> * Deny \c readlink(2) if the file is not within the sandbox bounds.
</span><span class="cx"> */
</span><span class="cx"> #ifdef READLINK_IS_NOT_P1003_1A
</span><del>-int readlink(const char *path, char *buf, int bufsiz) {
</del><ins>+static int _dt_readlink(const char *path, char *buf, int bufsiz) {
</ins><span class="cx"> #else
</span><del>-ssize_t readlink(const char *path, char *buf, size_t bufsiz) {
</del><ins>+static ssize_t _dt_readlink(const char *path, char *buf, size_t bufsiz) {
</ins><span class="cx"> #endif
</span><span class="cx"> #define readlink(x,y,z) syscall(SYS_readlink, (x), (y), (z))
</span><span class="cx">         __darwintrace_setup();
</span><span class="lines">@@ -69,3 +69,5 @@
</span><span class="cx">         return result;
</span><span class="cx"> #undef readlink
</span><span class="cx"> }
</span><ins>+
+DARWINTRACE_INTERPOSE(_dt_readlink, readlink);
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10renamec"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/darwintracelib1.0/rename.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/rename.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/darwintracelib1.0/rename.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> * Wrapper around \c rename(2) to prevent moving a file outside, or out of the
</span><span class="cx"> * sandbox.
</span><span class="cx"> */
</span><del>-int rename(const char *from, const char *to) {
</del><ins>+static int _dt_rename(const char *from, const char *to) {
</ins><span class="cx"> #define rename(x,y) syscall(SYS_rename, (x), (y))
</span><span class="cx">         __darwintrace_setup();
</span><span class="cx">
</span><span class="lines">@@ -67,3 +67,5 @@
</span><span class="cx">         return result;
</span><span class="cx"> #undef rename
</span><span class="cx"> }
</span><ins>+
+DARWINTRACE_INTERPOSE(_dt_rename, rename);
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10rmdirc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/darwintracelib1.0/rmdir.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/rmdir.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/darwintracelib1.0/rmdir.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> * Wrapper around \c rmdir(2) to deny deleting directories outside of the
</span><span class="cx"> * sandbox.
</span><span class="cx"> */
</span><del>-int rmdir(const char *path) {
</del><ins>+static int _dt_rmdir(const char *path) {
</ins><span class="cx"> #define rmdir(x) syscall(SYS_rmdir, (x))
</span><span class="cx">         __darwintrace_setup();
</span><span class="cx">
</span><span class="lines">@@ -64,3 +64,5 @@
</span><span class="cx">         return result;
</span><span class="cx"> #undef rmdir
</span><span class="cx"> }
</span><ins>+
+DARWINTRACE_INTERPOSE(_dt_rmdir, rmdir);
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10statc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/darwintracelib1.0/stat.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/stat.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/darwintracelib1.0/stat.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> * Wrapper around \c stat(2) to hide information about files outside the
</span><span class="cx"> * sandbox.
</span><span class="cx"> */
</span><del>-int stat(const char *path, void *sb) {
</del><ins>+static int _dt_stat(const char *path, void *sb) {
</ins><span class="cx"> #define stat(path, sb) syscall(SYS_stat, path, sb)
</span><span class="cx">         __darwintrace_setup();
</span><span class="cx">
</span><span class="lines">@@ -66,9 +66,14 @@
</span><span class="cx"> #undef stat
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+// We don't include sys/stat.h because it would rewrite all stat function
+// calls, but we need the declaration of stat here.
+int stat(const char *path, void *sb);
+DARWINTRACE_INTERPOSE(_dt_stat, stat);
+
</ins><span class="cx"> // Don't provide stat64 on systems that have no stat64 syscall
</span><span class="cx"> #ifdef SYS_stat64
</span><del>-int stat64(const char *path, void *sb) {
</del><ins>+static int _dt_stat64(const char *path, void *sb) {
</ins><span class="cx"> #define stat64(path, sb) syscall(SYS_stat64, path, sb)
</span><span class="cx">         __darwintrace_setup();
</span><span class="cx">
</span><span class="lines">@@ -86,13 +91,15 @@
</span><span class="cx">         return result;
</span><span class="cx"> #undef stat64
</span><span class="cx"> }
</span><ins>+int stat64(const char *path, void *sb);
+DARWINTRACE_INTERPOSE(_dt_stat64, stat64);
</ins><span class="cx">
</span><del>-int stat$INODE64(const char *path, void *sb) {
-        return stat64(path, sb);
-}
</del><ins>+int stat$INODE64(const char *path, void *sb);
+DARWINTRACE_INTERPOSE(_dt_stat64, stat$INODE64);
+
</ins><span class="cx"> #endif /* defined(SYS_stat64) */
</span><span class="cx">
</span><del>-int lstat(const char *path, void *sb) {
</del><ins>+static int _dt_lstat(const char *path, void *sb) {
</ins><span class="cx"> #define lstat(path, sb) syscall(SYS_lstat, path, sb)
</span><span class="cx">         __darwintrace_setup();
</span><span class="cx">
</span><span class="lines">@@ -112,9 +119,12 @@
</span><span class="cx"> #undef lstat
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+int lstat(const char *path, void *sb);
+DARWINTRACE_INTERPOSE(_dt_lstat, lstat);
+
</ins><span class="cx"> // Don't provide lstat64 on systems that have no lstat64 syscall
</span><span class="cx"> #ifdef SYS_lstat64
</span><del>-int lstat64(const char *path, void *sb) {
</del><ins>+static int _dt_lstat64(const char *path, void *sb) {
</ins><span class="cx"> #define lstat64(path, sb) syscall(SYS_lstat64, path, sb)
</span><span class="cx">         __darwintrace_setup();
</span><span class="cx">
</span><span class="lines">@@ -134,7 +144,10 @@
</span><span class="cx"> #undef lstat64
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int lstat$INODE64(const char *path, void *sb) {
-        return lstat64(path, sb);
-}
</del><ins>+int lstat64(const char *path, void *sb);
+DARWINTRACE_INTERPOSE(_dt_lstat64, lstat64);
+
+int lstat$INODE64(const char *path, void *sb);
+DARWINTRACE_INTERPOSE(_dt_lstat64, lstat$INODE64);
+
</ins><span class="cx"> #endif /* defined(SYS_lstat64) */
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcdarwintracelib10unlinkc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/darwintracelib1.0/unlink.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/darwintracelib1.0/unlink.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/darwintracelib1.0/unlink.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> * Wrapper around \c unlink(2) that will deny attempts to delete files outside
</span><span class="cx"> * of the sandbox and simulate non-existence of the file instead.
</span><span class="cx"> */
</span><del>-int unlink(const char *path) {
</del><ins>+static int _dt_unlink(const char *path) {
</ins><span class="cx"> #define unlink(x) syscall(SYS_unlink, (x))
</span><span class="cx">         __darwintrace_setup();
</span><span class="cx">
</span><span class="lines">@@ -64,3 +64,5 @@
</span><span class="cx">         return result;
</span><span class="cx"> #undef unlink
</span><span class="cx"> }
</span><ins>+
+DARWINTRACE_INTERPOSE(_dt_unlink, unlink);
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcdedup_portfilestclinfromrev122997trunkbasesrcdedup_portfilestclin"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/dedup_portfiles.tcl.in (from rev 122997, trunk/base/src/dedup_portfiles.tcl.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/dedup_portfiles.tcl.in         (rev 0)
+++ branches/new-help-system/base/src/dedup_portfiles.tcl.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+#!@TCLSH@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+# move portfiles from sqlite db to filesystem, while deduplicating
+# Takes one argument, which should be TCL_PACKAGE_DIR.
+
+package require macports 1.0
+package require registry2 2.0
+package require Pextlib 1.0
+
+umask 022
+
+array set ui_options {ports_verbose yes}
+
+mportinit ui_options
+
+if {[registry::metadata get portfiles_update_needed] == 1} {
+ set portfiles_dir [file join ${macports::registry.path} registry portfiles]
+
+ registry::write {
+ set installed_ports [registry::entry imaged]
+ foreach portref $installed_ports {
+ set portfile_contents [$portref portfile]
+ if {$portfile_contents ne "" && $portfile_contents ne "0"} {
+ set portfile_partial_dir [file join $portfiles_dir [$portref name]-[$portref version]_[$portref revision]]
+ file mkdir $portfile_partial_dir
+ set portfile_temp_path ${portfile_partial_dir}/Portfile
+ set fd [open $portfile_temp_path w]
+ puts $fd $portfile_contents
+ close $fd
+
+ set hash_size [sha256 file $portfile_temp_path]-[file size $portfile_temp_path]
+ set portfile_dir [file join $portfile_partial_dir $hash_size]
+ file mkdir $portfile_dir
+ file rename -force $portfile_temp_path $portfile_dir
+ file mtime ${portfile_dir}/Portfile [$portref date]
+
+ $portref portfile $hash_size
+ }
+ }
+ registry::metadata del portfiles_update_needed
+ }
+}
+
+exit 0
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcimages_to_archivestcl"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/src/images_to_archives.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/images_to_archives.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/images_to_archives.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,160 +0,0 @@
</span><del>-#!/usr/bin/env tclsh
-# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
-# $Id$
-
-# convert existing port image directories into compressed archive versions
-# Takes one argument, which should be TCL_PACKAGE_DIR.
-
-source [file join [lindex $argv 0] macports1.0 macports_fastload.tcl]
-package require macports 1.0
-package require registry 1.0
-package require registry2 2.0
-package require Pextlib 1.0
-
-umask 022
-
-array set ui_options {ports_verbose yes}
-
-mportinit ui_options
-
-# always converting to tbz2 should be fine as both these programs are
-# needed elsewhere and assumed to be available
-set tarcmd [macports::findBinary tar ${macports::autoconf::tar_path}]
-set bzip2cmd [macports::findBinary bzip2 ${macports::autoconf::bzip2_path}]
-
-if {[catch {set ilist [registry::installed]}]} {
- # no ports installed
- puts "No ports installed to convert."
- exit 0
-}
-
-puts "This could take a while..."
-
-# list of ports we successfully create an archive of, to be used to update
-# the registry only after we know all creation attempts were successful.
-set archived_list {}
-set installed_len [llength $ilist]
-set counter 0
-
-foreach installed $ilist {
- incr counter
- set iname [lindex $installed 0]
- set iversion [lindex $installed 1]
- set irevision [lindex $installed 2]
- set ivariants [lindex $installed 3]
- set iepoch [lindex $installed 5]
- set iref [registry::open_entry $iname $iversion $irevision $ivariants $iepoch]
- set installtype [registry::property_retrieve $iref installtype]
- if {$installtype eq "image"} {
- set location [registry::property_retrieve $iref location]
- if {$location == 0} {
- set location [registry::property_retrieve $iref imagedir]
- }
- } else {
- set location ""
- }
-
- if {$location eq "" || ![file isfile $location]} {
- # no image archive present, so make one
- set archs [registry::property_retrieve $iref archs]
- if {$archs eq "" || $archs == 0} {
- set archs ${macports::os_arch}
- }
- # look for any existing archive in the old location
- set oldarchiverootname "${iname}-${iversion}_${irevision}${ivariants}.[join $archs -]"
- set archivetype tbz2
- set oldarchivedir [file join ${macports::portdbpath} packages ${macports::os_platform}_${macports::os_major}]
- set olderarchivedir [file join ${macports::portdbpath} packages ${macports::os_platform}]
- if {[llength $archs] == 1} {
- set oldarchivedir [file join $oldarchivedir $archs $iname]
- set olderarchivedir [file join $olderarchivedir $archs]
- } else {
- set oldarchivedir [file join $oldarchivedir universal $iname]
- set olderarchivedir [file join $olderarchivedir universal]
- }
- set found 0
- foreach adir [list $oldarchivedir $olderarchivedir] {
- foreach type {tbz2 tbz tgz tar txz tlz xar zip cpgz cpio} {
- set oldarchivefullpath "[file join $adir $oldarchiverootname].${type}"
- if {[file isfile $oldarchivefullpath]} {
- set found 1
- set archivetype $type
- break
- }
- }
- if {$found} {break}
- }
-
- # compute new name and location of archive
- set archivename "${iname}-${iversion}_${irevision}${ivariants}.${macports::os_platform}_${macports::os_major}.[join $archs -].${archivetype}"
- ui_msg "Processing ${counter} of ${installed_len}: ${archivename}"
- if {$installtype eq "image"} {
- set targetdir [file dirname $location]
- } else {
- set targetdir [file join ${macports::registry.path} software ${iname}]
- }
- if {$location eq "" || ![file isdirectory $location]} {
- set contents [$iref imagefiles]
- }
- file mkdir $targetdir
- set newlocation [file join $targetdir $archivename]
-
- if {$found} {
- file rename $oldarchivefullpath $newlocation
- } elseif {$installtype eq "image" && [file isdirectory $location]} {
- # create archive from image dir
- system -W $location "$tarcmd -cjf $newlocation * > ${targetdir}/error.log 2>&1"
- file delete -force ${targetdir}/error.log
- } else {
- # direct mode (or missing image dir), create archive from installed files
- # we tell tar to read filenames from a file so as not to run afoul of command line length limits
- set fd [open ${targetdir}/tarlist w]
- foreach entry $contents {
- puts $fd $entry
- }
- close $fd
- system "$tarcmd -cjf $newlocation -T ${targetdir}/tarlist > ${targetdir}/error.log 2>&1"
- file delete -force ${targetdir}/tarlist ${targetdir}/error.log
- }
-
- lappend archived_list [list $installtype $iref $location $newlocation]
- }
-}
-
-set archived_len [llength $archived_list]
-set counter 0
-
-registry::write {
- foreach archived $archived_list {
- incr counter
- ui_msg "Updating registry: ${counter} of ${archived_len}"
- set installtype [lindex $archived 0]
- set iref [lindex $archived 1]
- set newlocation [lindex $archived 3]
-
- if {$installtype eq "direct"} {
- # change receipt to image
- $iref installtype image
- $iref state imaged
- $iref activate [$iref imagefiles]
- $iref state installed
- }
-
- # set the new location in the registry and delete the old dir
- $iref location $newlocation
- }
-}
-
-set counter 0
-foreach archived $archived_list {
- incr counter
- set location [lindex $archived 2]
- ui_msg "Deleting ${counter} of ${archived_len}: ${location}"
- if {$location ne "" && [file isdirectory $location]} {
- if {[catch {file delete -force $location} result]} {
- ui_warn "Failed to delete ${location}: $result"
- }
- }
-}
-
-exit 0
</del></span></pre></div>
<a id="branchesnewhelpsystembasesrcimages_to_archivestclinfromrev122997trunkbasesrcimages_to_archivestclin"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/images_to_archives.tcl.in (from rev 122997, trunk/base/src/images_to_archives.tcl.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/images_to_archives.tcl.in         (rev 0)
+++ branches/new-help-system/base/src/images_to_archives.tcl.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,159 @@
</span><ins>+#!@TCLSH@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+# convert existing port image directories into compressed archive versions
+# Takes one argument, which should be TCL_PACKAGE_DIR.
+
+package require macports 1.0
+package require registry 1.0
+package require registry2 2.0
+package require Pextlib 1.0
+
+umask 022
+
+array set ui_options {ports_verbose yes}
+
+mportinit ui_options
+
+# always converting to tbz2 should be fine as both these programs are
+# needed elsewhere and assumed to be available
+set tarcmd [macports::findBinary tar ${macports::autoconf::tar_path}]
+set bzip2cmd [macports::findBinary bzip2 ${macports::autoconf::bzip2_path}]
+
+if {[catch {set ilist [registry::installed]}]} {
+ # no ports installed
+ puts "No ports installed to convert."
+ exit 0
+}
+
+puts "This could take a while..."
+
+# list of ports we successfully create an archive of, to be used to update
+# the registry only after we know all creation attempts were successful.
+set archived_list {}
+set installed_len [llength $ilist]
+set counter 0
+
+foreach installed $ilist {
+ incr counter
+ set iname [lindex $installed 0]
+ set iversion [lindex $installed 1]
+ set irevision [lindex $installed 2]
+ set ivariants [lindex $installed 3]
+ set iepoch [lindex $installed 5]
+ set iref [registry::open_entry $iname $iversion $irevision $ivariants $iepoch]
+ set installtype [registry::property_retrieve $iref installtype]
+ if {$installtype eq "image"} {
+ set location [registry::property_retrieve $iref location]
+ if {$location == 0} {
+ set location [registry::property_retrieve $iref imagedir]
+ }
+ } else {
+ set location ""
+ }
+
+ if {$location eq "" || ![file isfile $location]} {
+ # no image archive present, so make one
+ set archs [registry::property_retrieve $iref archs]
+ if {$archs eq "" || $archs == 0} {
+ set archs ${macports::os_arch}
+ }
+ # look for any existing archive in the old location
+ set oldarchiverootname "${iname}-${iversion}_${irevision}${ivariants}.[join $archs -]"
+ set archivetype tbz2
+ set oldarchivedir [file join ${macports::portdbpath} packages ${macports::os_platform}_${macports::os_major}]
+ set olderarchivedir [file join ${macports::portdbpath} packages ${macports::os_platform}]
+ if {[llength $archs] == 1} {
+ set oldarchivedir [file join $oldarchivedir $archs $iname]
+ set olderarchivedir [file join $olderarchivedir $archs]
+ } else {
+ set oldarchivedir [file join $oldarchivedir universal $iname]
+ set olderarchivedir [file join $olderarchivedir universal]
+ }
+ set found 0
+ foreach adir [list $oldarchivedir $olderarchivedir] {
+ foreach type {tbz2 tbz tgz tar txz tlz xar zip cpgz cpio} {
+ set oldarchivefullpath "[file join $adir $oldarchiverootname].${type}"
+ if {[file isfile $oldarchivefullpath]} {
+ set found 1
+ set archivetype $type
+ break
+ }
+ }
+ if {$found} {break}
+ }
+
+ # compute new name and location of archive
+ set archivename "${iname}-${iversion}_${irevision}${ivariants}.${macports::os_platform}_${macports::os_major}.[join $archs -].${archivetype}"
+ ui_msg "Processing ${counter} of ${installed_len}: ${archivename}"
+ if {$installtype eq "image"} {
+ set targetdir [file dirname $location]
+ } else {
+ set targetdir [file join ${macports::registry.path} software ${iname}]
+ }
+ if {$location eq "" || ![file isdirectory $location]} {
+ set contents [$iref imagefiles]
+ }
+ file mkdir $targetdir
+ set newlocation [file join $targetdir $archivename]
+
+ if {$found} {
+ file rename $oldarchivefullpath $newlocation
+ } elseif {$installtype eq "image" && [file isdirectory $location]} {
+ # create archive from image dir
+ system -W $location "$tarcmd -cjf $newlocation * > ${targetdir}/error.log 2>&1"
+ file delete -force ${targetdir}/error.log
+ } else {
+ # direct mode (or missing image dir), create archive from installed files
+ # we tell tar to read filenames from a file so as not to run afoul of command line length limits
+ set fd [open ${targetdir}/tarlist w]
+ foreach entry $contents {
+ puts $fd $entry
+ }
+ close $fd
+ system "$tarcmd -cjf $newlocation -T ${targetdir}/tarlist > ${targetdir}/error.log 2>&1"
+ file delete -force ${targetdir}/tarlist ${targetdir}/error.log
+ }
+
+ lappend archived_list [list $installtype $iref $location $newlocation]
+ }
+}
+
+set archived_len [llength $archived_list]
+set counter 0
+
+registry::write {
+ foreach archived $archived_list {
+ incr counter
+ ui_msg "Updating registry: ${counter} of ${archived_len}"
+ set installtype [lindex $archived 0]
+ set iref [lindex $archived 1]
+ set newlocation [lindex $archived 3]
+
+ if {$installtype eq "direct"} {
+ # change receipt to image
+ $iref installtype image
+ $iref state imaged
+ $iref activate [$iref imagefiles]
+ $iref state installed
+ }
+
+ # set the new location in the registry and delete the old dir
+ $iref location $newlocation
+ }
+}
+
+set counter 0
+foreach archived $archived_list {
+ incr counter
+ set location [lindex $archived 2]
+ ui_msg "Deleting ${counter} of ${archived_len}: ${location}"
+ if {$location ne "" && [file isdirectory $location]} {
+ if {[catch {file delete -force $location} result]} {
+ ui_warn "Failed to delete ${location}: $result"
+ }
+ }
+}
+
+exit 0
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcmachista10Makefilein"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/machista1.0/Makefile.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/machista1.0/Makefile.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/machista1.0/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,6 +1,11 @@
</span><ins>+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include ../../Mk/macports.autoconf.mk
+
</ins><span class="cx"> OBJS=                 libmachista.o hashmap.o machista_wrap.o
</span><span class="cx"> SHLIB_NAME= machista${SHLIB_SUFFIX}
</span><del>-INSTALLDIR=        ${DESTDIR}${datadir}/macports/Tcl/machista1.0
</del><ins>+INSTALLDIR=        ${DESTDIR}${TCL_PACKAGE_PATH}/machista1.0
</ins><span class="cx">
</span><span class="cx"> SWIG = @SWIG@
</span><span class="cx"> SWIG_FLAGS = -tcl8 -pkgversion 1.0 -namespace
</span><span class="lines">@@ -12,8 +17,7 @@
</span><span class="cx">
</span><span class="cx"> TESTS = ./tests/libmachista-test
</span><span class="cx">
</span><del>-include ../../Mk/macports.autoconf.mk
-include ../../Mk/macports.tea.mk
</del><ins>+include $(srcdir)/../../Mk/macports.tea.mk
</ins><span class="cx">
</span><span class="cx"> CFLAGS+= -fPIC
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcmachista10libmachistac"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/machista1.0/libmachista.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/machista1.0/libmachista.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/machista1.0/libmachista.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -30,8 +30,15 @@
</span><span class="cx"> * POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><ins>+#ifdef HAVE_CONFIG_H
</ins><span class="cx"> #include <config.h>
</span><ins>+#endif
</ins><span class="cx">
</span><ins>+/* required for asprintf(3) on OS X */
+#define _DARWIN_C_SOURCE
+/* required for asprintf(3) on Linux */
+#define _GNU_SOURCE
+
</ins><span class="cx"> #include <stdbool.h>
</span><span class="cx"> #include <stdio.h>
</span><span class="cx"> #include <stdlib.h>
</span><span class="lines">@@ -109,14 +116,15 @@
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#ifdef __MACH__
</ins><span class="cx"> const char *macho_get_arch_name (cpu_type_t cputype) {
</span><del>-#ifdef __MACH__
</del><span class="cx"> const NXArchInfo *archInfo = NXGetArchInfoFromCpuType(cputype, CPU_SUBTYPE_MULTIPLE);        
</span><span class="cx"> if (!archInfo) {
</span><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="cx"> return archInfo->name;
</span><span class="cx"> #else
</span><ins>+const char *macho_get_arch_name (cpu_type_t cputype UNUSED) {
</ins><span class="cx"> return NULL;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="lines">@@ -239,8 +247,8 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> /* Parse a Mach-O header */
</span><ins>+#ifdef __MACH__
</ins><span class="cx"> static int parse_macho (macho_t *mt, macho_input_t *input) {
</span><del>-#ifdef __MACH__
</del><span class="cx"> /* Read the file type. */
</span><span class="cx"> const uint32_t *magic = macho_read(input, input->data, sizeof(uint32_t));
</span><span class="cx"> if (magic == NULL)
</span><span class="lines">@@ -437,14 +445,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return MACHO_SUCCESS;
</span><del>-#else
- return 0;
</del><ins>+}
</ins><span class="cx"> #endif
</span><del>-}
</del><span class="cx">
</span><span class="cx"> /* Parse a (possible Mach-O) file. For a more detailed description, see the header */
</span><ins>+#ifdef __MACH__
</ins><span class="cx"> int macho_parse_file(macho_handle_t *handle, const char *filepath, const macho_t **res) {
</span><del>-#ifdef __MACH__
</del><span class="cx"> int fd;
</span><span class="cx"> struct stat st;
</span><span class="cx"> void *data;
</span><span class="lines">@@ -505,6 +511,7 @@
</span><span class="cx">
</span><span class="cx"> return ret;
</span><span class="cx"> #else
</span><ins>+int macho_parse_file(macho_handle_t *handle UNUSED, const char *filepath UNUSED, const macho_t **res UNUSED) {
</ins><span class="cx"> return 0;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcmacports10"></a>
<div class="propset"><h4>Property changes: branches/new-help-system/base/src/macports1.0</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="modfile"><h4>Modified: svn:ignore</h4></div>
<span class="cx">macports_autoconf.tcl
</span><span class="cx">macports_test_autoconf.tcl
</span><span class="cx">macports_fastload.tcl
</span><span class="cx">pkgIndex.tcl
</span><span class="cx"> + *.dylib
</span><span class="cx">Makefile
</span><span class="cx">macports_autoconf.tcl
</span><span class="cx">macports_test_autoconf.tcl
</span><span class="cx">pkgIndex.tcl
</span><a id="branchesnewhelpsystembasesrcmacports10Makefile"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/src/macports1.0/Makefile (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/macports1.0/Makefile        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/macports1.0/Makefile        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,46 +0,0 @@
</span><del>-SRCS=                macports.tcl macports_dlist.tcl macports_util.tcl \
-                macports_autoconf.tcl macports_fastload.tcl
-OBJS=                macports.o get_systemconfiguration_proxies.o sysctl.o
-SHLIB_NAME=        MacPorts${SHLIB_SUFFIX}
-
-INSTALLDIR=        ${DESTDIR}${datadir}/macports/Tcl/macports1.0
-INSTALLPKGLINK=        ${TCL_PACKAGE_DIR}/macports1.0
-
-include ../../Mk/macports.autoconf.mk
-include ../../Mk/macports.tea.mk
-
-ifeq ($(OBJC_RUNTIME), APPLE_RUNTIME)
-        LIBS+= -framework CoreFoundation -framework SystemConfiguration
-endif
-
-pkgIndex.tcl: $(SRCS)
-
-test::
-        $(TCLSH) ./tests/test.tcl -nocolor
-
-distclean:: clean
-        rm -f macports_autoconf.tcl macports_fastload.tcl macports_test_autoconf.tcl ${SHLIB_NAME}
-
-install:: all
-        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
-
-        $(SILENT) set -x; for file in ${SRCS}; do \
-                $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}/$$file; \
-        done
-
-        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
-
-        echo "${TCL_PACKAGE_DIR}" > ${DESTDIR}${prefix}/var/macports/.tclpackage
-        if test -z "${DESTDIR}" -a "${INSTALLPKGLINK}" != "${INSTALLDIR}"; then \
-                if test ! -L "${INSTALLPKGLINK}"; then \
- if test ! -e "${TCL_PACKAGE_DIR}"; then \
- $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${TCL_PACKAGE_DIR}" || true; \
- fi; \
- if test -d "${INSTALLPKGLINK}"; then \
- rm -vrf "${INSTALLPKGLINK}" || true; \
- fi; \
- if test ! -e "${INSTALLPKGLINK}"; then \
- ln -vs "${INSTALLDIR}" "${INSTALLPKGLINK}" || true; \
- fi; \
- fi; \
-        fi
</del></span></pre></div>
<a id="branchesnewhelpsystembasesrcmacports10Makefileinfromrev122997trunkbasesrcmacports10Makefilein"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/macports1.0/Makefile.in (from rev 122997, trunk/base/src/macports1.0/Makefile.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/macports1.0/Makefile.in         (rev 0)
+++ branches/new-help-system/base/src/macports1.0/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include ../../Mk/macports.autoconf.mk
+
+SRCS=                macports.tcl macports_dlist.tcl macports_util.tcl \
+                macports_autoconf.tcl
+OBJS=                macports.o get_systemconfiguration_proxies.o sysctl.o
+SHLIB_NAME=        MacPorts${SHLIB_SUFFIX}
+
+INSTALLDIR=        ${DESTDIR}${TCL_PACKAGE_PATH}/macports1.0
+OLDINSTALLDIR= ${datadir}/macports/Tcl
+
+ifeq ($(OBJC_RUNTIME), APPLE_RUNTIME)
+        LIBS+= -framework CoreFoundation -framework SystemConfiguration
+endif
+
+pkgIndex.tcl: $(SRCS)
+
+test::
+        $(TCLSH) $(srcdir)/tests/test.tcl -nocolor
+
+distclean:: clean
+        rm -f macports_autoconf.tcl macports_test_autoconf.tcl ${SHLIB_NAME}
+        rm -f Makefile
+
+install:: all
+        @# Clean up old instances of the MacPorts Tcl packages
+        if test -z "${DESTDIR}"; then rm -rf "${OLDINSTALLDIR}"; fi
+
+        @# Remove the previously installed link if it still exists. Without this,
+        @# creating the directory will fail.
+        if test -L "${INSTALLDIR}"; then rm -rf "${INSTALLDIR}"; fi
+
+        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
+
+        $(SILENT) set -x; for file in ${SRCS}; do \
+                $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$$file" "${INSTALLDIR}/$$file"; \
+        done
+
+        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${INSTALLDIR}"
+
+
+include $(srcdir)/../../Mk/macports.tea.mk
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcmacports10get_systemconfiguration_proxiesc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/macports1.0/get_systemconfiguration_proxies.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/macports1.0/get_systemconfiguration_proxies.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/macports1.0/get_systemconfiguration_proxies.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -55,7 +55,11 @@
</span><span class="cx"> *
</span><span class="cx"> * Synopsis: array set someArray get_systemconfiguration_proxies
</span><span class="cx"> */
</span><ins>+#ifdef HAVE_FRAMEWORK_SYSTEMCONFIGURATION
</ins><span class="cx"> int GetSystemConfigurationProxiesCmd( ClientData clientData UNUSED, Tcl_Interp *interp, int objc UNUSED, Tcl_Obj *CONST objv[] UNUSED )
</span><ins>+#else
+int GetSystemConfigurationProxiesCmd( ClientData clientData UNUSED, Tcl_Interp *interp UNUSED, int objc UNUSED, Tcl_Obj *CONST objv[] UNUSED )
+#endif
</ins><span class="cx"> {
</span><span class="cx"> int cmdResult = TCL_OK;
</span><span class="cx"> #ifdef HAVE_FRAMEWORK_SYSTEMCONFIGURATION
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcmacports10macportstcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/macports1.0/macports.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/macports1.0/macports.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/macports1.0/macports.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -36,11 +36,12 @@
</span><span class="cx"> package provide macports 1.0
</span><span class="cx"> package require macports_dlist 1.0
</span><span class="cx"> package require macports_util 1.0
</span><ins>+package require Tclx
</ins><span class="cx">
</span><span class="cx"> namespace eval macports {
</span><span class="cx"> namespace export bootstrap_options user_options portinterp_options open_mports ui_priorities port_phases
</span><span class="cx"> variable bootstrap_options "\
</span><del>- portdbpath libpath binpath auto_path extra_env sources_conf prefix portdbformat \
</del><ins>+ portdbpath binpath auto_path extra_env sources_conf prefix portdbformat \
</ins><span class="cx"> portarchivetype portautoclean \
</span><span class="cx"> porttrace portverbose keeplogs destroot_umask variants_conf rsync_server rsync_options \
</span><span class="cx"> rsync_dir startupitem_type startupitem_install place_worksymlink xcodeversion xcodebuildcmd \
</span><span class="lines">@@ -59,7 +60,7 @@
</span><span class="cx"> rsync_server rsync_options rsync_dir startupitem_type startupitem_install place_worksymlink macportsuser \
</span><span class="cx"> configureccache ccache_dir ccache_size configuredistcc configurepipe buildnicevalue buildmakejobs \
</span><span class="cx"> applications_dir current_phase frameworks_dir developer_dir universal_archs build_arch \
</span><del>- os_arch os_endian os_version os_major os_platform macosx_version macosx_sdk_version macosx_deployment_target \
</del><ins>+ os_arch os_endian os_version os_major os_minor os_platform macosx_version macosx_sdk_version macosx_deployment_target \
</ins><span class="cx"> packagemaker_path default_compilers sandbox_enable delete_la_files cxx_stdlib \
</span><span class="cx"> pkg_post_unarchive_deletions $user_options"
</span><span class="cx">
</span><span class="lines">@@ -204,6 +205,24 @@
</span><span class="cx">
</span><span class="cx"> proc ui_message {priority prefix phase args} {
</span><span class="cx"> global macports::channels ::debuglog macports::current_phase
</span><ins>+
+ #
+ # validate $args
+ #
+ switch [llength $args] {
+ 0 - 1 {}
+ 2 {
+ if {[lindex $args 0] ne {-nonewline}} {
+ set hint "error: when 5 arguments are given, 2nd last must be \"-newnewline\""
+ error "$hint\nusage: ui_message priority prefix phase ?-nonewline? string"
+ }
+ }
+ default {
+ set hint "error: too many arguments specified"
+ error "$hint\nusage: ui_message priority prefix phase ?-nonewline? string"
+ }
+ }
+
</ins><span class="cx"> foreach chan $macports::channels($priority) {
</span><span class="cx"> if {[info exists ::debuglog] && ($chan eq {debuglog})} {
</span><span class="cx"> set chan $::debuglog
</span><span class="lines">@@ -248,7 +267,7 @@
</span><span class="cx"> }
</span><span class="cx"> set phases {fetch checksum}
</span><span class="cx"> try {
</span><del>- eval ::ui_init $priority $prefix $channels($priority) $args
</del><ins>+ ::ui_init $priority $prefix $channels($priority) {*}$args
</ins><span class="cx"> } catch * {
</span><span class="cx"> interp alias {} ui_$priority {} ui_message $priority $prefix {}
</span><span class="cx"> foreach phase $phases {
</span><span class="lines">@@ -541,6 +560,10 @@
</span><span class="cx"> macports::ui_init $priority
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ package require Pextlib 1.0
+ package require registry 1.0
+ package require registry2 2.0
+ package require machista 1.0
</ins><span class="cx">
</span><span class="cx"> global auto_path env tcl_platform \
</span><span class="cx"> macports::autoconf::macports_conf_path \
</span><span class="lines">@@ -554,7 +577,6 @@
</span><span class="cx"> macports::sources \
</span><span class="cx"> macports::sources_default \
</span><span class="cx"> macports::destroot_umask \
</span><del>- macports::libpath \
</del><span class="cx"> macports::prefix \
</span><span class="cx"> macports::macportsuser \
</span><span class="cx"> macports::prefix_frozen \
</span><span class="lines">@@ -573,6 +595,7 @@
</span><span class="cx"> macports::os_endian \
</span><span class="cx"> macports::os_version \
</span><span class="cx"> macports::os_major \
</span><ins>+ macports::os_minor \
</ins><span class="cx"> macports::os_platform \
</span><span class="cx"> macports::macosx_version \
</span><span class="cx"> macports::macosx_sdk_version \
</span><span class="lines">@@ -587,12 +610,18 @@
</span><span class="cx"> # Set the system encoding to utf-8
</span><span class="cx"> encoding system utf-8
</span><span class="cx">
</span><ins>+ # Set up signal handling for SIGTERM and SIGINT
+ # Specifying error here will case the program to abort where it is with
+ # a Tcl error, which can be caught, if necessary.
+ signal -restart error {TERM INT}
+
</ins><span class="cx"> # set up platform info variables
</span><span class="cx"> set os_arch $tcl_platform(machine)
</span><span class="cx"> if {$os_arch eq {Power Macintosh}} {set os_arch "powerpc"}
</span><span class="cx"> if {$os_arch eq {i586} || $os_arch eq {i686} || $os_arch eq {x86_64}} {set os_arch "i386"}
</span><span class="cx"> set os_version $tcl_platform(osVersion)
</span><span class="cx"> set os_major [lindex [split $os_version .] 0]
</span><ins>+ set os_minor [lindex [split $os_version .] 1]
</ins><span class="cx"> set os_platform [string tolower $tcl_platform(os)]
</span><span class="cx"> # Remove trailing "Endian"
</span><span class="cx"> set os_endian [string range $tcl_platform(byteOrder) 0 end-6]
</span><span class="lines">@@ -606,7 +635,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # Check that the current platform is the one we were configured for, otherwise need to do migration
</span><del>- if {($os_platform != $macports::autoconf::os_platform) || ($os_major != $macports::autoconf::os_major)} {
</del><ins>+ if {($os_platform ne $macports::autoconf::os_platform) || ($os_major != $macports::autoconf::os_major)} {
</ins><span class="cx"> ui_error "Current platform \"$os_platform $os_major\" does not match expected platform \"$macports::autoconf::os_platform $macports::autoconf::os_major\""
</span><span class="cx"> ui_error "If you upgraded your OS, please follow the migration instructions: https://trac.macports.org/wiki/Migration"
</span><span class="cx"> return -code error "OS platform mismatch"
</span><span class="lines">@@ -869,10 +898,6 @@
</span><span class="cx"> return -code error "Data files directory '$portsharepath' must exist"
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if {![info exists libpath]} {
- set libpath ${prefix}/share/macports/Tcl
- }
-
</del><span class="cx"> if {![info exists binpath]} {
</span><span class="cx"> set env(PATH) ${prefix}/bin:${prefix}/sbin:/bin:/sbin:/usr/bin:/usr/sbin
</span><span class="cx"> } else {
</span><span class="lines">@@ -1015,21 +1040,6 @@
</span><span class="cx"> set keepenvkeys [concat $keepenvkeys $extra_env]
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if {[file isdirectory $libpath]} {
- lappend auto_path $libpath
- set macports::auto_path $auto_path
-
- # XXX: not sure if this the best place, but it needs to happen
- # early, and after auto_path has been set. Or maybe Pextlib
- # should ship with macports1.0 API?
- package require Pextlib 1.0
- package require registry 1.0
- package require registry2 2.0
- package require machista 1.0
- } else {
- return -code error "Library directory '$libpath' must exist"
- }
-
</del><span class="cx"> # set the hidden flag on $portdbpath to avoid spotlight indexing, which
</span><span class="cx"> # might slow builds down considerably. You can avoid this by touching
</span><span class="cx"> # $portdbpath/.nohide.
</span><span class="lines">@@ -1286,6 +1296,14 @@
</span><span class="cx"> $workername alias ui_progress_download $macports::ui_options(progress_download)
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ # notifications callback
+ if {[info exists macports::ui_options(notifications_append)]} {
+ $workername alias ui_notifications_append $macports::ui_options(notifications_append)
+ } else {
+ # provide a no-op if notifications_append wasn't set. See http://wiki.tcl.tk/3044
+ $workername alias ui_notifications_append return -level 0
+ }
+
</ins><span class="cx"> $workername alias ui_prefix ui_prefix
</span><span class="cx"> $workername alias ui_channels ui_channels
</span><span class="cx">
</span><span class="lines">@@ -1461,7 +1479,7 @@
</span><span class="cx"> } elseif {[info exists macports::ui_options(progress_download)]} {
</span><span class="cx"> set progressflag "--progress ${macports::ui_options(progress_download)}"
</span><span class="cx"> }
</span><del>- if {[catch {eval curl fetch $progressflag {$url} {[file join $fetchdir $fetchfile]}} result]} {
</del><ins>+ if {[catch {curl fetch {*}$progressflag $url [file join $fetchdir $fetchfile]} result]} {
</ins><span class="cx"> return -code error "Port remote fetch failed: $result"
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1474,9 +1492,9 @@
</span><span class="cx"> set tarcmd [findBinary tar $macports::autoconf::tar_path]
</span><span class="cx"> set tarflags [get_tar_flags [file extension $fetchfile]]
</span><span class="cx"> set qflag $macports::autoconf::tar_q
</span><del>- set cmdline "$tarcmd ${tarflags}${qflag}xOf \"$fetchfile\" +CONTENTS"
</del><ins>+ set cmdline [list $tarcmd ${tarflags}${qflag}xOf $fetchfile +CONTENTS]
</ins><span class="cx"> ui_debug $cmdline
</span><del>- if {![catch {set contents [eval exec $cmdline]}]} {
</del><ins>+ if {![catch {set contents [exec {*}$cmdline]}]} {
</ins><span class="cx"> # the file is probably a valid binary archive
</span><span class="cx"> set binary 1
</span><span class="cx"> ui_debug "getting port name from binary archive"
</span><span class="lines">@@ -1502,12 +1520,12 @@
</span><span class="cx"> # extract the portfile (and possibly files dir if not a binary archive)
</span><span class="cx"> ui_debug "extracting port archive to [pwd]"
</span><span class="cx"> if {$binary} {
</span><del>- set cmdline "$tarcmd ${tarflags}${qflag}xOf \"../$fetchfile\" +PORTFILE > Portfile"
</del><ins>+ set cmdline [list $tarcmd ${tarflags}${qflag}xOf ../$fetchfile +PORTFILE > Portfile]
</ins><span class="cx"> } else {
</span><del>- set cmdline "$tarcmd ${tarflags}xf \"$fetchfile\""
</del><ins>+ set cmdline [list $tarcmd ${tarflags}${qflag}xf $fetchfile]
</ins><span class="cx"> }
</span><span class="cx"> ui_debug $cmdline
</span><del>- if {[catch {eval exec $cmdline} result]} {
</del><ins>+ if {[catch {exec {*}$cmdline} result]} {
</ins><span class="cx"> # clean up the archive, we don't need it anymore
</span><span class="cx"> file delete [file join $fetchdir $fetchfile]
</span><span class="cx">
</span><span class="lines">@@ -1715,12 +1733,7 @@
</span><span class="cx"> proc mportopen_installed {name version revision variants options} {
</span><span class="cx"> global macports::registry.path
</span><span class="cx"> set regref [lindex [registry::entry imaged $name $version $revision $variants] 0]
</span><del>- set portfile_dir [file join ${registry.path} registry portfiles $name ${version}_${revision}$variants]
- file mkdir $portfile_dir
- set fd [open ${portfile_dir}/Portfile w]
- puts $fd [$regref portfile]
- close $fd
- file mtime ${portfile_dir}/Portfile [$regref date]
</del><ins>+ set portfile_dir [file join ${registry.path} registry portfiles ${name}-${version}_${revision} [$regref portfile]]
</ins><span class="cx">
</span><span class="cx"> set variations {}
</span><span class="cx"> set minusvariant [lrange [split [$regref negated_variants] -] 1 end]
</span><span class="lines">@@ -1731,24 +1744,20 @@
</span><span class="cx"> foreach v $minusvariant {
</span><span class="cx"> lappend variations $v -
</span><span class="cx"> }
</span><del>- lappend options subport $name
- return [mportopen file://${portfile_dir}/ $options $variations]
-}
</del><span class="cx">
</span><del>-# mportclose_installed
-# close mport opened with mportopen_installed and clean up associated files
-proc mportclose_installed {mport} {
- global macports::registry.path
- foreach key {subport version revision portvariants} {
- set $key [_mportkey $mport $key]
</del><ins>+ array set options_array $options
+ set options_array(subport) $name
+
+ # find portgroups in registry
+ set pgdirlist [list]
+ foreach pg [$regref groups_used] {
+ lappend pgdirlist [file join ${registry.path} registry portgroups [$pg sha256]-[$pg size]]
</ins><span class="cx"> }
</span><del>- mportclose $mport
- set portfiles_dir [file join ${registry.path} registry portfiles $subport]
- set portfile [file join $portfiles_dir ${version}_${revision}$portvariants Portfile]
- file delete -force $portfile [file dirname $portfile]
- if {[llength [glob -nocomplain -directory $portfiles_dir *]] == 0} {
- file delete -force $portfiles_dir
</del><ins>+ if {$pgdirlist ne {}} {
+ set options_array(_portgroup_search_dirs) [list $pgdirlist]
</ins><span class="cx"> }
</span><ins>+
+ return [mportopen file://${portfile_dir}/ [array get options_array] $variations]
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # Traverse a directory with ports, calling a function on the path of ports
</span><span class="lines">@@ -1967,10 +1976,9 @@
</span><span class="cx"> } else {
</span><span class="cx"> # An error occurred.
</span><span class="cx"> global ::logenabled ::debuglogname
</span><del>- ui_error "Failed to install $portname"
</del><span class="cx"> ui_debug $::errorInfo
</span><span class="cx"> if {[info exists ::logenabled] && $::logenabled && [info exists ::debuglogname]} {
</span><del>- ui_notice "Please see the log file for port $portname for details:\n $::debuglogname"
</del><ins>+ ui_error "See $::debuglogname for details."
</ins><span class="cx"> }
</span><span class="cx"> macports::pop_log
</span><span class="cx"> return 1
</span><span class="lines">@@ -2054,11 +2062,16 @@
</span><span class="cx"> registry::exclusive_unlock
</span><span class="cx">
</span><span class="cx"> if {$result ne {}} {
</span><del>- set errstring "The following dependencies were not installed:"
- foreach ditem $result {
- append errstring " [ditem_key $ditem provides]"
- }
- ui_error $errstring
</del><ins>+ ##
+ # When this happens, the failing port usually already printed an
+ # error message. Omit this one to avoid cluttering the output and
+ # hiding the *real* problem.
+
+ #set errstring "The following dependencies were not installed:"
+ #foreach ditem $result {
+ # append errstring " [ditem_key $ditem provides]"
+ #}
+ #ui_error $errstring
</ins><span class="cx"> foreach ditem $dlist {
</span><span class="cx"> catch {mportclose $ditem}
</span><span class="cx"> }
</span><span class="lines">@@ -2096,7 +2109,7 @@
</span><span class="cx"> global ::logenabled ::debuglogname
</span><span class="cx"> if {[info exists ::logenabled] && $::logenabled && [info exists ::debuglogname]} {
</span><span class="cx"> if {$result != 0} {
</span><del>- ui_notice "Please see the log file for port $portname for details:\n $::debuglogname"
</del><ins>+ ui_error "See $::debuglogname for details."
</ins><span class="cx"> }
</span><span class="cx"> macports::pop_log
</span><span class="cx"> }
</span><span class="lines">@@ -2318,6 +2331,10 @@
</span><span class="cx"> } {
</span><span class="cx"> ui_debug $::errorInfo
</span><span class="cx"> ui_error "Synchronization of the local ports tree failed doing an svn update"
</span><ins>+ if {[getuid] == 0} {
+ seteuid $euid
+ setegid $egid
+ }
</ins><span class="cx"> incr numfailed
</span><span class="cx"> continue
</span><span class="cx"> }
</span><span class="lines">@@ -2348,6 +2365,10 @@
</span><span class="cx"> } {
</span><span class="cx"> ui_debug $::errorInfo
</span><span class="cx"> ui_error "Synchronization of the local ports tree failed doing a git update"
</span><ins>+ if {[getuid] == 0} {
+ seteuid $euid
+ setegid $egid
+ }
</ins><span class="cx"> incr numfailed
</span><span class="cx"> continue
</span><span class="cx"> }
</span><span class="lines">@@ -2518,12 +2539,20 @@
</span><span class="cx"> set progressflag {}
</span><span class="cx"> if {$macports::portverbose eq {yes}} {
</span><span class="cx"> set progressflag "--progress builtin"
</span><ins>+ set verboseflag "-v"
</ins><span class="cx"> } elseif {[info exists macports::ui_options(progress_download)]} {
</span><span class="cx"> set progressflag "--progress ${macports::ui_options(progress_download)}"
</span><ins>+ set verboseflag ""
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- if {[catch {eval curl fetch $progressflag {$source} {$tarpath}} error]} {
- ui_error "Fetching $source failed ($error)"
</del><ins>+ try {
+ curl fetch {*}$progressflag $source $tarpath
+ } catch {{POSIX SIG SIGINT} eCode eMessage} {
+ throw
+ } catch {{POSIX SIG SIGTERM} eCode eMessage} {
+ throw
+ } catch {{*} eCode eMessage} {
+ ui_error [msgcat::mc "Fetching %s failed: %s" $source $error]
</ins><span class="cx"> incr numfailed
</span><span class="cx"> continue
</span><span class="cx"> }
</span><span class="lines">@@ -2660,7 +2689,7 @@
</span><span class="cx">
</span><span class="cx"> switch -- $matchstyle {
</span><span class="cx"> exact {
</span><del>- if {$case_sensitive eq yes} {
</del><ins>+ if {$case_sensitive eq "yes"} {
</ins><span class="cx"> set compres [string compare $pattern $target]
</span><span class="cx"> } else {
</span><span class="cx"> set compres [string compare -nocase $pattern $target]
</span><span class="lines">@@ -2668,14 +2697,14 @@
</span><span class="cx"> set matchres [expr {0 == $compres}]
</span><span class="cx"> }
</span><span class="cx"> glob {
</span><del>- if {$case_sensitive eq yes} {
</del><ins>+ if {$case_sensitive eq "yes"} {
</ins><span class="cx"> set matchres [string match $pattern $target]
</span><span class="cx"> } else {
</span><span class="cx"> set matchres [string match -nocase $pattern $target]
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> regexp {
</span><del>- if {$case_sensitive eq yes} {
</del><ins>+ if {$case_sensitive eq "yes"} {
</ins><span class="cx"> set matchres [regexp -- $pattern $target]
</span><span class="cx"> } else {
</span><span class="cx"> set matchres [regexp -nocase -- $pattern $target]
</span><span class="lines">@@ -3382,10 +3411,10 @@
</span><span class="cx">
</span><span class="cx"> # selfupdate procedure
</span><span class="cx"> proc macports::selfupdate {{optionslist {}} {updatestatusvar {}}} {
</span><del>- global macports::prefix macports::portdbpath macports::libpath \
- macports::rsync_server macports::rsync_dir macports::rsync_options \
- macports::autoconf::macports_version macports::autoconf::rsync_path \
- tcl_platform macports::autoconf::openssl_path macports::autoconf::tar_path
</del><ins>+ global macports::prefix macports::portdbpath macports::rsync_server macports::rsync_dir \
+ macports::rsync_options macports::autoconf::macports_version \
+ macports::autoconf::rsync_path tcl_platform macports::autoconf::openssl_path \
+ macports::autoconf::tar_path
</ins><span class="cx"> array set options $optionslist
</span><span class="cx">
</span><span class="cx"> # variable that indicates whether we actually updated base
</span><span class="lines">@@ -3510,17 +3539,7 @@
</span><span class="cx"> }
</span><span class="cx"> ui_debug "Permissions OK"
</span><span class="cx">
</span><del>- # where to install a link to our macports1.0 tcl package
- set mp_tclpackage_path [file join $portdbpath .tclpackage]
- if {[file exists $mp_tclpackage_path]} {
- set fd [open $mp_tclpackage_path r]
- gets $fd tclpackage
- close $fd
- } else {
- set tclpackage $libpath
- }
-
- set configure_args "--prefix=$prefix --with-tclpackage=$tclpackage --with-install-user=$owner --with-install-group=$group --with-directory-mode=$perms"
</del><ins>+ set configure_args "--prefix=[macports::shellescape $prefix] --with-install-user=[macports::shellescape $owner] --with-install-group=[macports::shellescape $group] --with-directory-mode=[macports::shellescape $perms]"
</ins><span class="cx"> # too many users have an incompatible readline in /usr/local, see ticket #10651
</span><span class="cx"> if {$tcl_platform(os) ne {Darwin} || $prefix eq {/usr/local}
</span><span class="cx"> || ([glob -nocomplain /usr/local/lib/lib{readline,history}*] eq {} && [glob -nocomplain /usr/local/include/readline/*.h] eq {})} {
</span><span class="lines">@@ -3540,7 +3559,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # do the actual configure, build and installation of new base
</span><del>- ui_msg "Installing new MacPorts release in $prefix as ${owner}:${group}; permissions ${perms}; Tcl-Package in $tclpackage\n"
</del><ins>+ ui_msg "Installing new MacPorts release in $prefix as ${owner}:${group}; permissions ${perms}\n"
</ins><span class="cx"> if {[catch {system "cd $mp_source_path && ${cc_arg}./configure $configure_args && make SELFUPDATING=1 && make install SELFUPDATING=1"} result]} {
</span><span class="cx"> return -code error "Error installing new MacPorts base: $result"
</span><span class="cx"> }
</span><span class="lines">@@ -3990,7 +4009,6 @@
</span><span class="cx"> if {[info exists ::errorInfo]} {
</span><span class="cx"> ui_debug $::errorInfo
</span><span class="cx"> }
</span><del>- ui_error "Unable to upgrade port: $result"
</del><span class="cx"> catch {mportclose $mport}
</span><span class="cx"> return 1
</span><span class="cx"> }
</span><span class="lines">@@ -3999,7 +4017,6 @@
</span><span class="cx"> if {[info exists ::errorInfo]} {
</span><span class="cx"> ui_debug $::errorInfo
</span><span class="cx"> }
</span><del>- ui_error "Unable to upgrade port: $result"
</del><span class="cx"> catch {mportclose $mport}
</span><span class="cx"> return 1
</span><span class="cx"> }
</span><span class="lines">@@ -4010,7 +4027,6 @@
</span><span class="cx"> if {[info exists ::errorInfo]} {
</span><span class="cx"> ui_debug $::errorInfo
</span><span class="cx"> }
</span><del>- ui_error "Unable to upgrade port: $result"
</del><span class="cx"> catch {mportclose $mport}
</span><span class="cx"> return 1
</span><span class="cx"> }
</span><span class="lines">@@ -4115,7 +4131,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if {[info exists uninstall_later] && $uninstall_later eq yes} {
</del><ins>+ if {[info exists uninstall_later] && $uninstall_later eq "yes"} {
</ins><span class="cx"> foreach i $ilist {
</span><span class="cx"> set version [lindex $i 1]
</span><span class="cx"> set revision [lindex $i 2]
</span><span class="lines">@@ -4203,12 +4219,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # mportselect
</span><del>-# * command: The only valid commands are list, set and show
</del><ins>+# * command: The only valid commands are list, set, show and summary
</ins><span class="cx"> # * group: This argument should correspond to a directory under
</span><span class="cx"> # ${macports::prefix}/etc/select.
</span><span class="cx"> # * version: This argument is only used by the 'set' command.
</span><span class="cx"> # On error mportselect returns with the code 'error'.
</span><del>-proc mportselect {command group {version {}}} {
</del><ins>+proc mportselect {command {group ""} {version {}}} {
</ins><span class="cx"> ui_debug "mportselect \[$command] \[$group] \[$version]"
</span><span class="cx">
</span><span class="cx"> set conf_path ${macports::prefix}/etc/select/$group
</span><span class="lines">@@ -4237,6 +4253,16 @@
</span><span class="cx"> }
</span><span class="cx"> return [lsort $lversions]
</span><span class="cx"> }
</span><ins>+ summary {
+ # Return the list of portgroups in ${macports::prefix}/etc/select
+ if {[catch {set lportgroups [glob -directory $conf_path -tails *]} result]} {
+ global errorInfo
+ ui_debug "${result}: $errorInfo"
+ return -code error [concat "No ports with the select" \
+ "option were found."]
+ }
+ return [lsort $lportgroups]
+ }
</ins><span class="cx"> set {
</span><span class="cx"> # Use ${conf_path}/$version to read in sources.
</span><span class="cx"> if {$version eq {} || $version eq {base} || $version eq {current}
</span><span class="lines">@@ -4339,16 +4365,58 @@
</span><span class="cx"> return yes
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+##
+# Execute the rev-upgrade scan and attempt to rebuild all ports found to be
+# broken. Depends on the revupgrade_mode setting from macports.conf.
+#
+# @param opts
+# A Tcl array serialized into a list using array get containing options
+# for MacPorts. Options used exclusively by rev-upgrade are
+# ports_rev-upgrade_id-loadcmd-check, a boolean indicating whether the
+# ID load command of binaries should be check for sanity. This is mostly
+# useful for maintainers.
+# @return 0 if report-only mode is enabled, no ports are broken, or the
+# rebuilds finished successfully. 1 if an exception occured during the
+# execution of rev-upgrade, 2 if the execution was aborted on user
+# request.
</ins><span class="cx"> proc macports::revupgrade {opts} {
</span><span class="cx"> set run_loop 1
</span><span class="cx"> array set broken_port_counts {}
</span><del>- while {$run_loop == 1} {
- set run_loop [revupgrade_scanandrebuild broken_port_counts $opts]
</del><ins>+ try {
+ while {$run_loop == 1} {
+ set run_loop [revupgrade_scanandrebuild broken_port_counts $opts]
+ }
+ return 0
+ } catch {{POSIX SIG SIGINT} eCode eMessage} {
+ ui_debug "rev-upgrade failed: $::errorInfo"
+ ui_error [msgcat::mc "rev-upgrade aborted: SIGINT received."]
+ return 2
+ } catch {{POSIX SIG SIGTERM} eCode eMessage} {
+ ui_error [msgcat::mc "rev-upgrade aborted: SIGTERM received."]
+ return 2
+ } catch {{*} eCode eMessage} {
+ ui_debug "rev-upgrade failed: $::errorInfo"
+ ui_error [msgcat::mc "rev-upgrade failed: %s" $eMessage]
+ return 1
</ins><span class="cx"> }
</span><del>- return 0
</del><span class="cx"> }
</span><span class="cx">
</span><del>-# returns 1 if ports were rebuilt and revupgrade_scanandrebuild should be called again
</del><ins>+##
+# Helper function for rev-upgrade. Do not consider this to be part of public
+# API. Use macports::revupgrade instead.
+#
+# @param broken_port_counts_name
+# The name of a Tcl array that's being used to store the number of times
+# a port has been rebuilt so far.
+# @param opts
+# A serialized version of a Tcl array that contains options for
+# MacPorts. Options used by this method are
+# ports_rev-upgrade_id-loadcmd-check, a boolean indicating whether the
+# ID loadcommand of binaries should also be checked during rev-upgrade
+# and ports_dryrun, a boolean indicating whether no action should be
+# taken.
+# @return 1 if ports were rebuilt and this function should be called again,
+# 0 otherwise.
</ins><span class="cx"> proc macports::revupgrade_scanandrebuild {broken_port_counts_name opts} {
</span><span class="cx"> upvar $broken_port_counts_name broken_port_counts
</span><span class="cx"> array set options $opts
</span><span class="lines">@@ -4387,6 +4455,9 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> } catch {*} {
</span><ins>+ if {${fancy_output}} {
+ $revupgrade_progress intermission
+ }
</ins><span class="cx"> ui_error "Updating database of binaries failed"
</span><span class="cx"> throw
</span><span class="cx"> }
</span><span class="lines">@@ -4412,71 +4483,44 @@
</span><span class="cx"> $revupgrade_progress start
</span><span class="cx"> }
</span><span class="cx">
</span><del>- set i 1
- foreach b $binaries {
- if {$fancy_output} {
- if {$binary_count < 10000 || $i % 10 == 1} {
- $revupgrade_progress update $i $binary_count
</del><ins>+ try {
+ set i 1
+ foreach b $binaries {
+ if {$fancy_output} {
+ if {$binary_count < 10000 || $i % 10 == 1} {
+ $revupgrade_progress update $i $binary_count
+ }
</ins><span class="cx"> }
</span><del>- }
- set bpath [$b actual_path]
- #ui_debug "${i}/${binary_count}: $bpath"
- incr i
</del><ins>+ set bpath [$b actual_path]
+ #ui_debug "${i}/${binary_count}: $bpath"
+ incr i
</ins><span class="cx">
</span><del>- set resultlist [machista::parse_file $handle $bpath]
- set returncode [lindex $resultlist 0]
- set result [lindex $resultlist 1]
</del><ins>+ set resultlist [machista::parse_file $handle $bpath]
+ set returncode [lindex $resultlist 0]
+ set result [lindex $resultlist 1]
</ins><span class="cx">
</span><del>- if {$returncode != $machista::SUCCESS} {
- if {$returncode == $machista::EMAGIC} {
- # not a Mach-O file
- # ignore silently, these are only static libs anyway
- #ui_debug "Error parsing file ${bpath}: [machista::strerror $returncode]"
- } else {
- if {$fancy_output} {
- $revupgrade_progress intermission
</del><ins>+ if {$returncode != $machista::SUCCESS} {
+ if {$returncode == $machista::EMAGIC} {
+ # not a Mach-O file
+ # ignore silently, these are only static libs anyway
+ #ui_debug "Error parsing file ${bpath}: [machista::strerror $returncode]"
+ } else {
+ if {$fancy_output} {
+ $revupgrade_progress intermission
+ }
+ ui_warn "Error parsing file ${bpath}: [machista::strerror $returncode]"
</ins><span class="cx"> }
</span><del>- ui_warn "Error parsing file ${bpath}: [machista::strerror $returncode]"
</del><ins>+ continue;
</ins><span class="cx"> }
</span><del>- continue;
- }
</del><span class="cx">
</span><del>- set architecture [$result cget -mt_archs]
- while {$architecture ne {NULL}} {
- if {[info exists options(ports_rev-upgrade_id-loadcmd-check)] && $options(ports_rev-upgrade_id-loadcmd-check) eq {yes}} {
- if {[$architecture cget -mat_install_name] ne {NULL} && [$architecture cget -mat_install_name] ne {}} {
- # check if this lib's install name actually refers to this file itself
- # if this is not the case software linking against this library might have erroneous load commands
- if {0 == [catch {set idloadcmdpath [revupgrade_handle_special_paths $bpath [$architecture cget -mat_install_name]]}]} {
- if {[string index $idloadcmdpath 0] ne {/}} {
- set port [registry::entry owner $bpath]
- if {$port ne {}} {
- set portname [$port name]
- } else {
- set portname <unknown-port>
- }
- if {$fancy_output} {
- $revupgrade_progress intermission
- }
- ui_warn "ID load command in ${bpath}, arch [machista::get_arch_name [$architecture cget -mat_arch]] (belonging to port $portname) contains relative path"
- } elseif {![file exists $idloadcmdpath]} {
- set port [registry::entry owner $bpath]
- if {$port ne {}} {
- set portname [$port name]
- } else {
- set portname <unknown-port>
- }
- if {$fancy_output} {
- $revupgrade_progress intermission
- }
- ui_warn "ID load command in ${bpath}, arch [machista::get_arch_name [$architecture cget -mat_arch]] refers to non-existant file $idloadcmdpath"
- ui_warn "This is probably a bug in the $portname port and might cause problems in libraries linking against this file"
- } else {
-
- set hash_this [sha256 file $bpath]
- set hash_idloadcmd [sha256 file $idloadcmdpath]
-
- if {$hash_this ne $hash_idloadcmd} {
</del><ins>+ set architecture [$result cget -mt_archs]
+ while {$architecture ne {NULL}} {
+ if {[info exists options(ports_rev-upgrade_id-loadcmd-check)] && $options(ports_rev-upgrade_id-loadcmd-check) eq {yes}} {
+ if {[$architecture cget -mat_install_name] ne {NULL} && [$architecture cget -mat_install_name] ne {}} {
+ # check if this lib's install name actually refers to this file itself
+ # if this is not the case software linking against this library might have erroneous load commands
+ if {0 == [catch {set idloadcmdpath [revupgrade_handle_special_paths $bpath [$architecture cget -mat_install_name]]}]} {
+ if {[string index $idloadcmdpath 0] ne {/}} {
</ins><span class="cx"> set port [registry::entry owner $bpath]
</span><span class="cx"> if {$port ne {}} {
</span><span class="cx"> set portname [$port name]
</span><span class="lines">@@ -4486,94 +4530,121 @@
</span><span class="cx"> if {$fancy_output} {
</span><span class="cx"> $revupgrade_progress intermission
</span><span class="cx"> }
</span><del>- ui_warn "ID load command in ${bpath}, arch [machista::get_arch_name [$architecture cget -mat_arch]] refers to file ${idloadcmdpath}, which is a different file"
</del><ins>+ ui_warn "ID load command in ${bpath}, arch [machista::get_arch_name [$architecture cget -mat_arch]] (belonging to port $portname) contains relative path"
+ } elseif {![file exists $idloadcmdpath]} {
+ set port [registry::entry owner $bpath]
+ if {$port ne {}} {
+ set portname [$port name]
+ } else {
+ set portname <unknown-port>
+ }
+ if {$fancy_output} {
+ $revupgrade_progress intermission
+ }
+ ui_warn "ID load command in ${bpath}, arch [machista::get_arch_name [$architecture cget -mat_arch]] refers to non-existant file $idloadcmdpath"
</ins><span class="cx"> ui_warn "This is probably a bug in the $portname port and might cause problems in libraries linking against this file"
</span><ins>+ } else {
+ set hash_this [sha256 file $bpath]
+ set hash_idloadcmd [sha256 file $idloadcmdpath]
+
+ if {$hash_this ne $hash_idloadcmd} {
+ set port [registry::entry owner $bpath]
+ if {$port ne {}} {
+ set portname [$port name]
+ } else {
+ set portname <unknown-port>
+ }
+ if {$fancy_output} {
+ $revupgrade_progress intermission
+ }
+ ui_warn "ID load command in ${bpath}, arch [machista::get_arch_name [$architecture cget -mat_arch]] refers to file ${idloadcmdpath}, which is a different file"
+ ui_warn "This is probably a bug in the $portname port and might cause problems in libraries linking against this file"
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- }
</del><span class="cx">
</span><del>- set archname [machista::get_arch_name [$architecture cget -mat_arch]]
- if {![arch_runnable $archname]} {
- ui_debug "skipping $archname in $bpath since this system can't run it anyway"
- set architecture [$architecture cget -next]
- continue
- }
-
- set loadcommand [$architecture cget -mat_loadcmds]
-
- while {$loadcommand ne {NULL}} {
- if {0 != [catch {set filepath [revupgrade_handle_special_paths $bpath [$loadcommand cget -mlt_install_name]]}]} {
- set loadcommand [$loadcommand cget -next]
- continue;
</del><ins>+ set archname [machista::get_arch_name [$architecture cget -mat_arch]]
+ if {![arch_runnable $archname]} {
+ ui_debug "skipping $archname in $bpath since this system can't run it anyway"
+ set architecture [$architecture cget -next]
+ continue
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- if {(${filepath} == "/usr/lib/libstdc++.6.dylib" && ${macports::cxx_stdlib} == "libc++") ||
- (${filepath} == "/usr/lib/libc++.1.dylib" && ${macports::cxx_stdlib} == "libstdc++")} {
</del><ins>+ set loadcommand [$architecture cget -mat_loadcmds]
</ins><span class="cx">
</span><del>- if {$fancy_output} {
- $revupgrade_progress intermission
</del><ins>+ while {$loadcommand ne {NULL}} {
+ if {0 != [catch {set filepath [revupgrade_handle_special_paths $bpath [$loadcommand cget -mlt_install_name]]}]} {
+ set loadcommand [$loadcommand cget -next]
+ continue;
</ins><span class="cx"> }
</span><del>- ui_warn "${bpath} uses ${filepath} as C++ standard library although macports::cxx_stdlib is set to ${macports::cxx_stdlib}."
- }
</del><span class="cx">
</span><del>- set libresultlist [machista::parse_file $handle $filepath]
- set libreturncode [lindex $libresultlist 0]
- set libresult [lindex $libresultlist 1]
</del><ins>+ set libresultlist [machista::parse_file $handle $filepath]
+ set libreturncode [lindex $libresultlist 0]
+ set libresult [lindex $libresultlist 1]
</ins><span class="cx">
</span><del>- if {$libreturncode != $machista::SUCCESS} {
- if {![info exists files_warned_about($filepath)]} {
- if {$fancy_output} {
- $revupgrade_progress intermission
</del><ins>+ if {$libreturncode != $machista::SUCCESS} {
+ if {![info exists files_warned_about($filepath)]} {
+ if {$fancy_output} {
+ $revupgrade_progress intermission
+ }
+ ui_info "Could not open ${filepath}: [machista::strerror $libreturncode] (referenced from $bpath)"
+ if {[string first [file separator] $filepath] == -1} {
+ ui_info "${filepath} seems to be referenced using a relative path. This may be a problem with its canonical library name and require the use of install_name_tool(1) to fix."
+ }
+ set files_warned_about($filepath) yes
</ins><span class="cx"> }
</span><del>- ui_info "Could not open ${filepath}: [machista::strerror $libreturncode] (referenced from $bpath)"
- set files_warned_about($filepath) yes
</del><ins>+ if {$libreturncode == $machista::EFILE} {
+ ui_debug "Marking $bpath as broken"
+ lappend broken_files $bpath
+ }
+ set loadcommand [$loadcommand cget -next]
+ continue;
</ins><span class="cx"> }
</span><del>- if {$libreturncode == $machista::EFILE} {
- ui_debug "Marking $bpath as broken"
- lappend broken_files $bpath
- }
- set loadcommand [$loadcommand cget -next]
- continue;
- }
</del><span class="cx">
</span><del>- set libarchitecture [$libresult cget -mt_archs]
- set libarch_found false;
- while {$libarchitecture ne {NULL}} {
- if {[$architecture cget -mat_arch] ne [$libarchitecture cget -mat_arch]} {
- set libarchitecture [$libarchitecture cget -next]
- continue;
</del><ins>+ set libarchitecture [$libresult cget -mt_archs]
+ set libarch_found false;
+ while {$libarchitecture ne {NULL}} {
+ if {[$architecture cget -mat_arch] ne [$libarchitecture cget -mat_arch]} {
+ set libarchitecture [$libarchitecture cget -next]
+ continue;
+ }
+
+ if {[$loadcommand cget -mlt_version] ne [$libarchitecture cget -mat_version] && [$loadcommand cget -mlt_comp_version] > [$libarchitecture cget -mat_comp_version]} {
+ if {$fancy_output} {
+ $revupgrade_progress intermission
+ }
+ ui_info "Incompatible library version: $bpath requires version [machista::format_dylib_version [$loadcommand cget -mlt_comp_version]] or later, but $filepath provides version [machista::format_dylib_version [$libarchitecture cget -mat_comp_version]]"
+ ui_debug "Marking $bpath as broken"
+ lappend broken_files $bpath
+ }
+
+ set libarch_found true;
+ break;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- if {[$loadcommand cget -mlt_version] ne [$libarchitecture cget -mat_version] && [$loadcommand cget -mlt_comp_version] > [$libarchitecture cget -mat_comp_version]} {
- if {$fancy_output} {
- $revupgrade_progress intermission
</del><ins>+ if {$libarch_found eq "false"} {
+ ui_debug "Missing architecture [machista::get_arch_name [$architecture cget -mat_arch]] in file $filepath"
+ if {[path_is_in_prefix $filepath]} {
+ ui_debug "Marking $bpath as broken"
+ lappend broken_files $bpath
+ } else {
+ ui_debug "Missing architecture [machista::get_arch_name [$architecture cget -mat_arch]] in file outside prefix referenced from $bpath"
+ # ui_debug " How did you get that compiled anyway?"
</ins><span class="cx"> }
</span><del>- ui_info "Incompatible library version: $bpath requires version [machista::format_dylib_version [$loadcommand cget -mlt_comp_version]] or later, but $filepath provides version [machista::format_dylib_version [$libarchitecture cget -mat_comp_version]]"
- ui_debug "Marking $bpath as broken"
- lappend broken_files $bpath
</del><span class="cx"> }
</span><del>-
- set libarch_found true;
- break;
</del><ins>+ set loadcommand [$loadcommand cget -next]
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- if {$libarch_found eq false} {
- ui_debug "Missing architecture [machista::get_arch_name [$architecture cget -mat_arch]] in file $filepath"
- if {[path_is_in_prefix $filepath]} {
- ui_debug "Marking $bpath as broken"
- lappend broken_files $bpath
- } else {
- ui_debug "Missing architecture [machista::get_arch_name [$architecture cget -mat_arch]] in file outside prefix referenced from $bpath"
- # ui_debug " How did you get that compiled anyway?"
- }
- }
- set loadcommand [$loadcommand cget -next]
</del><ins>+ set architecture [$architecture cget -next]
</ins><span class="cx"> }
</span><del>-
- set architecture [$architecture cget -next]
</del><span class="cx"> }
</span><ins>+ } catch {*} {
+ if {$fancy_output} {
+ $revupgrade_progress intermission
+ }
+ throw
</ins><span class="cx"> }
</span><span class="cx"> if {$fancy_output} {
</span><span class="cx"> $revupgrade_progress finish
</span><span class="lines">@@ -4934,3 +5005,25 @@
</span><span class="cx"> }
</span><span class="cx"> return $archive_sites_conf_values
</span><span class="cx"> }
</span><ins>+
+##
+# Escape a string for use in a POSIX shell, e.g., when passing it to the \c system Pextlib extension. This is necessary
+# to handle cases such as group names with backslashes correctly. See #43875 for an example of a problem caused by
+# missing quotes.
+#
+# @param arg The argument that should be escaped for use in a POSIX shell
+# @return A quoted version of the argument
+proc macports::shellescape {arg} {
+ set mapping {}
+ # Replace each backslash by a double backslash. Apparently Bash treats Backslashes in single-quoted strings
+ # differently depending on whether is was invoked as sh or bash: echo 'using \backslashes' preserves the backslash
+ # in bash mode, but interprets it in sh mode. Since the `system' command uses sh, escape backslashes.
+ lappend mapping "\\" "\\\\"
+ # Replace each single quote with a single quote (closing the currently open string), an escaped single quote \'
+ # (additional backslash needed to escape the backslash in Tcl), and another single quote (opening a new quoted
+ # string).
+ lappend mapping "'" "'\\''"
+
+ # Add a single quote at the start, escape all single quotes in the argument, and add a single quote at the end
+ return "'[string map $mapping $arg]'"
+}
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcmacports10macports_dlisttcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/macports1.0/macports_dlist.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/macports1.0/macports_dlist.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/macports1.0/macports_dlist.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -17,7 +17,7 @@
</span><span class="cx"> # 3. Neither the name of Apple Inc. nor the names of its contributors
</span><span class="cx"> # may be used to endorse or promote products derived from this software
</span><span class="cx"> # without specific prior written permission.
</span><del>-#
</del><ins>+#
</ins><span class="cx"> # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
</span><span class="cx"> # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
</span><span class="cx"> # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
</span><span class="lines">@@ -55,21 +55,21 @@
</span><span class="cx">
</span><span class="cx"> # dlist_match_multi
</span><span class="cx"> # Returns all dependency entries for which the entry's value for 'key' exactly matches the given 'value'.
</span><del>-#        dlist - the dependency list to search
-#        criteria - the key/value pairs to compare
</del><ins>+# dlist - the dependency list to search
+# criteria - the key/value pairs to compare
</ins><span class="cx">
</span><span class="cx"> proc dlist_match_multi {dlist criteria} {
</span><span class="cx">         set result {}
</span><span class="cx">         foreach ditem $dlist {
</span><del>-         set match 1
-         foreach {key value} $criteria {
-                 if {[ditem_key $ditem $key] != $value} {
-                         set match 0
-                         break
-                 }
</del><ins>+                set match 1
+                foreach {key value} $criteria {
+                        if {[ditem_key $ditem $key] != $value} {
+                                set match 0
+                                break
+                        }
</ins><span class="cx">                 }
</span><span class="cx">                 if {$match} {
</span><del>-                 lappend result $ditem
</del><ins>+                        lappend result $ditem
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         return $result
</span><span class="lines">@@ -77,9 +77,9 @@
</span><span class="cx">
</span><span class="cx"> # dlist_search
</span><span class="cx"> # Returns all dependency entries whose 'key' contains 'value'.
</span><del>-#        dlist - the dependency list to search
-#        key - the key to compare: Requires, Provides, et al.
-#        value - the value to compare
</del><ins>+# dlist - the dependency list to search
+# key - the key to compare: Requires, Provides, et al.
+# value - the value to compare
</ins><span class="cx">
</span><span class="cx"> proc dlist_search {dlist key value} {
</span><span class="cx">         set result {}
</span><span class="lines">@@ -93,22 +93,22 @@
</span><span class="cx">
</span><span class="cx"> # dlist_delete
</span><span class="cx"> # Deletes the specified ditem from the dlist.
</span><del>-#        dlist - the list to search
-#        ditem - the item to delete
</del><ins>+# dlist - the list to search
+# ditem - the item to delete
</ins><span class="cx"> proc dlist_delete {dlist ditem} {
</span><del>- upvar $dlist uplist
- set ix [lsearch -exact $uplist $ditem]
- if {$ix >= 0} {
</del><ins>+        upvar $dlist uplist
+        set ix [lsearch -exact $uplist $ditem]
+        if {$ix >= 0} {
</ins><span class="cx">                 set uplist [lreplace $uplist $ix $ix]
</span><del>- }
</del><ins>+        }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # dlist_has_pending
</span><span class="cx"> # Returns true if the dlist contains ditems
</span><span class="cx"> # which will provide one of the specified names,
</span><span class="cx"> # and thus are still "pending".
</span><del>-#        dlist - the dependency list to search
-#        tokens - the list of pending tokens to check for
</del><ins>+# dlist - the dependency list to search
+# tokens - the list of pending tokens to check for
</ins><span class="cx">
</span><span class="cx"> proc dlist_has_pending {dlist tokens} {
</span><span class="cx">         foreach token $tokens {
</span><span class="lines">@@ -153,9 +153,9 @@
</span><span class="cx">
</span><span class="cx"> # ditem_key
</span><span class="cx"> # Sets and returns the given key of the dependency item.
</span><del>-#        ditem - the dependency item to operate on
-#        key - the key to set
-#        value - optional value to set the key to
</del><ins>+# ditem - the dependency item to operate on
+# key - the key to set
+# value - optional value to set the key to
</ins><span class="cx">
</span><span class="cx"> proc ditem_key {ditem args} {
</span><span class="cx">         set nbargs [llength $args]
</span><span class="lines">@@ -170,40 +170,40 @@
</span><span class="cx">
</span><span class="cx"> # ditem_append
</span><span class="cx"> # Appends the value to the given key of the dependency item.
</span><del>-#        ditem - the dependency item to operate on
-#        key - the key to append to
-#        value - the value to append to the key
</del><ins>+# ditem - the dependency item to operate on
+# key - the key to append to
+# value - the value to append to the key
</ins><span class="cx">
</span><span class="cx"> proc ditem_append {ditem key args} {
</span><del>-        eval "return \[macports_dlist::ditem_append $ditem $key $args\]"
</del><ins>+        return [macports_dlist::ditem_append $ditem $key {*}$args]
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # ditem_append_unique
</span><span class="cx"> # Appends the value to the given key of the dependency item if
</span><span class="cx"> # they were not there yet.
</span><del>-#        ditem - the dependency item to operate on
-#        key - the key to append to
-#        value - the value to append to the key
</del><ins>+# ditem - the dependency item to operate on
+# key - the key to append to
+# value - the value to append to the key
</ins><span class="cx">
</span><span class="cx"> proc ditem_append_unique {ditem key args} {
</span><del>-        eval "return \[macports_dlist::ditem_append_unique $ditem $key $args\]"
</del><ins>+        return [macports_dlist::ditem_append_unique $ditem $key {*}$args]
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # ditem_contains
</span><span class="cx"> # Tests whether the ditem key contains the specified value;
</span><span class="cx"> # or if the value is omitted, tests whether the key exists.
</span><del>-#        ditem - the dependency item to test
-#        key - the key to examine
-#        value - optional value to search for in the key
</del><ins>+# ditem - the dependency item to test
+# key - the key to examine
+# value - optional value to search for in the key
</ins><span class="cx"> proc ditem_contains {ditem key args} {
</span><del>-        eval "return \[macports_dlist::ditem_contains $ditem $key $args\]"
</del><ins>+        return [macports_dlist::ditem_contains $ditem $key {*}$args]
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # dlist_append_dependents
</span><span class="cx"> # Returns the ditems which are dependents of the ditem specified.
</span><del>-#        dlist - the dependency list to search
-#        ditem - the item which itself, and its dependents should be selected
-#        result - used for recursing, pass empty initially.
</del><ins>+# dlist - the dependency list to search
+# ditem - the item which itself, and its dependents should be selected
+# result - used for recursing, pass empty initially.
</ins><span class="cx">
</span><span class="cx"> proc dlist_append_dependents {dlist ditem result} {
</span><span class="cx">         # Only append things if the root item is not in the list.
</span><span class="lines">@@ -233,9 +233,9 @@
</span><span class="cx"> # on unfulfilled tokens in the Uses key. However these items
</span><span class="cx"> # will eventually be returned if there are no alternatives.
</span><span class="cx"> # Soft-dependencies can be implemented in this way.
</span><del>-#        dlist - the dependency list to select from
-#        statusdict - the status dictionary describing the history
-#         of the dependency list.
</del><ins>+# dlist - the dependency list to select from
+# statusdict - the status dictionary describing the history
+# of the dependency list.
</ins><span class="cx">
</span><span class="cx"> proc dlist_get_next {dlist statusdict} {
</span><span class="cx">         upvar $statusdict upstatus
</span><span class="lines">@@ -278,14 +278,14 @@
</span><span class="cx"> # ditems are eligible to run (the selector returns {}) then
</span><span class="cx"> # dlist_eval will exit with a list of the remaining ditems,
</span><span class="cx"> # or {} if all ditems were evaluated.
</span><del>-#        dlist - the dependency list to evaluate
-#        testcond - test condition to populate the status dictionary
-#         should return {-1, 0, 1}
-#        handler - the handler to invoke on each ditem
-#        canfail - If 1, then progress will not stop when a failure
-#         occures; if 0, then dlist_eval will return on the
-#         first failure
-#        selector - the selector for determining eligibility
</del><ins>+# dlist - the dependency list to evaluate
+# testcond - test condition to populate the status dictionary
+# should return {-1, 0, 1}
+# handler - the handler to invoke on each ditem
+# canfail - If 1, then progress will not stop when a failure
+# occures; if 0, then dlist_eval will return on the
+# first failure
+# selector - the selector for determining eligibility
</ins><span class="cx">
</span><span class="cx"> proc dlist_eval {dlist testcond handler {canfail "0"} {selector "dlist_get_next"}} {
</span><span class="cx">         array set statusdict [list]
</span><span class="lines">@@ -294,7 +294,7 @@
</span><span class="cx">         # can evaluate to true.
</span><span class="cx">         if {$testcond ne ""} {
</span><span class="cx">                 foreach ditem $dlist {
</span><del>-                        if {[eval "expr \[\$testcond \$ditem\] == 1"]} {
</del><ins>+                        if {[$testcond $ditem] == 1} {
</ins><span class="cx">                                 foreach token [ditem_key $ditem provides] {
</span><span class="cx">                                         set statusdict($token) 1
</span><span class="cx">                                 }
</span><span class="lines">@@ -308,14 +308,14 @@
</span><span class="cx">                 set ditem [$selector $dlist statusdict]
</span><span class="cx">
</span><span class="cx">                 if {$ditem == {}} {
</span><del>-                 if {[llength $dlist] > 0} {
-                 ui_debug "dlist_eval: all entries in dependency list have unsatisfied dependencies; can't process"
-                 }
</del><ins>+                        if {[llength $dlist] > 0} {
+                                ui_debug "dlist_eval: all entries in dependency list have unsatisfied dependencies; can't process"
+                        }
</ins><span class="cx">                         break
</span><span class="cx">                 } else {
</span><span class="cx">                         # $handler should return a unix status code, 0 for success.
</span><span class="cx">                         # statusdict notation is 1 for success
</span><del>-                        if {[catch {eval "$handler $ditem"} result]} {
</del><ins>+                        if {[catch {{*}$handler $ditem} result]} {
</ins><span class="cx">                                 puts $result
</span><span class="cx">                                 return $dlist
</span><span class="cx">                         }
</span><span class="lines">@@ -388,7 +388,7 @@
</span><span class="cx">         variable $ditem
</span><span class="cx">         set x [lindex [array get $ditem $key] 1]
</span><span class="cx">         if {$x != {}} {
</span><del>-                eval "lappend x $args"
</del><ins>+                lappend x {*}$args
</ins><span class="cx">         } else {
</span><span class="cx">                 set x $args
</span><span class="cx">         }
</span><span class="lines">@@ -400,7 +400,7 @@
</span><span class="cx">         variable $ditem
</span><span class="cx">         set x [lindex [array get $ditem $key] 1]
</span><span class="cx">         if {$x != {}} {
</span><del>-                eval "lappend x $args"
</del><ins>+                lappend x {*}$args
</ins><span class="cx">                 set x [lsort -unique $x]
</span><span class="cx">         } else {
</span><span class="cx">                 set x $args
</span><span class="lines">@@ -412,7 +412,7 @@
</span><span class="cx"> proc ditem_contains {ditem key args} {
</span><span class="cx">         variable $ditem
</span><span class="cx">         if {[llength $args] == 0} {
</span><del>-                eval "return \[info exists ${ditem}($key)\]"
</del><ins>+                return [info exists [set ditem]($key)]
</ins><span class="cx">         } else {
</span><span class="cx">                 set x [lindex [array get $ditem $key] 1]
</span><span class="cx">                 if {[llength $x] > 0 && [lsearch -exact $x [lindex $args 0]] != -1} {
</span><span class="lines">@@ -425,4 +425,3 @@
</span><span class="cx">
</span><span class="cx"> # End of macports_dlist namespace
</span><span class="cx"> }
</span><del>-
</del></span></pre></div>
<a id="branchesnewhelpsystembasesrcmacports10macports_fastloadtclin"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/src/macports1.0/macports_fastload.tcl.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/macports1.0/macports_fastload.tcl.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/macports1.0/macports_fastload.tcl.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,91 +0,0 @@
</span><del>-# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
-# macports_fastload.tcl.in
-# $Id$
-#
-# Copyright (c) 2005-2007, 2009-2010 The MacPorts Project
-# Copyright (c) 2004-2005 Paul Guyot, The MacPorts Project.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of The MacPorts Project nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-# This script is here to fast load all the MacPorts related packages.
-# This avoids the very expensive globbing of Tcl' package mechanism.
-# Please note that this is not required and base/ should work even if some
-# packages are moved as long as their new location is in Tcl's package paths.
-# However, this file also defines a workaround to avoid conflicts between a /
-# installation of MacPorts and a user installation of MacPorts (on the same box).
-# (this workaround isn't required on 10.4.2).
-#
-# The package command that's replaced in this code works somewhat differently
-# than the original version. In particular, users with multiple copies of a
-# package such as portuninstall (due to obsolete files being left from previous
-# installations) may experience problems due to different package loading
-# behavior.
-#
-if { [regexp {\d+\.\d+\.\d+} [info patchlevel]] &&
- ([package vcompare [info patchlevel] 8.4.7] < 0) } {
- global allpackages
- if {![info exists allpackages]} {
- # Only patch once.
- array set allpackages {}
- rename package package_native
- proc package {args} {
- global allpackages
- if {([lindex $args 0] == "ifneeded") && ([llength $args] == 4)} {
- set package_name [lindex $args 1]
- set package_version [lindex $args 2]
- set package_key ${package_name}::${package_version}
- if {![info exists allpackages($package_key)]} {
- set allpackages($package_key) 1
- set result [eval package_native $args]
- } else {
- set result ""
- }
- } else {
- set result [eval package_native $args]
- }
- return $result
- }
- }
-}
-
-set sharetcldir [file normalize [file join [file dirname [info script]] ..]]
-if {[file exists $sharetcldir]} {
- foreach dir [glob -directory $sharetcldir *] {
- set pkgindex [file join $dir pkgIndex.tcl]
- if [file exists $pkgindex] {
- source $pkgindex
- }
- }
-}
-
-if { "@SQLITE3_TCL_DIR@" != "" } {
- set dir "@SQLITE3_TCL_DIR@"
- set pkgindex [file join $dir pkgIndex.tcl]
- if [file exists $pkgindex] {
- source $pkgindex
- }
-}
</del></span></pre></div>
<a id="branchesnewhelpsystembasesrcmacports10macports_test_autoconftclin"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/macports1.0/macports_test_autoconf.tcl.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/macports1.0/macports_test_autoconf.tcl.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/macports1.0/macports_test_autoconf.tcl.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -32,6 +32,6 @@
</span><span class="cx"> #
</span><span class="cx">
</span><span class="cx"> namespace eval macports::autoconf {
</span><del>- variable macports_tcl_dir "@macports_tcl_dir@"
</del><span class="cx"> variable prefix "@prefix@"
</span><ins>+ variable os_platform "@OS_PLATFORM@"
</ins><span class="cx"> }
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcmacports10sysctlc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/macports1.0/sysctl.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/macports1.0/sysctl.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/macports1.0/sysctl.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -49,9 +49,13 @@
</span><span class="cx"> /*
</span><span class="cx"> * Read-only wrapper for sysctlbyname(3). Only works for values of type CTLTYPE_INT and CTLTYPE_QUAD.
</span><span class="cx"> */
</span><ins>+#ifdef HAVE_SYSCTLBYNAME
</ins><span class="cx"> int SysctlCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
</span><ins>+#else
+int SysctlCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc UNUSED, Tcl_Obj *CONST objv[] UNUSED)
+#endif
</ins><span class="cx"> {
</span><del>-#if HAVE_SYSCTLBYNAME
</del><ins>+#ifdef HAVE_SYSCTLBYNAME
</ins><span class="cx"> const char error_message[] = "sysctl failed: ";
</span><span class="cx"> Tcl_Obj *tcl_result;
</span><span class="cx"> int res;
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcmacports10testsPortfile"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/macports1.0/tests/Portfile (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/macports1.0/tests/Portfile        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/macports1.0/tests/Portfile        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,40 +1,30 @@
</span><del>-# $Id: Portfile 85472 2011-10-14 01:52:18Z dports@macports.org $
</del><ins>+# $Id$
</ins><span class="cx">
</span><del>-PortSystem 1.0
</del><ins>+PortSystem 1.0
</ins><span class="cx">
</span><del>-name fondu
-version 060102
-revision 1
-platforms darwin
-categories print
-license BSD
-maintainers nomaintainer
-homepage http://fondu.sourceforge.net/
-master_sites http://fondu.sourceforge.net/
</del><ins>+name                        gcc_select
+version                        0.1
+revision                4
+categories                sysutils
+platforms                darwin
+license                BSD
+maintainers                mww
+supported_archs                noarch
+description                Switch the default compiler
+long_description        gcc_select lets you switch the default compiler. \
+                        It symlinks the standard compiler executables \
+                        in the MacPorts prefix to the selected version.
</ins><span class="cx">
</span><del>-description A set of programs to interconvert between Mac font \
- formats and pfb, ttf, otf and bdf files on UNIX.
</del><ins>+homepage                http://svn.macports.org/repository/macports/contrib/select/
+master_sites                ${homepage}
+distname                select-${version}
+checksums                sha1 18e1f95c2ddd88210aa52eb696261859af2dc3a4
</ins><span class="cx">
</span><del>-long_description Dealing with Mac fonts is hard on other operating \
- systems because Mac fonts are stored in the resource \
- fork, and other operating systems do not support \
- this concept. Fondu will extract the resource fork \
- from either a MacBinary file or a BinHex file. Ufond \
- will create a resource fork inside a MacBinary file.
</del><ins>+configure.args                --mandir=${prefix}/share/man --name=gcc
</ins><span class="cx">
</span><del>-checksums md5 e20861beacddc1ab392bef7813641bf8
-extract.suffix .tgz
-distfiles ${name}_src-${version}${extract.suffix}
-
-post-patch {
- reinplace "s|^CFLAGS = -g \$(WFLAGS)|CFLAGS = -g \$(WFLAGS) ${configure.cppflags} ${configure.cflags} ${configure.ldflags} [get_canonical_archflags]|g" ${worksrcpath}/Makefile.in
-}
-
-configure.args --bindir=${prefix}/bin \
- --mandir=${prefix}/share/man
-
</del><span class="cx"> post-destroot {
</span><del>- eval xinstall -m 644 [glob ${worksrcpath}/*.1] ${destroot}${prefix}/share/man/man1/
</del><ins>+ xinstall -d ${destroot}${prefix}/etc/select/gcc
+ touch ${destroot}${prefix}/etc/select/gcc/base
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-test.run                yes
</del><ins>+livecheck.type        none
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcmacports10testsmacportstest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/macports1.0/tests/macports.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/macports1.0/tests/macports.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/macports1.0/tests/macports.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -2,12 +2,15 @@
</span><span class="cx">
</span><span class="cx"> package require tcltest 2
</span><span class="cx"> namespace import tcltest::*
</span><del>-eval ::tcltest::configure $::argv
</del><ins>+::tcltest::configure {*}$::argv
</ins><span class="cx">
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../macports_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><ins>+
+# constraint for darwin platform
+testConstraint darwin [expr {$macports::autoconf::os_platform eq "darwin"}]
+
</ins><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> # clean leftovers from interrupted tests
</span><span class="lines">@@ -35,20 +38,14 @@
</span><span class="cx"> #set ui_options(ports_verbose) yes
</span><span class="cx"> mportinit ui_options
</span><span class="cx">
</span><del>-package require portutil 1.0
-package require portinstall 1.0
-package require portuninstall 1.0
</del><span class="cx"> package require Thread
</span><del>-source ../../registry2.0/portuninstall.tcl
-source ../../port1.0/port_autoconf.tcl
</del><span class="cx"> source ./library.tcl
</span><del>-macports_worker_init
</del><span class="cx">
</span><span class="cx">
</span><span class="cx"> test mportclose {
</span><span class="cx"> Mport close unit test.
</span><span class="cx"> } -setup {
</span><del>- set mport [mportopen file://.]
</del><ins>+ set mport [mportopen file://${pwd}]
</ins><span class="cx"> } -body {
</span><span class="cx"> if {[catch {mportclose $mport}] != 0} {
</span><span class="cx"> return "FAIL: cannot run mportclose"
</span><span class="lines">@@ -63,12 +60,13 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> test mportinfo {
</span><del>- Mport info uni test.
</del><ins>+ Mport info unit test.
</ins><span class="cx"> } -setup {
</span><del>- set mport [mportopen file://.]
</del><ins>+ set mport [mportopen file://${pwd}]
</ins><span class="cx"> } -body {
</span><span class="cx"> set res [mportinfo $mport]
</span><del>- if {[lindex $res 2] != "canonical_active_variants"} {
</del><ins>+ catch {array set PortInfo $res}
+ if {![info exists PortInfo(canonical_active_variants)]} {
</ins><span class="cx"> return "FAIL: cannot get ::PortInfo"
</span><span class="cx"> }
</span><span class="cx"> return "Mport info successful."
</span><span class="lines">@@ -77,101 +75,56 @@
</span><span class="cx"> } -result "Mport info successful."
</span><span class="cx">
</span><span class="cx">
</span><del>-test mportopen_installed {
- Mport installed unit test.
-} -constraints {
- root
</del><ins>+test worker_init {
+ Worker init unit test.
</ins><span class="cx"> } -setup {
</span><del>- set os.platform darwin
- set macosx_version 10.8
- set os.major 10
- set os_version 11
- set os_arch i386
-
- set supported_archs {}
- set configure.build_arch build_arch
- set portarchivetype tgz
-
- set destpath $pwd/work/destroot
- set portdbpath $pwd/portdbpath
- set workpath $pwd/fondu/work
- set portpath $pwd
-
- set subport fondu
- set version 3.0
- set revision 1
- set epoch i386
-
- file copy -force $pwd/Portfile /tmp/
- set mport [mportopen file://.]
-
- proc getportbuildpath {id {portname ""}} {
- global portdbpath
- regsub {://} $id {.} port_path
- regsub -all {/} $port_path {_} port_path
- return [file join $portdbpath build $port_path $portname]
</del><ins>+ set name [interp create]
+ set portpath $pwd/portpath
+ set porturl http://www.macports.org
+ set portbuildpath $pwd/build
+ set options {a b}
+ set variations {1 2}
+} -body {
+ macports::worker_init $name $portpath $porturl $portbuildpath $options $variations
+ if {$name ne "interp0"} {
+ return "FAIL: wrong workername"
</ins><span class="cx"> }
</span><del>-
- proc getportworkpath_from_buildpath {portbuildpath} {
- return [file join $portbuildpath work]
</del><ins>+ if {[catch {$name eval source Portfile} result]} {
+ return "FAIL: cannot load Portfile"
</ins><span class="cx"> }
</span><del>-
- proc getportworkpath_from_portdir {portpath {portname ""}} {
- return [getportworkpath_from_buildpath [getportbuildpath $portpath $portname]]
</del><ins>+ if {[$name eval findBinary ls] ne "/bin/ls"} {
+ return "FAIL: alias not created"
</ins><span class="cx"> }
</span><del>-
- source $pwd/../../port1.0/portmain.tcl
-
- # sets up PortInfo array
- if {[eval_variants variations] != 0} {
- mportclose $mport
- error "Error evaluating variants"
</del><ins>+ if {[$name eval return \$os_arch] ne $macports::os_arch} {
+ return "FAIL: var not set"
</ins><span class="cx"> }
</span><ins>+ return "Worker init successful."
+} -result "Worker init successful."
</ins><span class="cx">
</span><del>- # set $version var
- set workername [ditem_key $mport workername]
</del><span class="cx">
</span><del>- # run destroot
- $workername eval eval_targets destroot
-
- # portinstall setup
- interp alias {} _cd {} cd
- set macosx_deployment_target $pwd/deploy_target
- file mkdir $pwd/$subport
- file link -symbolic $pwd/$subport/work $pwd/work
-
- if {[catch {portinstall::install_main}] != 0} {
- return "FAIL: cannot install port"
- }
-
- set variants {}
- set options {}
-
</del><ins>+test init_logging {
+ Init logging unit test.
+} -constraints {
+ root
+} -setup {
+ set mport [mportopen file://${pwd}]
</ins><span class="cx"> } -body {
</span><del>- set res [mportopen_installed $subport $version $revision $variants $options]
- if {![string match "ditem_*" $res]} {
- return "FAIL: installed port not opened"
</del><ins>+ if {[macports::init_logging $mport] != 0} {
+ return "FAIL: incorrect channels"
</ins><span class="cx"> }
</span><del>-
- if {[catch {mportclose_installed $res}] != 0} {
- return "FAIL: cannot close port"
</del><ins>+ if {$macports::channels(any) != "stdout debuglog"} {
+ return "FAIL: incorrect channels(any)"
</ins><span class="cx"> }
</span><del>- if {[catch {mportclose_installed $res}] != 1} {
- return "FAIL: installed port not closed"
</del><ins>+ if {(![info exists ui_options(ports_debug)] && $macports::channels(debug) ne "debuglog") ||
+ ([info exists ui_options(ports_debug)] && $macports::channels(debug) ne "stderr debuglog")} {
+ return "FAIL: incorrect channels(debug)"
</ins><span class="cx"> }
</span><del>- return "Installed port open successful."
-
</del><ins>+ return "Init logging successful."
</ins><span class="cx"> } -cleanup {
</span><del>- if {[catch {portuninstall::uninstall_main}] != 0} {
- return "FAIL: cannot install port"
- }
</del><span class="cx"> mportclose $mport
</span><ins>+} -result "Init logging successful."
</ins><span class="cx">
</span><del>- file delete -force $pwd/work
- file delete -force $pwd/$subport
-} -result "Installed port open successful."
</del><span class="cx">
</span><del>-
</del><span class="cx"> test ui_isset {
</span><span class="cx"> Ui is set unit test.
</span><span class="cx"> } -body {
</span><span class="lines">@@ -204,34 +157,12 @@
</span><span class="cx"> } -result "Global option isset successful."
</span><span class="cx">
</span><span class="cx">
</span><del>-test init_logging {
- Init logging unit test.
-} -constraints {
- root
-} -setup {
- set mport [mportopen file://.]
-} -body {
- if {[macports::init_logging $mport] != 0} {
- return "FAIL: incorrect channels"
- }
- if {$macports::channels(any) != "stdout debuglog"} {
- return "FAIL: incorrect channels(any)"
- }
- if {$macports::channels(debug) != "debuglog"} {
- return "FAIL: incorrect channels(debug)"
- }
- return "Init logging successful."
-} -cleanup {
- mportclose $mport
-} -result "Init logging successful."
-
-
</del><span class="cx"> test ch_logging {
</span><span class="cx"> Channel logging unit test. Assumes main.log filename.
</span><span class="cx"> } -constraints {
</span><span class="cx"> root
</span><span class="cx"> } -setup {
</span><del>- set mport [mportopen file://.]
</del><ins>+ set mport [mportopen file://${pwd}]
</ins><span class="cx">
</span><span class="cx"> set portname [_mportkey $mport subport]
</span><span class="cx"> set portpath [_mportkey $mport portpath]
</span><span class="lines">@@ -260,7 +191,7 @@
</span><span class="cx"> } -constraints {
</span><span class="cx"> root
</span><span class="cx"> } -setup {
</span><del>- set mport [mportopen file://.]
</del><ins>+ set mport [mportopen file://${pwd}]
</ins><span class="cx"> set ::logenabled 1
</span><span class="cx"> } -body {
</span><span class="cx"> if {[catch {macports::push_log $mport}] != 0} {
</span><span class="lines">@@ -281,7 +212,7 @@
</span><span class="cx"> set ::logenabled 1
</span><span class="cx"> set ::logstack [open $pwd/logstack w+]
</span><span class="cx"> set ::debuglog [open $pwd/log w+]
</span><del>- set mport [mportopen file://.]
</del><ins>+ set mport [mportopen file://${pwd}]
</ins><span class="cx"> if {[catch {macports::push_log $mport}] != 0} {
</span><span class="cx"> return "FAIL: cannot push log"
</span><span class="cx"> }
</span><span class="lines">@@ -493,8 +424,9 @@
</span><span class="cx">
</span><span class="cx"> test _is_valid_developer_dir {
</span><span class="cx"> Check valid dev dir unit test.
</span><ins>+} -constraints {
+ darwin
</ins><span class="cx"> } -body {
</span><del>- set macports::set_developer /Applications/Xcode.app/Contents/Developer
</del><span class="cx"> if {[macports::_is_valid_developer_dir $macports::developer_dir] != 1} {
</span><span class="cx"> return "FAIL: valid dir not detected"
</span><span class="cx"> }
</span><span class="lines">@@ -505,6 +437,54 @@
</span><span class="cx"> # test mportinit
</span><span class="cx">
</span><span class="cx">
</span><ins>+test mportopen_installed {
+ Mport installed unit test.
+} -constraints {
+ root
+} -setup {
+ set subport gcc_select
+ set version 0.1
+ set revision 4
+
+ set mport [mportopen file://${pwd}]
+
+ # run destroot
+ mportexec $mport destroot
+
+ if {[catch {mportexec $mport activate}] != 0} {
+ ui_debug "$::errorInfo"
+ return "FAIL: cannot install port"
+ }
+
+ set variants {}
+ set options {}
+
+} -body {
+ set res [mportopen_installed $subport $version $revision $variants $options]
+ if {![string match "ditem_*" $res]} {
+ return "FAIL: installed port not opened"
+ }
+
+ if {[catch {mportclose $res}] != 0} {
+ return "FAIL: cannot close port"
+ }
+ if {[catch {mportclose $res}] != 1} {
+ return "FAIL: installed port not closed"
+ }
+ return "Installed port open successful."
+
+} -cleanup {
+ if {[catch {mportexec $mport uninstall}] != 0} {
+ return "FAIL: cannot uninstall port"
+ }
+ mportclose $mport
+
+ file delete -force $pwd/work
+ file delete -force $pwd/$subport
+ cd $pwd
+} -result "Installed port open successful."
+
+
</ins><span class="cx"> test mportshutdown {
</span><span class="cx"> Mport shutdown unit test.
</span><span class="cx"> } -setup {
</span><span class="lines">@@ -558,33 +538,6 @@
</span><span class="cx"> } -result "Copy xcode plist successful."
</span><span class="cx">
</span><span class="cx">
</span><del>-test worker_init {
- Worker init unit test.
-} -setup {
- set name [interp create]
- set portpath $pwd/portpath
- set porturl http://www.macports.org
- set portbuildpath $pwd/build
- set options {a b}
- set variations {1 2}
-} -body {
- macports::worker_init $name $portpath $porturl $portbuildpath $options $variations
- if {$name != "interp0"} {
- return "FAIL: wrong workername"
- }
- if {[$name eval source Portfile] != "yes"} {
- return "FAIL: cannot load Portfile"
- }
- if {[$name eval findBinary ls] != "/bin/ls"} {
- return "FAIL: alias not created"
- }
- if {[$name eval return \$os_arch] != "i386"} {
- return "FAIL: var not set"
- }
- return "Worker init successful."
-} -result "Worker init successful."
-
-
</del><span class="cx"> test create_thread {
</span><span class="cx"> Create thread unit test.
</span><span class="cx"> } -body {
</span><span class="lines">@@ -615,9 +568,9 @@
</span><span class="cx"> test fetch_port {
</span><span class="cx"> Fetch port unit test.
</span><span class="cx"> } -body {
</span><del>- set url http://packages.macports.org/fondu/fondu-060102_1.darwin_10.x86_64.tbz2
</del><ins>+ set url http://packages.macports.org/db_select/db_select-0.1_2.darwin_13.noarch.tbz2
</ins><span class="cx"> set res [macports::fetch_port $url]
</span><del>- if {$res != "${pwd}/portdbpath/portdirs/fondu-060102_1"} {
</del><ins>+ if {$res != "${pwd}/portdbpath/portdirs/db_select-0.1_2"} {
</ins><span class="cx">         return "FAIL: cannot fetch port"
</span><span class="cx"> }
</span><span class="cx"> return "Fetch port successful."
</span><span class="lines">@@ -641,9 +594,9 @@
</span><span class="cx"> } -setup {
</span><span class="cx"> close [open $pwd/local_file w+]
</span><span class="cx"> } -body {
</span><del>- set url http://fondu.sourceforge.net/fondu_src-060102.tgz
</del><ins>+ set url http://packages.macports.org/db_select/db_select-0.1_2.darwin_13.noarch.tbz2
</ins><span class="cx"> set res [macports::getportdir $url]
</span><del>- if {$res != "${pwd}/portdbpath/portdirs/fondu_src-060102"} {
</del><ins>+ if {$res != "${pwd}/portdbpath/portdirs/db_select-0.1_2"} {
</ins><span class="cx">         return "FAIL: invalid port directory"
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -662,9 +615,9 @@
</span><span class="cx"> Get port resource path. Doesn't check for 'file' protocol.
</span><span class="cx"> } -body {
</span><span class="cx"> set macports::portdbpath $pwd/portdbpath
</span><del>- set url "http://packages.macports.org/fondu/fondu-060102_1.darwin_12.x86_64.tbz2"
</del><ins>+ set url "http://packages.macports.org/db_select/db_select-0.1_2.darwin_13.noarch.tbz2"
</ins><span class="cx"> set default_path $pwd/portdbpath/sources/rsync.macports.org/release/tarballs/ports/_resources
</span><del>- set fallback_path $pwd/portdbpath/sources/packages.macports.org/fondu/fondu-060102_1.darwin_12.x86_64.tbz2/_resources
</del><ins>+ set fallback_path $pwd/portdbpath/sources/packages.macports.org/db_select/db_select-0.1_2.darwin_13.noarch.tbz2/_resources
</ins><span class="cx">
</span><span class="cx"> if {[macports::getportresourcepath $url "" yes] != $default_path} {
</span><span class="cx"> return "FAIL: wrong resource path"
</span><span class="lines">@@ -702,32 +655,30 @@
</span><span class="cx"> # test mportopen
</span><span class="cx">
</span><span class="cx">
</span><del>-# Covered by mportopen_installed
-# test mportclose_installed
-
-
</del><span class="cx"> test mporttraverse {
</span><del>- Mport traverse unit test. Uses 3rd column of the Portfile.
</del><ins>+ Mport traverse unit test. Uses 3rd line of the Portfile.
</ins><span class="cx"> } -setup {
</span><span class="cx"> file mkdir $pwd/porttree
</span><del>- file mkdir $pwd/porttree/cat1/fondu
- file mkdir $pwd/porttree/cat2/fondu
</del><ins>+ file mkdir $pwd/porttree/cat1/gcc_select
+ file mkdir $pwd/porttree/cat2/gcc_select
</ins><span class="cx">
</span><del>- file copy -force $pwd/Portfile $pwd/porttree/cat1/fondu/Portfile
- file copy -force $pwd/Portfile $pwd/porttree/cat2/fondu/Portfile
</del><ins>+ file copy -force $pwd/Portfile $pwd/porttree/cat1/gcc_select/Portfile
+ file copy -force $pwd/Portfile $pwd/porttree/cat2/gcc_select/Portfile
</ins><span class="cx">
</span><span class="cx"> proc test_proc {file} {
</span><span class="cx"> global pwd res
</span><span class="cx"> set fd [open ${pwd}/porttree/${file}/Portfile r]
</span><ins>+ gets $fd
+ gets $fd
</ins><span class="cx"> gets $fd line
</span><del>- append res [lindex [split $line " "] 3]
</del><ins>+ append res [lindex [split $line " "] 1]
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> global res
</span><span class="cx"> set res ""
</span><span class="cx"> } -body {
</span><span class="cx"> mporttraverse test_proc $pwd/porttree
</span><del>- if {$res != "8547285472"} {
</del><ins>+ if {$res != "1.01.0"} {
</ins><span class="cx"> return "FAIL: porttree not traversed"
</span><span class="cx"> }
</span><span class="cx"> return "Mport traverse successful."
</span><span class="lines">@@ -942,9 +893,10 @@
</span><span class="cx"> close $fd
</span><span class="cx">
</span><span class="cx"> set macports::autoconf::macports_conf_path $pwd/archive_sites
</span><del>-
</del><ins>+ unset -nocomplain macports::archive_sites_conf_values
</ins><span class="cx"> } -body {
</span><span class="cx"> set res [macports::get_archive_sites_conf_values]
</span><ins>+ puts $res
</ins><span class="cx"> if {[lindex [split $res " "] 1] != "macports.org:nosubdir"} {
</span><span class="cx"> return "FAIL: name not set"
</span><span class="cx"> }
</span><span class="lines">@@ -963,4 +915,39 @@
</span><span class="cx"> } -result "Get archive sites conf values successful."
</span><span class="cx">
</span><span class="cx">
</span><ins>+set shellescapeTests [list \
+ "using \\backslashes" \
+ " spaces " \
+ "and        tabs" \
+ "quotes need to be \"supported\", too" \
+ "… and not only 'double-quotes'" \
+ "other meta chars such as \$dollar," \
+ "!bang, ;semicolon, :colon," \
+ "\$(subshells) and similar must be kept" \
+ ">redirects <& must be ignored as well as ampersands &"]
+test shellescaping {
+ Check whether shell escaping using macports::shellescape works correctly when passed to Pextlib's system extension.
+} -setup {
+ set outputfile "shellescapetestoutput.txt"
+ makeFile "" $outputfile
+
+} -body {
+ set first "yes"
+ foreach test $shellescapeTests {
+ if {$first eq "yes"} {
+ system "echo [macports::shellescape $test] >$outputfile"
+ set first "no"
+ } else {
+ system "echo [macports::shellescape $test] >>$outputfile"
+ }
+ }
+
+ set fd [open $outputfile r]
+ set output [read -nonewline $fd]
+ close $fd
+ return $output
+} -cleanup {
+ removeFile $outputfile
+} -result [join $shellescapeTests "\n"]
+
</ins><span class="cx"> cleanupTests
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcmacports10testsmacports_dlisttest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/macports1.0/tests/macports_dlist.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/macports1.0/tests/macports_dlist.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/macports1.0/tests/macports_dlist.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -4,7 +4,6 @@
</span><span class="cx"> namespace import tcltest::*
</span><span class="cx">
</span><span class="cx"> source ../macports_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> # Debug options
</span><span class="lines">@@ -21,7 +20,7 @@
</span><span class="cx"> } -setup {
</span><span class="cx"> set mport [mportopen file://.]
</span><span class="cx"> set crit {
</span><del>- provides fondu
</del><ins>+ provides gcc_select
</ins><span class="cx"> porturl file://.
</span><span class="cx"> }
</span><span class="cx"> set crit2 { provides fondu2 }
</span><span class="lines">@@ -44,7 +43,7 @@
</span><span class="cx"> } -setup {
</span><span class="cx"> set mport [mportopen file://.]
</span><span class="cx"> } -body {
</span><del>- if {[dlist_search $mport provides fondu] != $mport} {
</del><ins>+ if {[dlist_search $mport provides gcc_select] != $mport} {
</ins><span class="cx"> return "FAIL: matching item not found"
</span><span class="cx"> }
</span><span class="cx"> if {[dlist_search $mport provides fondu2] != ""} {
</span><span class="lines">@@ -80,7 +79,7 @@
</span><span class="cx"> } -setup {
</span><span class="cx"> set mport [mportopen file://.]
</span><span class="cx"> } -body {
</span><del>- if {[dlist_has_pending $mport fondu] != 1} {
</del><ins>+ if {[dlist_has_pending $mport gcc_select] != 1} {
</ins><span class="cx"> return "FAIL: not detected"
</span><span class="cx"> }
</span><span class="cx"> if {[dlist_has_pending $mport provides] != 0} {
</span><span class="lines">@@ -140,7 +139,7 @@
</span><span class="cx"> Dlist get next unit test.
</span><span class="cx"> } -setup {
</span><span class="cx"> set mport [mportopen file://.]
</span><del>- set dict {fondu}
</del><ins>+ set dict {gcc_select}
</ins><span class="cx"> } -body {
</span><span class="cx"> if {[dlist_get_next $mport $dict] != $mport} {
</span><span class="cx"> return "FAIL: wrong dlist"
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcmacports10testsmacports_utiltest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/macports1.0/tests/macports_util.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/macports1.0/tests/macports_util.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/macports1.0/tests/macports_util.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -4,7 +4,6 @@
</span><span class="cx"> namespace import tcltest::*
</span><span class="cx">
</span><span class="cx"> source ../macports_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcmacports10teststesttcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/macports1.0/tests/test.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/macports1.0/tests/test.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/macports1.0/tests/test.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> # Global vars
</span><del>-set arguments ""
</del><ins>+set arguments {}
</ins><span class="cx"> set test_name ""
</span><span class="cx"> set color_out ""
</span><span class="cx"> set tcl ""
</span><span class="lines">@@ -17,8 +17,8 @@
</span><span class="cx"> proc print_help {arg} {
</span><span class="cx"> if { $arg eq "tests" } {
</span><span class="cx"> puts "The list of available tests is:"
</span><del>-        cd tests
-        set test_suite [glob *.test]
</del><ins>+ cd tests
+ set test_suite [glob *.test]
</ins><span class="cx"> foreach test $test_suite {
</span><span class="cx"> puts [puts -nonewline " "]$test
</span><span class="cx"> }
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> set index [expr {[lsearch $argv $arg] + 1}]
</span><span class="cx"> set level [lindex $argv $index]
</span><span class="cx"> if { $level >= 0 && $level <= 3 } {
</span><del>- append arguments "-debug " $level
</del><ins>+ lappend arguments -debug $level
</ins><span class="cx"> } else {
</span><span class="cx"> puts "Invalid debug level."
</span><span class="cx"> exit 1
</span><span class="lines">@@ -50,29 +50,29 @@
</span><span class="cx"> set index [expr {[lsearch $argv $arg] + 1}]
</span><span class="cx"> set test_name [lindex $argv $index]
</span><span class="cx"> set no 0
</span><del>-        cd tests
-        set test_suite [glob *.test]
</del><ins>+ cd tests
+ set test_suite [glob *.test]
</ins><span class="cx"> foreach test $test_suite {
</span><del>- if { $test_name != $test } {
- set no [expr {$no + 1}]
</del><ins>+ if {$test_name ne $test} {
+ incr no
</ins><span class="cx"> }
</span><span class="cx"> }
</span><del>- if { $no == [llength $test_suite] } {
</del><ins>+ if {$no == [llength $test_suite]} {
</ins><span class="cx"> print_help tests
</span><span class="cx"> exit 1
</span><span class="cx"> }
</span><del>- } elseif { $arg eq "-l" } {
</del><ins>+ } elseif {$arg eq "-l"} {
</ins><span class="cx"> print_help tests
</span><span class="cx"> exit 0
</span><del>- } elseif { $arg eq "-nocolor" } {
</del><ins>+ } elseif {$arg eq "-nocolor"} {
</ins><span class="cx"> set color_out "no"
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> # Run tests
</span><del>-if { $test_name ne ""} {
- set result [eval exec $tcl $test_name $arguments 2>@stderr]
</del><ins>+if {$test_name ne ""} {
+ set result [exec -ignorestderr $tcl $test_name {*}$arguments]
</ins><span class="cx"> puts $result
</span><span class="cx">
</span><span class="cx"> } else {
</span><span class="lines">@@ -80,31 +80,33 @@
</span><span class="cx"> set test_suite [glob *.test]
</span><span class="cx">
</span><span class="cx"> foreach test $test_suite {
</span><del>- set result [eval exec $tcl $test $arguments 2>@stderr]
-        set lastline [lindex [split $result "\n"] end]
</del><ins>+ set result [exec -ignorestderr $tcl $test {*}$arguments]
+ set lastline [lindex [split $result "\n"] end]
</ins><span class="cx">
</span><del>-        if {[lrange [split $lastline "\t"] 1 1] != "Total"} {
-         set lastline [lindex [split $result "\n"] end-2]
-         set errmsg [lindex [split $result "\n"] end]
-        }
</del><ins>+ if {[lrange [split $lastline "\t"] 1 1] != "Total"} {
+ set lastline [lindex [split $result "\n"] end-2]
+ set errmsg [lindex [split $result "\n"] end]
+ }
</ins><span class="cx">
</span><del>-        set splitresult [split $lastline "\t"]
</del><ins>+ set splitresult [split $lastline "\t"]
</ins><span class="cx"> set total [lindex $splitresult 2]
</span><span class="cx"> set pass [lindex $splitresult 4]
</span><span class="cx"> set skip [lindex $splitresult 6]
</span><span class="cx"> set fail [lindex $splitresult 8]
</span><span class="cx">
</span><del>-        # Format output
-        if {$total < 10} { set total "0${total}"}
-        if {$pass < 10} { set pass "0${pass}"}
-        if {$skip < 10} { set skip "0${skip}"}
-        if {$fail < 10} { set fail "0${fail}"}
</del><ins>+ # Format output
+ if {$total < 10} { set total "0${total}"}
+ if {$pass < 10} { set pass "0${pass}"}
+ if {$skip < 10} { set skip "0${skip}"}
+ if {$fail < 10} { set fail "0${fail}"}
</ins><span class="cx">
</span><span class="cx"> # Check for errors.
</span><del>- if { $fail != 0 } { set err "yes" }
</del><ins>+ if {$fail != 0} {
+ set err "yes"
+ }
</ins><span class="cx">
</span><span class="cx"> set out ""
</span><del>- if { ($fail != 0 || $skip != 0) && $color_out eq "" } {
</del><ins>+ if {($fail != 0 || $skip != 0) && $color_out eq ""} {
</ins><span class="cx"> # Color failed tests.
</span><span class="cx"> append out "\x1b\[1;31mTotal:" $total " Passed:" $pass " Failed:" $fail " Skipped:" $skip " \x1b\[0m" $test
</span><span class="cx"> } else {
</span><span class="lines">@@ -113,19 +115,21 @@
</span><span class="cx">
</span><span class="cx"> # Print results and constrints for auto-skipped tests.
</span><span class="cx"> puts $out
</span><del>- if { $skip != 0 } {
</del><ins>+ if {$skip != 0} {
</ins><span class="cx"> set out " Constraint: "
</span><span class="cx"> append out [string trim $errmsg "\t {}"]
</span><span class="cx"> puts $out
</span><span class="cx"> }
</span><del>-        if { $fail != 0 } {
-         set end [expr {[string first $test $result 0] - 1}]
-         puts [string range $result 0 $end]
-        }
</del><ins>+ if {$fail != 0} {
+ set end [expr {[string first $test $result 0] - 1}]
+ puts [string range $result 0 $end]
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # Return 1 if errors were found.
</span><del>-if {$err ne ""} { exit 1 }
</del><ins>+if {$err ne ""} {
+ exit 1
+}
</ins><span class="cx">
</span><span class="cx"> return 0
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10"></a>
<div class="propset"><h4>Property changes: branches/new-help-system/base/src/package1.0</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="modfile"><h4>Modified: svn:ignore</h4></div>
<span class="cx">package_test_autoconf.tcl
</span><span class="cx"> + Makefile
</span><span class="cx">package_test_autoconf.tcl
</span><span class="cx">pkgIndex.tcl
</span><a id="branchesnewhelpsystembasesrcpackage10Makefile"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/src/package1.0/Makefile (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/Makefile        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/Makefile        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,29 +0,0 @@
</span><del>-INSTALLDIR=        ${DESTDIR}${datadir}/macports/Tcl/package1.0
-
-SRCS=        package.tcl portdmg.tcl portmdmg.tcl portmpkg.tcl portpkg.tcl \
-        portrpm.tcl portsrpm.tcl portdpkg.tcl portunarchive.tcl \
-        portarchivefetch.tcl
-
-include ../../Mk/macports.autoconf.mk
-
-all:: pkgIndex.tcl
-
-pkgIndex.tcl: $(SRCS)
-        $(SILENT) ../pkg_mkindex.sh .
-
-clean::
-        rm -f pkgIndex.tcl
-
-distclean:: clean
-        rm -f package_test_autoconf.tcl
-
-test::
-        -$(prefix)/bin/port sync
-        $(TCLSH) ./tests/test.tcl -nocolor
-
-install:: all
-        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
-        $(SILENT)set -x; for file in ${SRCS}; do \
-                $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}; \
-        done
-        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
</del></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10Makefileinfromrev122997trunkbasesrcpackage10Makefilein"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/package1.0/Makefile.in (from rev 122997, trunk/base/src/package1.0/Makefile.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/Makefile.in         (rev 0)
+++ branches/new-help-system/base/src/package1.0/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include ../../Mk/macports.autoconf.mk
+
+INSTALLDIR=        ${DESTDIR}${TCL_PACKAGE_PATH}/package1.0
+
+SRCS=        package.tcl portdmg.tcl portmdmg.tcl portmpkg.tcl portpkg.tcl \
+        portrpm.tcl portsrpm.tcl portdpkg.tcl portunarchive.tcl \
+        portarchivefetch.tcl
+
+all:: pkgIndex.tcl
+
+pkgIndex.tcl: $(SRCS)
+        $(SILENT) ../pkg_mkindex.sh .
+
+clean::
+        rm -f pkgIndex.tcl
+
+distclean:: clean
+        rm -f package_test_autoconf.tcl
+        rm -f Makefile
+
+test::
+        -$(prefix)/bin/port sync
+        $(TCLSH) $(srcdir)/tests/test.tcl -nocolor
+
+install:: all
+        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
+        $(SILENT)set -x; for file in ${SRCS}; do \
+                $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$(srcdir)/$$file" "${INSTALLDIR}"; \
+        done
+        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${INSTALLDIR}"
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10package_test_autoconftclin"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/package_test_autoconf.tcl.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/package_test_autoconf.tcl.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/package_test_autoconf.tcl.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #
</span><span class="cx">
</span><span class="cx"> namespace eval macports::autoconf {
</span><del>- variable macports_tcl_dir "@macports_tcl_dir@"
</del><span class="cx"> variable prefix "@prefix@"
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10portarchivefetchtcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/portarchivefetch.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/portarchivefetch.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/portarchivefetch.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -216,6 +216,7 @@
</span><span class="cx"> }
</span><span class="cx"> set failed_sites 0
</span><span class="cx"> unset -nocomplain fetched
</span><ins>+ set lastError ""
</ins><span class="cx"> foreach site $urlmap($url_var) {
</span><span class="cx"> if {[string index $site end] ne "/"} {
</span><span class="cx"> append site "/[option archive.subdir]"
</span><span class="lines">@@ -225,13 +226,22 @@
</span><span class="cx"> ui_msg "$UI_PREFIX [format [msgcat::mc "Attempting to fetch %s from %s"] $archive ${site}]"
</span><span class="cx"> set file_url [portfetch::assemble_url $site $archive]
</span><span class="cx"> set effectiveURL ""
</span><del>- if {![catch {eval curl fetch --effective-url effectiveURL $fetch_options {$file_url} {"${incoming_path}/${archive}.TMP"}} result]} {
- # Successful fetch
</del><ins>+ try {
+ curl fetch --effective-url effectiveURL {*}$fetch_options $file_url "${incoming_path}/${archive}.TMP"
</ins><span class="cx"> set fetched 1
</span><span class="cx"> break
</span><del>- } else {
- ui_debug "[msgcat::mc "Fetching archive failed:"]: $result"
</del><ins>+ } catch {{POSIX SIG SIGINT} eCode eMessage} {
+ ui_debug [msgcat::mc "Aborted fetching archive due to SIGINT"]
</ins><span class="cx"> file delete -force "${incoming_path}/${archive}.TMP"
</span><ins>+ throw
+ } catch {{POSIX SIG SIGTERM} eCode eMessage} {
+ ui_debug [msgcat::mc "Aborted fetching archive due to SIGTERM"]
+ file delete -force "${incoming_path}/${archive}.TMP"
+ throw
+ } catch {{*} eCode eMessage} {
+ ui_debug [msgcat::mc "Fetching archive failed: %s" $eMessage]
+ set lastError $eMessage
+ file delete -force "${incoming_path}/${archive}.TMP"
</ins><span class="cx"> incr failed_sites
</span><span class="cx"> if {$failed_sites > 2 && ![tbool ports_binary_only] && ![_archive_available]} {
</span><span class="cx"> break
</span><span class="lines">@@ -243,7 +253,7 @@
</span><span class="cx"> set signature "${incoming_path}/${archive}.rmd160"
</span><span class="cx"> ui_msg "$UI_PREFIX [format [msgcat::mc "Attempting to fetch %s from %s"] ${archive}.rmd160 $site]"
</span><span class="cx"> # reusing $file_url from the last iteration of the loop above
</span><del>- if {[catch {eval curl fetch --effective-url effectiveURL $fetch_options {${file_url}.rmd160} {$signature}} result]} {
</del><ins>+ if {[catch {curl fetch --effective-url effectiveURL {*}$fetch_options ${file_url}.rmd160 $signature} result]} {
</ins><span class="cx"> ui_debug "$::errorInfo"
</span><span class="cx"> return -code error "Failed to fetch signature for archive: $result"
</span><span class="cx"> }
</span><span class="lines">@@ -285,7 +295,11 @@
</span><span class="cx"> return 0
</span><span class="cx"> }
</span><span class="cx"> if {[info exists ports_binary_only] && $ports_binary_only eq "yes"} {
</span><del>- return -code error "archivefetch failed for [option subport] @[option version]_[option revision][option portvariants]"
</del><ins>+ if {[info exists lastError] && $lastError ne ""} {
+ error [msgcat::mc "version @[option version]_[option revision][option portvariants]: %s" $lastError]
+ } else {
+ error "version @[option version]_[option revision][option portvariants]"
+ }
</ins><span class="cx"> } else {
</span><span class="cx"> return 0
</span><span class="cx"> }
</span><span class="lines">@@ -306,6 +320,8 @@
</span><span class="cx"> }
</span><span class="cx"> if {[info exists all_archive_files] && [llength $all_archive_files] > 0} {
</span><span class="cx"> ui_msg "$UI_PREFIX [format [msgcat::mc "Fetching archive for %s"] $subport]"
</span><ins>+ } elseif {[tbool ports_binary_only]} {
+ error "Binary-only mode requested with no usable archive sites configured"
</ins><span class="cx"> }
</span><span class="cx"> portfetch::check_dns
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10portdpkgtcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/portdpkg.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/portdpkg.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/portdpkg.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -188,15 +188,15 @@
</span><span class="cx">                         # xxx: only examines the portfile component of the depspec
</span><span class="cx">                         set depends {}
</span><span class="cx">                         if {[info exists portinfo(depends_run)]} {
</span><del>-                                eval "lappend depends $portinfo(depends_run)"
</del><ins>+                                lappend depends {*}$portinfo(depends_run)
</ins><span class="cx">                         }
</span><span class="cx">                         if {[info exists portinfo(depends_lib)]} {
</span><del>-                                eval "lappend depends $portinfo(depends_lib)"
</del><ins>+                                lappend depends {*}$portinfo(depends_lib)
</ins><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                         foreach depspec $depends {
</span><span class="cx">                                 set dep [lindex [split $depspec :] end]
</span><del>-                                eval "lappend result [make_dependency_list $dep]"
</del><ins>+                                lappend result {*}[make_dependency_list $dep]
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">                                 lappend result $portinfo(name)/$portinfo(version)
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10portmpkgtcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/portmpkg.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/portmpkg.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/portmpkg.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx"> foreach depspec $depends {
</span><span class="cx"> set dep [_get_dep_port $depspec]
</span><span class="cx"> if {$dep ne ""} {
</span><del>- eval "lappend result [make_dependency_list $dep $destination]"
</del><ins>+ lappend result {*}[make_dependency_list $dep $destination]
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10portpkgtcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/portpkg.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/portpkg.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/portpkg.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx"> if ([file exists "${destpath}/$dir"]) {
</span><span class="cx"> # certain toplevel directories really are symlinks. leaving them as directories make pax lose the symlinks. that's bad.
</span><span class="cx"> file mkdir "${destpath}/private/${dir}"
</span><del>- eval file rename [glob ${destpath}/${dir}/*] "${destpath}/private/${dir}"
</del><ins>+ file rename {*}[glob ${destpath}/${dir}/*] "${destpath}/private/${dir}"
</ins><span class="cx"> delete "${destpath}/${dir}"
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10portrpmtcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/portrpm.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/portrpm.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/portrpm.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx"> foreach dir [list "${prefix}/src/macports/RPMS" "${prefix}/src/apple/RPMS" "/usr/src/apple/RPMS" "/macports/rpms/RPMS"] {
</span><span class="cx"> foreach arch [list ${configure.build_arch} ${os.arch} "fat" "noarch"] {
</span><span class="cx"> set rpmpath "$dir/${arch}/${portname}-${portversion}-${portrevision}.${arch}.rpm"
</span><del>-         if {[file readable $rpmpath] && ([file mtime ${rpmpath}] >= [file mtime ${portpath}/Portfile])} {
</del><ins>+ if {[file readable $rpmpath] && ([file mtime ${rpmpath}] >= [file mtime ${portpath}/Portfile])} {
</ins><span class="cx"> ui_debug "$rpmpath"
</span><span class="cx"> ui_msg "$UI_PREFIX [format [msgcat::mc "RPM package for %s version %s is up-to-date"] ${portname} ${portversion}]"
</span><span class="cx"> return 0
</span><span class="lines">@@ -125,8 +125,8 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-        # depend on system (virtual packages for apple stuff)
-        lappend dependencies "org.macports.${os.platform}${os.major}"
</del><ins>+ # depend on system (virtual packages for apple stuff)
+ lappend dependencies "org.macports.${os.platform}${os.major}"
</ins><span class="cx">
</span><span class="cx"> set listpath ${workpath}/${portname}.filelist
</span><span class="cx"> system "rm -f '${workpath}/${portname}.filelist' && touch '${workpath}/${portname}.filelist'"
</span><span class="lines">@@ -142,8 +142,8 @@
</span><span class="cx"> proc portrpm::make_dependency_list {portname} {
</span><span class="cx"> set result {}
</span><span class="cx"> if {[catch {set res [mport_lookup $portname]} error]} {
</span><del>-                global errorInfo
-                ui_debug "$errorInfo"
</del><ins>+ global errorInfo
+ ui_debug "$errorInfo"
</ins><span class="cx"> ui_error "port lookup failed: $error"
</span><span class="cx"> return 1
</span><span class="cx"> }
</span><span class="lines">@@ -154,15 +154,19 @@
</span><span class="cx"> # get the union of depends_run and depends_lib
</span><span class="cx"> # xxx: only examines the portfile component of the depspec
</span><span class="cx"> set depends {}
</span><del>- if {[info exists portinfo(depends_run)]} { eval "lappend depends $portinfo(depends_run)" }
- if {[info exists portinfo(depends_lib)]} { eval "lappend depends $portinfo(depends_lib)" }
</del><ins>+ if {[info exists portinfo(depends_run)]} {
+ lappend depends {*}$portinfo(depends_run)
+ }
+ if {[info exists portinfo(depends_lib)]} {
+ lappend depends {*}$portinfo(depends_lib)
+ }
</ins><span class="cx">
</span><span class="cx"> foreach depspec $depends {
</span><span class="cx"> set dep [lindex [split $depspec :] end]
</span><span class="cx">
</span><span class="cx"> # xxx: nasty hack
</span><del>- if {$dep != "XFree86"} {
- eval "lappend result [make_dependency_list $dep]"
</del><ins>+ if {$dep ne "XFree86"} {
+ lappend result {*}[make_dependency_list $dep]
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -181,21 +185,21 @@
</span><span class="cx"> set words [split $orig]
</span><span class="cx"> set numWords [llength $words]
</span><span class="cx"> for {set cnt 0} {$cnt < $numWords} {incr cnt} {
</span><del>-        set w [lindex $words $cnt]
-        set wLen [string length $w]
</del><ins>+ set w [lindex $words $cnt]
+ set wLen [string length $w]
</ins><span class="cx">
</span><del>-        if {($pos+$wLen < $Length)} {
-         # append word to current line
-         if {$pos} {append line " "; incr pos}
-         append line $w
-         incr pos $wLen
-        } else {
-         # line full => write buffer and begin a new line
-         if {[string length $text]} {append text "\n"}
-         append text $line
-         set line $w
-         set pos $wLen
-        }
</del><ins>+ if {($pos+$wLen < $Length)} {
+ # append word to current line
+ if {$pos} {append line " "; incr pos}
+ append line $w
+ incr pos $wLen
+ } else {
+ # line full => write buffer and begin a new line
+ if {[string length $text]} {append text "\n"}
+ append text $line
+ set line $w
+ set pos $wLen
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if {[string length $text]} {append text "\n"}
</span><span class="lines">@@ -228,12 +232,12 @@
</span><span class="cx"> BuildRoot: ${destroot}
</span><span class="cx"> AutoReq: no"
</span><span class="cx"> if {$epoch != 0} {
</span><del>-         puts $specfd "Epoch: ${epoch}"
</del><ins>+ puts $specfd "Epoch: ${epoch}"
</ins><span class="cx"> }
</span><span class="cx"> if {[llength ${dependencies}] != 0} {
</span><del>-        foreach require ${dependencies} {
-         puts $specfd "Requires: [regsub -all -- "\-" $require "_"]"
-        }
</del><ins>+ foreach require ${dependencies} {
+ puts $specfd "Requires: [regsub -all -- "\-" $require "_"]"
+ }
</ins><span class="cx"> }
</span><span class="cx"> set wrap_description [word_wrap ${long_description} 72]
</span><span class="cx"> puts $specfd "
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10portsrpmtcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/portsrpm.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/portsrpm.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/portsrpm.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> foreach dir [list "${prefix}/src/macports/SRPMS" "${prefix}/src/apple/SRPMS" "/usr/src/apple/SRPMS" "/macports/rpms/SRPMS"] {
</span><span class="cx"> foreach arch {"src" "nosrc"} {
</span><span class="cx"> set rpmpath "$dir/${portname}-${portversion}-${portrevision}.${arch}.rpm"
</span><del>-         if {[file readable $rpmpath] && ([file mtime ${rpmpath}] >= [file mtime ${portpath}/Portfile])} {
</del><ins>+ if {[file readable $rpmpath] && ([file mtime ${rpmpath}] >= [file mtime ${portpath}/Portfile])} {
</ins><span class="cx"> ui_debug "$rpmpath"
</span><span class="cx"> ui_msg "$UI_PREFIX [format [msgcat::mc "SRPM package for %s version %s is up-to-date"] ${portname} ${portversion}]"
</span><span class="cx"> return 0
</span><span class="lines">@@ -141,8 +141,8 @@
</span><span class="cx"> proc portsrpm::make_dependency_list {portname} {
</span><span class="cx"> set result {}
</span><span class="cx"> if {[catch {set res [mport_lookup $portname]} error]} {
</span><del>-                global errorInfo
-                ui_debug "$errorInfo"
</del><ins>+ global errorInfo
+ ui_debug "$errorInfo"
</ins><span class="cx"> ui_error "port lookup failed: $error"
</span><span class="cx"> return 1
</span><span class="cx"> }
</span><span class="lines">@@ -154,17 +154,25 @@
</span><span class="cx"> # get the union of depends_fetch, depends_extract, depends_build and depends_lib
</span><span class="cx"> # xxx: only examines the portfile component of the depspec
</span><span class="cx"> set depends {}
</span><del>- if {[info exists portinfo(depends_fetch)]} { eval "lappend depends $portinfo(depends_fetch)" }
- if {[info exists portinfo(depends_extract)]} { eval "lappend depends $portinfo(depends_extract)" }
- if {[info exists portinfo(depends_build)]} { eval "lappend depends $portinfo(depends_build)" }
- if {[info exists portinfo(depends_lib)]} { eval "lappend depends $portinfo(depends_lib)" }
</del><ins>+ if {[info exists portinfo(depends_fetch)]} {
+ lappend depends {*}$portinfo(depends_fetch)
+ }
+ if {[info exists portinfo(depends_extract)]} {
+ lappend depends {*}$portinfo(depends_extract)
+ }
+ if {[info exists portinfo(depends_build)]} {
+ lappend depends {*}$portinfo(depends_build)
+ }
+ if {[info exists portinfo(depends_lib)]} {
+ lappend depends {*}$portinfo(depends_lib)
+ }
</ins><span class="cx">
</span><span class="cx"> foreach depspec $depends {
</span><span class="cx"> set dep [lindex [split $depspec :] end]
</span><span class="cx">
</span><span class="cx"> # xxx: nasty hack
</span><span class="cx"> if {$dep != "XFree86"} {
</span><del>- eval "lappend result [make_dependency_list $dep]"
</del><ins>+ lappend result {*}[make_dependency_list $dep]
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -183,21 +191,21 @@
</span><span class="cx"> set words [split $orig]
</span><span class="cx"> set numWords [llength $words]
</span><span class="cx"> for {set cnt 0} {$cnt < $numWords} {incr cnt} {
</span><del>-        set w [lindex $words $cnt]
-        set wLen [string length $w]
</del><ins>+ set w [lindex $words $cnt]
+ set wLen [string length $w]
</ins><span class="cx">
</span><del>-        if {($pos+$wLen < $Length)} {
-         # append word to current line
-         if {$pos} {append line " "; incr pos}
-         append line $w
-         incr pos $wLen
-        } else {
-         # line full => write buffer and begin a new line
-         if {[string length $text]} {append text "\n"}
-         append text $line
-         set line $w
-         set pos $wLen
-        }
</del><ins>+ if {($pos+$wLen < $Length)} {
+ # append word to current line
+ if {$pos} {append line " "; incr pos}
+ append line $w
+ incr pos $wLen
+ } else {
+ # line full => write buffer and begin a new line
+ if {[string length $text]} {append text "\n"}
+ append text $line
+ set line $w
+ set pos $wLen
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if {[string length $text]} {append text "\n"}
</span><span class="lines">@@ -228,7 +236,7 @@
</span><span class="cx"> puts $specfd "Source1: $zip"
</span><span class="cx"> }
</span><span class="cx"> if {$epoch != 0} {
</span><del>-         puts $specfd "Epoch: ${epoch}"
</del><ins>+ puts $specfd "Epoch: ${epoch}"
</ins><span class="cx"> }
</span><span class="cx"> set first 2
</span><span class="cx"> set count $first
</span><span class="lines">@@ -254,9 +262,9 @@
</span><span class="cx"> }
</span><span class="cx"> puts $specfd "AutoReq: no"
</span><span class="cx"> if {[llength ${dependencies}] != 0} {
</span><del>-        foreach require ${dependencies} {
-         puts $specfd "BuildRequires: [regsub -all -- "\-" $require "_"]"
-        }
</del><ins>+ foreach require ${dependencies} {
+ puts $specfd "BuildRequires: [regsub -all -- "\-" $require "_"]"
+ }
</ins><span class="cx"> }
</span><span class="cx"> set wrap_description [word_wrap ${long_description} 72]
</span><span class="cx"> if {$zip ne ""} {
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10portunarchivetcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/portunarchive.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/portunarchive.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/portunarchive.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -173,7 +173,13 @@
</span><span class="cx"> if {[regexp {z2?$} ${unarchive.type}]} {
</span><span class="cx"> set unarchive.args {-}
</span><span class="cx"> if {[regexp {bz2?$} ${unarchive.type}]} {
</span><del>- set gzip "bzip2"
</del><ins>+ if {![catch {binaryInPath lbzip2}]} {
+ set gzip "lbzip2"
+ } elseif {![catch {binaryInPath pbzip2}]} {
+ set gzip "pbzip2"
+ } else {
+ set gzip "bzip2"
+ }
</ins><span class="cx"> } elseif {[regexp {lz$} ${unarchive.type}]} {
</span><span class="cx"> set gzip "lzma"
</span><span class="cx"> } elseif {[regexp {xz$} ${unarchive.type}]} {
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10testsPortfile"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/tests/Portfile (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/tests/Portfile        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/tests/Portfile        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> --mandir=${prefix}/share/man
</span><span class="cx">
</span><span class="cx"> post-destroot {
</span><del>- eval xinstall -m 644 [glob ${worksrcpath}/*.1] ${destroot}${prefix}/share/man/man1/
</del><ins>+ xinstall -m 644 {*}[glob ${worksrcpath}/*.1] ${destroot}${prefix}/share/man/man1/
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> test.run                yes
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10testslibrarytcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/tests/library.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/tests/library.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/tests/library.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -104,3 +104,5 @@
</span><span class="cx"> # We don't need to handle portinterp_deferred_options, they're
</span><span class="cx"> # automatically handled correctly.
</span><span class="cx"> }
</span><ins>+
+testConstraint darwin [expr {$tcl_platform(os) eq "Darwin"}]
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10testsportarchivefetchtest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/tests/portarchivefetch.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/tests/portarchivefetch.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/tests/portarchivefetch.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../package_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span><span class="lines">@@ -86,9 +85,9 @@
</span><span class="cx"> env_init
</span><span class="cx">
</span><span class="cx"> array set ::portfetch::urlmap {
</span><del>- fondu http://packages.macports.org/fondu/
</del><ins>+ db_select http://packages.macports.org/db_select/
</ins><span class="cx"> }
</span><del>- set portarchivefetch::archivefetch_urls {fondu fondu-060102_1.darwin_12.x86_64.tbz2}
</del><ins>+ set portarchivefetch::archivefetch_urls {db_select db_select-0.1_2.darwin_13.noarch.tbz2}
</ins><span class="cx"> set target_state_fd [open $pwd/target w+]
</span><span class="cx">
</span><span class="cx"> set mport [mportopen file://.]
</span><span class="lines">@@ -105,7 +104,7 @@
</span><span class="cx"> if {[catch {portarchivefetch::fetchfiles}] != 0} {
</span><span class="cx"> return "FAIL: cannot fetch archive"
</span><span class="cx"> }
</span><del>- if {[file exists ${archivefetch.fulldestpath}/fondu-060102_1.darwin_12.x86_64.tbz2]} {
</del><ins>+ if {[file exists ${archivefetch.fulldestpath}/db_select-0.1_2.darwin_13.noarch.tbz2]} {
</ins><span class="cx"> return "FAIL: unverified archive not discarded"
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -113,7 +112,7 @@
</span><span class="cx"> if {[portarchivefetch::fetchfiles] != 0} {
</span><span class="cx"> return "FAIL: cannot fetch archive"
</span><span class="cx"> }
</span><del>- if {![file exists ${archivefetch.fulldestpath}/fondu-060102_1.darwin_12.x86_64.tbz2]} {
</del><ins>+ if {![file exists ${archivefetch.fulldestpath}/db_select-0.1_2.darwin_13.noarch.tbz2]} {
</ins><span class="cx"> return "FAIL: verified archive deleted"
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10testsportdmgtest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/tests/portdmg.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/tests/portdmg.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/tests/portdmg.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../package_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span><span class="lines">@@ -24,6 +23,8 @@
</span><span class="cx">
</span><span class="cx"> test package_dmg {
</span><span class="cx"> Package dmg unit test.
</span><ins>+} -constraints {
+ darwin
</ins><span class="cx"> } -setup {
</span><span class="cx"> set os.major 10
</span><span class="cx"> set os.arch i386
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10testsportdpkgtest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/tests/portdpkg.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/tests/portdpkg.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/tests/portdpkg.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../package_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10testsportmdmgtest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/tests/portmdmg.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/tests/portmdmg.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/tests/portmdmg.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../package_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span><span class="lines">@@ -27,6 +26,8 @@
</span><span class="cx">
</span><span class="cx"> test package_mdmg {
</span><span class="cx"> Package mdmg unit test.
</span><ins>+} -constraints {
+ darwin
</ins><span class="cx"> } -setup {
</span><span class="cx"> set os.major 10
</span><span class="cx"> set os.arch i386
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10testsportmpkgtest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/tests/portmpkg.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/tests/portmpkg.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/tests/portmpkg.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../package_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span><span class="lines">@@ -22,6 +21,8 @@
</span><span class="cx">
</span><span class="cx"> test mpkg_main {
</span><span class="cx"> Port mpkg main unit test.
</span><ins>+} -constraints {
+ darwin
</ins><span class="cx"> } -setup {
</span><span class="cx"> global os.platform os.major os.arch epoch destpath package.destpath configure.build_arch
</span><span class="cx"> global subport version revision package.flat maintainers description categories
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10testsportpkgtest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/tests/portpkg.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/tests/portpkg.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/tests/portpkg.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../package_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span><span class="lines">@@ -23,7 +22,7 @@
</span><span class="cx"> test pkg_main {
</span><span class="cx"> Port pkg main unit test.
</span><span class="cx"> } -constraints {
</span><del>- root
</del><ins>+ root darwin
</ins><span class="cx"> } -setup {
</span><span class="cx"> global os.platform os.major os.arch epoch destpath package.destpath configure.build_arch
</span><span class="cx"> global subport version revision package.flat maintainers description categories
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpackage10teststesttcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/package1.0/tests/test.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/package1.0/tests/test.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/package1.0/tests/test.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> # Global vars
</span><del>-set arguments ""
</del><ins>+set arguments {}
</ins><span class="cx"> set test_name ""
</span><span class="cx"> set color_out ""
</span><span class="cx"> set tcl ""
</span><span class="lines">@@ -17,8 +17,8 @@
</span><span class="cx"> proc print_help {arg} {
</span><span class="cx"> if { $arg eq "tests" } {
</span><span class="cx"> puts "The list of available tests is:"
</span><del>-        cd tests
-        set test_suite [glob *.test]
</del><ins>+ cd tests
+ set test_suite [glob *.test]
</ins><span class="cx"> foreach test $test_suite {
</span><span class="cx"> puts [puts -nonewline " "]$test
</span><span class="cx"> }
</span><span class="lines">@@ -34,82 +34,91 @@
</span><span class="cx">
</span><span class="cx"> # Process args
</span><span class="cx"> foreach arg $argv {
</span><del>- if { $arg eq "-h" || $arg eq "-help" } {
</del><ins>+ if {$arg eq "-h" || $arg eq "-help"} {
</ins><span class="cx"> print_help ""
</span><span class="cx"> exit 0
</span><del>- } elseif { $arg eq "-debug" } {
</del><ins>+ } elseif {$arg eq "-debug"} {
</ins><span class="cx"> set index [expr {[lsearch $argv $arg] + 1}]
</span><span class="cx"> set level [lindex $argv $index]
</span><del>- if { $level >= 0 && $level <= 3 } {
- append arguments "-debug " $level
</del><ins>+ if {$level >= 0 && $level <= 3} {
+ lappend arguments "-debug" $level
</ins><span class="cx"> } else {
</span><span class="cx"> puts "Invalid debug level."
</span><span class="cx"> exit 1
</span><span class="cx"> }
</span><del>- } elseif { $arg eq "-t" } {
</del><ins>+ } elseif {$arg eq "-t"} {
</ins><span class="cx"> set index [expr {[lsearch $argv $arg] + 1}]
</span><span class="cx"> set test_name [lindex $argv $index]
</span><span class="cx"> set no 0
</span><del>-        cd tests
-        set test_suite [glob *.test]
</del><ins>+ cd tests
+ set test_suite [glob *.test]
</ins><span class="cx"> foreach test $test_suite {
</span><del>- if { $test_name != $test } {
</del><ins>+ if {$test_name ne $test} {
</ins><span class="cx"> set no [expr {$no + 1}]
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- if { $no == [llength $test_suite] } {
</del><ins>+ if {$no == [llength $test_suite]} {
</ins><span class="cx"> print_help tests
</span><span class="cx"> exit 1
</span><span class="cx"> }
</span><del>- } elseif { $arg eq "-l" } {
</del><ins>+ } elseif {$arg eq "-l"} {
</ins><span class="cx"> print_help tests
</span><span class="cx"> exit 0
</span><del>- } elseif { $arg eq "-nocolor" } {
</del><ins>+ } elseif {$arg eq "-nocolor"} {
</ins><span class="cx"> set color_out "no"
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> # Run tests
</span><del>-if { $test_name ne ""} {
- set result [eval exec $tcl $test_name $arguments 2>@stderr]
</del><ins>+if {$test_name ne ""} {
+ set result [exec -ignorestderr $tcl $test_name {*}$arguments]
</ins><span class="cx"> puts $result
</span><del>-
</del><span class="cx"> } else {
</span><span class="cx"> cd tests
</span><span class="cx"> set test_suite [glob *.test]
</span><span class="cx">
</span><span class="cx"> foreach test $test_suite {
</span><del>- set result [eval exec $tcl $test $arguments 2>@stderr]
-                set lastline [lindex [split $result "\n"] end]
</del><ins>+ set result [exec -ignorestderr $tcl $test {*}$arguments]
+ set lastline [lindex [split $result "\n"] end]
</ins><span class="cx">
</span><del>-        if {[lrange [split $lastline "\t"] 1 1] != "Total"} {
-                if {[lrange [split $lastline "\t"] 1 1] == ""} {
-                        set lastline [lindex [split $result "\n"] 0]
-                 set errmsg [lindex [split $result "\n"] 2]
-                } else {
-                 set lastline [lindex [split $result "\n"] end-2]
-                 set errmsg [lindex [split $result "\n"] end]
-                }
-        }
</del><ins>+ if {[lrange [split $lastline "\t"] 1 1] ne "Total"} {
+ if {[lrange [split $lastline "\t"] 1 1] eq ""} {
+ set lastline [lindex [split $result "\n"] 0]
+ set errmsg [lindex [split $result "\n"] 2]
+ } else {
+ set lastline [lindex [split $result "\n"] end-2]
+ set errmsg [lindex [split $result "\n"] end]
+ }
+ }
</ins><span class="cx">
</span><del>-        set splitresult [split $lastline "\t"]
</del><ins>+ set splitresult [split $lastline "\t"]
</ins><span class="cx"> set total [lindex $splitresult 2]
</span><span class="cx"> set pass [lindex $splitresult 4]
</span><span class="cx"> set skip [lindex $splitresult 6]
</span><span class="cx"> set fail [lindex $splitresult 8]
</span><span class="cx">
</span><del>-        # Format output
-        if {$total < 10} { set total "0${total}"}
-        if {$pass < 10} { set pass "0${pass}"}
-        if {$skip < 10} { set skip "0${skip}"}
-        if {$fail < 10} { set fail "0${fail}"}
</del><ins>+ # Format output
+ if {$total < 10} {
+ set total "0${total}"
+ }
+ if {$pass < 10} {
+ set pass "0${pass}"
+ }
+ if {$skip < 10} {
+ set skip "0${skip}"
+ }
+ if {$fail < 10} {
+ set fail "0${fail}"
+ }
</ins><span class="cx">
</span><span class="cx"> # Check for errors.
</span><del>- if { $fail != 0 } { set err "yes" }
</del><ins>+ if {$fail != 0} {
+ set err "yes"
+ }
</ins><span class="cx">
</span><span class="cx"> set out ""
</span><del>- if { ($fail != 0 || $skip != 0) && $color_out eq "" } {
</del><ins>+ if {($fail != 0 || $skip != 0) && $color_out eq ""} {
</ins><span class="cx"> # Color failed tests.
</span><span class="cx"> append out "\x1b\[1;31mTotal:" $total " Passed:" $pass " Failed:" $fail " Skipped:" $skip " \x1b\[0m" $test
</span><span class="cx"> } else {
</span><span class="lines">@@ -118,19 +127,21 @@
</span><span class="cx">
</span><span class="cx"> # Print results and constrints for auto-skipped tests.
</span><span class="cx"> puts $out
</span><del>- if { $skip != 0 } {
</del><ins>+ if {$skip != 0} {
</ins><span class="cx"> set out " Constraint: "
</span><span class="cx"> append out [string trim $errmsg "\t {}"]
</span><span class="cx"> puts $out
</span><span class="cx"> }
</span><del>-        if { $fail != 0 } {
-         set end [expr {[string first $test $result 0] - 1}]
-         puts [string range $result 0 $end]
-        }
</del><ins>+ if {$fail != 0} {
+ set end [expr {[string first $test $result 0] - 1}]
+ puts [string range $result 0 $end]
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # Return 1 if errors were found.
</span><del>-if {$err ne ""} { exit 1 }
</del><ins>+if {$err ne ""} {
+ exit 1
+}
</ins><span class="cx">
</span><span class="cx"> return 0
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10Makefilein"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/Makefile.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/Makefile.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include ../../Mk/macports.autoconf.mk
+
</ins><span class="cx"> OBJS= \
</span><span class="cx">         Pextlib.o strsed.o fgetln.o md5cmd.o setmode.o xinstall.o \
</span><span class="cx">         fs-traverse.o strcasecmp.o vercomp.o filemap.o base32cmd.o \
</span><span class="lines">@@ -9,29 +14,28 @@
</span><span class="cx"> endif
</span><span class="cx">
</span><span class="cx"> SHLIB_NAME= Pextlib${SHLIB_SUFFIX}
</span><del>-INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/pextlib1.0
</del><ins>+INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/pextlib1.0
</ins><span class="cx">
</span><del>-include ../../Mk/macports.autoconf.mk
-include ../../Mk/macports.tea.mk
</del><ins>+include $(srcdir)/../../Mk/macports.tea.mk
</ins><span class="cx">
</span><span class="cx"> CFLAGS+= ${CURL_CFLAGS} ${MD5_CFLAGS} ${READLINE_CFLAGS}
</span><span class="cx"> LIBS+= ${CURL_LIBS} ${MD5_LIBS} ${READLINE_LIBS}
</span><span class="cx"> ifeq ($(shell uname), Darwin)
</span><span class="cx"> LIBS+= ../registry2.0/registry${SHLIB_SUFFIX}
</span><del>-SHLIB_LDFLAGS+= -install_name ${datadir}/macports/Tcl/pextlib1.0/${SHLIB_NAME}
</del><ins>+SHLIB_LDFLAGS+= -install_name ${TCL_PACKAGE_PATH}/pextlib1.0/${SHLIB_NAME}
</ins><span class="cx"> ${SHLIB_NAME}: ../registry2.0/registry${SHLIB_SUFFIX}
</span><span class="cx"> endif
</span><span class="cx">
</span><span class="cx"> .PHONY: test
</span><span class="cx">
</span><span class="cx"> test:: ${SHLIB_NAME}
</span><del>-        ${TCLSH} tests/checksums.tcl ./${SHLIB_NAME}
-        ${TCLSH} tests/curl.tcl ./${SHLIB_NAME}
-        ${TCLSH} tests/filemap.tcl ./${SHLIB_NAME}
-        ${TCLSH} tests/fs-traverse.tcl ./${SHLIB_NAME}
-        ${TCLSH} tests/symlink.tcl ./${SHLIB_NAME}
-        ${TCLSH} tests/unsetenv.tcl ./${SHLIB_NAME}
-        ${TCLSH} tests/vercomp.tcl ./${SHLIB_NAME}
</del><ins>+        ${TCLSH} $(srcdir)/tests/checksums.tcl ./${SHLIB_NAME}
+        ${TCLSH} $(srcdir)/tests/curl.tcl ./${SHLIB_NAME}
+        ${TCLSH} $(srcdir)/tests/filemap.tcl ./${SHLIB_NAME}
+        ${TCLSH} $(srcdir)/tests/fs-traverse.tcl ./${SHLIB_NAME}
+        ${TCLSH} $(srcdir)/tests/symlink.tcl ./${SHLIB_NAME}
+        ${TCLSH} $(srcdir)/tests/unsetenv.tcl ./${SHLIB_NAME}
+        ${TCLSH} $(srcdir)/tests/vercomp.tcl ./${SHLIB_NAME}
</ins><span class="cx">
</span><span class="cx"> distclean::
</span><span class="cx">         rm -f Makefile
</span><span class="cx">Property changes on: branches/new-help-system/base/src/pextlib1.0/Makefile.in
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4>Modified: svn:mergeinfo</h4></div>
<span class="cx">/branches/gsoc08-privileges/base/src/pextlib1.0/Makefile.in:37343-46937
</span><span class="cx">/branches/gsoc09-logging/base/src/pextlib1.0/Makefile:51231-60371
</span><span class="cx">/branches/gsoc09-logging/base/src/pextlib1.0/Makefile.in:51231-60371
</span><span class="cx">/branches/gsoc11-rev-upgrade/base/src/pextlib1.0/Makefile:78828-88375
</span><span class="cx">/branches/gsoc11-rev-upgrade/base/src/pextlib1.0/Makefile.in:78828-88375
</span><span class="cx">/branches/gsoc13-tests/src/pextlib1.0/Makefile.in:106692-111324
</span><span class="cx">/branches/universal-sanity/base/src/pextlib1.0/Makefile:51872-52323
</span><span class="cx">/branches/universal-sanity/base/src/pextlib1.0/Makefile.in:51872-52323
</span><span class="cx">/branches/variant-descs-14482/base/src/pextlib1.0/Makefile:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
</span><span class="cx">/branches/variant-descs-14482/base/src/pextlib1.0/Makefile.in:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
</span><span class="cx">/trunk/base/src/pextlib1.0/Makefile.in:49341-104698,108155-117083
</span><span class="cx">/users/perry/base-bugs_and_notes/src/pextlib1.0/Makefile:45682-46060
</span><span class="cx">/users/perry/base-bugs_and_notes/src/pextlib1.0/Makefile.in:45682-46060
</span><span class="cx">/users/perry/base-select/src/pextlib1.0/Makefile:44044-44692
</span><span class="cx">/users/perry/base-select/src/pextlib1.0/Makefile.in:44044-44692
</span><span class="cx"> + /branches/gsoc08-privileges/base/src/pextlib1.0/Makefile:37343-46937
</span><span class="cx">/branches/gsoc08-privileges/base/src/pextlib1.0/Makefile.in:37343-46937
</span><span class="cx">/branches/gsoc09-logging/base/src/pextlib1.0/Makefile:51231-60371
</span><span class="cx">/branches/gsoc09-logging/base/src/pextlib1.0/Makefile.in:51231-60371
</span><span class="cx">/branches/gsoc11-rev-upgrade/base/src/pextlib1.0/Makefile:78828-88375
</span><span class="cx">/branches/gsoc11-rev-upgrade/base/src/pextlib1.0/Makefile.in:78828-88375
</span><span class="cx">/branches/gsoc13-tests/src/pextlib1.0/Makefile.in:106692-111324
</span><span class="cx">/branches/universal-sanity/base/src/pextlib1.0/Makefile:51872-52323
</span><span class="cx">/branches/universal-sanity/base/src/pextlib1.0/Makefile.in:51872-52323
</span><span class="cx">/branches/variant-descs-14482/base/src/pextlib1.0/Makefile:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
</span><span class="cx">/branches/variant-descs-14482/base/src/pextlib1.0/Makefile.in:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
</span><span class="cx">/trunk/base/src/pextlib1.0/Makefile.in:49341-104698,108155-122997
</span><span class="cx">/users/perry/base-bugs_and_notes/src/pextlib1.0/Makefile:45682-46060
</span><span class="cx">/users/perry/base-bugs_and_notes/src/pextlib1.0/Makefile.in:45682-46060
</span><span class="cx">/users/perry/base-select/src/pextlib1.0/Makefile:44044-44692
</span><span class="cx">/users/perry/base-select/src/pextlib1.0/Makefile.in:44044-44692
</span><a id="branchesnewhelpsystembasesrcpextlib10Pextlibc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/Pextlib.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/Pextlib.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/Pextlib.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -33,10 +33,17 @@
</span><span class="cx"> * POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#if HAVE_CONFIG_H
</del><ins>+#ifdef HAVE_CONFIG_H
</ins><span class="cx"> #include <config.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+/* required for strdup(3) on Linux and OS X */
+#define _XOPEN_SOURCE 600L
+/* required for clearenv(3)/setenv(3)/unsetenv(3) on Linux */
+#define _BSD_SOURCE
+/* required for clearenv(3)/setenv(3)/unsetenv(3) on OS X */
+#define _DARWIN_C_SOURCE
+
</ins><span class="cx"> #include <sys/types.h>
</span><span class="cx"> #include <sys/socket.h>
</span><span class="cx"> #include <sys/stat.h>
</span><span class="lines">@@ -94,7 +101,7 @@
</span><span class="cx"> extern char **environ;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if !HAVE_SETMODE
</del><ins>+#ifndef HAVE_SETMODE
</ins><span class="cx"> #include "setmode.h"
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -361,13 +368,6 @@
</span><span class="cx"> int UnsetEnvCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
</span><span class="cx"> {
</span><span class="cx"> char *name;
</span><del>- char **envp;
- char *equals;
- size_t len;
- Tcl_Obj *tclList;
- int listLength;
- Tcl_Obj **listArray;
- int loopCounter;
</del><span class="cx">
</span><span class="cx"> if (objc != 2) {
</span><span class="cx"> Tcl_WrongNumArgs(interp, 1, objv, "name");
</span><span class="lines">@@ -386,18 +386,21 @@
</span><span class="cx"> clearenv() but that is not yet standardized, instead use Tcl's
</span><span class="cx"> list capability to easily build an array of strings for each
</span><span class="cx"> env name, then loop through that list to unsetenv() each one */
</span><del>- tclList = Tcl_NewListObj( 0, NULL );
</del><ins>+ Tcl_Obj *tclList = Tcl_NewListObj( 0, NULL );
</ins><span class="cx"> Tcl_IncrRefCount( tclList );
</span><span class="cx"> /* unset all current environment variables */
</span><del>- for (envp = environ; *envp != NULL; envp++) {
- equals = strchr(*envp, '=');
</del><ins>+ for (char **envp = environ; *envp != NULL; envp++) {
+ char *equals = strchr(*envp, '=');
</ins><span class="cx"> if (equals != NULL) {
</span><del>- len = (size_t)(equals - *envp);
</del><ins>+                                size_t len = (size_t)(equals - *envp);
</ins><span class="cx"> Tcl_ListObjAppendElement(interp, tclList, Tcl_NewStringObj(*envp, len));
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+
+                int listLength;
+                Tcl_Obj **listArray;
</ins><span class="cx"> Tcl_ListObjGetElements(interp, tclList, &listLength, &listArray);
</span><del>- for (loopCounter = 0; loopCounter < listLength; loopCounter++) {
</del><ins>+ for (int loopCounter = 0; loopCounter < listLength; loopCounter++) {
</ins><span class="cx"> unsetenv(Tcl_GetString(listArray[loopCounter]));
</span><span class="cx"> }
</span><span class="cx"> Tcl_DecrRefCount( tclList );
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10curlc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/curl.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/curl.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/curl.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> #include <stdio.h>
</span><span class="cx"> #include <stdlib.h>
</span><span class="cx"> #include <string.h>
</span><ins>+#include <sys/select.h>
</ins><span class="cx"> #include <utime.h>
</span><span class="cx">
</span><span class="cx"> #include <curl/curl.h>
</span><span class="lines">@@ -61,12 +62,17 @@
</span><span class="cx"> /* ========================================================================= **
</span><span class="cx"> * Definitions
</span><span class="cx"> * ========================================================================= */
</span><del>-#pragma mark Definitions
</del><span class="cx">
</span><span class="cx"> /* ------------------------------------------------------------------------- **
</span><del>- * Global cURL handle
</del><ins>+ * Global cURL handles
</ins><span class="cx"> * ------------------------------------------------------------------------- */
</span><del>-/* we use a single global handle rather than creating and destroying handles to
</del><ins>+/* If we want to use TclX' signal handling mechanism we need cURL to return
+ * control to our code from time to time so we can call Tcl_AsyncInvoke to
+ * process pending signals. To do that, we could either abuse the curl progress
+ * callback (which would mean we could no longer use the default curl progress
+ * callback, or we need to use the cURL multi API. */
+static CURLM* theMHandle = NULL;
+/* We use a single global handle rather than creating and destroying handles to
</ins><span class="cx"> * take advantage of HTTP pipelining, especially to the packages servers. */
</span><span class="cx"> static CURL* theHandle = NULL;
</span><span class="cx">
</span><span class="lines">@@ -74,6 +80,7 @@
</span><span class="cx"> * Prototypes
</span><span class="cx"> * ------------------------------------------------------------------------- */
</span><span class="cx"> int SetResultFromCurlErrorCode(Tcl_Interp* interp, CURLcode inErrorCode);
</span><ins>+int SetResultFromCurlMErrorCode(Tcl_Interp* interp, CURLMcode inErrorCode);
</ins><span class="cx"> int CurlFetchCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
</span><span class="cx"> int CurlIsNewerCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
</span><span class="cx"> int CurlGetSizeCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
</span><span class="lines">@@ -93,8 +100,6 @@
</span><span class="cx"> /* ========================================================================= **
</span><span class="cx"> * Entry points
</span><span class="cx"> * ========================================================================= */
</span><del>-#pragma mark -
-#pragma mark Entry points
</del><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Set the result if a libcurl error occurred return TCL_ERROR.
</span><span class="lines">@@ -120,6 +125,29 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><ins>+ * Set the result if a libcurl multi error occurred return TCL_ERROR.
+ * Otherwise, set the result to "" and return TCL_OK.
+ *
+ * @param interp                pointer to the interpreter.
+ * @param inErrorCode        code of the multi error.
+ * @return TCL_OK if inErrorCode is 0, TCL_ERROR otherwise.
+ */
+int
+SetResultFromCurlMErrorCode(Tcl_Interp *interp, CURLMcode inErrorCode)
+{
+        int result = TCL_ERROR;
+
+        if (inErrorCode == CURLM_OK) {
+                Tcl_SetResult(interp, "", TCL_STATIC);
+                result = TCL_OK;
+        } else {
+                Tcl_SetResult(interp, (char *)curl_multi_strerror(inErrorCode), TCL_VOLATILE);
+        }
+
+        return result;
+}
+
+/**
</ins><span class="cx"> * curl fetch subcommand entry point.
</span><span class="cx"> *
</span><span class="cx"> * syntax: curl fetch [--disable-epsv] [--ignore-ssl-cert] [--remote-time] [-u userpass] [--effective-url lasturlvar] [--progress "builtin"|callback] url filename
</span><span class="lines">@@ -132,8 +160,8 @@
</span><span class="cx"> CurlFetchCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
</span><span class="cx"> {
</span><span class="cx">         int theResult = TCL_OK;
</span><ins>+        bool handleAdded = false;
</ins><span class="cx">         FILE* theFile = NULL;
</span><del>-        bool performFailed = false;
</del><span class="cx">         char theErrorString[CURL_ERROR_SIZE];
</span><span class="cx">
</span><span class="cx">         do {
</span><span class="lines">@@ -156,7 +184,10 @@
</span><span class="cx">                 const char* theFilePath;
</span><span class="cx">                 long theFileTime = 0;
</span><span class="cx">                 CURLcode theCurlCode;
</span><ins>+                CURLMcode theCurlMCode;
</ins><span class="cx">                 struct curl_slist *headers = NULL;
</span><ins>+                struct CURLMsg *info = NULL;
+                int running; /* number of running transfers */
</ins><span class="cx">
</span><span class="cx">                 /* we might have options and then the url and the file */
</span><span class="cx">                 /* let's process the options first */
</span><span class="lines">@@ -260,10 +291,25 @@
</span><span class="cx">                         break;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                /* Create the CURL handle */
</del><ins>+                /* Create the CURL handles */
+                if (theMHandle == NULL) {
+                        /* Re-use existing multi handle if theMHandle isn't NULL */
+                        theMHandle = curl_multi_init();
+                        if (theMHandle == NULL) {
+                                theResult = TCL_ERROR;
+                                Tcl_SetResult(interp, "error in curl_multi_init", TCL_STATIC);
+                                break;
+                        }
+                }
+
</ins><span class="cx">                 if (theHandle == NULL) {
</span><span class="cx">                         /* Re-use existing handle if theHandle isn't NULL */
</span><span class="cx">                         theHandle = curl_easy_init();
</span><ins>+                        if (theHandle == NULL) {
+                                theResult = TCL_ERROR;
+                                Tcl_SetResult(interp, "error in curl_easy_init", TCL_STATIC);
+                                break;
+                        }
</ins><span class="cx">                 }
</span><span class="cx">                 /* If we're re-using a handle, the previous call did ensure to reset it
</span><span class="cx">                  * to the default state using curl_easy_reset(3) */
</span><span class="lines">@@ -432,18 +478,134 @@
</span><span class="cx">                         break;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                /* actually fetch the resource */
-                theCurlCode = curl_easy_perform(theHandle);
-                if (theCurlCode != CURLE_OK) {
-                        performFailed = true;
</del><ins>+                /* add the easy handle to the multi handle */
+                theCurlMCode = curl_multi_add_handle(theMHandle, theHandle);
+                if (theCurlMCode != CURLM_OK) {
+                        theResult = SetResultFromCurlMErrorCode(interp, theCurlMCode);
</ins><span class="cx">                         break;
</span><span class="cx">                 }
</span><ins>+                handleAdded = true;
</ins><span class="cx">
</span><ins>+                /* select(2) the file descriptors used by curl and interleave with
+                 * checks for TclX signals */
+                do {
+                        int rc; /* select() return code */
+
+                        /* arguments for select(2) */
+                        int nfds;
+                        fd_set readfds;
+                        fd_set writefds;
+                        fd_set errorfds;
+                        struct timeval timeout;
+
+                        long curl_timeout = -1;
+
+                        /* use at most half a second as timeout */
+                        timeout.tv_sec = 0;
+                        timeout.tv_usec = 500 * 1000;
+
+                        /* get the next timeout */
+                        theCurlMCode = curl_multi_timeout(theMHandle, &curl_timeout);
+                        if (theCurlMCode != CURLM_OK) {
+                                theResult = SetResultFromCurlMErrorCode(interp, theCurlMCode);
+                                break;
+                        }
+
+                        timeout.tv_sec = 1;
+                        timeout.tv_usec = 0;
+                        /* convert the timeout into a suitable format for select(2) and
+                         * limit the timeout to 500 msecs at most */
+                        if (curl_timeout > 0) {
+                                timeout.tv_sec = curl_timeout / 1000;
+                                if (timeout.tv_sec > 1) {
+                                        timeout.tv_sec = 1;
+                                }
+
+                                timeout.tv_usec = (curl_timeout % 1000) * 1000;
+                        }
+
+                        /* get the fd sets for select(2) */
+                        FD_ZERO(&readfds);
+                        FD_ZERO(&writefds);
+                        FD_ZERO(&errorfds);
+                        theCurlMCode = curl_multi_fdset(theMHandle, &readfds, &writefds, &errorfds, &nfds);
+                        if (theCurlMCode != CURLM_OK) {
+                                theResult = SetResultFromCurlMErrorCode(interp, theCurlMCode);
+                                break;
+                        }
+
+                        /* The value of nfds is guaranteed to be >= -1. Passing nfds + 1 to
+                         * select(2) makes the case of nfds == -1 a sleep. */
+                        rc = select(nfds + 1, &readfds, &writefds, &errorfds, &timeout);
+                        if (-1 == rc) {
+                                /* check for signals first to avoid breaking our special
+                                 * handling of SIGINT and SIGTERM */
+                                if (Tcl_AsyncReady()) {
+                                        theResult = Tcl_AsyncInvoke(interp, theResult);
+                                        if (theResult != TCL_OK) {
+                                                break;
+                                        }
+                                }
+
+                                /* select error */
+                                Tcl_SetResult(interp, strerror(errno), TCL_VOLATILE);
+                                theResult = TCL_ERROR;
+                                break;
+                        }
+
+                        /* timeout or activity */
+                        theCurlMCode = curl_multi_perform(theMHandle, &running);
+
+                        /* process signals from TclX */
+                        if (Tcl_AsyncReady()) {
+                                theResult = Tcl_AsyncInvoke(interp, theResult);
+                                if (theResult != TCL_OK) {
+                                        break;
+                                }
+                        }
+                } while (running > 0);
+
+                /* Find out whether the transfer succeeded or failed. */
+                info = curl_multi_info_read(theMHandle, &running);
+                if (running > 0) {
+                        fprintf(stderr, "Warning: curl_multi_info_read has %d more structs available\n", running);
+                }
+
+                /* free header memory */
+                curl_slist_free_all(headers);
+
</ins><span class="cx">                 /* signal cleanup to the progress callback */
</span><span class="cx">                 if (noprogress == 0 && strcmp(progressCallback.proc, "builtin") != 0) {
</span><span class="cx">                         CurlProgressCleanup(&progressCallback);
</span><span class="cx">                 }
</span><span class="cx">
</span><ins>+                /* check for errors in the loop */
+                if (theResult != TCL_OK || theCurlMCode != CURLM_OK) {
+                        break;
+                }
+
+                /* we should always get CURLMSG_DONE unless we aborted due to a Tcl
+                 * signal */
+                if (info == NULL) {
+                        Tcl_SetResult(interp, "curl_multi_info_read() returned NULL", TCL_STATIC);
+                        theResult = TCL_ERROR;
+                        break;
+                }
+
+                if (info->msg != CURLMSG_DONE) {
+                        snprintf(theErrorString, sizeof(theErrorString), "curl_multi_info_read() returned unexpected {.msg = %d, .data.result = %d}", info->msg, info->data.result);
+                        Tcl_SetResult(interp, theErrorString, TCL_VOLATILE);
+                        theResult = TCL_ERROR;
+                        break;
+                }
+                
+                if (info->data.result != CURLE_OK) {
+                        /* execution failed, use the error string */
+                        Tcl_SetResult(interp, theErrorString, TCL_VOLATILE);
+                        theResult = TCL_ERROR;
+                        break;
+                }
+
</ins><span class="cx">                 /* close the file */
</span><span class="cx">                 (void) fclose(theFile);
</span><span class="cx">                 theFile = NULL;
</span><span class="lines">@@ -497,21 +659,19 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                /* free header memory */
-                curl_slist_free_all(headers);
-
</del><span class="cx">                 /* If --effective-url option was given, set given variable name to last effective url used by curl */
</span><span class="cx">                 if (effectiveURLVarName != NULL) {
</span><span class="cx">                         theCurlCode = curl_easy_getinfo(theHandle, CURLINFO_EFFECTIVE_URL, &effectiveURL);
</span><span class="cx">                         Tcl_SetVar(interp, effectiveURLVarName,
</span><del>-                                (effectiveURL == NULL || theCurlCode != CURLE_OK) ? "" : effectiveURL,
-                                0);
</del><ins>+                                (effectiveURL == NULL || theCurlCode != CURLE_OK) ? "" : effectiveURL, 0);
</ins><span class="cx">                 }
</span><span class="cx">         } while (0);
</span><span class="cx">
</span><del>-        if (performFailed) {
-                Tcl_SetResult(interp, theErrorString, TCL_VOLATILE);
-                theResult = TCL_ERROR;
</del><ins>+        if (handleAdded) {
+                /* Remove the handle from the multi handle, but ignore errors to avoid
+                 * cluttering the real error info that might be somewhere further up */
+                curl_multi_remove_handle(theMHandle, theHandle);
+                handleAdded = false;
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         /* reset the connection */
</span><span class="lines">@@ -1187,16 +1347,17 @@
</span><span class="cx">
</span><span class="cx">                 /* actually perform the POST */
</span><span class="cx">                 theCurlCode = curl_easy_perform(theHandle);
</span><del>-                if (theCurlCode != CURLE_OK) {
-                        theResult = SetResultFromCurlErrorCode(interp, theCurlCode);
-                        break;
-                }
</del><span class="cx">
</span><span class="cx">                 /* signal cleanup to the progress callback */
</span><span class="cx">                 if (noprogress == 0 && strcmp(progressCallback.proc, "builtin") != 0) {
</span><span class="cx">                         CurlProgressCleanup(&progressCallback);
</span><span class="cx">                 }
</span><span class="cx">
</span><ins>+                if (theCurlCode != CURLE_OK) {
+                        theResult = SetResultFromCurlErrorCode(interp, theCurlCode);
+                        break;
+                }
+
</ins><span class="cx">                 /* close the file */
</span><span class="cx">                 (void) fclose(theFile);
</span><span class="cx">                 theFile = NULL;
</span><span class="lines">@@ -1291,8 +1452,6 @@
</span><span class="cx"> /* ========================================================================= **
</span><span class="cx"> * Callback function
</span><span class="cx"> * ========================================================================= */
</span><del>-#pragma mark -
-#pragma mark Callback function
</del><span class="cx"> static int CurlProgressHandler(
</span><span class="cx">                 tcl_callback_t *callback,
</span><span class="cx">                 double dltotal,
</span><span class="lines">@@ -1409,6 +1568,7 @@
</span><span class="cx">         /*
</span><span class="cx">          * Transfer complete, signal the progress callback
</span><span class="cx">          */
</span><ins>+        Tcl_InterpState state;
</ins><span class="cx">
</span><span class="cx">         /*
</span><span class="cx">          * Command string, a space followed "finish" plus the trailing \0.
</span><span class="lines">@@ -1423,5 +1583,9 @@
</span><span class="cx">                 abort();
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+        /* make sure to save and restore the interpreter state so a potential error
+         * message doesn't get lost */
+        state = Tcl_SaveInterpState(callback->interp, 0);
</ins><span class="cx">         Tcl_EvalEx(callback->interp, commandBuffer, len, TCL_EVAL_GLOBAL);
</span><ins>+        Tcl_RestoreInterpState(callback->interp, state);
</ins><span class="cx"> }
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10filemapc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/filemap.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/filemap.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/filemap.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -30,10 +30,13 @@
</span><span class="cx"> * POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#if HAVE_CONFIG_H
</del><ins>+#ifdef HAVE_CONFIG_H
</ins><span class="cx"> #include <config.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+/* needed for NAME_MAX and PATH_MAX on Linux */
+#define _XOPEN_SOURCE
+
</ins><span class="cx"> #include <sys/stat.h>
</span><span class="cx"> #include <errno.h>
</span><span class="cx"> #include <fcntl.h>
</span><span class="lines">@@ -48,7 +51,6 @@
</span><span class="cx"> /* ========================================================================= **
</span><span class="cx"> * Definitions
</span><span class="cx"> * ========================================================================= */
</span><del>-#pragma mark Definitions
</del><span class="cx">
</span><span class="cx"> /* ------------------------------------------------------------------------- **
</span><span class="cx"> * Internal structures
</span><span class="lines">@@ -184,8 +186,6 @@
</span><span class="cx"> /* ========================================================================= **
</span><span class="cx"> * Tree access functions
</span><span class="cx"> * ========================================================================= */
</span><del>-#pragma mark -
-#pragma mark Access functions
</del><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Load the database from a file.
</span><span class="lines">@@ -1118,8 +1118,6 @@
</span><span class="cx"> /* ========================================================================= **
</span><span class="cx"> * Tcl object functions
</span><span class="cx"> * ========================================================================= */
</span><del>-#pragma mark -
-#pragma mark Tcl object functions
</del><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Free the object.
</span><span class="lines">@@ -1205,8 +1203,6 @@
</span><span class="cx"> /* ========================================================================= **
</span><span class="cx"> * Entry points
</span><span class="cx"> * ========================================================================= */
</span><del>-#pragma mark -
-#pragma mark Entry points
</del><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Set the result if an error occurred and return TCL_ERROR.
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10flockc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/flock.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/flock.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/flock.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx"> * 3. Neither the name of The MacPorts Project nor the names of its contributors
</span><span class="cx"> * may be used to endorse or promote products derived from this software
</span><span class="cx"> * without specific prior written permission.
</span><del>- *
</del><ins>+ *
</ins><span class="cx"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
</span><span class="cx"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
</span><span class="cx"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
</span><span class="lines">@@ -34,152 +34,223 @@
</span><span class="cx"> #include <config.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+/* needed to get struct sigaction on some platforms */
+#define _XOPEN_SOURCE 500L
+/* the above hides flock on OS X without _DARWIN_C_SOURCE */
+#define _DARWIN_C_SOURCE
+
</ins><span class="cx"> #if HAVE_SYS_FILE_H
</span><span class="cx"> #include <sys/file.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #include <errno.h>
</span><span class="cx"> #include <inttypes.h>
</span><ins>+#include <signal.h>
</ins><span class="cx"> #include <string.h>
</span><ins>+#include <unistd.h>
</ins><span class="cx">
</span><span class="cx"> #include <tcl.h>
</span><span class="cx">
</span><span class="cx"> #include "flock.h"
</span><span class="cx">
</span><ins>+static volatile int alarmReceived = 0;
+
+static void alarmHandler(int sig UNUSED) {
+ alarmReceived = 1;
+}
+
</ins><span class="cx"> int
</span><del>-FlockCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
-{
-        static const char errorstr[] = "use one of \"-shared\", \"-exclusive\", or \"-unlock\", and optionally \"-noblock\"";
-        int operation = 0, fd, i, ret;
-        int errnoval = 0;
-        int oshared = 0, oexclusive = 0, ounlock = 0, onoblock = 0;
</del><ins>+FlockCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
+ static const char errorstr[] = "use one of \"-shared\", \"-exclusive\", or \"-unlock\", and optionally \"-noblock\"";
+ int operation = 0, fd, i, ret, sigret = TCL_OK;
+ int errnoval = 0;
+ int oshared = 0, oexclusive = 0, ounlock = 0, onoblock = 0, retry = 0;
</ins><span class="cx"> #if defined(HAVE_LOCKF) && !defined(HAVE_FLOCK)
</span><del>-        off_t curpos;
</del><ins>+ off_t curpos;
</ins><span class="cx"> #endif
</span><del>-        char *res;
-        Tcl_Channel channel;
-        ClientData handle;
</del><ins>+ char *res;
+ Tcl_Channel channel;
+ ClientData handle;
+ struct sigaction sa_oldalarm, sa_alarm;
</ins><span class="cx">
</span><del>-        if (objc < 3 || objc > 4) {
-                Tcl_WrongNumArgs(interp, 1, objv, "channelId switches");
-                return TCL_ERROR;
-        }
</del><ins>+ if (objc < 3 || objc > 4) {
+ Tcl_WrongNumArgs(interp, 1, objv, "channelId switches");
+ return TCL_ERROR;
+ }
</ins><span class="cx">
</span><del>-         if ((channel = Tcl_GetChannel(interp, Tcl_GetString(objv[1]), NULL)) == NULL)
-                return TCL_ERROR;
</del><ins>+ if ((channel = Tcl_GetChannel(interp, Tcl_GetString(objv[1]), NULL)) == NULL) {
+ Tcl_SetResult(interp, "error getting channel, result was NULL", TCL_STATIC);
+ return TCL_ERROR;
+ }
</ins><span class="cx">
</span><del>-        if (Tcl_GetChannelHandle(channel, TCL_READABLE|TCL_WRITABLE, &handle) != TCL_OK) {
-                Tcl_SetResult(interp, "error getting channel handle", TCL_STATIC);
-                return TCL_ERROR;
-        }
-        fd = (int)(intptr_t)handle;
</del><ins>+ if (Tcl_GetChannelHandle(channel, TCL_READABLE | TCL_WRITABLE, &handle) != TCL_OK) {
+ Tcl_SetResult(interp, "error getting channel handle", TCL_STATIC);
+ return TCL_ERROR;
+ }
+ fd = (int)(intptr_t)handle;
</ins><span class="cx">
</span><del>-        for (i = 2; i < objc; i++) {
-                char *arg = Tcl_GetString(objv[i]);
-                if (!strcmp(arg, "-shared")) {
-                 oshared = 1;
-                } else if (!strcmp(arg, "-exclusive")) {
-                 oexclusive = 1;
-                } else if (!strcmp(arg, "-unlock")) {
-                 ounlock = 1;
-                } else if (!strcmp(arg, "-noblock")) {
-                 onoblock = 1;
-                }
-        }
</del><ins>+ for (i = 2; i < objc; i++) {
+ char *arg = Tcl_GetString(objv[i]);
+ if (!strcmp(arg, "-shared")) {
+ oshared = 1;
+ }
+ else if (!strcmp(arg, "-exclusive")) {
+ oexclusive = 1;
+ }
+ else if (!strcmp(arg, "-unlock")) {
+ ounlock = 1;
+ }
+ else if (!strcmp(arg, "-noblock")) {
+ onoblock = 1;
+ }
+ }
</ins><span class="cx">
</span><del>-        /* verify the arguments */
</del><ins>+ /* verify the arguments */
</ins><span class="cx">
</span><del>-        if((oshared + oexclusive + ounlock) != 1) {
-         /* only one of the options should have been specified */
-         Tcl_SetResult(interp, (void *) &errorstr, TCL_STATIC);
-         return TCL_ERROR;
-        }
</del><ins>+ if ((oshared + oexclusive + ounlock) != 1) {
+ /* only one of the options should have been specified */
+ Tcl_SetResult(interp, (void *) &errorstr, TCL_STATIC);
+ return TCL_ERROR;
+ }
</ins><span class="cx">
</span><del>-        if(onoblock && ounlock) {
-         /* should not be specified together */
-         Tcl_SetResult(interp, "-noblock cannot be used with -unlock", TCL_STATIC);
-         return TCL_ERROR;
-        }
-        
</del><ins>+ if (onoblock && ounlock) {
+ /* should not be specified together */
+ Tcl_SetResult(interp, "-noblock cannot be used with -unlock", TCL_STATIC);
+ return TCL_ERROR;
+ }
+
+ /* (re-)enable SIGALRM so we can use alarm(3) to specify a timeout for the
+ * locking, do some Tcl signal processing and restart the locking to solve
+ * #43388. */
+ memset(&sa_alarm, 0, sizeof(struct sigaction));
+ sigemptyset(&sa_alarm.sa_mask);
+ sa_alarm.sa_flags = 0; /* explicitly don't specify SA_RESTART, we want the
+ following alarm(3) to interrupt the locking. */
+ sa_alarm.sa_handler = alarmHandler;
+ sigaction(SIGALRM, &sa_alarm, &sa_oldalarm);
+
+ do {
+ /* use a delay of one second */
+ retry = 0;
+ alarmReceived = 0;
+ alarm(1);
</ins><span class="cx"> #if HAVE_FLOCK
</span><del>-        /* prefer flock if present */
-        if(oshared) operation |= LOCK_SH;
</del><ins>+ /* prefer flock if present */
+ if (oshared) {
+ operation |= LOCK_SH;
+ }
</ins><span class="cx">
</span><del>-        if(oexclusive) operation |= LOCK_EX;
</del><ins>+ if (oexclusive) {
+ operation |= LOCK_EX;
+ }
</ins><span class="cx">
</span><del>-        if(ounlock) operation |= LOCK_UN;
</del><ins>+ if (ounlock) {
+ operation |= LOCK_UN;
+ }
</ins><span class="cx">
</span><del>-        if(onoblock) operation |= LOCK_NB;
</del><ins>+ if (onoblock) {
+ operation |= LOCK_NB;
+ }
</ins><span class="cx">
</span><del>-        ret = flock(fd, operation);
-        if(ret == -1) {
-         errnoval = errno;
-        }
</del><ins>+ ret = flock(fd, operation);
+ if (ret == -1) {
+ errnoval = errno;
+ }
</ins><span class="cx"> #else
</span><span class="cx"> #if HAVE_LOCKF
</span><del>-        if(ounlock) operation = F_ULOCK;
</del><ins>+ if (ounlock) {
+ operation = F_ULOCK;
+ }
</ins><span class="cx">
</span><del>-        /* lockf semantics don't map to shared locks. */
-        if(oshared || oexclusive) {
-         if(onoblock) {
-         operation = F_TLOCK;
-         } else {
-         operation = F_LOCK;
-         }
-        }
</del><ins>+ /* lockf semantics don't map to shared locks. */
+ if (oshared || oexclusive) {
+ if (onoblock) {
+ operation = F_TLOCK;
+ }
+ else {
+ operation = F_LOCK;
+ }
+ }
</ins><span class="cx">
</span><del>-        curpos = lseek(fd, 0, SEEK_CUR);
-        if(curpos == -1) {
-                Tcl_SetResult(interp, (void *) "Seek error", TCL_STATIC);
-                return TCL_ERROR;
-        }
</del><ins>+ curpos = lseek(fd, 0, SEEK_CUR);
+ if (curpos == -1) {
+ Tcl_SetResult(interp, (void *) "Seek error", TCL_STATIC);
+ return TCL_ERROR;
+ }
</ins><span class="cx">
</span><del>-        ret = lockf(fd, operation, 0); /* lock entire file */
</del><ins>+ ret = lockf(fd, operation, 0); /* lock entire file */
+ if (ret == -1) {
+ errnoval = errno;
+ }
</ins><span class="cx">
</span><del>-        curpos = lseek(fd, curpos, SEEK_SET);
-        if(curpos == -1) {
-                Tcl_SetResult(interp, (void *) "Seek error", TCL_STATIC);
-                return TCL_ERROR;
-        }
-
-        if(ret == -1) {
-         errnoval = errno;
-         if((oshared || oexclusive)) {
-         /* map the errno val to what we would expect for flock */
-         if(onoblock && errnoval == EAGAIN) {
-         /* on some systems, EAGAIN=EWOULDBLOCK, but lets be safe */
-         errnoval = EWOULDBLOCK;
-         } else if(errnoval == EINVAL) {
-         errnoval = EOPNOTSUPP;
-         }
-         }
-        }
</del><ins>+ curpos = lseek(fd, curpos, SEEK_SET);
+ if (curpos == -1) {
+ Tcl_SetResult(interp, (void *) "Seek error", TCL_STATIC);
+ return TCL_ERROR;
+ }
</ins><span class="cx"> #else
</span><span class="cx"> #error no available locking implementation
</span><span class="cx"> #endif /* HAVE_LOCKF */
</span><span class="cx"> #endif /* HAVE_FLOCK */
</span><ins>+ /* disable the alarm timer */
+ alarm(0);
</ins><span class="cx">
</span><del>-        if (ret != 0)
-        {
-                switch(errnoval) {
-                        case EAGAIN:
-                                res = "EAGAIN";
-                                break;
-                        case EBADF:
-                                res = "EBADF";
-                                break;
-                        case EINVAL:
-                                res = "EINVAL";
-                                break;
-                        case EOPNOTSUPP:
-                                res = "EOPNOTSUPP";
-                                break;
-                        default:
-                                res = strerror(errno);
-                                break;
-                }
-                Tcl_SetResult(interp, (void *) res, TCL_STATIC);
-                return TCL_ERROR;
-        }
-        return TCL_OK;
</del><ins>+ if (ret == -1) {
+ if (oshared || oexclusive) {
+ if (!onoblock && alarmReceived && errnoval == EINTR) {
+ /* We were trying to lock, the lock was supposed to block,
+ * it failed with EINTR and we processed a SIGALRM. This
+ * probably means the call was interrupted by the timer.
+ * Call Tcl signal processing functions and try again. */
+ if (Tcl_AsyncReady()) {
+ sigret = Tcl_AsyncInvoke(interp, TCL_OK);
+ if (sigret != TCL_OK) {
+ break;
+ }
+ }
+ retry = 1;
+ continue;
+ }
+
+ if (onoblock && errnoval == EAGAIN) {
+ /* The lock wasn't supposed to block, and the lock wasn't
+ * successful because the lock is taken. On some systems
+ * EAGAIN == EWOULDBLOCK, but let's play it safe. */
+ errnoval = EWOULDBLOCK;
+ }
+ }
+ }
+ } while (retry);
+
+ /* Restore the previous handler for SIGALRM */
+ sigaction(SIGALRM, &sa_oldalarm, NULL);
+
+ if (sigret != TCL_OK) {
+ /* We received a signal that raised an error. The file hasn't been
+ * locked. */
+ return sigret;
+ }
+
+ if (ret != 0) {
+ switch (errnoval) {
+ case EAGAIN:
+ res = "EAGAIN";
+ break;
+ case EBADF:
+ res = "EBADF";
+ break;
+ case EINVAL:
+ res = "EINVAL";
+ break;
+ case EOPNOTSUPP:
+ res = "EOPNOTSUPP";
+ break;
+ default:
+ res = strerror(errno);
+ break;
+ }
+ Tcl_SetResult(interp, (void *) res, TCL_STATIC);
+ return TCL_ERROR;
+ }
+ return TCL_OK;
</ins><span class="cx"> }
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10fstraversec"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/fs-traverse.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/fs-traverse.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/fs-traverse.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -38,6 +38,10 @@
</span><span class="cx"> #include <config.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+/* required for u_short in fts.h on Linux; I think this can be considered a bug
+ * in the system header, though. */
+#define _BSD_SOURCE
+
</ins><span class="cx"> #include <sys/types.h>
</span><span class="cx"> #include <sys/stat.h>
</span><span class="cx"> #include <errno.h>
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10mktempc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/mktemp.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/mktemp.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/mktemp.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -34,6 +34,13 @@
</span><span class="cx"> #include <config.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+/* required for strdup(3)/mkdtemp(3) on Linux */
+#define _XOPEN_SOURCE 700L
+/* required for mktemp(3) if _XOPEN_SOURCE >= 600L on Linux */
+#define _BSD_SOURCE
+/* required for mkdtemp(3) on OS X */
+#define _DARWIN_C_SOURCE
+
</ins><span class="cx"> #include <errno.h>
</span><span class="cx"> #include <stdlib.h>
</span><span class="cx"> #include <string.h>
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10readlinec"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/readline.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/readline.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/readline.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -8,19 +8,22 @@
</span><span class="cx"> *
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#if HAVE_CONFIG_H
</del><ins>+#ifdef HAVE_CONFIG_H
</ins><span class="cx"> #include <config.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+/* required for strdup(3) on Linux and OS X */
+#define _XOPEN_SOURCE 600L
+
</ins><span class="cx"> #include <stdio.h>
</span><span class="cx"> #include <stdlib.h>
</span><span class="cx"> #include <string.h>
</span><span class="cx">
</span><del>-#if HAVE_READLINE_READLINE_H
</del><ins>+#ifdef HAVE_READLINE_READLINE_H
</ins><span class="cx"> #include <readline/readline.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if HAVE_READLINE_HISTORY_H
</del><ins>+#ifdef HAVE_READLINE_HISTORY_H
</ins><span class="cx"> #include <readline/history.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -29,7 +32,7 @@
</span><span class="cx"> #include "readline.h"
</span><span class="cx">
</span><span class="cx"> /* Globals */
</span><del>-#if HAVE_READLINE_READLINE_H
</del><ins>+#ifdef HAVE_READLINE_READLINE_H
</ins><span class="cx"> Tcl_Interp* completion_interp = NULL;
</span><span class="cx"> Tcl_Obj* attempted_completion_word = NULL;
</span><span class="cx"> Tcl_Obj* generator_word = NULL;
</span><span class="lines">@@ -55,7 +58,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx">
</span><del>-#if HAVE_LIBREADLINE
</del><ins>+#ifdef HAVE_LIBREADLINE
</ins><span class="cx"> char*
</span><span class="cx"> completion_generator(const char* text, int state)
</span><span class="cx"> {
</span><span class="lines">@@ -156,7 +159,7 @@
</span><span class="cx"> {
</span><span class="cx">         char* action;
</span><span class="cx">         Tcl_Obj *tcl_result;
</span><del>-#if HAVE_LIBREADLINE
</del><ins>+#ifdef HAVE_LIBREADLINE
</ins><span class="cx">         int argbase;
</span><span class="cx">         int argcnt;
</span><span class="cx"> #endif
</span><span class="lines">@@ -173,7 +176,7 @@
</span><span class="cx">         
</span><span class="cx">                 int initOk = 0;
</span><span class="cx">                 
</span><del>-#if HAVE_LIBREADLINE
</del><ins>+#ifdef HAVE_LIBREADLINE
</ins><span class="cx">                 /* Set the name of our program, so .inputrc can be conditionalized */
</span><span class="cx">                 if (objc == 3) {
</span><span class="cx">                         rl_readline_name = strdup(Tcl_GetString(objv[2]));
</span><span class="lines">@@ -194,7 +197,7 @@
</span><span class="cx">                 tcl_result = Tcl_NewIntObj(initOk);        
</span><span class="cx">                 Tcl_SetObjResult(interp, tcl_result);
</span><span class="cx">
</span><del>-#if HAVE_LIBREADLINE
</del><ins>+#ifdef HAVE_LIBREADLINE
</ins><span class="cx">         } else if (0 == strcmp("read", action)) {
</span><span class="cx">         
</span><span class="cx">                 char* s;
</span><span class="lines">@@ -272,7 +275,7 @@
</span><span class="cx"> int RLHistoryCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
</span><span class="cx"> {
</span><span class="cx">         char* action = NULL;
</span><del>-#if HAVE_LIBREADLINE
</del><ins>+#ifdef HAVE_LIBREADLINE
</ins><span class="cx">         char* s = NULL;
</span><span class="cx">         int i = 0;
</span><span class="cx">         Tcl_Obj *tcl_result;
</span><span class="lines">@@ -286,7 +289,7 @@
</span><span class="cx">
</span><span class="cx">         /* Case out on action */
</span><span class="cx">         if (0) {
</span><del>-#if HAVE_LIBREADLINE
</del><ins>+#ifdef HAVE_LIBREADLINE
</ins><span class="cx">         } else if (0 == strcmp("add", action)) {
</span><span class="cx">                 if (objc != 3) {
</span><span class="cx">                         Tcl_WrongNumArgs(interp, 1, objv, "add line");
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10realpathc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/realpath.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/realpath.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/realpath.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -34,6 +34,9 @@
</span><span class="cx"> #include <config.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+/* required for PATH_MAX and realpath(3) */
+#define _XOPEN_SOURCE 500
+
</ins><span class="cx"> #include <tcl.h>
</span><span class="cx">
</span><span class="cx"> #include <errno.h>
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10rmd160cmdc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/rmd160cmd.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/rmd160cmd.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/rmd160cmd.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -35,6 +35,9 @@
</span><span class="cx"> #include <config.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+/* required for u_char on Linux */
+#define _BSD_SOURCE
+
</ins><span class="cx"> #include <string.h>
</span><span class="cx"> #include <stdio.h>
</span><span class="cx"> #include <fcntl.h>
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10setmodec"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/setmode.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/setmode.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/setmode.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -36,10 +36,8 @@
</span><span class="cx">
</span><span class="cx"> #include <config.h>
</span><span class="cx">
</span><del>-extern int xxx_so_this_isnt_empty;
</del><ins>+#ifndef HAVE_SETMODE
</ins><span class="cx">
</span><del>-#if !HAVE_SETMODE
-
</del><span class="cx"> #if defined(LIBC_SCCS) && !defined(lint)
</span><span class="cx"> #if 0
</span><span class="cx"> static char sccsid[] = "@(#)setmode.c        8.2 (Berkeley) 3/25/94";
</span><span class="lines">@@ -48,6 +46,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif /* LIBC_SCCS and not lint */
</span><span class="cx">
</span><ins>+/* required for sigfillset(3)/sigemptyset(3) and S_ISVTX */
+#define _XOPEN_SOURCE 500
+/* required for u_int and u_long */
+#define _BSD_SOURCE
+
</ins><span class="cx"> #include <sys/types.h>
</span><span class="cx"> #include <sys/stat.h>
</span><span class="cx">
</span><span class="lines">@@ -192,7 +195,7 @@
</span><span class="cx">         BITCMD *set, *saveset, *endset;
</span><span class="cx">         sigset_t sigset, sigoset;
</span><span class="cx">         mode_t mask;
</span><del>-        int equalopdone, permXbits, setlen;
</del><ins>+        int equalopdone = 0, permXbits, setlen;
</ins><span class="cx">         long perml;
</span><span class="cx">
</span><span class="cx">         if (!*p)
</span><span class="lines">@@ -380,7 +383,7 @@
</span><span class="cx">         case '-':
</span><span class="cx">         case 'X':
</span><span class="cx">                 set->cmd = op;
</span><del>-                set->bits = (who ? who : mask) & oparg;
</del><ins>+                set->bits = (who ? ((mode_t) who) : ((mode_t) mask)) & oparg;
</ins><span class="cx">                 break;
</span><span class="cx">
</span><span class="cx">         case 'u':
</span><span class="lines">@@ -479,5 +482,8 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> }
</span><del>-#endif
</del><ins>+#else /* !defined(HAVE_SETMODE) */
</ins><span class="cx">
</span><ins>+extern int xxx_so_this_isnt_empty;
+
+#endif /* !defined(HAVE_SETMODE) */
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10strcasecmph"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/strcasecmp.h (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/strcasecmp.h        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/strcasecmp.h        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -30,13 +30,18 @@
</span><span class="cx"> * POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><ins>+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
</ins><span class="cx"> #include <string.h>
</span><ins>+#include <strings.h>
</ins><span class="cx">
</span><del>-#if !HAVE_STRCASECMP
</del><ins>+#ifndef HAVE_STRCASECMP
</ins><span class="cx">         #define strcasecmp xstrcasecmp
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if !HAVE_STRNCASECMP
</del><ins>+#ifndef HAVE_STRNCASECMP
</ins><span class="cx">         #define strncasecmp xstrncasecmp
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10strsedc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/strsed.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/strsed.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/strsed.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -131,6 +131,9 @@
</span><span class="cx">
</span><span class="cx"> #include "strsed.h"
</span><span class="cx">
</span><ins>+/* required for strdup(3) on Linux and OS X */
+#define _XOPEN_SOURCE 600L
+
</ins><span class="cx"> #include <ctype.h>
</span><span class="cx"> #include <string.h>
</span><span class="cx"> #include <stdlib.h>
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10systemc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/system.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/system.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/system.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -36,6 +36,11 @@
</span><span class="cx"> #include <config.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+/* required for fdopen(3)/seteuid(2), among others */
+#define _XOPEN_SOURCE 600
+/* required for fgetln(3) on OS X */
+#define _DARWIN_C_SOURCE
+
</ins><span class="cx"> #include <tcl.h>
</span><span class="cx">
</span><span class="cx"> #if HAVE_PATHS_H
</span><span class="lines">@@ -111,8 +116,8 @@
</span><span class="cx"> char *args[7];
</span><span class="cx"> char *cmdstring;
</span><span class="cx"> int sandbox = 0;
</span><del>- char *sandbox_exec_path;
- char *profilestr;
</del><ins>+ char *sandbox_exec_path = NULL;
+ char *profilestr = NULL;
</ins><span class="cx"> FILE *pdes;
</span><span class="cx"> int fdset[2], nullfd;
</span><span class="cx"> int fline, pos, ret;
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10tracelibc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/tracelib.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/tracelib.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/tracelib.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -56,6 +56,7 @@
</span><span class="cx"> #include <sys/un.h>
</span><span class="cx"> #include <unistd.h>
</span><span class="cx">
</span><ins>+#include <cregistry/portgroup.h>
</ins><span class="cx"> #include <cregistry/entry.h>
</span><span class="cx"> #include <registry2.0/registry.h>
</span><span class="cx">
</span><span class="lines">@@ -847,6 +848,14 @@
</span><span class="cx">
</span><span class="cx"> int TracelibCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
</span><span class="cx"> int result = TCL_OK;
</span><ins>+
+ /* There is no args for commands now. */
+ if (objc < 2) {
+ Tcl_WrongNumArgs(interp, 1, objv, "option");
+ return TCL_ERROR;
+ }
+
+#ifdef HAVE_TRACEMODE_SUPPORT
</ins><span class="cx"> static const char *options[] = {"setname", "opensocket", "run", "clean", "setsandbox", "closesocket", "setdeps", "enablefence", 0};
</span><span class="cx"> typedef enum {
</span><span class="cx"> kSetName,
</span><span class="lines">@@ -860,13 +869,6 @@
</span><span class="cx"> } EOptions;
</span><span class="cx"> EOptions current_option;
</span><span class="cx">
</span><del>- /* There is no args for commands now. */
- if (objc < 2) {
- Tcl_WrongNumArgs(interp, 1, objv, "option");
- return TCL_ERROR;
- }
-
-#ifdef HAVE_TRACEMODE_SUPPORT
</del><span class="cx"> result = Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, (int *)&current_option);
</span><span class="cx"> if (result == TCL_OK) {
</span><span class="cx"> switch (current_option) {
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10ttyc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/tty.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/tty.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/tty.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> #include <config.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#include <stdint.h>
</ins><span class="cx"> #include <sys/ioctl.h>
</span><span class="cx"> #include <unistd.h>
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10uidc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/uid.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/uid.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/uid.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -12,6 +12,9 @@
</span><span class="cx"> #include <config.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+/* required for seteuid(2)/setegid(2) */
+#define _BSD_SOURCE
+
</ins><span class="cx"> #include <sys/types.h>
</span><span class="cx"> #include <grp.h>
</span><span class="cx"> #include <pwd.h>
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpextlib10xinstallc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pextlib1.0/xinstall.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pextlib1.0/xinstall.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pextlib1.0/xinstall.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -41,6 +41,9 @@
</span><span class="cx"> #include <config.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+/* required for u_int and u_long */
+#define _BSD_SOURCE
+
</ins><span class="cx"> #if HAVE_SYS_CDEFS_H
</span><span class="cx"> #include <sys/cdefs.h>
</span><span class="cx"> #endif
</span><span class="lines">@@ -104,7 +107,7 @@
</span><span class="cx"> #define ALLPERMS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO)
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if !HAVE_SETMODE
</del><ins>+#ifndef HAVE_SETMODE
</ins><span class="cx"> #include "setmode.h"
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -148,7 +151,7 @@
</span><span class="cx">         u_long fset = 0;
</span><span class="cx">         int no_target, rval;
</span><span class="cx">         u_int iflags;
</span><del>-        char *flags, *curdir;
</del><ins>+        char *curdir;
</ins><span class="cx">         const char *group, *owner, *cp;
</span><span class="cx">         Tcl_Obj *to_name;
</span><span class="cx">         int dodir = 0;
</span><span class="lines">@@ -198,7 +201,7 @@
</span><span class="cx">                                 Tcl_WrongNumArgs(interp, 1, objv, "-f");
</span><span class="cx">                                 return TCL_ERROR;
</span><span class="cx">                         }
</span><del>-                        flags = Tcl_GetString(*(++objv));
</del><ins>+                        char *flags = Tcl_GetString(*(++objv));
</ins><span class="cx">                         if (strtofflags(&flags, &fset, NULL)) {
</span><span class="cx">                                 Tcl_SetResult(interp, "invalid flags for -f", TCL_STATIC);
</span><span class="cx">                                 return TCL_ERROR;
</span><span class="lines">@@ -428,7 +431,11 @@
</span><span class="cx"> *        build a path name and install the file
</span><span class="cx"> */
</span><span class="cx"> static int
</span><ins>+#if defined(UF_NODUMP)
</ins><span class="cx"> install(Tcl_Interp *interp, const char *from_name, const char *to_name, u_long fset, u_int flags)
</span><ins>+#else
+install(Tcl_Interp *interp, const char *from_name, const char *to_name, u_long fset UNUSED, u_int flags)
+#endif
</ins><span class="cx"> {
</span><span class="cx">         struct stat from_sb, temp_sb, to_sb;
</span><span class="cx">         struct timeval tvb[2];
</span><span class="lines">@@ -869,7 +876,11 @@
</span><span class="cx"> *        create a new file, overwriting an existing one if necessary
</span><span class="cx"> */
</span><span class="cx"> static int
</span><ins>+#if defined(UF_IMMUTABLE) && defined(SF_IMMUTABLE)
</ins><span class="cx"> create_newfile(Tcl_Interp *interp, const char *path, int target, struct stat *sbp)
</span><ins>+#else
+create_newfile(Tcl_Interp *interp, const char *path, int target, struct stat *sbp UNUSED)
+#endif
</ins><span class="cx"> {
</span><span class="cx">         char backup[MAXPATHLEN];
</span><span class="cx">         int saved_errno = 0;
</span><span class="lines">@@ -1105,7 +1116,11 @@
</span><span class="cx"> *        return true (1) if mmap should be tried, false (0) if not.
</span><span class="cx"> */
</span><span class="cx"> int
</span><ins>+#ifdef MFSNAMELEN
</ins><span class="cx"> trymmap(int fd)
</span><ins>+#else
+trymmap(int fd UNUSED)
+#endif
</ins><span class="cx"> {
</span><span class="cx"> /*
</span><span class="cx"> * The ifdef is for bootstrapping - f_fstypename doesn't exist in
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcpkg_mkindexshin"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/pkg_mkindex.sh.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/pkg_mkindex.sh.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/pkg_mkindex.sh.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -28,8 +28,9 @@
</span><span class="cx"> # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
</span><span class="cx"> # POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">
</span><del>-TCLSH=@TCLSH@
</del><ins>+TCLSH=@INTREE_TCLSH@
</ins><span class="cx"> GREP=@GREP@
</span><ins>+LIB_PATH=`dirname $TCLSH`
</ins><span class="cx">
</span><span class="cx"> if [ $# = 0 ]; then
</span><span class="cx"> echo "Usage: $0 <directory list>"
</span><span class="lines">@@ -37,7 +38,8 @@
</span><span class="cx"> fi
</span><span class="cx">
</span><span class="cx"> for dir in $@; do
</span><del>- echo "pkg_mkIndex -verbose -- $dir *.tcl *.dylib *.so" | $TCLSH 2>&1 \
</del><ins>+ echo "pkg_mkIndex -verbose -- $dir *.tcl *.dylib *.so" \
+                | env DYLD_LIBRARY_PATH=$LIB_PATH LD_LIBRARY_PATH=$LIB_PATH $TCLSH 2>&1 \
</ins><span class="cx"> | $GREP "^warning: " && exit 1
</span><span class="cx"> done
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport"></a>
<div class="propset"><h4>Property changes: branches/new-help-system/base/src/port</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="modfile"><h4>Modified: svn:ignore</h4></div>
<span class="cx">portall
</span><span class="cx">portindex
</span><span class="cx">portmirror
</span><span class="cx"> + Makefile
</span><span class="cx">port
</span><span class="cx">portall
</span><span class="cx">portindex
</span><span class="cx">portmirror
</span><a id="branchesnewhelpsystembasesrcportMakefile"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/src/port/Makefile (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port/Makefile        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port/Makefile        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,39 +0,0 @@
</span><del>-INSTALLDIR=        ${DESTDIR}${prefix}
-TOPSRCDIR=        ../..
-SCRIPTS=        portmirror portindex port
-
-edit = sed \
-        -e 's,@TCLSH\@,$(TCLSH),g' \
-        -e 's,@macports_tcl_dir\@,$(macports_tcl_dir),g'
-
-include ../../Mk/macports.autoconf.mk
-
-.PHONY: mkdirs
-
-all: ${SCRIPTS}
-
-portmirror: portmirror.tcl ../../Mk/macports.autoconf.mk
-        ${edit} portmirror.tcl > $@
-
-portindex: portindex.tcl ../../Mk/macports.autoconf.mk
-        ${edit} portindex.tcl > $@
-
-port: port.tcl ../../Mk/macports.autoconf.mk
-        ${edit} port.tcl > $@
-
-mkdirs:
-        < ../../doc/prefix.mtree $(MTREE) -U -d -e -p ${INSTALLDIR} > /dev/null
-        < ../../doc/base.mtree $(MTREE) -U -d -e -p ${INSTALLDIR} > /dev/null
-
-clean:
-        rm -f ${SCRIPTS}
-
-test:
-
-distclean: clean
-
-install: all mkdirs
-        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}/bin
-        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}/var/macports
-        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 555 port portindex portmirror ${INSTALLDIR}/bin/
-        cd ${INSTALLDIR}/bin && $(LN_S) -f port portf
</del></span></pre></div>
<a id="branchesnewhelpsystembasesrcportMakefileinfromrev122997trunkbasesrcportMakefilein"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/port/Makefile.in (from rev 122997, trunk/base/src/port/Makefile.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port/Makefile.in         (rev 0)
+++ branches/new-help-system/base/src/port/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include ../../Mk/macports.autoconf.mk
+
+INSTALLDIR=        ${DESTDIR}${prefix}
+TOPSRCDIR=        ../..
+SCRIPTS=        portmirror portindex port
+
+edit = sed -e 's,@TCLSH\@,$(TCLSH),g'
+
+.PHONY: mkdirs
+
+all: ${SCRIPTS}
+
+portmirror: portmirror.tcl ../../Mk/macports.autoconf.mk
+        ${edit} $(srcdir)/portmirror.tcl > $@
+
+portindex: portindex.tcl ../../Mk/macports.autoconf.mk
+        ${edit} $(srcdir)/portindex.tcl > $@
+
+port: port.tcl ../../Mk/macports.autoconf.mk
+        ${edit} $(srcdir)/port.tcl > $@
+
+mkdirs:
+        < ../../doc/prefix.mtree $(MTREE) -U -d -e -p ${INSTALLDIR} > /dev/null
+        < ../../doc/base.mtree $(MTREE) -U -d -e -p ${INSTALLDIR} > /dev/null
+
+clean:
+        rm -f ${SCRIPTS}
+
+test:
+
+distclean: clean
+        rm -f Makefile
+
+install: all mkdirs
+        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}/bin"
+        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}/var/macports"
+        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 555 port portindex portmirror "${INSTALLDIR}/bin/"
+        cd "${INSTALLDIR}/bin" && $(LN_S) -f port portf
+        cd "${INSTALLDIR}/bin" && $(LN_S) -f "${TCLSH}" port-tclsh
+ifneq (,$(findstring darwin,@build_os@))
+ifneq (8,@OS_MAJOR@)
+        chmod -h 555 "${INSTALLDIR}/bin/portf" "${INSTALLDIR}/bin/port-tclsh"
+endif
+endif
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcportporttcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port/port.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port/port.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port/port.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,8 +1,5 @@
</span><del>-#!/bin/sh
</del><ins>+#!@TCLSH@
</ins><span class="cx"> # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
</span><del>-# Run the Tcl interpreter \
-exec @TCLSH@ "$0" "$@"
-# port.tcl
</del><span class="cx"> # $Id$
</span><span class="cx"> #
</span><span class="cx"> # Copyright (c) 2004-2013 The MacPorts Project
</span><span class="lines">@@ -34,13 +31,21 @@
</span><span class="cx"> # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
</span><span class="cx"> # POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">
</span><del>-package require term::ansi::send
</del><ins>+# Create a namespace for some local variables
+namespace eval portclient::progress {
+ ##
+ # Indicate whether the term::ansi::send tcllib package is available and was
+ # imported. "yes", if the package is available, "no" otherwise.
+ variable hasTermAnsiSend no
+}
</ins><span class="cx">
</span><del>-source [file join "@macports_tcl_dir@" macports1.0 macports_fastload.tcl]
</del><ins>+if {![catch {package require term::ansi::send}]} {
+ set portclient::progress::hasTermAnsiSend yes
+}
+
</ins><span class="cx"> package require macports
</span><span class="cx"> package require Pextlib 1.0
</span><span class="cx">
</span><del>-
</del><span class="cx"> # Standard procedures
</span><span class="cx"> proc print_usage {{verbose 1}} {
</span><span class="cx"> global cmdname
</span><span class="lines">@@ -144,18 +149,9 @@
</span><span class="cx"> # @param name variable name
</span><span class="cx"> # @param value constant variable value
</span><span class="cx"> proc const {name args} {
</span><del>- interp alias {} $name {} _const [expr $args]
</del><ins>+ proc $name {} [list return [expr $args]]
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-##
-# Helper function to define constants
-#
-# @see const
-proc _const value {
- return $value
-}
-
-
</del><span class="cx"> # Format an integer representing bytes using given units
</span><span class="cx"> proc bytesize {siz {unit {}} {format {%.3f}}} {
</span><span class="cx"> if {$unit == {}} {
</span><span class="lines">@@ -238,8 +234,8 @@
</span><span class="cx">
</span><span class="cx"> # show the URL for the ticket reporting instructions
</span><span class="cx"> proc print_tickets_url {args} {
</span><del>- if {${macports::prefix} != "/usr/local" && ${macports::prefix} != "/usr"} {
- ui_notice "To report a bug, follow the instructions in the guide:\n http://guide.macports.org/#project.tickets"
</del><ins>+ if {${macports::prefix} ne "/usr/local" && ${macports::prefix} ne "/usr"} {
+ ui_error "Follow http://guide.macports.org/#project.tickets to report a bug."
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -454,7 +450,7 @@
</span><span class="cx">
</span><span class="cx"> # Execute the enclosed block once for every element in the portlist
</span><span class="cx"> # When the block is entered, the following variables will have been set:
</span><del>-#        portspec, porturl, portname, portversion, options, variations, requested_variations
</del><ins>+# portspec, porturl, portname, portversion, options, variations, requested_variations
</ins><span class="cx"> proc foreachport {portlist block} {
</span><span class="cx"> set savedir [pwd]
</span><span class="cx"> foreach portspec $portlist {
</span><span class="lines">@@ -2518,18 +2514,23 @@
</span><span class="cx"> proc action_select { action portlist opts } {
</span><span class="cx"> ui_debug "action_select \[$portlist] \[$opts]..."
</span><span class="cx">
</span><del>- # Error out if no group is specified.
- if {[llength $portlist] < 1} {
- ui_error "port select \[--list|--set|--show] <group> \[<version>]"
</del><ins>+ array set opts_array $opts
+ set commands [array names opts_array ports_select_*]
+ array unset opts_array
+
+ # Error out if no group is specified or command is not --summary.
+ if {[llength $portlist] < 1 && [string map {ports_select_ ""} [lindex $commands 0]] != "summary"} {
+ ui_error "Incorrect usage. Correct synopsis is one of:"
+ ui_msg " port select \[--list|--show\] <group>"
+ ui_msg " port select \[--set\] <group> <version>"
+ ui_msg " port select --summary"
</ins><span class="cx"> return 1
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> set group [lindex $portlist 0]
</span><del>-
- array set opts_array $opts
- set commands [array names opts_array ports_select_*]
- array unset opts_array
- # If no command (--set, --show, --list) is specified *but* more than one
- # argument is specified, default to the set command.
</del><ins>+
+ # If no command (--set, --show, --list, --summary) is specified *but*
+ # more than one argument is specified, default to the set command.
</ins><span class="cx"> if {[llength $commands] < 1 && [llength $portlist] > 1} {
</span><span class="cx"> set command set
</span><span class="cx"> ui_debug [concat "Although no command was specified, more than " \
</span><span class="lines">@@ -2615,6 +2616,57 @@
</span><span class="cx"> "'$selected_version'."]
</span><span class="cx"> return 0
</span><span class="cx"> }
</span><ins>+ summary {
+ if {[llength $portlist] > 0} {
+ ui_warn [concat "The 'summary' command does not expect any " \
+ "arguments. Extra arguments will be ignored."]
+ }
+
+ if {[catch {mportselect $command} portgroups]} {
+ ui_error "The 'summary' command failed: $portgroups"
+ return 1
+ }
+
+ set w1 4
+ set w2 8
+ set formatStr "%-*s %-*s %s"
+
+ set groups [list]
+ foreach pg $portgroups {
+ array set groupdesc {}
+ set groupdesc(name) [string trim $pg]
+
+ if {[catch {mportselect list $pg} versions]} {
+ ui_warn "The list of options for the select group $pg could not be obtained: $versions"
+ continue
+ }
+ # remove "none", sort the list, append none at the end
+ set noneidx [lsearch -exact $versions "none"]
+ set versions [lsort [lreplace $versions $noneidx $noneidx]]
+ lappend versions "none"
+ set groupdesc(versions) $versions
+
+ if {[catch {mportselect show $pg} selected_version]} {
+ ui_warn "The currently selected option for the select group $pg could not be obtained: $selected_version"
+ continue
+ }
+ set groupdesc(selected) $selected_version
+
+ set w1 [expr {max($w1, [string length $pg])}]
+ set w2 [expr {max($w2, [string length $selected_version])}]
+
+ lappend groups [array get groupdesc]
+ array unset groupdesc
+ }
+ puts [format $formatStr $w1 "Name" $w2 "Selected" "Options"]
+ puts [format $formatStr $w1 "====" $w2 "========" "======="]
+ foreach groupdesc $groups {
+ array set groupd $groupdesc
+ puts [format $formatStr $w1 $groupd(name) $w2 $groupd(selected) [join $groupd(versions) " "]]
+ array unset groupd
+ }
+ return 0
+ }
</ins><span class="cx"> default {
</span><span class="cx"> ui_error "An unknown command '$command' was specified."
</span><span class="cx"> return 1
</span><span class="lines">@@ -2707,9 +2759,12 @@
</span><span class="cx">
</span><span class="cx"> proc action_revupgrade { action portlist opts } {
</span><span class="cx"> set status [macports::revupgrade $opts]
</span><del>- if {$status != 0} {
- print_tickets_url
</del><ins>+ switch $status {
+ 1 {
+ print_tickets_url
+ }
</ins><span class="cx"> }
</span><ins>+
</ins><span class="cx"> return $status
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3635,7 +3690,7 @@
</span><span class="cx"> # Map from friendly name
</span><span class="cx"> set opt [map_friendly_field_names $opt]
</span><span class="cx">
</span><del>- if {[catch {eval set matches \[mportsearch \$searchstring $filter_case \$matchstyle $opt\]} result]} {
</del><ins>+ if {[catch {set matches [mportsearch $searchstring $filter_case $matchstyle $opt]} result]} {
</ins><span class="cx"> global errorInfo
</span><span class="cx"> ui_debug "$errorInfo"
</span><span class="cx"> break_softcontinue "search for name $portname failed: $result" 1 status
</span><span class="lines">@@ -3864,7 +3919,7 @@
</span><span class="cx"> if { $editor eq "" } { set editor "/usr/bin/vi" }
</span><span class="cx">
</span><span class="cx"> # Invoke the editor
</span><del>- if {[catch {eval exec >@stdout <@stdin 2>@stderr $editor {$portfile}} result]} {
</del><ins>+ if {[catch {exec -ignorestderr >@stdout <@stdin {*}$editor $portfile} result]} {
</ins><span class="cx"> global errorInfo
</span><span class="cx"> ui_debug "$errorInfo"
</span><span class="cx"> break_softcontinue "unable to invoke editor $editor: $result" 1 status
</span><span class="lines">@@ -4067,7 +4122,7 @@
</span><span class="cx"> set status [action_revupgrade $action $portlist $opts]
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> return $status
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4308,7 +4363,7 @@
</span><span class="cx"> clean {all archive dist work logs}
</span><span class="cx"> mirror {new}
</span><span class="cx"> lint {nitpick}
</span><del>- select {list set show}
</del><ins>+ select {list set show summary}
</ins><span class="cx"> log {{phase 1} {level 1}}
</span><span class="cx"> upgrade {force enforce-variants no-replace no-rev-upgrade}
</span><span class="cx"> rev-upgrade {id-loadcmd-check}
</span><span class="lines">@@ -4565,6 +4620,16 @@
</span><span class="cx"> # What kind of arguments does the command expect?
</span><span class="cx"> set expand [action_needs_portlist $action]
</span><span class="cx">
</span><ins>+ # (Re-)initialize private_options(ports_no_args) to no, because it might still be yes
+ # from the last command in batch mode. If we don't do this, port will fail to
+ # distinguish arguments that expand to empty lists from no arguments at all:
+ # > installed
+ # > list outdated
+ # will then behave like
+ # > list
+ # if outdated expands to the empty list. See #44091, which was filed about this.
+ set private_options(ports_no_args) "no"
+
</ins><span class="cx"> # Parse action arguments, setting a special flag if there were none
</span><span class="cx"> # We otherwise can't tell the difference between arguments that evaluate
</span><span class="cx"> # to the empty set, and the empty set itself.
</span><span class="lines">@@ -4572,7 +4637,7 @@
</span><span class="cx"> switch -- [lookahead] {
</span><span class="cx"> ; -
</span><span class="cx"> _EOF_ {
</span><del>- set private_options(ports_no_args) yes
</del><ins>+ set private_options(ports_no_args) "yes"
</ins><span class="cx"> }
</span><span class="cx"> default {
</span><span class="cx"> if {[ACTION_ARGS_NONE] == $expand} {
</span><span class="lines">@@ -4603,6 +4668,9 @@
</span><span class="cx"> registry::exclusive_unlock
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ # Print notifications of just-activated ports.
+ portclient::notifications::display
+
</ins><span class="cx"> # semaphore to exit
</span><span class="cx"> if {$action_status == -999} break
</span><span class="cx"> }
</span><span class="lines">@@ -4743,7 +4811,7 @@
</span><span class="cx">
</span><span class="cx"> # Calculate our prompt
</span><span class="cx"> if { $noisy } {
</span><del>- set shortdir [eval file join [lrange [file split $current_portdir] end-1 end]]
</del><ins>+ set shortdir [file join {*}[lrange [file split $current_portdir] end-1 end]]
</ins><span class="cx"> set prompt "\[$shortdir\] > "
</span><span class="cx"> } else {
</span><span class="cx"> set prompt ""
</span><span class="lines">@@ -4812,226 +4880,391 @@
</span><span class="cx"> return $exit_status
</span><span class="cx"> }
</span><span class="cx">
</span><del>-##
-# Progress callback for generic operations executed by macports 1.0.
-#
-# @param action
-# One of "start", "update", "intermission" or "finish", where start will
-# be called before any number of update calls, interrupted by any number
-# of intermission calls (called because other output is being produced),
-# followed by one call to finish.
-# @param args
-# A list of variadic args that differ for each action.
-# For "start": empty.
-# For "update": contains the arguments $cur and $total where $cur is the
-# current number of units processed and $total is the total number of
-# units to be processed.
-# For "intermission": empty.
-# For "finish": empty.
-proc port_progress_generic {action args} {
- global _port_progress_starttime _port_progress_display_bar
- switch -nocase -- $action {
- start {
- set _port_progress_starttime [clock milliseconds]
- set _port_progress_display_bar no
</del><ins>+namespace eval portclient::progress {
+ ##
+ # Maximum width of the progress bar or indicator when displaying it.
+ variable maxWidth 50
+
+ ##
+ # The start time of the last progress callback as returned by [clock time].
+ # Since only one progress indicator is active at a time, this variable is
+ # shared between the different variants of progress functions.
+ variable startTime
+
+ ##
+ # Delay in milliseconds after the start of the operation before deciding
+ # that showing a progress bar makes sense.
+ variable showTimeThreshold 500
+
+ ##
+ # Percentage value between 0 and 1 that must not have been reached yet when
+ # $showTimeThreshold has passed for a progress bar to be shown. If the
+ # operation has proceeded above e.g. 75% after 500ms we won't bother
+ # displaying a progress indicator anymore -- the operation will be finished
+ # in well below a second anyway.
+ variable showPercentageThreshold 0.75
+
+ ##
+ # Boolean indication whether the progress indicator should be shown or is
+ # still hidden because the current operation didn't need enough time for
+ # a progress indicator to make sense, yet.
+ variable show no
+
+ ##
+ # Initialize the progress bar display delay; call this from the start
+ # action of the progress functions.
+ proc initDelay {} {
+ variable show
+ variable startTime
+
+ set startTime [clock milliseconds]
+ set show no
+ }
+
+ ##
+ # Determine whether a progress bar should be shown for the current
+ # operation in its current state. You must have called initDelay for the
+ # current operation before calling this method.
+ #
+ # @param cur
+ # Current progress in abstract units.
+ # @param total
+ # Total number of abstract units to be processed, if known. Pass
+ # 0 if unknown.
+ # @return
+ # "yes", if the progress indicator should be shown, "no" otherwise.
+ proc showProgress {cur total} {
+ variable show
+ variable startTime
+ variable showTimeThreshold
+ variable showPercentageThreshold
+
+ if {$show eq "yes"} {
+ return yes
+ } else {
+ if {[expr {[clock milliseconds] - $startTime}] > $showTimeThreshold &&
+ ($total == 0 || [expr {double($cur) / double($total)}] < $showPercentageThreshold)} {
+ set show yes
+ }
+ return $show
</ins><span class="cx"> }
</span><del>- update {
- # the for loop is a simple hack because Tcl 8.4 doesn't have
- # lassign
- foreach {now total} $args {
- if {${_port_progress_display_bar} ne yes} {
- # check whether we should show a progress bar for this transfer
- if {[expr {[clock milliseconds] - ${_port_progress_starttime}}] > 500 && ($total == 0 || [expr {$now / $total}] < 0.5)} {
- # wait 500ms, then, if we don't know the total or we're
- # not past 50% yet, display a progress bar.
- set _port_progress_display_bar yes
</del><ins>+ }
+
+ ##
+ # Progress callback for generic operations executed by macports 1.0.
+ #
+ # @param action
+ # One of "start", "update", "intermission" or "finish", where start
+ # will be called before any number of update calls, interrupted by
+ # any number of intermission calls (called because other output is
+ # being produced), followed by one call to finish.
+ # @param args
+ # A list of variadic args that differ for each action. For "start",
+ # "intermission" and "finish", the args are empty and unused. For
+ # "update", args contains $cur and $total, where $cur is the current
+ # number of units processed and $total is the total number of units
+ # to be processed. If the total is not known, it is 0.
+ proc generic {action args} {
+ global env
+ variable maxWidth
+
+ switch -nocase -- $action {
+ start {
+ initDelay
+ }
+ update {
+ # the for loop is a simple hack because Tcl 8.4 doesn't have
+ # lassign
+ foreach {now total} $args {
+ if {[showProgress $now $total] eq "yes"} {
+ set barPrefix " "
+ set barPrefixLen [string length $barPrefix]
+ if {$total != 0} {
+ progressbar $now $total [expr {min($maxWidth, $env(COLUMNS) - $barPrefixLen)}] $barPrefix
+ } else {
+ unprogressbar [expr {min($maxWidth, $env(COLUMNS) - $barPrefixLen)}] $barPrefix
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><del>- if {${_port_progress_display_bar} eq yes} {
- set barprefix " "
- if {$total != 0} {
- progress_bar $now $total 20 $barprefix
- } else {
- unprogress_bar $now 20 $barprefix
- }
- }
</del><span class="cx"> }
</span><ins>+ intermission -
+ finish {
+ # erase to start of line
+ ::term::ansi::send::esol
+ # return cursor to start of line
+ puts -nonewline "\r"
+ flush stdout
+ }
</ins><span class="cx"> }
</span><del>- intermission -
- finish {
- # erase to start of line
- ::term::ansi::send::esol
- # return cursor to start of line
- puts -nonewline "\r"
- flush stdout
- }
</del><ins>+
+ return 0
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return 0
-}
</del><ins>+ ##
+ # Progress callback for downloads executed by macports 1.0.
+ #
+ # This is essentially a cURL progress callback.
+ #
+ # @param action
+ # One of "start", "update" or "finish", where start will be called
+ # before any number of update calls, followed by one call to finish.
+ # @param args
+ # A list of variadic args that differ for each action. For "start",
+ # contains a single argument "ul" or "dl" indicating whether this is
+ # an up- or download. For "update", contains the arguments
+ # ("ul"|"dl") $total $now $speed where ul/dl are as for start, and
+ # total, now and speed are doubles indicating the total transfer
+ # size, currently transferred amount and average speed per second in
+ # bytes. Unused for "finish".
+ proc download {action args} {
+ global env
+ variable maxWidth
</ins><span class="cx">
</span><ins>+ switch -nocase -- $action {
+ start {
+ initDelay
+ }
+ update {
+ # the for loop is a simple hack because Tcl 8.4 doesn't have
+ # lassign
+ foreach {type total now speed} $args {
+ if {[showProgress $now $total] eq "yes"} {
+ set barPrefix " "
+ set barPrefixLen [string length $barPrefix]
+ if {$total != 0} {
+ set barSuffix [format " speed: %-13s" "[bytesize $speed {} "%.1f"]/s"]
+ set barSuffixLen [string length $barSuffix]
</ins><span class="cx">
</span><del>-##
-# Progress callback for downloads executed by macports 1.0.
-#
-# This is essentially a cURL progress callback.
-#
-# @param action
-# One of "start", "update" or "finish", where start will be called
-# before any number of update calls, followed by one call to finish.
-# @param args
-# A list of variadic args that differ for each action.
-# For "start": contains a single argument "ul" or "dl" indicating
-# whether this is an up- or download.
-# For "update": contains the arguments ("ul"|"dl") total now speed where
-# ul/dl are as for start, and total, now and speed are doubles
-# indicating the total transfer size, currently transferred amount and
-# average speed per second in bytes.
-# For "finish": empty.
-proc port_progress_download {action args} {
- global _port_progress_starttime _port_progress_display_bar
- switch -nocase -- $action {
- start {
- set _port_progress_starttime [clock milliseconds]
- set _port_progress_display_bar no
- }
- update {
- # the for loop is a simple hack because Tcl 8.4 doesn't have
- # lassign
- foreach {type total now speed} $args {
- if {${_port_progress_display_bar} ne yes} {
- # check whether we should show a progress bar for this transfer
- if {[expr {[clock milliseconds] - ${_port_progress_starttime}}] > 500 && ($total == 0 || [expr {$now / $total}] < 0.5)} {
- # wait 500ms, then, if we don't know the total or we're
- # not past 50% yet, display a progress bar.
- set _port_progress_display_bar yes
</del><ins>+ set barLen [expr {min($maxWidth, $env(COLUMNS) - $barPrefixLen - $barSuffixLen)}]
+ progressbar $now $total $barLen $barPrefix $barSuffix
+ } else {
+ set barSuffix [format " %-10s speed: %-13s" [bytesize $now {} "%6.1f"] "[bytesize $speed {} "%.1f"]/s"]
+ set barSuffixLen [string length $barSuffix]
+
+ set barLen [expr {min($maxWidth, $env(COLUMNS) - $barPrefixLen - $barSuffixLen)}]
+ unprogressbar $barLen $barPrefix $barSuffix
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><del>- if {${_port_progress_display_bar} eq yes} {
- set barprefix " "
- if {$total != 0} {
- set barsuffix [format " speed: %-13s" "[bytesize $speed {} "%.1f"]/s"]
- progress_bar $now $total 20 $barprefix $barsuffix
- } else {
- set barsuffix [format " %-10s speed: %-13s" [bytesize $now {} "%6.1f"] "[bytesize $speed {} "%.1f"]/s"]
- unprogress_bar $now 20 $barprefix $barsuffix
- }
- }
</del><span class="cx"> }
</span><ins>+ finish {
+ # erase to start of line
+ ::term::ansi::send::esol
+ # return cursor to start of line
+ puts -nonewline "\r"
+ flush stdout
+ }
</ins><span class="cx"> }
</span><del>- finish {
- # erase to start of line
- ::term::ansi::send::esol
- # return cursor to start of line
- puts -nonewline "\r"
- flush stdout
- }
</del><ins>+
+ return 0
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return 0
-}
</del><ins>+ ##
+ # Draw a progress bar using unicode block drawing characters
+ #
+ # @param current
+ # The current progress value.
+ # @param total
+ # The progress value representing 100%.
+ # @param width
+ # The width in characters of the progress bar. This includes percentage
+ # output, which takes up 8 characters.
+ # @param prefix
+ # Prefix to be printed in front of the progress bar.
+ # @param suffix
+ # Suffix to be printed after the progress bar.
+ proc progressbar {current total width {prefix ""} {suffix ""}} {
+ # Subtract the width of the percentage output, also subtract the two
+ # characters [ and ] bounding the progress bar.
+ set percentageWidth 8
+ set barWidth [expr {entier($width) - $percentageWidth - 2}]
</ins><span class="cx">
</span><del>-##
-# Draw a progress bar using unicode block drawing characters
-#
-# @param current
-# the current progress value
-# @param total
-# the progress value representing 100%
-# @param halfwidth
-# the half width in characters of the progress bar
-# @param prefix
-# prefix to be printed in front of the progress bar
-# @param suffix
-# suffix to be printed after the progress bar
-proc progress_bar {current total halfwidth {prefix ""} {suffix ""}} {
- # we use 8 different states per character, so let's multiply the width by
- # 8 and map the percentage to this range
- set percent [expr {(double($current) * 100 / double($total))}]
- set progress [expr {int(round(($current * $halfwidth * 8) / $total))}]
- set fullfields [expr {int($progress / 8)}]
- set remainder [expr {$progress % 8}]
</del><ins>+ # Map the range (0, $total) to (0, 4 * $width) where $width is the maximum
+ # numebr of characters to be printed for the progress bar. Multiply the
+ # upper bound with 8 because we have 8 sub-states per character.
+ set barProgress [expr {entier(round(($current * $barWidth * 8) / $total))}]
</ins><span class="cx">
</span><del>- # clear the current line
- set progressbar ""
- for {set i 0} {$i < $fullfields} {incr i} {
- # U+2588 FULL BLOCK doesn't match the other blocks in some fonts :/
- # Use two half blocks instead
- # Since we use two chars here, make sure to remove a space for each of
- # those used!
- append progressbar "\u258c\u258c"
- }
</del><ins>+ set barInteger [expr {$barProgress / 8}]
+ #set barRemainder [expr {$barProgress % 8}]
</ins><span class="cx">
</span><del>- if {$remainder == 0 && $fullfields < $halfwidth} {
- append progressbar " "
- } elseif {$remainder == 1} {
- # U+258F LEFT ONE EIGHTH BLOCK
- append progressbar "\u258f"
- } elseif {$remainder == 2} {
- # U+258E LEFT ONE QUARTER BLOCK
- append progressbar "\u258e"
- } elseif {$remainder == 3} {
- # U+258D LEFT THREE EIGHTHS BLOCK
- append progressbar "\u258d"
- } elseif {$remainder == 4} {
- # U+258C LEFT HALF BLOCK
- append progressbar "\u258c"
- } elseif {$remainder == 5} {
- # U+258B LEFT FIVE EIGHTHS BLOCK
- append progressbar "\u258b"
- } elseif {$remainder == 6} {
- # U+258A LEFT THREE QUARTERS BLOCK
- append progressbar "\u258a"
- } elseif {$remainder == 7} {
- # U+2589 LEFT SEVEN EIGHTHS BLOCK
- append progressbar "\u2589"
</del><ins>+ # Finally, also provide a percentage value to print behind the progress bar
+ set percentage [expr {double($current) * 100 / double($total)}]
+
+ # clear the current line, enable reverse video
+ set progressbar "\033\[7m"
+ for {set i 0} {$i < $barInteger} {incr i} {
+ # U+2588 FULL BLOCK doesn't match the other blocks in some fonts :/
+ # Two half blocks work better in some fonts, but not in others (because
+ # they leave ugly spaces). So, one or the other choice isn't better or
+ # worse and even just using full blocks looks ugly in a few fonts.
+
+ # Use pure ASCII until somebody fixes most of the default terminal fonts :/
+ append progressbar " "
+ }
+ # back to normal output
+ append progressbar "\033\[0m"
+
+ #switch $barRemainder {
+ # 0 {
+ # if {$barInteger < $barWidth} {
+ # append progressbar " "
+ # }
+ # }
+ # 1 {
+ # # U+258F LEFT ONE EIGHTH BLOCK
+ # append progressbar "\u258f"
+ # }
+ # 2 {
+ # # U+258E LEFT ONE QUARTER BLOCK
+ # append progressbar "\u258e"
+ # }
+ # 3 {
+ # # U+258D LEFT THREE EIGHTHS BLOCK
+ # append progressbar "\u258d"
+ # }
+ # 3 {
+ # # U+258D LEFT THREE EIGHTHS BLOCK
+ # append progressbar "\u258d"
+ # }
+ # 4 {
+ # # U+258C LEFT HALF BLOCK
+ # append progressbar "\u258c"
+ # }
+ # 5 {
+ # # U+258B LEFT FIVE EIGHTHS BLOCK
+ # append progressbar "\u258b"
+ # }
+ # 6 {
+ # # U+258A LEFT THREE QUARTERS BLOCK
+ # append progressbar "\u258a"
+ # }
+ # 7 {
+ # # U+2589 LEFT SEVEN EIGHTHS BLOCK
+ # append progressbar "\u2589"
+ # }
+ #}
+
+ # Fill the progress bar with spaces
+ for {set i $barInteger} {$i < $barWidth} {incr i} {
+ append progressbar " "
+ }
+
+ # Format the percentage using the space that has been reserved for it
+ set percentagesuffix [format " %[expr {$percentageWidth - 3}].1f %%" $percentage]
+
+ puts -nonewline "\r${prefix}\[${progressbar}\]${percentagesuffix}${suffix}"
+ flush stdout
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- for {set i [expr {[string length $progressbar]}]} {$i < [expr {2 * $halfwidth}]} {incr i} {
- append progressbar " "
</del><ins>+
+ ##
+ # Internal state of the progress indicator; unless you're hacking the
+ # unprogressbar code you should never touch this.
+ variable unprogressState 0
+
+ ##
+ # Draw a progress indicator
+ #
+ # @param width
+ # The width in characters of the progress indicator.
+ # @param prefix
+ # Prefix to be printed in front of the progress indicator.
+ # @param suffix
+ # Suffix to be printed after the progress indicator.
+ proc unprogressbar {width {prefix ""} {suffix ""}} {
+ variable unprogressState
+
+ # Subtract the two characters [ and ] bounding the progress indicator
+ # from the width.
+ set barWidth [expr {int($width) - 2}]
+
+ # Number of states of the progress bar, or rather: the number of
+ # characters before the sequence repeats.
+ set numStates 4
+
+ set unprogressState [expr {($unprogressState + 1) % $numStates}]
+
+ set progressbar ""
+ for {set i 0} {$i < $barWidth} {incr i} {
+ if {[expr {$i % $numStates}] == $unprogressState} {
+ # U+2022 BULLET
+ append progressbar "\u2022"
+ } else {
+ append progressbar " "
+ }
+ }
+
+ puts -nonewline "\r${prefix}\[${progressbar}\]${suffix}"
+ flush stdout
</ins><span class="cx"> }
</span><del>- set percentagesuffix [format " %5.1f %%" $percent]
-
- puts -nonewline "\r${prefix}\[${progressbar}\]${percentagesuffix}${suffix}"
- flush stdout
</del><span class="cx"> }
</span><span class="cx">
</span><del>-##
-# Draw a progress indicator
-#
-# @param current
-# the number of bytes currently downloaded
-# @param halfwidth
-# the half width in characters of the progress indicator
-# @param prefix
-# prefix to be printed in front of the progress indicator
-# @param suffix
-# suffix to be printed after the progress indicator
-proc unprogress_bar {current halfwidth {prefix ""} {suffix ""}} {
- global _port_progress_unprogressbar_state
</del><ins>+namespace eval portclient::notifications {
+ ##
+ # Ports whose notifications to display; these were either installed
+ # or requested to be installed.
+ variable notificationsToPrint
+ array set notificationsToPrint {}
</ins><span class="cx">
</span><del>- set numstates 4
</del><ins>+ ##
+ # Add a port to the list for printing notifications.
+ #
+ # @param name
+ # The name of the port.
+ # @param note
+ # A list of notes to be stored for the given port.
+ proc append {name notes} {
+ variable notificationsToPrint
</ins><span class="cx">
</span><del>- if {![info exists _port_progress_unprogressbar_state]} {
- set _port_progress_unprogressbar_state 0
- } else {
- set _port_progress_unprogressbar_state [expr {(${_port_progress_unprogressbar_state} + 1) % $numstates}]
</del><ins>+ set notificationsToPrint($name) $notes
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- # clear the current line
- set progressbar ""
</del><ins>+ ##
+ # Print port notifications.
+ #
+ proc display {} {
+ global env
+ variable notificationsToPrint
</ins><span class="cx">
</span><del>- for {set i 0} {$i < [expr {2 * $halfwidth}]} {incr i} {
- if {[expr $i % $numstates] == ${_port_progress_unprogressbar_state}} {
- # U+2022 BULLET
- append progressbar "\u2022"
- } else {
- append progressbar " "
</del><ins>+ # Display notes at the end of the activation phase.
+ if {[array size notificationsToPrint] > 0} {
+ ui_notice "---> Some of the ports you installed have notes:"
+ foreach {name notes} [array get notificationsToPrint] {
+ ui_notice " $name has the following notes:"
+
+ # If env(COLUMNS) exists, limit each line's width to this width.
+ if {[info exists env(COLUMNS)]} {
+ set maxlen $env(COLUMNS)
+
+ foreach note $notes {
+ foreach line [split $note "\n"] {
+ set joiner ""
+ set lines ""
+ set newline " "
+
+ foreach word [split $line " "] {
+ if {[string length $newline] + [string length $word] >= $maxlen} {
+ lappend lines $newline
+ set newline " "
+ set joiner ""
+ }
+ ::append newline $joiner $word
+ set joiner " "
+ }
+ if {$newline ne {}} {
+ lappend lines $newline
+ }
+ ui_notice [join $lines "\n"]
+ }
+ }
+ } else {
+ foreach note $notes {
+ ui_notice $note
+ }
+ }
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><del>-
- puts -nonewline "\r${prefix}\[${progressbar}\]${suffix}"
- flush stdout
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -5082,11 +5315,15 @@
</span><span class="cx"> exit 1
</span><span class="cx"> }
</span><span class="cx">
</span><del>-if {[isatty stdout] && (![info exists ui_options(ports_quiet)] || $ui_options(ports_quiet) ne "yes")} {
- set ui_options(progress_download) port_progress_download
- set ui_options(progress_generic) port_progress_generic
</del><ins>+if {[isatty stdout]
+ && $portclient::progress::hasTermAnsiSend eq "yes"
+ && (![info exists ui_options(ports_quiet)] || $ui_options(ports_quiet) ne "yes")} {
+ set ui_options(progress_download) portclient::progress::download
+ set ui_options(progress_generic) portclient::progress::generic
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+set ui_options(notifications_append) portclient::notifications::append
+
</ins><span class="cx"> # Get arguments remaining after option processing
</span><span class="cx"> set remaining_args [lrange $cmd_argv $cmd_argn end]
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcportportindextcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port/portindex.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port/portindex.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port/portindex.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,13 +1,9 @@
</span><del>-#!/bin/sh
</del><ins>+#!@TCLSH@
</ins><span class="cx"> # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
</span><del>-# Run the Tcl interpreter \
-exec @TCLSH@ "$0" "$@"
-
</del><span class="cx"> # Traverse through all ports, creating an index and archiving port directories
</span><span class="cx"> # if requested
</span><span class="cx"> # $Id$
</span><span class="cx">
</span><del>-source [file join "@macports_tcl_dir@" macports1.0 macports_fastload.tcl]
</del><span class="cx"> package require macports
</span><span class="cx"> package require Pextlib
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcportportmirrortcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port/portmirror.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port/portmirror.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port/portmirror.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,8 +1,5 @@
</span><del>-#!/bin/sh
</del><ins>+#!@TCLSH@
</ins><span class="cx"> # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
</span><del>-# Run the Tcl interpreter \
-exec @TCLSH@ "$0" "$@"
-# portmirror.tcl
</del><span class="cx"> # $Id$
</span><span class="cx"> #
</span><span class="cx"> # Copyright (c) 2002-2007 The MacPorts Project.
</span><span class="lines">@@ -11,7 +8,6 @@
</span><span class="cx"> # Updates the distfiles to current distfiles by deleting old stuff.
</span><span class="cx"> # Uses the database.
</span><span class="cx">
</span><del>-source [file join "@macports_tcl_dir@" macports1.0 macports_fastload.tcl]
</del><span class="cx"> package require macports
</span><span class="cx"> package require Pextlib
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10"></a>
<div class="propset"><h4>Property changes: branches/new-help-system/base/src/port1.0</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="modfile"><h4>Modified: svn:ignore</h4></div>
<span class="cx">port_test_autoconf.tcl
</span><span class="cx">pkgIndex.tcl
</span><span class="cx"> + Makefile
</span><span class="cx">pkgIndex.tcl
</span><span class="cx">port_autoconf.tcl
</span><span class="cx">port_test_autoconf.tcl
</span><a id="branchesnewhelpsystembasesrcport10Makefile"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/src/port1.0/Makefile (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/Makefile        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/Makefile        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,36 +0,0 @@
</span><del>-INSTALLDIR=        ${DESTDIR}${datadir}/macports/Tcl/port1.0
-
-SRCS=        port.tcl portchecksum.tcl portconfigure.tcl portextract.tcl         \
-        portfetch.tcl portmain.tcl portbuild.tcl portpatch.tcl portutil.tcl \
-        portinstall.tcl portuninstall.tcl portdepends.tcl portdestroot.tcl \
-        portlint.tcl portclean.tcl porttest.tcl portactivate.tcl \
-        portdeactivate.tcl port_autoconf.tcl portstartupitem.tcl \
-        porttrace.tcl portlivecheck.tcl portdistcheck.tcl portmirror.tcl \
-        portload.tcl portunload.tcl portdistfiles.tcl fetch_common.tcl \
-        portsandbox.tcl
-
-include ../../Mk/macports.subdir.mk
-include ../../Mk/macports.autoconf.mk
-
-.PHONY: test
-
-all:: pkgIndex.tcl
-
-pkgIndex.tcl: $(SRCS)
-        $(SILENT) ../pkg_mkindex.sh . || ( rm -rf $@ && exit 1 )
-
-clean::
-        rm -f pkgIndex.tcl
-
-distclean:: clean
-        rm -f port_autoconf.tcl port_test_autoconf.tcl
-
-install:: all
-        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
-        $(SILENT)set -x; for file in ${SRCS}; do \
-                $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}; \
-        done
-        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
-
-test::
-        $(TCLSH) ./tests/test.tcl -nocolor
</del></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10Makefileinfromrev122997trunkbasesrcport10Makefilein"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/port1.0/Makefile.in (from rev 122997, trunk/base/src/port1.0/Makefile.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/Makefile.in         (rev 0)
+++ branches/new-help-system/base/src/port1.0/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include ../../Mk/macports.autoconf.mk
+
+INSTALLDIR=        ${DESTDIR}${TCL_PACKAGE_PATH}/port1.0
+
+SRCS_AUTOCONF= port_autoconf.tcl
+SRCS=        port.tcl portchecksum.tcl portconfigure.tcl portextract.tcl         \
+        portfetch.tcl portmain.tcl portbuild.tcl portpatch.tcl portutil.tcl \
+        portinstall.tcl portuninstall.tcl portdepends.tcl portdestroot.tcl \
+        portlint.tcl portclean.tcl porttest.tcl portactivate.tcl \
+        portdeactivate.tcl portstartupitem.tcl porttrace.tcl portlivecheck.tcl \
+        portdistcheck.tcl portmirror.tcl portload.tcl portunload.tcl \
+        portdistfiles.tcl fetch_common.tcl portsandbox.tcl
+
+include $(srcdir)/../../Mk/macports.subdir.mk
+
+.PHONY: test
+
+all:: pkgIndex.tcl
+
+pkgIndex.tcl: $(SRCS) $(SRCS_AUTOCONF)
+        $(SILENT) ../pkg_mkindex.sh . || ( rm -rf $@ && exit 1 )
+
+clean::
+        rm -f pkgIndex.tcl
+
+distclean:: clean
+        rm -f port_autoconf.tcl port_test_autoconf.tcl
+        rm -f Makefile
+
+install:: all
+        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
+        $(SILENT)set -x; for file in ${SRCS}; do \
+                $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$(srcdir)/$$file" "${INSTALLDIR}"; \
+        done
+        $(SILENT)set -x; for file in ${SRCS_AUTOCONF}; do \
+                $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$$file" "${INSTALLDIR}"; \
+        done
+        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${INSTALLDIR}"
+
+test::
+        $(TCLSH) $(srcdir)/tests/test.tcl -nocolor
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10fetch_commontcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/fetch_common.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/fetch_common.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/fetch_common.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -135,13 +135,13 @@
</span><span class="cx"> set thesubdir ""
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if {"$tag" != ""} {
- eval append element "${thesubdir}:${tag}"
</del><ins>+ if {$tag ne ""} {
+ append element "${thesubdir}:${tag}"
</ins><span class="cx"> } else {
</span><del>- eval append element "${thesubdir}"
</del><ins>+ append element "${thesubdir}"
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- eval lappend ret $element
</del><ins>+ lappend ret $element
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return $ret
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10port_autoconftclin"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/port_autoconf.tcl.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/port_autoconf.tcl.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/port_autoconf.tcl.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -80,4 +80,5 @@
</span><span class="cx">         variable install_user "@DSTUSR@"
</span><span class="cx">         variable install_group "@DSTGRP@"
</span><span class="cx">         variable prefix "@prefix_expanded@"
</span><ins>+        variable tcl_package_path "@TCL_PACKAGE_PATH@"
</ins><span class="cx"> }
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10port_test_autoconftclin"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/port_test_autoconf.tcl.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/port_test_autoconf.tcl.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/port_test_autoconf.tcl.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -32,6 +32,5 @@
</span><span class="cx"> #
</span><span class="cx">
</span><span class="cx"> namespace eval macports::autoconf {
</span><del>- variable macports_tcl_dir "@macports_tcl_dir@"
</del><span class="cx"> variable prefix "@prefix@"
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10portactivatetcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/portactivate.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/portactivate.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/portactivate.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -60,42 +60,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> proc portactivate::activate_main {args} {
</span><del>- global env subport version revision portvariants user_options PortInfo startupitem.autostart UI_PREFIX
</del><ins>+ global subport version revision portvariants user_options PortInfo
</ins><span class="cx">
</span><span class="cx"> registry_activate $subport $version $revision $portvariants [array get user_options]
</span><del>-
- # Display notes at the end of the activation phase.
- if {[info exists PortInfo(notes)] && $PortInfo(notes) ne {}} {
- ui_notice ""
- foreach note $PortInfo(notes) {
- # If env(COLUMNS) exists, limit each line's width to this width.
- if {[info exists env(COLUMNS)]} {
- set maxlen $env(COLUMNS)
-
- foreach line [split $note "\n"] {
- set joiner ""
- set lines ""
- set newline ""
-
- foreach word [split $line " "] {
- if {[string length $newline] + [string length $word] >= $maxlen} {
- lappend lines $newline
- set newline ""
- set joiner ""
- }
- append newline $joiner $word
- set joiner " "
- }
- if {$newline ne {}} {
- lappend lines $newline
- }
- ui_notice [join $lines "\n"]
- }
- } else {
- ui_notice $note
- }
- }
- ui_notice ""
</del><ins>+ if {[info exists PortInfo(notes)] && [llength $PortInfo(notes)] > 0} {
+ ui_notifications_append $subport $PortInfo(notes)
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return 0
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10portconfiguretcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/portconfigure.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/portconfigure.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/portconfigure.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx"> ([info exists option_defaults(${type}.cmd)] && [set ${type}.cmd] eq $option_defaults(${type}.cmd)) ||
</span><span class="cx"> (![info exists option_defaults(${type}.cmd)] && [set ${type}.cmd] eq ${type})
</span><span class="cx"> )} {
</span><del>- eval [linsert $dep 0 depends_build-append]
</del><ins>+ depends_build-append {*}$dep
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -99,14 +99,14 @@
</span><span class="cx"> autoreconf.cmd -
</span><span class="cx"> automake.cmd -
</span><span class="cx"> autoconf.cmd {
</span><del>- eval [linsert $configure_map(autoconf) 0 depends_build-delete]
</del><ins>+ depends_build-delete {*}$configure_map(autoconf)
</ins><span class="cx"> }
</span><span class="cx"> xmkmf.cmd {
</span><del>- eval [linsert $configure_map(xmkmf) 0 depends_build-delete]
</del><ins>+ depends_build-delete {*}$configure_map(xmkmf)
</ins><span class="cx"> }
</span><span class="cx"> use_xmkmf {
</span><span class="cx"> if {[tbool args]} {
</span><del>- eval [linsert $configure_map(xmkmf) 0 depends_build-append]
</del><ins>+ depends_build-append {*}$configure_map(xmkmf)
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> default {
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx"> default configure.cxxflags {${configure.optflags}}
</span><span class="cx"> default configure.objcflags {${configure.optflags}}
</span><span class="cx"> default configure.objcxxflags {${configure.optflags}}
</span><del>-default configure.cppflags {-isystem${prefix}/include}
</del><ins>+default configure.cppflags {-I${prefix}/include}
</ins><span class="cx"> default configure.ldflags {"-L${prefix}/lib -Wl,-headerpad_max_install_names"}
</span><span class="cx"> default configure.libs {}
</span><span class="cx"> default configure.fflags {${configure.optflags}}
</span><span class="lines">@@ -221,7 +221,7 @@
</span><span class="cx"> {^gcc$} {System GCC}
</span><span class="cx"> {^gcc-(3\.3|4\.[02])$} {Xcode GCC %s}
</span><span class="cx"> {^llvm-gcc-4\.2$} {Xcode LLVM-GCC 4.2}
</span><del>- {^macports-clang$} {MacPorts Clang (port select}
</del><ins>+ {^macports-clang$} {MacPorts Clang (port select)}
</ins><span class="cx"> {^macports-clang-(\d+\.\d+)$} {MacPorts Clang %s}
</span><span class="cx"> {^macports-dragonegg-(\d+\.\d+)$} {MacPorts DragonEgg %s}
</span><span class="cx"> {^macports-dragonegg-(\d+\.\d+)-gcc-(\d+\.\d+)$}
</span><span class="lines">@@ -232,7 +232,7 @@
</span><span class="cx"> }
</span><span class="cx"> foreach {re fmt} $valid_compilers {
</span><span class="cx"> if {[set matches [regexp -inline $re $compiler]] ne ""} {
</span><del>- set compiler_name [eval [linsert [lrange $matches 1 end] 0 format $fmt]]
</del><ins>+ set compiler_name [format $fmt {*}[lrange $matches 1 end]]
</ins><span class="cx"> break
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -387,7 +387,7 @@
</span><span class="cx"> }
</span><span class="cx"> foreach {re fmt} $valid_compiler_ports {
</span><span class="cx"> if {[set matches [regexp -inline $re $compiler]] ne ""} {
</span><del>- return [eval [linsert [lrange $matches 1 end] 0 format $fmt]]
</del><ins>+ return [format $fmt {*}[lrange $matches 1 end]]
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> return {}
</span><span class="lines">@@ -430,20 +430,22 @@
</span><span class="cx"> return $default_compilers
</span><span class="cx"> } elseif {$xcodeversion eq "none" || $xcodeversion eq ""} {
</span><span class="cx"> return {cc}
</span><ins>+ } elseif {[vercmp $xcodeversion 6.0] >= 0 && [vercmp $macosx_deployment_target 10.10] >= 0} {
+ return {clang macports-clang-3.4 macports-clang-3.3}
</ins><span class="cx"> } elseif {[vercmp $xcodeversion 5.0] >= 0} {
</span><del>- return {clang macports-llvm-gcc-4.2 apple-gcc-4.2 macports-clang-3.3}
- } elseif {[vercmp $xcodeversion 4.2] >= 0} {
- return {clang llvm-gcc-4.2 apple-gcc-4.2 macports-clang-3.3}
</del><ins>+ return {clang macports-clang-3.4 macports-clang-3.3 macports-llvm-gcc-4.2 apple-gcc-4.2}
+ } elseif {[vercmp $xcodeversion 4.3] >= 0} {
+ return {clang llvm-gcc-4.2 macports-clang-3.4 macports-clang-3.3 apple-gcc-4.2}
</ins><span class="cx"> } elseif {[vercmp $xcodeversion 4.0] >= 0} {
</span><del>- return {llvm-gcc-4.2 clang gcc-4.2 macports-clang-3.3 apple-gcc-4.2}
</del><ins>+ return {llvm-gcc-4.2 clang gcc-4.2 macports-clang-3.4 macports-clang-3.3 apple-gcc-4.2}
</ins><span class="cx"> } elseif {[vercmp $xcodeversion 3.2] >= 0} {
</span><span class="cx"> if {[string match *10.4u* ${configure.sdkroot}]} {
</span><span class="cx"> return {gcc-4.0}
</span><span class="cx"> } else {
</span><del>- return {gcc-4.2 clang llvm-gcc-4.2 macports-clang-3.3 macports-llvm-gcc-4.2 apple-gcc-4.2 gcc-4.0}
</del><ins>+ return {gcc-4.2 clang llvm-gcc-4.2 macports-clang-3.4 macports-clang-3.3 macports-llvm-gcc-4.2 apple-gcc-4.2 gcc-4.0}
</ins><span class="cx"> }
</span><span class="cx"> } elseif {[vercmp $xcodeversion 3.0] >= 0} {
</span><del>- return {gcc-4.2 apple-gcc-4.2 gcc-4.0 macports-clang-3.3}
</del><ins>+ return {gcc-4.2 apple-gcc-4.2 gcc-4.0 macports-clang-3.4 macports-clang-3.3}
</ins><span class="cx"> } else {
</span><span class="cx"> return {apple-gcc-4.2 gcc-4.0 gcc-3.3 macports-clang-3.3}
</span><span class="cx"> }
</span><span class="lines">@@ -702,7 +704,7 @@
</span><span class="cx"> PERL PYTHON RUBY INSTALL AWK BISON PKG_CONFIG PKG_CONFIG_PATH \
</span><span class="cx"> } {
</span><span class="cx"> set value [option configure.[string tolower $env_var]]
</span><del>- eval [linsert $value 0 append_to_environment_value configure $env_var]
</del><ins>+ append_to_environment_value configure $env_var {*}$value
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # https://trac.macports.org/ticket/34221
</span><span class="lines">@@ -719,16 +721,16 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # add extra flags that are conditional on whether we're building universal
</span><del>- eval [linsert [get_canonical_archflags cc] 0 append_to_environment_value configure CFLAGS]
</del><ins>+ append_to_environment_value configure CFLAGS {*}[get_canonical_archflags cc]
</ins><span class="cx"> foreach tool {cxx objc objcxx cpp f77 f90 fc ld} {
</span><span class="cx"> if {[catch {get_canonical_archflags $tool} flags]} {
</span><span class="cx"> continue
</span><span class="cx"> }
</span><span class="cx"> set env_var [string toupper $tool]FLAGS
</span><del>- eval [linsert $flags 0 append_to_environment_value configure $env_var]
</del><ins>+ append_to_environment_value configure $env_var {*}$flags
</ins><span class="cx"> }
</span><span class="cx"> if {[variant_exists universal] && [variant_isset universal]} {
</span><del>- eval [linsert ${configure.universal_args} 0 configure.pre_args-append]
</del><ins>+ configure.pre_args-append {*}${configure.universal_args}
</ins><span class="cx"> } else {
</span><span class="cx"> foreach env_var {CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS FFLAGS F90FLAGS FCFLAGS LDFLAGS} {
</span><span class="cx"> if {${configure.march} ne ""} {
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10portdestroottcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/portdestroot.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/portdestroot.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/portdestroot.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -171,25 +171,35 @@
</span><span class="cx">
</span><span class="cx"> # Prevent overlinking due to glibtool .la files: https://trac.macports.org/ticket/38010
</span><span class="cx"> ui_debug "Fixing glibtool .la files in destroot for ${subport}"
</span><ins>+ set la_file_list [list]
</ins><span class="cx"> fs-traverse -depth fullpath ${destroot} {
</span><del>- if {[file extension $fullpath] eq ".la" && [file type $fullpath] eq "file"} {
</del><ins>+ if {[file extension $fullpath] eq ".la" && ([file type $fullpath] eq "file" || [file type $fullpath] eq "link")} {
+ if {[file type $fullpath] eq "link" && [file pathtype [file link $fullpath]] ne "relative"} {
+ # prepend $destroot to target of absolute symlinks
+ set checkpath ${destroot}[file link $fullpath]
+ } else {
+ set checkpath $fullpath
+ }
</ins><span class="cx"> # Make sure it is from glibtool ... "a libtool library file" will appear in the first line
</span><del>- if {![catch {set fp [open $fullpath]}]} {
</del><ins>+ if {![catch {set fp [open $checkpath]}]} {
</ins><span class="cx"> if {[gets $fp line] > 0 && [string first "a libtool library file" $line] != -1} {
</span><del>- if {${destroot.delete_la_files}} {
- ui_debug "Removing [file tail $fullpath]"
- file delete -force ${fullpath}
- } else {
- ui_debug "Clearing dependency_libs in [file tail $fullpath]"
- reinplace "/dependency_libs/ s/'.*'/''/" ${fullpath}
- }
</del><ins>+ lappend la_file_list $fullpath
</ins><span class="cx"> }
</span><span class="cx"> } else {
</span><del>- ui_debug "Failed to open $fullpath"
</del><ins>+ ui_debug "Failed to open $checkpath"
</ins><span class="cx"> }
</span><span class="cx"> catch {close $fp}
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+ foreach fullpath $la_file_list {
+ if {${destroot.delete_la_files}} {
+ ui_debug "Removing [file tail $fullpath]"
+ file delete -force ${fullpath}
+ } elseif {[file type $fullpath] eq "file"} {
+ ui_debug "Clearing dependency_libs in [file tail $fullpath]"
+ reinplace "/dependency_libs/ s/'.*'/''/" ${fullpath}
+ }
+ }
</ins><span class="cx">
</span><span class="cx"> # Prune empty directories in ${destroot}
</span><span class="cx"> foreach path ${destroot.keepdirs} {
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10portdistchecktcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/portdistcheck.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/portdistcheck.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/portdistcheck.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -85,13 +85,20 @@
</span><span class="cx"> foreach site $urlmap($url_var) {
</span><span class="cx"> ui_debug [format [msgcat::mc "Checking %s from %s"] $distfile $site]
</span><span class="cx"> set file_url [portfetch::assemble_url $site $distfile]
</span><del>- if {[catch {set urlnewer [eval curl isnewer $curl_options {$file_url} $port_moddate]} error]} {
- ui_warn "couldn't fetch $file_url for $subport ($error)"
- } else {
</del><ins>+ try {
+ set urlnewer [curl isnewer {*}$curl_options $file_url $port_moddate]
</ins><span class="cx"> if {$urlnewer} {
</span><span class="cx"> ui_warn "port $subport: $file_url is newer than Portfile"
</span><span class="cx"> }
</span><span class="cx"> incr count
</span><ins>+ } catch {{POSIX SIG SIGINT} eCode eMessage} {
+ ui_debug [msgcat::mc "Aborted due to SIGINT"]
+ throw
+ } catch {{POSIX SIG SIGTERM} eCode eMessage} {
+ ui_debug [msgcat::mc "Aborted due to SIGTERM"]
+ throw
+ } catch {{*} eCode eMessage} {
+ ui_debug [msgcat::mc "couldn't fetch %s for %s (%s)" $file_url $subport $eMessage]
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if {$count == 0} {
</span><span class="lines">@@ -102,15 +109,22 @@
</span><span class="cx"> foreach site $urlmap($url_var) {
</span><span class="cx"> ui_debug [format [msgcat::mc "Checking %s from %s"] $distfile $site]
</span><span class="cx"> set file_url [portfetch::assemble_url $site $distfile]
</span><del>- if {[catch {set urlsize [eval curl getsize $curl_options {$file_url}]} error]} {
- ui_warn "couldn't fetch $file_url for $subport ($error)"
- } else {
</del><ins>+ try {
+ set urlsize [curl getsize {*}$curl_options $file_url]
</ins><span class="cx"> incr count
</span><span class="cx"> if {$urlsize > 0} {
</span><span class="cx"> ui_info "port $subport: $distfile $urlsize bytes"
</span><span class="cx"> incr totalsize $urlsize
</span><span class="cx"> break
</span><span class="cx"> }
</span><ins>+ } catch {{POSIX SIG SIGINT} eCode eMessage} {
+ ui_debug [msgcat::mc "Aborted due to SIGINT"]
+ throw
+ } catch {{POSIX SIG SIGTERM} eCode eMessage} {
+ ui_debug [msgcat::mc "Aborted due to SIGTERM"]
+ throw
+ } catch {{*} eCode eMessage} {
+ ui_debug [msgcat::mc "couldn't fetch %s for %s (%s)" $file_url $subport $eMessage]
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if {$count == 0} {
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10portextracttcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/portextract.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/portextract.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/portextract.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -90,7 +90,11 @@
</span><span class="cx"> set extract.dir ${worksrcpath}
</span><span class="cx"> }
</span><span class="cx"> if {[tbool use_bzip2]} {
</span><del>- option extract.cmd [findBinary bzip2 ${portutil::autoconf::bzip2_path}]
</del><ins>+ if {![catch {findBinary lbzip2} result]} {
+ option extract.cmd $result
+ } else {
+ option extract.cmd [findBinary bzip2 ${portutil::autoconf::bzip2_path}]
+ }
</ins><span class="cx"> } elseif {[tbool use_lzma]} {
</span><span class="cx"> option extract.cmd [findBinary lzma ${portutil::autoconf::lzma_path}]
</span><span class="cx"> } elseif {[tbool use_xz]} {
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10portfetchtcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/portfetch.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/portfetch.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/portfetch.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,8 +1,7 @@
</span><span class="cx"> # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><del>-# portfetch.tcl
</del><span class="cx"> # $Id$
</span><span class="cx"> #
</span><del>-# Copyright (c) 2004 - 2012 The MacPorts Project
</del><ins>+# Copyright (c) 2004 - 2014 The MacPorts Project
</ins><span class="cx"> # Copyright (c) 2002 - 2003 Apple Inc.
</span><span class="cx"> # All rights reserved.
</span><span class="cx"> #
</span><span class="lines">@@ -188,7 +187,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> git {
</span><del>- depends_fetch-append bin:git:git-core
</del><ins>+ depends_fetch-append bin:git:git
</ins><span class="cx"> }
</span><span class="cx"> hg {
</span><span class="cx"> depends_fetch-append bin:hg:mercurial
</span><span class="lines">@@ -533,20 +532,34 @@
</span><span class="cx"> set urlmap($url_var) $urlmap(master_sites)
</span><span class="cx"> }
</span><span class="cx"> unset -nocomplain fetched
</span><ins>+ set lastError ""
</ins><span class="cx"> foreach site $urlmap($url_var) {
</span><span class="cx"> ui_notice "$UI_PREFIX [format [msgcat::mc "Attempting to fetch %s from %s"] $distfile $site]"
</span><span class="cx"> set file_url [portfetch::assemble_url $site $distfile]
</span><del>- if {![catch {eval curl fetch $fetch_options {$file_url} {"${distpath}/${distfile}.TMP"}} result] &&
- ![catch {file rename -force "${distpath}/${distfile}.TMP" "${distpath}/${distfile}"} result]} {
</del><ins>+ try {
+ curl fetch {*}$fetch_options $file_url "${distpath}/${distfile}.TMP"
+ file rename -force "${distpath}/${distfile}.TMP" "${distpath}/${distfile}"
</ins><span class="cx"> set fetched 1
</span><span class="cx"> break
</span><del>- } else {
- ui_debug "[msgcat::mc "Fetching distfile failed"]: $result"
</del><ins>+ } catch {{POSIX SIG SIGINT} eCode eMessage} {
+ ui_debug [msgcat::mc "Aborted fetching distfile due to SIGINT"]
</ins><span class="cx"> file delete -force "${distpath}/${distfile}.TMP"
</span><ins>+ throw
+ } catch {{POSIX SIG SIGTERM} eCode eMessage} {
+ ui_debug [msgcat::mc "Aborted fetching distfile due to SIGTERM"]
+ file delete -force "${distpath}/${distfile}.TMP"
+ throw
+ } catch {{*} eCode eMessage} {
+ ui_debug [msgcat::mc "Fetching distfile failed: %s" $eMessage]
+ set lastError $eMessage
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if {![info exists fetched]} {
</span><del>- return -code error [msgcat::mc "fetch failed"]
</del><ins>+ if {$lastError ne ""} {
+ error $lastError
+ } else {
+ error [msgcat::mc "fetch failed"]
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10portinstalltcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/portinstall.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/portinstall.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/portinstall.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -122,7 +122,13 @@
</span><span class="cx"> set archive.pre_args {-cvf}
</span><span class="cx"> if {[regexp {z2?$} ${archive.type}]} {
</span><span class="cx"> if {[regexp {bz2?$} ${archive.type}]} {
</span><del>- set gzip "bzip2"
</del><ins>+ if {![catch {binaryInPath lbzip2}]} {
+ set gzip "lbzip2"
+ } elseif {![catch {binaryInPath pbzip2}]} {
+ set gzip "pbzip2"
+ } else {
+ set gzip "bzip2"
+ }
</ins><span class="cx"> set level 9
</span><span class="cx"> } elseif {[regexp {lz$} ${archive.type}]} {
</span><span class="cx"> set gzip "lzma"
</span><span class="lines">@@ -307,7 +313,7 @@
</span><span class="cx"> homepage depends_run package-install workdir workpath \
</span><span class="cx"> worksrcdir UI_PREFIX destroot revision maintainers user_options \
</span><span class="cx"> portvariants negated_variants targets depends_lib PortInfo epoch license \
</span><del>- os.platform os.major portarchivetype installPlist
</del><ins>+ os.platform os.major portarchivetype installPlist registry.path porturl
</ins><span class="cx">
</span><span class="cx"> set oldpwd [pwd]
</span><span class="cx"> if {$oldpwd eq ""} {
</span><span class="lines">@@ -373,11 +379,40 @@
</span><span class="cx"> # register files
</span><span class="cx"> $regref map $installPlist
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> # store portfile
</span><del>- set fd [open [file join ${portpath} Portfile]]
- $regref portfile [read $fd]
- close $fd
</del><ins>+ set portfile_path [file join $portpath Portfile]
+ set portfile_sha256 [sha256 file $portfile_path]
+ set portfile_size [file size $portfile_path]
+ set portfile_reg_dir [file join ${registry.path} registry portfiles ${subport}-${version}_${revision} ${portfile_sha256}-${portfile_size}]
+ file mkdir $portfile_reg_dir
+ set portfile_reg_path ${portfile_reg_dir}/Portfile
+ if {![file isfile $portfile_reg_path] || [file size $portfile_reg_path] != $portfile_size || [sha256 file $portfile_reg_path] ne $portfile_sha256} {
+ file copy -force $portfile_path $portfile_reg_dir
+ }
+ $regref portfile ${portfile_sha256}-${portfile_size}
+
+ # store portgroups
+ if {[info exists PortInfo(portgroups)]} {
+ foreach pg $PortInfo(portgroups) {
+ set pgname [lindex $pg 0]
+ set pgversion [lindex $pg 1]
+ set groupFile [getportresourcepath $porturl "port1.0/group/${pgname}-${pgversion}.tcl"]
+ if {[file isfile $groupFile]} {
+ set pgsha256 [sha256 file $groupFile]
+ set pgsize [file size $groupFile]
+ set pg_reg_dir [file join ${registry.path} registry portgroups ${pgsha256}-${pgsize}]
+ set pg_reg_path ${pg_reg_dir}/${pgname}-${pgversion}.tcl
+ if {![file isfile $pg_reg_path] || [file size $pg_reg_path] != $pgsize || [sha256 file $pg_reg_path] ne $pgsha256} {
+ file mkdir $pg_reg_dir
+ file copy -force $groupFile $pg_reg_dir
+ }
+ $regref addgroup $pgname $pgversion $pgsha256 $pgsize
+ } else {
+ ui_debug "install_main: no portgroup ${pgname}-${pgversion}.tcl found"
+ }
+ }
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> _cd $oldpwd
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10portlinttcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/portlint.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/portlint.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/portlint.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,6 +1,33 @@
</span><del>-# et:ts=4
-# portlint.tcl
</del><ins>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
</ins><span class="cx"> # $Id$
</span><ins>+#
+# Copyright (c) 2007 - 2014 The MacPorts Project
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of The MacPorts Project nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
</ins><span class="cx">
</span><span class="cx"> package provide portlint 1.0
</span><span class="cx"> package require portutil 1.0
</span><span class="lines">@@ -53,6 +80,7 @@
</span><span class="cx"> "distname" \
</span><span class="cx"> "use_automake" \
</span><span class="cx"> "use_autoconf" \
</span><ins>+ "use_autoreconf" \
</ins><span class="cx"> "use_configure" \
</span><span class="cx"> ]
</span><span class="cx">
</span><span class="lines">@@ -261,6 +289,11 @@
</span><span class="cx"> incr warnings
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if {[regexp {compiler\.blacklist.*\{} $line] && ![info exists portgroups(compiler_blacklist_versions)]} {
+ ui_error "Line $lineno uses compiler.blacklist in a way that requires the compiler_blacklist_versions portgroup, but this portgroup has not been included"
+ incr errors
+ }
+
</ins><span class="cx"> # Check for hardcoded version numbers
</span><span class="cx"> if {$nitpick} {
</span><span class="cx"> # Support for skipping checksums lines
</span><span class="lines">@@ -458,11 +491,21 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> set all_depends {}
</span><del>- if {[info exists depends_fetch]} { eval "lappend all_depends $depends_fetch" }
- if {[info exists depends_extract]} { eval "lappend all_depends $depends_extract" }
- if {[info exists depends_lib]} { eval "lappend all_depends $depends_lib" }
- if {[info exists depends_build]} { eval "lappend all_depends $depends_build" }
- if {[info exists depends_run]} { eval "lappend all_depends $depends_run" }
</del><ins>+ if {[info exists depends_fetch]} {
+ lappend all_depends {*}$depends_fetch
+ }
+ if {[info exists depends_extract]} {
+ lappend all_depends {*}$depends_extract
+ }
+ if {[info exists depends_lib]} {
+ lappend all_depends {*}$depends_lib
+ }
+ if {[info exists depends_build]} {
+ lappend all_depends {*}$depends_build
+ }
+ if {[info exists depends_run]} {
+ lappend all_depends {*}$depends_run
+ }
</ins><span class="cx"> foreach depspec $all_depends {
</span><span class="cx"> set dep [lindex [split $depspec :] end]
</span><span class="cx"> if {[catch {set res [mport_lookup $dep]} error]} {
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10portlivechecktcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/portlivecheck.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/portlivecheck.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/portlivecheck.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx"> "regexm" {
</span><span class="cx"> # single and multiline regex
</span><span class="cx"> ui_debug "Fetching ${livecheck.url}"
</span><del>- if {[catch {eval curl fetch $curl_options {${livecheck.url}} $tempfile} error]} {
</del><ins>+ if {[catch {curl fetch {*}$curl_options ${livecheck.url} $tempfile} error]} {
</ins><span class="cx"> ui_error "cannot check if $subport was updated ($error)"
</span><span class="cx"> set updated -1
</span><span class="cx"> } else {
</span><span class="lines">@@ -198,7 +198,7 @@
</span><span class="cx"> }
</span><span class="cx"> "md5" {
</span><span class="cx"> ui_debug "Fetching ${livecheck.url}"
</span><del>- if {[catch {eval curl fetch $curl_options {${livecheck.url}} $tempfile} error]} {
</del><ins>+ if {[catch {curl fetch {*}$curl_options ${livecheck.url} $tempfile} error]} {
</ins><span class="cx"> ui_error "cannot check if $subport was updated ($error)"
</span><span class="cx"> set updated -1
</span><span class="cx"> } else {
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10portloadtcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/portload.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/portload.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/portload.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> } elseif {![file exists $path]} {
</span><span class="cx"> return -code error [format [msgcat::mc "Launchd plist %s was not found"] $path]
</span><span class="cx"> } else {
</span><del>- exec $launchctl_path load -w $path 2>@stderr
</del><ins>+ exec -ignorestderr $launchctl_path load -w $path
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10portmaintcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/portmain.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/portmain.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/portmain.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> long_description description homepage notes license \
</span><span class="cx"> provides conflicts replaced_by \
</span><span class="cx"> worksrcdir filesdir distname portdbpath libpath distpath sources_conf \
</span><del>- os.platform os.subplatform os.version os.major os.arch os.endian \
</del><ins>+ os.platform os.subplatform os.version os.major os.minor os.arch os.endian \
</ins><span class="cx"> platforms default_variants install.user install.group \
</span><span class="cx"> macosx_deployment_target universal_variant os.universal_supported \
</span><span class="cx"> supported_archs depends_skip_archcheck installs_libs \
</span><span class="lines">@@ -116,6 +116,7 @@
</span><span class="cx"> default os.platform {$os_platform}
</span><span class="cx"> default os.version {$os_version}
</span><span class="cx"> default os.major {$os_major}
</span><ins>+default os.minor {$os_minor}
</ins><span class="cx"> default os.arch {$os_arch}
</span><span class="cx"> default os.endian {$os_endian}
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10porttracetcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/porttrace.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/porttrace.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/porttrace.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -49,9 +49,7 @@
</span><span class="cx"> # Create a fifo.
</span><span class="cx"> # path in unix socket limited to 109 chars
</span><span class="cx"> # # set trace_fifo "$workpath/trace_fifo"
</span><del>- set trace_fifo "/tmp/macports/[pid]_[expr {int(rand()*1000)}]"
- file mkdir "/tmp/macports"
- chownAsRoot "/tmp/macports"
</del><ins>+ set trace_fifo "/tmp/macports_trace_[pid]-[expr {int(rand()*1000)}]"
</ins><span class="cx"> file delete -force $trace_fifo
</span><span class="cx">
</span><span class="cx"> # Create the thread/process.
</span><span class="lines">@@ -59,14 +57,13 @@
</span><span class="cx">
</span><span class="cx"> # Launch darwintrace.dylib.
</span><span class="cx">
</span><del>- set tracelib_path [file join ${portutil::autoconf::prefix} share macports Tcl darwintrace1.0 darwintrace.dylib]
</del><ins>+ set tracelib_path [file join ${portutil::autoconf::tcl_package_path} darwintrace1.0 darwintrace.dylib]
</ins><span class="cx">
</span><span class="cx"> if {[info exists env(DYLD_INSERT_LIBRARIES)] && [string length "$env(DYLD_INSERT_LIBRARIES)"] > 0} {
</span><span class="cx"> set env(DYLD_INSERT_LIBRARIES) "${env(DYLD_INSERT_LIBRARIES)}:${tracelib_path}"
</span><span class="cx"> } else {
</span><span class="cx"> set env(DYLD_INSERT_LIBRARIES) ${tracelib_path}
</span><span class="cx"> }
</span><del>- set env(DYLD_FORCE_FLAT_NAMESPACE) 1
</del><span class="cx"> set env(DARWINTRACE_LOG) "$trace_fifo"
</span><span class="cx"> # The sandbox is limited to:
</span><span class="cx"> # workpath
</span><span class="lines">@@ -170,7 +167,7 @@
</span><span class="cx"> global os.platform
</span><span class="cx"> if {${os.platform} == "darwin"} {
</span><span class="cx"> global env trace_fifo macosx_version
</span><del>- foreach var {DYLD_INSERT_LIBRARIES DYLD_FORCE_FLAT_NAMESPACE DARWINTRACE_LOG DARWINTRACE_SANDBOX_BOUNDS} {
</del><ins>+ foreach var {DYLD_INSERT_LIBRARIES DARWINTRACE_LOG} {
</ins><span class="cx"> array unset env $var
</span><span class="cx"> if {$macosx_version eq "10.5"} {
</span><span class="cx"> unsetenv $var
</span><span class="lines">@@ -338,7 +335,7 @@
</span><span class="cx"> # Private.
</span><span class="cx"> # Slave cleanup method.
</span><span class="cx"> proc porttrace::slave_stop {} {
</span><del>- global trace_filemap trace_fifo_r_chan trace_fifo_w_chan
</del><ins>+ global trace_filemap
</ins><span class="cx"> # Close the virtual filemap.
</span><span class="cx"> filemap close trace_filemap
</span><span class="cx"> # Close the pipe (both ends).
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10portunloadtcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/portunload.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/portunload.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/portunload.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> } elseif {![file exists $path]} {
</span><span class="cx"> return -code error [format [msgcat::mc "Launchd plist %s was not found"] $path]
</span><span class="cx"> } else {
</span><del>- exec $launchctl_path unload -w $path 2>@stderr
</del><ins>+ exec -ignorestderr $launchctl_path unload -w $path
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10portutiltcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/portutil.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/portutil.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/portutil.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> # Copyright (c) 2002-2003 Apple Inc.
</span><span class="cx"> # Copyright (c) 2004 Robert Shaw <rshaw@opendarwin.org>
</span><span class="cx"> # Copyright (c) 2006-2007 Markus W. Weissmann <mww@macports.org>
</span><del>-# Copyright (c) 2004-2013 The MacPorts Project
</del><ins>+# Copyright (c) 2004-2014 The MacPorts Project
</ins><span class="cx"> # All rights reserved.
</span><span class="cx"> #
</span><span class="cx"> # Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx"> }
</span><span class="cx"> set refcount [lindex $deprecated_options(${option}-replace) 1]
</span><span class="cx"> lset deprecated_options(${option}-replace) 1 [expr {$refcount + 1}]
</span><del>- return [eval handle_option-strsed $option $args]
</del><ins>+ return [handle_option-strsed $option {*}$args]
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if {![info exists user_options($option)] && [info exists $option]} {
</span><span class="lines">@@ -451,7 +451,7 @@
</span><span class="cx"> # Call the command.
</span><span class="cx"> set fullcmdstring "$command_prefix $cmdstring $command_suffix"
</span><span class="cx"> ui_debug "Executing command line: $fullcmdstring"
</span><del>- set code [catch {eval system $notty $nice \$fullcmdstring} result]
</del><ins>+ set code [catch {system {*}$notty {*}$nice $fullcmdstring} result]
</ins><span class="cx"> # Save variables in order to re-throw the same error code.
</span><span class="cx"> set errcode $::errorCode
</span><span class="cx"> set errinfo $::errorInfo
</span><span class="lines">@@ -988,7 +988,8 @@
</span><span class="cx"> set tmpfile [join [lrange $tmpfile 1 end]]
</span><span class="cx"> }
</span><span class="cx">
</span><del>- set cmdline $portutil::autoconf::sed_command
</del><ins>+ set cmdline {}
+ lappend cmdline $portutil::autoconf::sed_command
</ins><span class="cx"> if {$extended} {
</span><span class="cx"> if {$portutil::autoconf::sed_ext_flag eq "N/A"} {
</span><span class="cx"> ui_debug "sed extended regexp not available"
</span><span class="lines">@@ -999,13 +1000,13 @@
</span><span class="cx"> if {$suppress} {
</span><span class="cx"> lappend cmdline -n
</span><span class="cx"> }
</span><del>- set cmdline [concat $cmdline [list $pattern < $file >@ $tmpfd 2>@stderr]]
</del><ins>+ lappend cmdline $pattern "<$file" ">@$tmpfd"
</ins><span class="cx"> if {$locale ne ""} {
</span><span class="cx"> set env(LC_CTYPE) $locale
</span><span class="cx"> }
</span><span class="cx"> ui_info "$UI_PREFIX [format [msgcat::mc "Patching %s: %s"] [file tail $file] $pattern]"
</span><span class="cx"> ui_debug "Executing reinplace: $cmdline"
</span><del>- if {[catch {eval exec $cmdline} error]} {
</del><ins>+ if {[catch {exec -ignorestderr -- {*}$cmdline} error]} {
</ins><span class="cx"> global errorInfo
</span><span class="cx"> ui_debug "$errorInfo"
</span><span class="cx"> ui_error "reinplace: $error"
</span><span class="lines">@@ -1068,7 +1069,7 @@
</span><span class="cx"> # delete
</span><span class="cx"> # Wrapper for file delete -force
</span><span class="cx"> proc delete {args} {
</span><del>- eval file delete -force -- $args
</del><ins>+ file delete -force -- {*}$args
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # touch
</span><span class="lines">@@ -1167,7 +1168,7 @@
</span><span class="cx"> # copy
</span><span class="cx"> # Wrapper for file copy
</span><span class="cx"> proc copy {args} {
</span><del>- eval file copy $args
</del><ins>+ file copy {*}$args
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # move
</span><span class="lines">@@ -1196,7 +1197,7 @@
</span><span class="cx"> return
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- eval file rename $options -- $args
</del><ins>+ file rename {*}$options -- {*}$args
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # ln
</span><span class="lines">@@ -1506,7 +1507,7 @@
</span><span class="cx"> if {$result == 0} {
</span><span class="cx"> foreach pre [ditem_key $ditem pre] {
</span><span class="cx"> ui_debug "Executing $pre"
</span><del>- set result [catch {eval $pre $targetname} errstr]
</del><ins>+ set result [catch {$pre $targetname} errstr]
</ins><span class="cx"> # Save variables in order to re-throw the same error code.
</span><span class="cx"> set errcode $::errorCode
</span><span class="cx"> set errinfo $::errorInfo
</span><span class="lines">@@ -1516,7 +1517,7 @@
</span><span class="cx">
</span><span class="cx"> if {$result == 0} {
</span><span class="cx"> ui_debug "Executing $targetname ($portname)"
</span><del>- set result [catch {eval $procedure $targetname} errstr]
</del><ins>+ set result [catch {$procedure $targetname} errstr]
</ins><span class="cx"> # Save variables in order to re-throw the same error code.
</span><span class="cx"> set errcode $::errorCode
</span><span class="cx"> set errinfo $::errorInfo
</span><span class="lines">@@ -1525,7 +1526,7 @@
</span><span class="cx"> if {$result == 0} {
</span><span class="cx"> foreach post [ditem_key $ditem post] {
</span><span class="cx"> ui_debug "Executing $post"
</span><del>- set result [catch {eval $post $targetname} errstr]
</del><ins>+ set result [catch {$post $targetname} errstr]
</ins><span class="cx"> # Save variables in order to re-throw the same error code.
</span><span class="cx"> set errcode $::errorCode
</span><span class="cx"> set errinfo $::errorInfo
</span><span class="lines">@@ -1551,7 +1552,7 @@
</span><span class="cx"> if {[ditem_contains $ditem postrun] && $result == 0} {
</span><span class="cx"> set postrun [ditem_key $ditem postrun]
</span><span class="cx"> ui_debug "Executing $postrun"
</span><del>- set result [catch {eval $postrun $targetname} errstr]
</del><ins>+ set result [catch {$postrun $targetname} errstr]
</ins><span class="cx"> # Save variables in order to re-throw the same error code.
</span><span class="cx"> set errcode $::errorCode
</span><span class="cx"> set errinfo $::errorInfo
</span><span class="lines">@@ -1580,12 +1581,16 @@
</span><span class="cx"> # - this step is not to always be performed
</span><span class="cx"> # - this step must be written to file
</span><span class="cx"> if {$skipped == 0
</span><del>- && [ditem_key $ditem runtype] ne "always"
- && [ditem_key $ditem state] ne "no"} {
- write_statefile target $targetname $target_state_fd
</del><ins>+ && [ditem_key $ditem runtype] ne "always"
+ && [ditem_key $ditem state] ne "no"} {
+ write_statefile target $targetname $target_state_fd
</ins><span class="cx"> }
</span><span class="cx"> } else {
</span><del>- ui_error "$targetname for port $portname returned: $errstr"
</del><ins>+ if {$errstr ne {}} {
+ ui_error "Failed to $target $portname: $errstr"
+ } else {
+ ui_error "Failed to $target $portname."
+ }
</ins><span class="cx"> ui_debug "Error code: $errcode"
</span><span class="cx"> ui_debug "Backtrace: $errinfo"
</span><span class="cx"> set result 1
</span><span class="lines">@@ -1680,11 +1685,14 @@
</span><span class="cx">
</span><span class="cx"> if {[llength $dlist] > 0} {
</span><span class="cx"> # somebody broke!
</span><del>- set errstring "Warning: targets not executed for $subport:"
- foreach ditem $dlist {
- append errstring " [ditem_key $ditem name]"
- }
- ui_info $errstring
</del><ins>+ # The phase that failed should have already printed error info; don't
+ # print useless stuff cluttering the *real* info of the error message.
+
+ #set errstring "Warning: targets not executed for $subport:"
+ #foreach ditem $dlist {
+ # append errstring " [ditem_key $ditem name]"
+ #}
+ #ui_info $errstring
</ins><span class="cx"> set result 1
</span><span class="cx"> } else {
</span><span class="cx"> set result 0
</span><span class="lines">@@ -2132,7 +2140,8 @@
</span><span class="cx">
</span><span class="cx"> array set oldvariations {}
</span><span class="cx"> if {[check_statefile_variants variations oldvariations $state_fd]} {
</span><del>- ui_error "Requested variants \"[canonicalize_variants [array get variations]]\" do not match original selection \"[canonicalize_variants [array get oldvariations]]\".\nPlease use the same variants again, perform 'port clean [option subport]' or specify the force option (-f)."
</del><ins>+ ui_error "Requested variants \"[canonicalize_variants [array get variations]]\" do not match original selection \"[canonicalize_variants [array get oldvariations]]\"."
+ ui_error "Please use the same variants again, perform 'port clean [option subport]' or specify the force option (-f)."
</ins><span class="cx"> set result 1
</span><span class="cx"> } elseif {!([info exists ports_dryrun] && $ports_dryrun eq "yes")} {
</span><span class="cx"> # Write variations out to the statefile
</span><span class="lines">@@ -2232,39 +2241,39 @@
</span><span class="cx"> makeuserproc userproc-post-${ident}-${target}-\${proc_index} \$args
</span><span class="cx"> "
</span><span class="cx"> }
</span><del>- eval ditem_append $ditem provides $args
</del><ins>+ ditem_append $ditem provides {*}$args
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> proc target_requires {ditem args} {
</span><del>- eval ditem_append $ditem requires $args
</del><ins>+ ditem_append $ditem requires {*}$args
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> proc target_uses {ditem args} {
</span><del>- eval ditem_append $ditem uses $args
</del><ins>+ ditem_append $ditem uses {*}$args
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> proc target_deplist {ditem args} {
</span><del>- eval ditem_append $ditem deplist $args
</del><ins>+ ditem_append $ditem deplist {*}$args
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> proc target_prerun {ditem args} {
</span><del>- eval ditem_append $ditem prerun $args
</del><ins>+ ditem_append $ditem prerun {*}$args
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> proc target_postrun {ditem args} {
</span><del>- eval ditem_append $ditem postrun $args
</del><ins>+ ditem_append $ditem postrun {*}$args
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> proc target_runtype {ditem args} {
</span><del>- eval ditem_append $ditem runtype $args
</del><ins>+ ditem_append $ditem runtype {*}$args
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> proc target_state {ditem args} {
</span><del>- eval ditem_append $ditem state $args
</del><ins>+ ditem_append $ditem state {*}$args
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> proc target_init {ditem args} {
</span><del>- eval ditem_append $ditem init $args
</del><ins>+ ditem_append $ditem init {*}$args
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ##### variant class #####
</span><span class="lines">@@ -2328,7 +2337,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> foreach username [array names args] {
</span><del>- eval adduser $username $args($username)
</del><ins>+ adduser $username {*}$args($username)
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2365,22 +2374,22 @@
</span><span class="cx"> set dscl [findBinary dscl $portutil::autoconf::dscl_path]
</span><span class="cx"> set failed? 0
</span><span class="cx"> try {
</span><del>- exec $dscl . -create /Users/${name} UniqueID ${uid} 2>@stderr
</del><ins>+ exec -ignorestderr $dscl . -create /Users/${name} UniqueID ${uid}
</ins><span class="cx">
</span><span class="cx"> # These are implicitly added on Mac OSX Lion. AuthenticationAuthority
</span><span class="cx"> # causes the user to be visible in the Users & Groups Preference Pane,
</span><span class="cx"> # and the others are just noise, so delete them.
</span><span class="cx"> # https://trac.macports.org/ticket/30168
</span><del>- exec $dscl . -delete /Users/${name} AuthenticationAuthority 2>@stderr
- exec $dscl . -delete /Users/${name} PasswordPolicyOptions 2>@stderr
- exec $dscl . -delete /Users/${name} dsAttrTypeNative:KerberosKeys 2>@stderr
- exec $dscl . -delete /Users/${name} dsAttrTypeNative:ShadowHashData 2>@stderr
</del><ins>+ exec -ignorestderr $dscl . -delete /Users/${name} AuthenticationAuthority
+ exec -ignorestderr $dscl . -delete /Users/${name} PasswordPolicyOptions
+ exec -ignorestderr $dscl . -delete /Users/${name} dsAttrTypeNative:KerberosKeys
+ exec -ignorestderr $dscl . -delete /Users/${name} dsAttrTypeNative:ShadowHashData
</ins><span class="cx">
</span><del>- exec $dscl . -create /Users/${name} RealName ${realname} 2>@stderr
- exec $dscl . -create /Users/${name} Password ${passwd} 2>@stderr
- exec $dscl . -create /Users/${name} PrimaryGroupID ${gid} 2>@stderr
- exec $dscl . -create /Users/${name} NFSHomeDirectory ${home} 2>@stderr
- exec $dscl . -create /Users/${name} UserShell ${shell} 2>@stderr
</del><ins>+ exec -ignorestderr $dscl . -create /Users/${name} RealName ${realname}
+ exec -ignorestderr $dscl . -create /Users/${name} Password ${passwd}
+ exec -ignorestderr $dscl . -create /Users/${name} PrimaryGroupID ${gid}
+ exec -ignorestderr $dscl . -create /Users/${name} NFSHomeDirectory ${home}
+ exec -ignorestderr $dscl . -create /Users/${name} UserShell ${shell}
</ins><span class="cx"> } catch {{CHILDKILLED *} eCode eMessage} {
</span><span class="cx"> # the foreachs are a simple workaround for Tcl 8.4, which doesn't
</span><span class="cx"> # seem to have lassign
</span><span class="lines">@@ -2411,7 +2420,7 @@
</span><span class="cx"> # state before the error
</span><span class="cx"> ui_debug "Attempting to clean up failed creation of user $name"
</span><span class="cx"> try {
</span><del>- exec $dscl . -delete /Users/${name} 2>@stderr
</del><ins>+ exec -ignorestderr $dscl . -delete /Users/${name}
</ins><span class="cx"> } catch {{CHILDKILLED *} eCode eMessage} {
</span><span class="cx"> foreach {- pid sigName msg} {
</span><span class="cx"> ui_warn "dscl($pid) was killed by $sigName: $msg while trying to clean up failed creation of user $name."
</span><span class="lines">@@ -2509,7 +2518,7 @@
</span><span class="cx"> # state before the error
</span><span class="cx"> ui_debug "Attempting to clean up failed creation of group $name"
</span><span class="cx"> try {
</span><del>- exec $dscl . -delete /Groups/${name} 2>@stderr
</del><ins>+ exec -ignorestderr $dscl . -delete /Groups/${name}
</ins><span class="cx"> } catch {{CHILDKILLED *} eCode eMessage} {
</span><span class="cx"> foreach {- pid sigName msg} {
</span><span class="cx"> ui_warn "dscl($pid) was killed by $sigName: $msg while trying to clean up failed creation of group $name."
</span><span class="lines">@@ -2569,8 +2578,21 @@
</span><span class="cx">
</span><span class="cx"> # Use a specified group/version.
</span><span class="cx"> proc PortGroup {group version} {
</span><del>- global porturl
</del><ins>+ global porturl PortInfo _portgroup_search_dirs
</ins><span class="cx">
</span><ins>+ lappend PortInfo(portgroups) [list $group $version]
+
+ if {[info exists _portgroup_search_dirs]} {
+ foreach dir $_portgroup_search_dirs {
+ set groupFile ${dir}/${group}-${version}.tcl
+ if {[file exists $groupFile]} {
+ uplevel "source $groupFile"
+ ui_debug "Sourcing PortGroup $group $version from $groupFile"
+ return
+ }
+ }
+ }
+
</ins><span class="cx"> set groupFile [getportresourcepath $porturl "port1.0/group/${group}-${version}.tcl"]
</span><span class="cx">
</span><span class="cx"> if {[file exists $groupFile]} {
</span><span class="lines">@@ -2802,7 +2824,7 @@
</span><span class="cx"> foreach arch ${archs} {
</span><span class="cx"> lappend exec-lipo -arch ${arch} ${base}/${arch}${file}
</span><span class="cx"> }
</span><del>- eval exec ${exec-lipo} [list -create -output ${target}${file}]
</del><ins>+ exec {*}${exec-lipo} -create -output ${target}${file}
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # private function
</span><span class="lines">@@ -2957,12 +2979,12 @@
</span><span class="cx"> setegid $egid
</span><span class="cx"> ui_debug "euid/egid changed to: [geteuid]/[getegid]"
</span><span class="cx"> ui_debug "setting attributes on $file"
</span><del>- eval file attributes {$file} $attributes
</del><ins>+ file attributes $file {*}$attributes
</ins><span class="cx"> setegid [uname_to_gid "$macportsuser"]
</span><span class="cx"> seteuid [name_to_uid "$macportsuser"]
</span><span class="cx"> ui_debug "euid/egid changed to: [geteuid]/[getegid]"
</span><span class="cx"> } else {
</span><del>- eval file attributes {$file} $attributes
</del><ins>+ file attributes $file {*}$attributes
</ins><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="cx"> # not root, so can't set owner/group
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10testsPortfile"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/tests/Portfile (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/tests/Portfile        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/tests/Portfile        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,36 +1,29 @@
</span><del>-# $Id: Portfile 85472 2011-10-14 01:52:18Z dports@macports.org $
</del><ins>+# $Id$
</ins><span class="cx">
</span><del>-PortSystem 1.0
</del><ins>+PortSystem 1.0
</ins><span class="cx">
</span><del>-name fondu
-version 060102
-revision 1
-platforms darwin
-categories print
-license BSD
-maintainers nomaintainer
-homepage http://fondu.sourceforge.net/
-master_sites http://fondu.sourceforge.net/
</del><ins>+name                        gcc_select
+version                        0.1
+revision                4
+categories                sysutils
+platforms                darwin
+license                BSD
+maintainers                mww
+supported_archs                noarch
+description                Switch the default compiler
+long_description        gcc_select lets you switch the default compiler. \
+                        It symlinks the standard compiler executables \
+                        in the MacPorts prefix to the selected version.
</ins><span class="cx">
</span><del>-description A set of programs to interconvert between Mac font \
- formats and pfb, ttf, otf and bdf files on UNIX.
</del><ins>+homepage                http://svn.macports.org/repository/macports/contrib/select/
+master_sites                ${homepage}
+distname                select-${version}
+checksums                sha1 18e1f95c2ddd88210aa52eb696261859af2dc3a4
</ins><span class="cx">
</span><del>-long_description Dealing with Mac fonts is hard on other operating \
- systems because Mac fonts are stored in the resource \
- fork, and other operating systems do not support \
- this concept. Fondu will extract the resource fork \
- from either a MacBinary file or a BinHex file. Ufond \
- will create a resource fork inside a MacBinary file.
-
-checksums md5 e20861beacddc1ab392bef7813641bf8
-extract.suffix .tgz
-distfiles ${name}_src-${version}${extract.suffix}
-
</del><span class="cx"> patchfiles
</span><del>-
</del><span class="cx"> patch {
</span><span class="cx"> foreach patch $patchfiles {
</span><del>- set fd [open ${portpath}/files/${patch} r]
</del><ins>+ set fd [open ${filespath}/${patch} r]
</ins><span class="cx"> set var [gets $fd]
</span><span class="cx"> close $fd
</span><span class="cx"> set fd [open ${workpath}/${distname}/test_patch w+]
</span><span class="lines">@@ -39,17 +32,16 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-post-patch {
- reinplace "s|^CFLAGS = -g \$(WFLAGS)|CFLAGS = -g \$(WFLAGS) ${configure.cppflags} ${configure.cflags} ${configure.ldflags} [get_canonical_archflags]|g" ${worksrcpath}/Makefile.in
-}
</del><ins>+configure.args                --mandir=${prefix}/share/man --name=gcc
</ins><span class="cx">
</span><del>-configure.args --bindir=${prefix}/bin \
- --mandir=${prefix}/share/man
-
</del><span class="cx"> post-destroot {
</span><del>- eval xinstall -m 644 [glob ${worksrcpath}/*.1] ${destroot}${prefix}/share/man/man1/
</del><ins>+ xinstall -d ${destroot}${prefix}/etc/select/gcc
+ touch ${destroot}${prefix}/etc/select/gcc/base
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> test {
</span><del>- file delete -force $worksrcpath/README
</del><ins>+ touch ${worksrcpath}/README
+ file delete -force ${worksrcpath}/README
</ins><span class="cx"> }
</span><ins>+
+livecheck.type        none
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10testsportactivatetest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/tests/portactivate.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/tests/portactivate.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/tests/portactivate.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../port_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10testsportchecksumtest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/tests/portchecksum.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/tests/portchecksum.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/tests/portchecksum.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../port_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10testsportcleantest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/tests/portclean.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/tests/portclean.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/tests/portclean.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../port_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10testsportdeactivatetest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/tests/portdeactivate.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/tests/portdeactivate.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/tests/portdeactivate.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../port_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10testsportdependstest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/tests/portdepends.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/tests/portdepends.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/tests/portdepends.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../port_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10testsportdistchecktest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/tests/portdistcheck.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/tests/portdistcheck.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/tests/portdistcheck.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../port_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span><span class="lines">@@ -25,12 +24,12 @@
</span><span class="cx"> set portpath $pwd
</span><span class="cx"> set filespath $pwd/files
</span><span class="cx">
</span><del>- set name cocot
</del><ins>+ set name gcc_select
</ins><span class="cx"> set subport $name
</span><del>- set distname cocot-20080315
- set porturl "http://distfiles.macports.org/cocot/"
</del><ins>+ set distname select-0.1
+ set porturl "http://distfiles.macports.org/gcc_select/"
</ins><span class="cx"> set master_sites $porturl
</span><del>- set extract.suffix .tar.bz2
</del><ins>+ set extract.suffix .tar.gz
</ins><span class="cx">
</span><span class="cx"> } -body {
</span><span class="cx"> set fetch.type standard
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10testsportinstalltest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/tests/portinstall.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/tests/portinstall.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/tests/portinstall.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../port_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span><span class="lines">@@ -31,9 +30,9 @@
</span><span class="cx"> set configure.build_arch build_arch
</span><span class="cx"> set portarchivetype tgz
</span><span class="cx">
</span><del>-set subport fondu
-set version 3.0
-set revision 2
</del><ins>+set subport gcc_select
+set version 0.1
+set revision 4
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> test install_start {
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10testsportloadtest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/tests/portload.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/tests/portload.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/tests/portload.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../port_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span><span class="lines">@@ -52,7 +51,7 @@
</span><span class="cx"> return "Load successful."
</span><span class="cx">
</span><span class="cx"> } -cleanup {
</span><del>- exec $launchctl_path unload -w $path 2>@stderr
</del><ins>+ exec -ignorestderr $launchctl_path unload -w $path
</ins><span class="cx"> file delete -force /Library/test
</span><span class="cx">
</span><span class="cx"> } -result "Load successful."
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10testsportmaintest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/tests/portmain.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/tests/portmain.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/tests/portmain.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../port_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10testsportpatchtest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/tests/portpatch.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/tests/portpatch.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/tests/portpatch.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../port_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span><span class="lines">@@ -38,7 +37,7 @@
</span><span class="cx"> } -setup {
</span><span class="cx"> set macosx_version 12
</span><span class="cx">
</span><del>- set subport fondu
</del><ins>+ set subport gcc_select
</ins><span class="cx"> set filespath $pwd/files
</span><span class="cx"> set distpath $pwd/dist
</span><span class="cx"> set usealtworkpath yes
</span><span class="lines">@@ -63,7 +62,7 @@
</span><span class="cx"> if {[$workername eval eval_targets patch]} {
</span><span class="cx"> return "FAIL: cannot run patch"
</span><span class="cx"> }
</span><del>- if {![file exists $pwd/work/fondu-060102/test_patch]} {
</del><ins>+ if {![file exists $pwd/work/select-0.1/test_patch]} {
</ins><span class="cx"> return "FAIL: missing patched file"
</span><span class="cx"> }
</span><span class="cx"> return "Patch successful."
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10testsporttesttest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/tests/porttest.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/tests/porttest.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/tests/porttest.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../port_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10testsportuninstalltest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/tests/portuninstall.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/tests/portuninstall.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/tests/portuninstall.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../port_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span><span class="lines">@@ -20,9 +19,9 @@
</span><span class="cx"> source ./library.tcl
</span><span class="cx"> macports_worker_init
</span><span class="cx">
</span><del>-set subport fondu
-set version 3.0
-set revision 2
</del><ins>+set subport gcc_select
+set version 0.1
+set revision 4
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> # test uninstall_start
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10testsportutiltest"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/tests/portutil.test (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/tests/portutil.test        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/tests/portutil.test        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -3,12 +3,10 @@
</span><span class="cx"> package require tcltest 2
</span><span class="cx"> namespace import tcltest::*
</span><span class="cx">
</span><del>-source ../../macports1.0/macports_fastload.tcl
</del><span class="cx">
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx">
</span><span class="cx"> source ../port_test_autoconf.tcl
</span><del>-source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
</del><span class="cx"> package require macports 1.0
</span><span class="cx">
</span><span class="cx"> array set ui_options {}
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcport10teststesttcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/port1.0/tests/test.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/port1.0/tests/test.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/port1.0/tests/test.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> # Global vars
</span><del>-set arguments ""
</del><ins>+set arguments {}
</ins><span class="cx"> set test_name ""
</span><span class="cx"> set color_out ""
</span><span class="cx"> set tcl ""
</span><span class="lines">@@ -15,10 +15,10 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> proc print_help {arg} {
</span><del>- if { $arg eq "tests" } {
</del><ins>+ if {$arg eq "tests"} {
</ins><span class="cx"> puts "The list of available tests is:"
</span><del>-        cd tests
-        set test_suite [glob *.test]
</del><ins>+ cd tests
+ set test_suite [glob *.test]
</ins><span class="cx"> foreach test $test_suite {
</span><span class="cx"> puts [puts -nonewline " "]$test
</span><span class="cx"> }
</span><span class="lines">@@ -34,77 +34,86 @@
</span><span class="cx">
</span><span class="cx"> # Process args
</span><span class="cx"> foreach arg $argv {
</span><del>- if { $arg eq "-h" || $arg eq "-help" } {
</del><ins>+ if {$arg eq "-h" || $arg eq "-help"} {
</ins><span class="cx"> print_help ""
</span><span class="cx"> exit 0
</span><del>- } elseif { $arg eq "-debug" } {
</del><ins>+ } elseif {$arg eq "-debug"} {
</ins><span class="cx"> set index [expr {[lsearch $argv $arg] + 1}]
</span><span class="cx"> set level [lindex $argv $index]
</span><del>- if { $level >= 0 && $level <= 3 } {
- append arguments "-debug " $level
</del><ins>+ if {$level >= 0 && $level <= 3} {
+ lappend arguments "-debug" $level
</ins><span class="cx"> } else {
</span><span class="cx"> puts "Invalid debug level."
</span><span class="cx"> exit 1
</span><span class="cx"> }
</span><del>- } elseif { $arg eq "-t" } {
</del><ins>+ } elseif {$arg eq "-t"} {
</ins><span class="cx"> set index [expr {[lsearch $argv $arg] + 1}]
</span><span class="cx"> set test_name [lindex $argv $index]
</span><span class="cx"> set no 0
</span><del>-        cd tests
-        set test_suite [glob *.test]
</del><ins>+ cd tests
+ set test_suite [glob *.test]
</ins><span class="cx"> foreach test $test_suite {
</span><del>- if { $test_name != $test } {
</del><ins>+ if {$test_name ne $test} {
</ins><span class="cx"> set no [expr {$no + 1}]
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- if { $no == [llength $test_suite] } {
</del><ins>+ if {$no == [llength $test_suite]} {
</ins><span class="cx"> print_help tests
</span><span class="cx"> exit 1
</span><span class="cx"> }
</span><del>- } elseif { $arg eq "-l" } {
</del><ins>+ } elseif {$arg eq "-l"} {
</ins><span class="cx"> print_help tests
</span><span class="cx"> exit 0
</span><del>- } elseif { $arg eq "-nocolor" } {
</del><ins>+ } elseif {$arg eq "-nocolor"} {
</ins><span class="cx"> set color_out "no"
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> # Run tests
</span><del>-if { $test_name ne ""} {
- set result [eval exec $tcl $test_name $arguments 2>@stderr]
</del><ins>+if {$test_name ne ""} {
+ set result [exec -ignorestderr $tcl $test_name {*}$arguments]
</ins><span class="cx"> puts $result
</span><del>-
</del><span class="cx"> } else {
</span><span class="cx"> cd tests
</span><span class="cx"> set test_suite [glob *.test]
</span><span class="cx">
</span><span class="cx"> foreach test $test_suite {
</span><del>- set result [eval exec $tcl $test $arguments 2>@stderr]
-        set lastline [lindex [split $result "\n"] end]
</del><ins>+ set result [exec -ignorestderr $tcl $test {*}$arguments]
+ set lastline [lindex [split $result "\n"] end]
</ins><span class="cx">
</span><del>-        if {[lrange [split $lastline "\t"] 1 1] != "Total"} {
-         set lastline [lindex [split $result "\n"] end-2]
-         set errmsg [lindex [split $result "\n"] end]
-        }
</del><ins>+ if {[lrange [split $lastline "\t"] 1 1] ne "Total"} {
+ set lastline [lindex [split $result "\n"] end-2]
+ set errmsg [lindex [split $result "\n"] end]
+ }
</ins><span class="cx">
</span><del>-        set splitresult [split $lastline "\t"]
</del><ins>+ set splitresult [split $lastline "\t"]
</ins><span class="cx"> set total [lindex $splitresult 2]
</span><span class="cx"> set pass [lindex $splitresult 4]
</span><span class="cx"> set skip [lindex $splitresult 6]
</span><span class="cx"> set fail [lindex $splitresult 8]
</span><span class="cx">
</span><del>-        # Format output
-        if {$total < 10} { set total "0${total}"}
-        if {$pass < 10} { set pass "0${pass}"}
-        if {$skip < 10} { set skip "0${skip}"}
-        if {$fail < 10} { set fail "0${fail}"}
</del><ins>+ # Format output
+ if {$total < 10} {
+ set total "0${total}"
+ }
+ if {$pass < 10} {
+ set pass "0${pass}"
+ }
+ if {$skip < 10} {
+ set skip "0${skip}"
+ }
+ if {$fail < 10} {
+ set fail "0${fail}"
+ }
</ins><span class="cx">
</span><span class="cx"> # Check for errors.
</span><del>- if { $fail != 0 } { set err "yes" }
</del><ins>+ if {$fail != 0} {
+ set err "yes"
+ }
</ins><span class="cx">
</span><span class="cx"> set out ""
</span><del>- if { ($fail != 0 || $skip != 0) && $color_out eq "" } {
</del><ins>+ if {($fail != 0 || $skip != 0) && $color_out eq ""} {
</ins><span class="cx"> # Color failed tests.
</span><span class="cx"> append out "\x1b\[1;31mTotal:" $total " Passed:" $pass " Failed:" $fail " Skipped:" $skip " \x1b\[0m" $test
</span><span class="cx"> } else {
</span><span class="lines">@@ -113,19 +122,21 @@
</span><span class="cx">
</span><span class="cx"> # Print results and constrints for auto-skipped tests.
</span><span class="cx"> puts $out
</span><del>- if { $skip != 0 } {
</del><ins>+ if {$skip != 0} {
</ins><span class="cx"> set out " Constraint: "
</span><span class="cx"> append out [string trim $errmsg "\t {}"]
</span><span class="cx"> puts $out
</span><span class="cx"> }
</span><del>-        if { $fail != 0 } {
-         set end [expr {[string first $test $result 0] - 1}]
-         puts [string range $result 0 $end]
-        }
</del><ins>+ if {$fail != 0} {
+ set end [expr {[string first $test $result 0] - 1}]
+ puts [string range $result 0 $end]
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # Return 1 if errors were found.
</span><del>-if {$err ne ""} { exit 1 }
</del><ins>+if {$err ne ""} {
+ exit 1
+}
</ins><span class="cx">
</span><span class="cx"> return 0
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcprogramsMakefilein"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/programs/Makefile.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/programs/Makefile.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/programs/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,8 +1,11 @@
</span><span class="cx"> # $Id$
</span><span class="cx">
</span><ins>+srcdir = @srcdir@
+VPATH = @srcdir@
+
</ins><span class="cx"> SUBDIR=        @EXTRA_PROGS@
</span><span class="cx">
</span><del>-include ../../Mk/macports.subdir.mk
</del><ins>+include $(srcdir)/../../Mk/macports.subdir.mk
</ins><span class="cx">
</span><span class="cx"> distclean::
</span><span class="cx">         rm -f Makefile
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcprogramsdaemondoMakefilein"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/programs/daemondo/Makefile.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/programs/daemondo/Makefile.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/programs/daemondo/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,8 +1,9 @@
</span><span class="cx"> # $Id$
</span><span class="cx">
</span><del>-top_srcdir = @top_srcdir@
</del><ins>+srcdir = @srcdir@
+VPATH = @srcdir@
</ins><span class="cx">
</span><del>-include ${top_srcdir}/Mk/macports.autoconf.mk
</del><ins>+include ../../../Mk/macports.autoconf.mk
</ins><span class="cx">
</span><span class="cx"> datarootdir=        @datarootdir@
</span><span class="cx"> mandir=                @mandir@
</span><span class="lines">@@ -34,6 +35,6 @@
</span><span class="cx">         rm -f Makefile
</span><span class="cx">
</span><span class="cx"> install: daemondo
</span><del>-        ${INSTALL} -o ${DSTUSR} -g ${DSTGRP} -m 555 ${PROGRAM} ${DESTDIR}${bindir}
</del><ins>+        ${INSTALL} -o "${DSTUSR}" -g "${DSTGRP}" -m 555 "${PROGRAM}" "${DESTDIR}${bindir}"
</ins><span class="cx">
</span><span class="cx"> test:
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20"></a>
<div class="propset"><h4>Property changes: branches/new-help-system/base/src/registry2.0</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="modfile"><h4>Modified: svn:ignore</h4></div>
<span class="cx">registry.dylib
</span><span class="cx">registry_autoconf.tcl
</span><span class="cx"> + Makefile
</span><span class="cx">pkgIndex.tcl
</span><span class="cx">registry.dylib
</span><span class="cx">registry_autoconf.tcl
</span><a id="branchesnewhelpsystembasesrcregistry20Makefile"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/src/registry2.0/Makefile (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/Makefile        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/registry2.0/Makefile        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,41 +0,0 @@
</span><del>-# $Id$
-
-SRCS = registry.tcl registry_autoconf.tcl registry_util.tcl receipt_flat.tcl receipt_sqlite.tcl portimage.tcl portuninstall.tcl
-OBJS = registry.o util.o \
-        entry.o entryobj.o \
-        file.o fileobj.o
-        #graph.o graphobj.o
-
-SHLIB_NAME= registry${SHLIB_SUFFIX}
-INSTALLDIR= ${DESTDIR}${datadir}/macports/Tcl/registry2.0
-
-include ../../Mk/macports.autoconf.mk
-include ../../Mk/macports.tea.mk
-
-pkgIndex.tcl: $(SRCS)
-
-CFLAGS+=        ${SQLITE3_CFLAGS}
-LIBS+=        ${SQLITE3_LIBS} ../cregistry/cregistry.a
-ifeq ($(shell uname), Darwin)
-SHLIB_LDFLAGS+= -install_name @loader_path/../registry2.0/${SHLIB_NAME}
-endif
-
-${SHLIB_NAME}: ../cregistry/cregistry.a
-
-.PHONY: test
-
-test:: ${SHLIB_NAME}
-        ${TCLSH} tests/entry.tcl ./${SHLIB_NAME}
-        ${TCLSH} tests/depends.tcl ./${SHLIB_NAME}
-
-distclean:: clean
-        rm -f registry_autoconf.tcl
-
-install:: all
-        [ ! -d $(DESTDIR)${datadir}/macports/Tcl/registry1.0 ] || rm -vrf $(DESTDIR)${datadir}/macports/Tcl/registry1.0
-        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
-        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 ${SHLIB_NAME} ${INSTALLDIR}
-        $(SILENT) set -x; for file in ${SRCS}; do \
-                $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}/$$file; \
-        done
-        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
</del></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20Makefileinfromrev122997trunkbasesrcregistry20Makefilein"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/registry2.0/Makefile.in (from rev 122997, trunk/base/src/registry2.0/Makefile.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/Makefile.in         (rev 0)
+++ branches/new-help-system/base/src/registry2.0/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+# $Id$
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include ../../Mk/macports.autoconf.mk
+
+SRCS_AUTOCONF = registry_autoconf.tcl
+SRCS = registry.tcl registry_util.tcl receipt_flat.tcl receipt_sqlite.tcl portimage.tcl portuninstall.tcl
+OBJS = registry.o util.o \
+        entry.o entryobj.o \
+        file.o fileobj.o \
+        portgroup.o portgroupobj.o
+        #graph.o graphobj.o
+
+SHLIB_NAME= registry${SHLIB_SUFFIX}
+INSTALLDIR= ${DESTDIR}${TCL_PACKAGE_PATH}/registry2.0
+
+include $(srcdir)/../../Mk/macports.tea.mk
+
+CPPFLAGS+=-D_XOPEN_SOURCE=600
+
+pkgIndex.tcl: $(SRCS) $(SRCS_AUTOCONF)
+
+CFLAGS+=        ${SQLITE3_CFLAGS}
+LIBS+=        ${SQLITE3_LIBS} ../cregistry/cregistry.a
+ifeq ($(shell uname), Darwin)
+SHLIB_LDFLAGS+= -install_name @loader_path/../registry2.0/${SHLIB_NAME}
+endif
+
+${SHLIB_NAME}: ../cregistry/cregistry.a
+
+.PHONY: test
+
+test:: ${SHLIB_NAME}
+        ${TCLSH} $(srcdir)/tests/entry.tcl ./${SHLIB_NAME}
+        ${TCLSH} $(srcdir)/tests/depends.tcl ./${SHLIB_NAME}
+
+distclean:: clean
+        rm -f registry_autoconf.tcl
+        rm -f Makefile
+
+install:: all $(SHLIB_NAME)
+        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
+        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "${SHLIB_NAME}" "${INSTALLDIR}"
+        $(SILENT) set -x; for file in ${SRCS}; do \
+                $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$(srcdir)/$$file" "${INSTALLDIR}/$$file"; \
+        done
+        $(SILENT) set -x; for file in ${SRCS_AUTOCONF}; do \
+                $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$$file" "${INSTALLDIR}/$$file"; \
+        done
+        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${INSTALLDIR}"
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20entryc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/registry2.0/entry.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/entry.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/registry2.0/entry.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -153,7 +153,7 @@
</span><span class="cx"> list_handle = Tcl_GetAssocData(interp, "registry::deleted", NULL);
</span><span class="cx"> if (list_handle) {
</span><span class="cx"> entry_list* list = *list_handle;
</span><del>- *list_handle = malloc(sizeof(entry_list*));
</del><ins>+ *list_handle = malloc(sizeof(entry_list));
</ins><span class="cx"> if (*list_handle) {
</span><span class="cx"> (*list_handle)->entry = entry;
</span><span class="cx"> (*list_handle)->next = list;
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20entryobjc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/registry2.0/entryobj.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/entryobj.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/registry2.0/entryobj.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -356,6 +356,59 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static int entry_obj_add_portgroup(Tcl_Interp* interp, reg_entry* entry, int objc,
+ Tcl_Obj* CONST objv[]) {
+ reg_registry* reg = registry_for(interp, reg_attached);
+ if (objc != 6) {
+ Tcl_WrongNumArgs(interp, 1, objv, "addgroup name version sha256 size");
+ return TCL_ERROR;
+ } else if (reg == NULL) {
+ return TCL_ERROR;
+ } else {
+ reg_error error;
+ char* name = Tcl_GetString(objv[2]);
+ char* version = Tcl_GetString(objv[3]);
+ char* sha256 = Tcl_GetString(objv[4]);
+ Tcl_WideInt tclsize;
+ Tcl_GetWideIntFromObj(interp, objv[5], &tclsize);
+ sqlite_int64 size = (sqlite_int64)tclsize;
+ if (reg_entry_addgroup(entry, name, version, sha256, size, &error)) {
+ return TCL_OK;
+ }
+ return registry_failed(interp, &error);
+ }
+}
+
+static int entry_obj_get_portgroups(Tcl_Interp* interp, reg_entry* entry, int objc,
+ Tcl_Obj* CONST objv[]) {
+ reg_registry* reg = registry_for(interp, reg_attached);
+ if (objc != 2) {
+ Tcl_WrongNumArgs(interp, 1, objv, "groups_used");
+ return TCL_ERROR;
+ } else if (reg == NULL) {
+ return TCL_ERROR;
+ } else {
+ reg_portgroup** portgroups;
+ reg_error error;
+ int portgroup_count = reg_entry_getgroups(entry, &portgroups, &error);
+ if (portgroup_count >= 0) {
+ Tcl_Obj** objs;
+ int retval = TCL_ERROR;
+ if (list_portgroup_to_obj(interp, &objs, portgroups, portgroup_count, &error)){
+ Tcl_Obj* result = Tcl_NewListObj(portgroup_count, objs);
+ Tcl_SetObjResult(interp, result);
+ free(objs);
+ retval = TCL_OK;
+ } else {
+ retval = registry_failed(interp, &error);
+ }
+ free(portgroups);
+ return retval;
+ }
+ return registry_failed(interp, &error);
+ }
+}
+
</ins><span class="cx"> typedef struct {
</span><span class="cx"> char* name;
</span><span class="cx"> int (*function)(Tcl_Interp* interp, reg_entry* entry, int objc,
</span><span class="lines">@@ -391,6 +444,9 @@
</span><span class="cx"> { "dependents", entry_obj_dependents },
</span><span class="cx"> { "dependencies", entry_obj_dependencies },
</span><span class="cx"> { "depends", entry_obj_depends },
</span><ins>+ /* portgroups */
+ { "addgroup", entry_obj_add_portgroup },
+ { "groups_used", entry_obj_get_portgroups },
</ins><span class="cx"> { NULL, NULL }
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20portgroupcfromrev122997trunkbasesrcregistry20portgroupc"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/registry2.0/portgroup.c (from rev 122997, trunk/base/src/registry2.0/portgroup.c) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/portgroup.c         (rev 0)
+++ branches/new-help-system/base/src/registry2.0/portgroup.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,294 @@
</span><ins>+/*
+ * vim:tw=80:expandtab
+ * $Id$
+ *
+ * Copyright (c) 2014 The MacPorts Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sqlite3.h>
+#include <stdlib.h>
+#include <string.h>
+#include <tcl.h>
+
+#include <cregistry/portgroup.h>
+#include <cregistry/util.h>
+
+#include "portgroup.h"
+#include "portgroupobj.h"
+#include "registry.h"
+#include "util.h"
+
+/**
+ * Converts a command name into a `reg_portgroup`.
+ *
+ * @param [in] interp Tcl interpreter to check within
+ * @param [in] name name of portgroup to get
+ * @param [out] errPtr description of error if the portgroup can't be found
+ * @return a portgroup, or NULL if one couldn't be found
+ * @see get_object
+ */
+static reg_portgroup* get_portgroup(Tcl_Interp* interp, char* name, reg_error* errPtr) {
+ return (reg_portgroup*)get_object(interp, name, "portgroup", portgroup_obj_cmd, errPtr);
+}
+
+/**
+ * Removes the portgroup from the Tcl interpreter. Doesn't actually delete it since
+ * that's the registry's job. This is written to be used as the
+ * `Tcl_CmdDeleteProc` for an portgroup object command.
+ *
+ * @param [in] clientData address of a reg_portgroup to remove
+ */
+void delete_portgroup(ClientData clientData) {
+ reg_portgroup* portgroup = (reg_portgroup*)clientData;
+ free(portgroup->proc);
+ portgroup->proc = NULL;
+}
+
+/**
+ * registry::portgroup open id name version size sha256
+ *
+ * Opens a portgroup matching the given parameters.
+ */
+static int portgroup_open(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]) {
+        reg_registry* reg = registry_for(interp, reg_attached);
+        if (objc != 7) {
+                Tcl_WrongNumArgs(interp, 1, objv, "open id name version size sha256");
+                return TCL_ERROR;
+        } else if (reg == NULL) {
+                return TCL_ERROR;
+        } else {
+                char* id = Tcl_GetString(objv[2]);
+                char* name = Tcl_GetString(objv[3]);
+ char* version = Tcl_GetString(objv[4]);
+ char* size = Tcl_GetString(objv[5]);
+ char* sha256 = Tcl_GetString(objv[6]);
+
+                reg_error error;
+                reg_portgroup* portgroup = reg_portgroup_open(reg, id, name, version, size, sha256, &error);
+                if (portgroup != NULL) {
+                        Tcl_Obj* result;
+                        if (portgroup_to_obj(interp, &result, portgroup, NULL, &error)) {
+                                Tcl_SetObjResult(interp, result);
+                                return TCL_OK;
+                        }
+                }
+                return registry_failed(interp, &error);
+        }
+        return TCL_ERROR;
+}
+
+/**
+ * registry::portgroup close portgroup
+ *
+ * Closes a portgroup. It will remain in the registry.
+ */
+static int portgroup_close(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]) {
+        if (objc != 3) {
+                Tcl_WrongNumArgs(interp, 1, objv, "close portgroup");
+                return TCL_ERROR;
+        } else {
+                reg_error error;
+                char* proc = Tcl_GetString(objv[2]);
+                reg_portgroup* portgroup = get_portgroup(interp, proc, &error);
+                if (portgroup == NULL) {
+                        return registry_failed(interp, &error);
+                } else {
+                        Tcl_DeleteCommand(interp, proc);
+                        return TCL_OK;
+                }
+        }
+}
+
+typedef struct {
+ char* name;
+ reg_strategy strategy;
+} strategy_type;
+
+static strategy_type strategies[] = {
+ { "-exact", reg_strategy_exact },
+ { "-glob", reg_strategy_glob },
+ { "-regexp", reg_strategy_regexp },
+ { "-null", reg_strategy_null },
+ { "--", reg_strategy_exact },
+ { NULL, 0 }
+};
+
+/*
+ * registry::portgroup search ?key value ...?
+ *
+ * Searches the registry for portgroups for which each key's value is equal to the
+ * given value. To find all portgroups, call `portgroup search` with no key-value pairs.
+ * For each key, can be given an option of -exact, -glob, -regexp or -null to
+ * specify the matching strategy; defaults to exact.
+ */
+static int portgroup_search(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]) {
+ int i, j;
+ reg_registry* reg = registry_for(interp, reg_attached);
+ if (reg == NULL) {
+ return TCL_ERROR;
+ } else {
+ char** keys;
+ char** vals;
+ int* strats;
+ int key_count = 0;
+ reg_portgroup** portgroups;
+ reg_error error;
+ int portgroup_count;
+ for (i = 2; i < objc;) {
+ int index, strat_index, val_length;
+ if (Tcl_GetIndexFromObj(interp, objv[i], portgroup_props, "search key",
+ 0, &index) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ /* we ate the key value */
+ i++;
+
+ /* check whether there's a strategy */
+ if (Tcl_GetString(objv[i])[0] == '-'
+ && Tcl_GetIndexFromObjStruct(interp, objv[i], strategies,
+ sizeof(strategy_type), "option", 0, &strat_index)
+ != TCL_ERROR) {
+ /* this key has a strategy specified, eat the strategy parameter */
+ i++;
+
+ if (strategies[strat_index].strategy != reg_strategy_null) {
+ /* this key must also have a value */
+
+ if (Tcl_GetStringFromObj(objv[i], &val_length) == NULL
+ || val_length == 0) {
+ Tcl_WrongNumArgs(interp, 2, objv,
+ "search ?key ?options? value ...?");
+ return TCL_ERROR;
+ }
+
+ i++;
+ }
+ } else {
+ /* this key must also have a value */
+
+ if (Tcl_GetStringFromObj(objv[i], &val_length) == NULL
+ || val_length == 0) {
+ Tcl_WrongNumArgs(interp, 2, objv,
+ "search ?key ?options? value ...?");
+ return TCL_ERROR;
+ }
+
+ i++;
+ }
+
+ key_count++;
+ }
+
+ keys = malloc(key_count * sizeof(char*));
+ vals = malloc(key_count * sizeof(char*));
+ strats = malloc(key_count * sizeof(int));
+ if (!keys || !vals || !strats) {
+ return TCL_ERROR;
+ }
+ for (i = 2, j = 0; i < objc && j < key_count; j++) {
+ int strat_index;
+
+ keys[j] = Tcl_GetString(objv[i++]);
+
+ /* try to get the strategy */
+ if (Tcl_GetString(objv[i])[0] == '-'
+ && Tcl_GetIndexFromObjStruct(interp, objv[i], strategies,
+ sizeof(strategy_type), "option", 0, &strat_index)
+ != TCL_ERROR) {
+ /* this key has a strategy specified */
+ i++;
+
+ strats[j] = strategies[strat_index].strategy;
+ } else {
+ /* use default strategy */
+ strats[j] = reg_strategy_exact;
+ }
+
+ if (strats[j] != reg_strategy_null) {
+ vals[j] = Tcl_GetString(objv[i++]);
+ } else {
+ vals[j] = NULL;
+ }
+ }
+ portgroup_count = reg_portgroup_search(reg, keys, vals, strats, key_count,
+ &portgroups, &error);
+ free(keys);
+ free(vals);
+ free(strats);
+ if (portgroup_count >= 0) {
+ int retval;
+ Tcl_Obj* resultObj;
+ Tcl_Obj** objs;
+ if (list_portgroup_to_obj(interp, &objs, portgroups, portgroup_count, &error)){
+ resultObj = Tcl_NewListObj(portgroup_count, objs);
+ Tcl_SetObjResult(interp, resultObj);
+ free(objs);
+ retval = TCL_OK;
+ } else {
+ retval = registry_failed(interp, &error);
+ }
+ free(portgroups);
+ return retval;
+ }
+ return registry_failed(interp, &error);
+ }
+}
+
+typedef struct {
+ char* name;
+ int (*function)(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
+} portgroup_cmd_type;
+
+static portgroup_cmd_type portgroup_cmds[] = {
+ /* Global commands */
+ { "open", portgroup_open },
+ { "close", portgroup_close },
+ { "search", portgroup_search },
+ { NULL, NULL }
+};
+
+/*
+ * registry::portgroup cmd ?arg ...?
+ *
+ * Commands manipulating portgroup entries in the registry. This can be called `registry::portgroup`
+ */
+int portgroup_cmd(ClientData clientData UNUSED, Tcl_Interp* interp, int objc,
+ Tcl_Obj* CONST objv[]) {
+ int cmd_index;
+ if (objc < 2) {
+ Tcl_WrongNumArgs(interp, 1, objv, "cmd ?arg ...?");
+ return TCL_ERROR;
+ }
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], portgroup_cmds,
+ sizeof(portgroup_cmd_type), "cmd", 0, &cmd_index) == TCL_OK) {
+ portgroup_cmd_type* cmd = &portgroup_cmds[cmd_index];
+ return cmd->function(interp, objc, objv);
+ }
+ return TCL_ERROR;
+}
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20portgrouphfromrev122997trunkbasesrcregistry20portgrouph"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/registry2.0/portgroup.h (from rev 122997, trunk/base/src/registry2.0/portgroup.h) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/portgroup.h         (rev 0)
+++ branches/new-help-system/base/src/registry2.0/portgroup.h        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+/*
+ * vim:tw=80:expandtab
+ * $Id$
+ *
+ * Copyright (c) 2014 The MacPorts Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _PORTGROUP_H
+#define _PORTGROUP_H
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <tcl.h>
+
+void delete_portgroup(ClientData clientData);
+
+int portgroup_cmd(ClientData clientData UNUSED, Tcl_Interp* interp, int objc,
+ Tcl_Obj* CONST objv[]);
+
+#endif /* _PORTGROUP_H */
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20portgroupobjcfromrev122997trunkbasesrcregistry20portgroupobjc"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/registry2.0/portgroupobj.c (from rev 122997, trunk/base/src/registry2.0/portgroupobj.c) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/portgroupobj.c         (rev 0)
+++ branches/new-help-system/base/src/registry2.0/portgroupobj.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,135 @@
</span><ins>+/*
+ * vim:tw=80:expandtab
+ * $Id$
+ *
+ * Copyright (c) 2014 The MacPorts Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <stdlib.h>
+#include <tcl.h>
+#include <sqlite3.h>
+
+#include "portgroupobj.h"
+#include "registry.h"
+#include "util.h"
+
+const char* portgroup_props[] = {
+ "name",
+ "version",
+ "size",
+ "sha256",
+ NULL
+};
+
+/* ${portgroup} prop ?value? */
+static int portgroup_obj_prop(Tcl_Interp* interp, reg_portgroup* portgroup, int objc,
+ Tcl_Obj* CONST objv[]) {
+ int index;
+ if (objc > 3) {
+ Tcl_WrongNumArgs(interp, 2, objv, "?value?");
+ return TCL_ERROR;
+ }
+ if (objc == 2) {
+ /* ${portgroup} prop; return the current value */
+ reg_registry* reg = registry_for(interp, reg_attached);
+ if (reg == NULL) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetIndexFromObj(interp, objv[1], portgroup_props, "prop", 0, &index)
+ == TCL_OK) {
+ char* key = Tcl_GetString(objv[1]);
+ char* value;
+ reg_error error;
+ if (reg_portgroup_propget(portgroup, key, &value, &error)) {
+ Tcl_Obj* result = Tcl_NewStringObj(value, -1);
+ Tcl_SetObjResult(interp, result);
+ free(value);
+ return TCL_OK;
+ }
+ return registry_failed(interp, &error);
+ }
+ return TCL_ERROR;
+ } else {
+ /* ${portgroup} prop name value; set a new value */
+ reg_registry* reg = registry_for(interp, reg_attached);
+ if (reg == NULL) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetIndexFromObj(interp, objv[1], portgroup_props, "prop", 0, &index)
+ == TCL_OK) {
+ char* key = Tcl_GetString(objv[1]);
+ char* value = Tcl_GetString(objv[2]);
+ reg_error error;
+ if (reg_portgroup_propset(portgroup, key, value, &error)) {
+ return TCL_OK;
+ }
+ return registry_failed(interp, &error);
+ }
+ return TCL_ERROR;
+ }
+}
+
+typedef struct {
+ char* name;
+ int (*function)(Tcl_Interp* interp, reg_portgroup* portgroup, int objc,
+ Tcl_Obj* CONST objv[]);
+} portgroup_obj_cmd_type;
+
+static portgroup_obj_cmd_type portgroup_cmds[] = {
+ /* keys */
+ { "name", portgroup_obj_prop },
+ { "version", portgroup_obj_prop },
+ { "size", portgroup_obj_prop },
+ { "sha256", portgroup_obj_prop },
+ { NULL, NULL }
+};
+
+/* ${portgroup} cmd ?arg ...? */
+/* This function implements the command that will be called when a portgroup
+ * created by `registry::portgroup` is used as a procedure. Since all data is kept
+ * in a temporary sqlite3 database that is created for the current interpreter,
+ * none of the sqlite3 functions used have any error checking. That should be a
+ * safe assumption, since nothing outside of registry:: should ever have the
+ * chance to touch it.
+ */
+int portgroup_obj_cmd(ClientData clientData, Tcl_Interp* interp, int objc,
+ Tcl_Obj* CONST objv[]) {
+ int cmd_index;
+ if (objc < 2) {
+ Tcl_WrongNumArgs(interp, 1, objv, "cmd ?arg ...?");
+ return TCL_ERROR;
+ }
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], portgroup_cmds,
+ sizeof(portgroup_obj_cmd_type), "cmd", 0, &cmd_index) == TCL_OK) {
+ portgroup_obj_cmd_type* cmd = &portgroup_cmds[cmd_index];
+ return cmd->function(interp, (reg_portgroup*)clientData, objc, objv);
+ }
+ return TCL_ERROR;
+}
+
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20portgroupobjhfromrev122997trunkbasesrcregistry20portgroupobjh"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/registry2.0/portgroupobj.h (from rev 122997, trunk/base/src/registry2.0/portgroupobj.h) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/portgroupobj.h         (rev 0)
+++ branches/new-help-system/base/src/registry2.0/portgroupobj.h        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * vim:tw=80:expandtab
+ * $Id$
+ *
+ * Copyright (c) 2014 The MacPorts Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _PORTGROUP_OBJ_CMD_H
+#define _PORTGROUP_OBJ_CMD_H
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <tcl.h>
+#include <sqlite3.h>
+
+extern const char* portgroup_props[];
+
+int portgroup_obj_cmd(ClientData clientData, Tcl_Interp* interp, int objc,
+ Tcl_Obj* CONST objv[]);
+
+#endif /* _PORTGROUP_OBJ_CMD_H */
</ins></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20portimagetcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/registry2.0/portimage.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/portimage.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/registry2.0/portimage.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -40,6 +40,8 @@
</span><span class="cx"> package require macports 1.0
</span><span class="cx"> package require Pextlib 1.0
</span><span class="cx">
</span><ins>+package require Tclx
+
</ins><span class="cx"> set UI_PREFIX "--> "
</span><span class="cx">
</span><span class="cx"> # Port Images are installations of the destroot of a port into a compressed
</span><span class="lines">@@ -132,7 +134,6 @@
</span><span class="cx"> ui_msg "$UI_PREFIX [format [msgcat::mc "Activating %s @%s"] $name $specifier]"
</span><span class="cx">
</span><span class="cx"> _activate_contents $requested
</span><del>- $requested state installed
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # takes a composite version spec rather than separate version,revision,variants
</span><span class="lines">@@ -199,7 +200,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> _deactivate_contents $requested [$requested files] $force
</span><del>- $requested state imaged
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> proc _check_registry {name version revision variants} {
</span><span class="lines">@@ -217,7 +217,7 @@
</span><span class="cx"> append composite_spec _${revision}${variants}
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- set ilist [eval registry::entry imaged $searchkeys]
</del><ins>+ set ilist [registry::entry imaged {*}$searchkeys]
</ins><span class="cx">
</span><span class="cx"> if { [llength $ilist] > 1 } {
</span><span class="cx"> ui_msg "$UI_PREFIX [msgcat::mc "The following versions of $name are currently installed:"]"
</span><span class="lines">@@ -268,10 +268,10 @@
</span><span class="cx"> ::file mkdir $dstfile
</span><span class="cx"> # fix attributes on the directory.
</span><span class="cx"> if {[getuid] == 0} {
</span><del>- eval ::file attributes {$dstfile} [::file attributes $srcfile]
</del><ins>+ ::file attributes $dstfile {*}[::file attributes $srcfile]
</ins><span class="cx"> } else {
</span><span class="cx"> # not root, so can't set owner/group
</span><del>- eval ::file attributes {$dstfile} -permissions [::file attributes $srcfile -permissions]
</del><ins>+ ::file attributes $dstfile -permissions {*}[::file attributes $srcfile -permissions]
</ins><span class="cx"> }
</span><span class="cx"> # set mtime on installed element
</span><span class="cx"> ::file mtime $dstfile [::file mtime $srcfile]
</span><span class="lines">@@ -344,7 +344,13 @@
</span><span class="cx"> if {[regexp {z2?$} ${unarchive.type}]} {
</span><span class="cx"> set unarchive.args {-}
</span><span class="cx"> if {[regexp {bz2?$} ${unarchive.type}]} {
</span><del>- set gzip "bzip2"
</del><ins>+ if {![catch {macports::binaryInPath lbzip2}]} {
+ set gzip "lbzip2"
+ } elseif {![catch {macports::binaryInPath pbzip2}]} {
+ set gzip "pbzip2"
+ } else {
+ set gzip "bzip2"
+ }
</ins><span class="cx"> } elseif {[regexp {lz$} ${unarchive.type}]} {
</span><span class="cx"> set gzip "lzma"
</span><span class="cx"> } elseif {[regexp {xz$} ${unarchive.type}]} {
</span><span class="lines">@@ -539,6 +545,24 @@
</span><span class="cx"> lappend rollback_filelist $file
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+
+ # Recording that the port has been activated should be done
+ # here so that this information cannot be inconsistent with the
+ # state of the files on disk.
+ $port state installed
+ } catch {{POSIX SIG SIGINT} eCode eMessage} {
+ # Pressing ^C will (often?) print "^C" to the terminal; send
+ # a linebreak so our message appears after that.
+ ui_msg ""
+ ui_msg "Control-C pressed, rolling back, please wait."
+ # can't do it here since we're already inside a transaction
+ set deactivate_this yes
+ throw
+ } catch {{POSIX SIG SIGTERM} eCode eMessage} {
+ ui_msg "SIGTERM received, rolling back, please wait."
+ # can't do it here since we're already inside a transaction
+ set deactivate_this yes
+ throw
</ins><span class="cx"> } catch {*} {
</span><span class="cx"> ui_debug "Activation failed, rolling back."
</span><span class="cx"> # can't do it here since we're already inside a transaction
</span><span class="lines">@@ -547,22 +571,41 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> } catch {*} {
</span><del>- # roll back activation of this port
- if {[info exists deactivate_this]} {
- _deactivate_contents $port $rollback_filelist yes yes
- }
- # if any errors occurred, move backed-up files back to their original
- # locations, then rethrow the error. Transaction rollback will take care
- # of this in the registry.
- foreach file $backups {
- ::file rename -force -- "${file}${baksuffix}" $file
- }
- # reactivate deactivated ports
- foreach entry [array names todeactivate] {
- if {[$entry state] eq "imaged" && ($noexec || ![registry::run_target $entry activate ""])} {
- activate [$entry name] [$entry version] [$entry revision] [$entry variants] [list ports_activate_no-exec $noexec]
</del><ins>+ # This code must run to completion, or the installation might be left
+ # in an inconsistent state. We store the old signal handling state,
+ # block the critical signals and restore to the previous state instead
+ # of unblocking.
+ # Note that this still contains a race condition: A user could press ^C
+ # fast enough so that the second error arrives before the error is
+ # caught, re-thrown and re-caught here. As far as I can see, there's no
+ # easy way around this problem.
+ set osignals [signal get {TERM INT}]
+ try {
+ # Block signals to avoid inconsistiencies.
+ signal block {TERM INT}
+
+ # roll back activation of this port
+ if {[info exists deactivate_this]} {
+ _deactivate_contents $port $rollback_filelist yes yes
</ins><span class="cx"> }
</span><ins>+ # if any errors occurred, move backed-up files back to their original
+ # locations, then rethrow the error. Transaction rollback will take care
+ # of this in the registry.
+ foreach file $backups {
+ ::file rename -force -- "${file}${baksuffix}" $file
+ }
+ # reactivate deactivated ports
+ foreach entry [array names todeactivate] {
+ if {[$entry state] eq "imaged" && ($noexec || ![registry::run_target $entry activate ""])} {
+ activate [$entry name] [$entry version] [$entry revision] [$entry variants] [list ports_activate_no-exec $noexec]
+ }
+ }
+ } finally {
+ # We've completed all critical operations, re-enable the TERM and
+ # INT signals.
+ signal set $osignals
</ins><span class="cx"> }
</span><ins>+
</ins><span class="cx"> # remove temp image dir
</span><span class="cx"> ::file delete -force $extracted_dir
</span><span class="cx"> throw
</span><span class="lines">@@ -636,18 +679,38 @@
</span><span class="cx"> # are after their elements.
</span><span class="cx"> set files [lsort -decreasing -unique $files]
</span><span class="cx">
</span><del>- # Remove all elements.
- if {!$rollback} {
- registry::write {
- $port deactivate $imagefiles
</del><ins>+ # Avoid interruptions while removing the files and updating the database to
+ # prevent inconsistencies from forming between filesystem and database.
+ set osignals [signal get {TERM INT}]
+
+ try {
+ # Block the TERM and INT signals to avoid being interrupted. Note that
+ # they might already be block at this point because
+ # _deactivate_contents might be called during rollback of
+ # _activate_contents, but because we're storing the old signal state
+ # and returning to that instead of unblocking it doesn't matter.
+ signal block {TERM INT}
+
+ # Remove all elements.
+ if {!$rollback} {
+ registry::write {
+ $port deactivate $imagefiles
+ foreach file $files {
+ _deactivate_file $file
+ }
+
+ # Update the port's state in the same transaction as the file
+ # delete operations.
+ $port state imaged
+ }
+ } else {
</ins><span class="cx"> foreach file $files {
</span><span class="cx"> _deactivate_file $file
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- } else {
- foreach file $files {
- _deactivate_file $file
- }
</del><ins>+ } finally {
+ # restore the signal block state
+ signal set $osignals
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20portuninstalltcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/registry2.0/portuninstall.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/portuninstall.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/registry2.0/portuninstall.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">
</span><span class="cx"> proc uninstall {portname {version ""} {revision ""} {variants 0} {optionslist ""}} {
</span><span class="cx"> global uninstall.force uninstall.nochecksum UI_PREFIX \
</span><del>- macports::portimagefilepath
</del><ins>+ macports::portimagefilepath macports::registry.path
</ins><span class="cx"> array set options $optionslist
</span><span class="cx"> if {[info exists options(subport)]} {
</span><span class="cx"> # don't want this set when calling registry::run_target
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> append composite_spec _${revision}${variants}
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- set ilist [eval registry::entry imaged $searchkeys]
</del><ins>+ set ilist [registry::entry imaged {*}$searchkeys]
</ins><span class="cx"> if { [llength $ilist] > 1 } {
</span><span class="cx"> # set portname again since the one we were passed may not have had the correct case
</span><span class="cx"> set portname [[lindex $ilist 0] name]
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx"> # look up deps from the saved portfile if possible
</span><span class="cx"> if {![catch {set mport [mportopen_installed [$port name] [$port version] [$port revision] [$port variants] $optionslist]}]} {
</span><span class="cx"> array set depportinfo [mportinfo $mport]
</span><del>- mportclose_installed $mport
</del><ins>+ mportclose $mport
</ins><span class="cx"> foreach type $deptypes {
</span><span class="cx"> if {[info exists depportinfo($type)]} {
</span><span class="cx"> foreach dep $depportinfo($type) {
</span><span class="lines">@@ -217,9 +217,37 @@
</span><span class="cx"> # files so just ignore the failure
</span><span class="cx"> catch {file delete [::file dirname $imagefile]}
</span><span class="cx">
</span><ins>+ # We want to delete the portfile if not referenced by any other ports
+ set portfile [$ref portfile]
+
+ # and likewise the portgroups
+ set portgroups [list]
+ foreach pg [$ref groups_used] {
+ lappend portgroups [list [$pg name] [$pg version] [$pg size] [$pg sha256]]
+ }
+
</ins><span class="cx"> registry::write {
</span><span class="cx"> registry::entry delete $port
</span><span class="cx"> }
</span><ins>+
+ set portfile_path [file join ${registry.path} registry portfiles ${portname}-${version}_${revision} $portfile]
+ if {[registry::entry search portfile $portfile] eq {}} {
+ file delete -force $portfile_path
+ catch {file delete [file dirname $portfile_path]}
+ }
+
+ set reg_portgroups_dir [file join ${registry.path} registry portgroups]
+ foreach pg $portgroups {
+ set pgname [lindex $pg 0]
+ set pgversion [lindex $pg 1]
+ set pgsize [lindex $pg 2]
+ set pgsha256 [lindex $pg 3]
+ if {[registry::portgroup search name $pgname version $pgversion size $pgsize sha256 $pgsha256] eq {}} {
+ set pg_reg_dir [file join $reg_portgroups_dir ${pgsha256}-${pgsize}]
+ file delete -force ${pg_reg_dir}/${pgname}-${pgversion}.tcl
+ catch {file delete $pg_reg_dir}
+ }
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # uninstall dependencies if requested
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20receipt_sqlitetcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/registry2.0/receipt_sqlite.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/receipt_sqlite.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/registry2.0/receipt_sqlite.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -41,8 +41,16 @@
</span><span class="cx"> # registry2.0 wrapper code that matches old receipt_flat interface
</span><span class="cx"> ##
</span><span class="cx"> namespace eval receipt_sqlite {
</span><del>-
-# return list of active ports, or active version of port 'name' if specified
</del><ins>+##
+# Return a list of active ports, or the active version of port \a name, if
+# specified.
+#
+# @param name
+# Empty string to return a list of all ports or the name of a port to
+# return only the active version of a single port.
+# @return A list of matching ports where each entry is a list of (name,
+# version, revision, variants, 1 or 0 indicating whether a port's state
+# is "installed", epoch).
</ins><span class="cx"> proc active {name} {
</span><span class="cx"> if {$name ne ""} {
</span><span class="cx"> set ports [registry::entry installed $name]
</span><span class="lines">@@ -57,59 +65,94 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ##
</span><del>-# Open an existing entry and return a reference.
</del><ins>+# Open an existing entry in the registry uniquely identified by name, version,
+# revision, variants and epoch and return a reference.
+#
+# @param name
+# The name of the port to be opened.
+# @param version
+# The version of the port to be opened.
+# @param revision
+# The revision of the port to be opened.
+# @param variants
+# The canonical variant string of the port to be opened.
+# @param epoch
+# The epoch of the port to be opened.
+# @return A reference to the requested port on success. Raises an error on
+# failure (e.g. if the port isn't found or allocating the reference
+# fails).
</ins><span class="cx"> proc open_entry {name version revision variants epoch} {
</span><span class="cx"> return [registry::entry open $name $version $revision $variants $epoch]
</span><span class="cx"> }
</span><span class="cx">
</span><del>-# Check to see if an entry exists
</del><ins>+##
+# Check whether a registry entry exists.
+#
+# @param name
+# The name to be searched in the registry.
+# @param version
+# The version to be searched in the registry.
+# @param revision
+# The revision to be searched in the registry. Defaults to 0.
+# @param variants
+# The canonical variant string to be searched in the registry. Defaults
+# to an empty string.
+# @return 1, if the port exists, 0 otherwise.
</ins><span class="cx"> proc entry_exists {name version {revision 0} {variants ""}} {
</span><span class="cx"> if {![catch {set ports [registry::entry search name $name version $version revision $revision variants $variants]}] && [llength $ports] > 0} {
</span><span class="cx"> return 1
</span><span class="cx"> }
</span><del>-        return 0
</del><ins>+ return 0
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-# Check to see if an entry exists
</del><ins>+##
+# Check whether a registry entry with the given name exists.
+#
+# @param name
+# The name to be searched in the registry.
+# @return 1 if a port with the given name exists in the registry, 0 otherwise.
</ins><span class="cx"> proc entry_exists_for_name {name} {
</span><del>-        if {![catch {set ports [registry::entry search name $name]}] && [llength $ports] > 0} {
-         return 1
-        }
-        return 0
</del><ins>+ if {![catch {set ports [registry::entry search name $name]}] && [llength $ports] > 0} {
+ return 1
+ }
+ return 0
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ##
</span><del>-# determine if a file is registered in the file map, and if it is,
-# get its port.
</del><ins>+# Determine if a file is registered in the file map, and if it is, get the name
+# of the port it is registered to.
</ins><span class="cx"> #
</span><del>-# - file        the file to test
-# returns 0 if the file is not registered, the name of the port otherwise.
-#
</del><ins>+# @param file
+# The full path to the file to be tested.
+# @return 0 if the file is not registered to any port. The name of the port
+# otherwise.
</ins><span class="cx"> proc file_registered {file} {
</span><span class="cx"> set port [registry::entry owner $file]
</span><del>-        if {$port ne ""} {
-                return [$port name]
-        } else {
-                return 0
-        }
</del><ins>+ if {$port ne ""} {
+ return [$port name]
+ } else {
+ return 0
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ##
</span><del>-# determine if a port is registered in the file map, and if it is,
-# get its installed (activated) files.
</del><ins>+# Determine if a port is registered in the file map, and if it is, get its
+# installed (activated) files.
</ins><span class="cx"> #
</span><del>-# - port        the port to test
-# returns 0 if the port is not registered, the list of its files otherwise.
</del><ins>+# @param name
+# The name of the port to be tested.
+# @return 0 if no port with the given name is active. An empty string, if no
+# port with the given name is active, but a port with the given name is
+# imaged (i.e. installed, but inactive). A list of files if the given
+# port is installed and active.
</ins><span class="cx"> proc port_registered {name} {
</span><del>-        if {![catch {set ports [registry::entry installed $name]}]
-         && [llength $ports] > 0} {
-         # should never return more than one port
-         set port [lindex $ports 0]
-                return [$port files]
-        } elseif {![catch {set ports [registry::entry imaged $name]}]
-         && [llength $ports] > 0} {
-         return ""
-        } else {
</del><ins>+ if {![catch {set ports [registry::entry installed $name]}] && [llength $ports] > 0} {
+ # should never return more than one port
+ set port [lindex $ports 0]
+ return [$port files]
+ } elseif {![catch {set ports [registry::entry imaged $name]}] && [llength $ports] > 0} {
+ return ""
+ } else {
</ins><span class="cx"> return 0
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -117,8 +160,13 @@
</span><span class="cx"> ##
</span><span class="cx"> # Retrieve a property from a registry entry.
</span><span class="cx"> #
</span><del>-# ref                        reference to the entry.
-# property                key for the property to retrieve.
</del><ins>+# @param ref
+# Reference to the registry entry.
+# @param property
+# Name of the property to retrieve.
+# @return Return value depends on the property queried. Returns 0 if an error
+# occured while trying to access the property (but note that 0 may be
+# a perfectly valid value for the key you're querying).
</ins><span class="cx"> proc property_retrieve {ref property} {
</span><span class="cx"> switch $property {
</span><span class="cx"> active {
</span><span class="lines">@@ -137,9 +185,12 @@
</span><span class="cx"> ##
</span><span class="cx"> # Store a property in a registry entry.
</span><span class="cx"> #
</span><del>-# ref                        reference to the entry.
-# property                key for the property to set.
-# value value to set it to.
</del><ins>+# @param ref
+# Reference to the registry entry.
+# @param property
+# Name of the property to set.
+# @param value
+# New value for the given key in the reference.
</ins><span class="cx"> proc property_store {ref property value} {
</span><span class="cx"> switch $property {
</span><span class="cx"> active {
</span><span class="lines">@@ -155,56 +206,85 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-# Return installed ports
</del><ins>+##
+# Return all installed ports (active and inactive). Optionally filter by name
+# and version.
</ins><span class="cx"> #
</span><del>-# If version is "", return all ports of that name.
-# Otherwise, return only ports that exactly match this version.
-# What we call version here is version_revision+variants.
-# The syntax for that can be ambiguous if there's an underscore and dash in
-# version for example, so we don't attempt to split up the composite version
-# into its components, we just compare the whole thing.
</del><ins>+# @param name
+# The name of the port you're looking for. Defaults to an empty string,
+# which will return all installed ports.
+# @param version
+# A version string in either of the forms "$version_$revision$variants"
+# or "$version". Defaults to an empty string, which will return ports
+# regardless of version constraints.
+# @return A list of ports in the form given by #active.
</ins><span class="cx"> proc installed {{name ""} {version ""}} {
</span><del>-        if { $name eq "" && $version eq "" } {
-         set ports [registry::entry imaged]
-        } elseif { $name ne "" && $version eq ""} {
-         set ports [registry::entry imaged $name]
-        } else {
-         set ports {}
-         set possible_ports [registry::entry imaged $name]
-         foreach p $possible_ports {
-         if {"[$p version]_[$p revision][$p variants]" == $version
-         || [$p version] == $version} {
-         lappend ports $p
-         }
-         }
-        }
</del><ins>+ # If version is "", return all ports of that name. Otherwise, return only
+ # ports that exactly match this version. What we call version here is
+ # version_revision+variants.
+ # The syntax for that can be ambiguous if there's an underscore and dash in
+ # version for example, so we don't attempt to split up the composite
+ # version into its components, we just compare the whole thing.
+ if {$name eq "" && $version eq ""} {
+ set ports [registry::entry imaged]
+ } elseif {$name ne "" && $version eq ""} {
+ set ports [registry::entry imaged $name]
+ } else {
+ set ports {}
+ set possible_ports [registry::entry imaged $name]
+ foreach p $possible_ports {
+ if {"[$p version]_[$p revision][$p variants]" == $version || [$p version] == $version} {
+ lappend ports $p
+ }
+ }
+ }
</ins><span class="cx">
</span><span class="cx"> set rlist [list]
</span><span class="cx"> foreach port $ports {
</span><span class="cx"> lappend rlist [list [$port name] [$port version] [$port revision] [$port variants] [string equal [$port state] "installed"] [$port epoch]]
</span><span class="cx"> }
</span><del>-        return $rlist
</del><ins>+ return $rlist
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+##
+# Does nothing.
</ins><span class="cx"> proc close_file_map {args} {
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+##
+# Does nothing.
</ins><span class="cx"> proc open_dep_map {args} {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-# List all the ports that this port depends on
</del><ins>+##
+# List all ports that a given port (identified by the parameters) depends on.
+# Each of the parameters can be passed as an empty string to ignore them in the
+# search. You should however at least specify name.
+#
+# @param name
+# The name of the port of interest.
+# @param version
+# The version of the port of interest.
+# @param revision
+# The revision of the port of interest.
+# @param variants
+# The canonical variants string of the port of interest.
+# @return A sorted list without duplicates where each entry is of the form
+# (dependency, "port", port), where dependency is the name of the
+# dependency and port is the name of the port that matched the search
+# criteria.
</ins><span class="cx"> proc list_depends {name version revision variants} {
</span><del>-        set rlist [list]
-        set searchcmd "registry::entry search"
</del><ins>+ set rlist [list]
+ set searchkeys {}
</ins><span class="cx"> foreach key {name version revision} {
</span><span class="cx"> if {[set $key] ne ""} {
</span><del>- append searchcmd " $key [set $key]"
</del><ins>+ lappend searchkeys $key [set $key]
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if {$variants != 0} {
</span><del>- append searchcmd " variants {$variants}"
</del><ins>+ lappend searchkeys "variants" $variants
</ins><span class="cx"> }
</span><del>- if {[catch {set ports [eval $searchcmd]}]} {
</del><ins>+ if {[catch {set ports [registry::entry search {*}$searchkeys]}]} {
</ins><span class="cx"> set ports [list]
</span><span class="cx"> }
</span><span class="cx"> foreach port $ports {
</span><span class="lines">@@ -212,23 +292,41 @@
</span><span class="cx"> lappend rlist [list [$dep name] port [$port name]]
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-        
-        return [lsort -unique $rlist]
</del><ins>+
+ return [lsort -unique $rlist]
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # List all the ports that depend on this port
</span><ins>+##
+# List all ports that depend on a given port (identified by the parameters).
+# Each of the parameters can be passed as an empty string to ignore them in the
+# search. In practice, you'll always pass at least the name parameter
+# non-empty.
+#
+# @param name
+# The name of the port of interest.
+# @param version
+# The version of the port of interest.
+# @param revision
+# The revision of the port of interest.
+# @param variants
+# The canonical variants string of the port of interest.
+# @return A sorted list without duplicates where each entry is of the form
+# (port, "port", dependent), where dependent is the name of the
+# dependent port and port is the name of the port that matched the
+# search criteria.
</ins><span class="cx"> proc list_dependents {name version revision variants} {
</span><del>-        set rlist [list]
-        set searchcmd "registry::entry search"
</del><ins>+ set rlist [list]
+ set searchkeys {}
</ins><span class="cx"> foreach key {name version revision} {
</span><span class="cx"> if {[set $key] ne ""} {
</span><del>- append searchcmd " $key [set $key]"
</del><ins>+ lappend searchkeys $key [set $key]
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if {$variants != 0} {
</span><del>- append searchcmd " variants {$variants}"
</del><ins>+ lappend searchkeys "variants" $variants
</ins><span class="cx"> }
</span><del>- if {[catch {set ports [eval $searchcmd]}]} {
</del><ins>+ if {[catch {set ports [registry::entry search {*}$searchkeys]}]} {
</ins><span class="cx"> set ports [list]
</span><span class="cx"> }
</span><span class="cx"> foreach port $ports {
</span><span class="lines">@@ -237,11 +335,36 @@
</span><span class="cx"> lappend rlist [list [$port name] port [$dependent name]]
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-        
-        return [lsort -unique $rlist]
</del><ins>+
+ return [lsort -unique $rlist]
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-# adds a registry entry from a list of keys and values
</del><ins>+##
+# Add a new registry entry from a given list of keys of values. The list should
+# at least contain the keys
+# \li \c name The name of the port
+# \li \c epoch The epoch of the port
+# \li \c version The version of the port
+# \li \c revision The revision of the port
+# \li \c variants The canonical variants string of the port
+# \li \c date The date of installation of this port, probably the current date
+# and time
+# \li \c requested 0 or 1 depending on whether this port is a requested port
+# \li \c location The absolute path to the binary archive of the port
+# \li \c state The current state of the port, currently either "imaged" or
+# "installed"
+# \li \c installtype The type of installation of this port. For new ports,
+# always "image"
+# \li \c imagefiles A list of files installed by this port
+# \li \c files A list of filenames as which the imagefiles should be activated
+# if state is "installed"
+# \li \c negated_variants The canonical representation of the negated variants
+# \li \c os_platform The platform on which the port was installed
+# \li \c os_major The major version of the OS on which the port was installed
+# \li \c archs A list of architectures of this port
+# \li \c depends A list of ports on which the new port depends
+# \li \c portfile The Portfile used to install this port (note: actual
+# contents, not the path!)
</ins><span class="cx"> proc create_entry_l {proplist} {
</span><span class="cx"> array set props $proplist
</span><span class="cx"> registry::write {
</span><span class="cx">Property changes on: branches/new-help-system/base/src/registry2.0/receipt_sqlite.tcl
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4>Modified: svn:mergeinfo</h4></div>
<span class="cx">/branches/gsoc09-logging/base/src/registry1.0/receipt_sqlite.tcl:51231-60371
</span><span class="cx">/branches/gsoc11-rev-upgrade/base/src/registry2.0/receipt_sqlite.tcl:78828-88375
</span><span class="cx">/branches/gsoc13-tests/src/registry2.0/receipt_sqlite.tcl:106692-111324
</span><span class="cx">/branches/universal-sanity/base/src/registry1.0/receipt_sqlite.tcl:51872-52323
</span><span class="cx">/branches/variant-descs-14482/base/src/registry1.0/receipt_sqlite.tcl:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
</span><span class="cx">/trunk/base/src/registry2.0/receipt_sqlite.tcl:57889-117083
</span><span class="cx">/users/perry/base-bugs_and_notes/src/registry1.0/receipt_sqlite.tcl:45682-46060
</span><span class="cx">/users/perry/base-select/src/registry1.0/receipt_sqlite.tcl:44044-44692
</span><span class="cx"> + /branches/gsoc08-privileges/base/src/registry1.0/receipt_sqlite.tcl:37343-46937
</span><span class="cx">/branches/gsoc09-logging/base/src/registry1.0/receipt_sqlite.tcl:51231-60371
</span><span class="cx">/branches/gsoc11-rev-upgrade/base/src/registry2.0/receipt_sqlite.tcl:78828-88375
</span><span class="cx">/branches/gsoc13-tests/src/registry2.0/receipt_sqlite.tcl:106692-111324
</span><span class="cx">/branches/universal-sanity/base/src/registry1.0/receipt_sqlite.tcl:51872-52323
</span><span class="cx">/branches/variant-descs-14482/base/src/registry1.0/receipt_sqlite.tcl:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
</span><span class="cx">/trunk/base/src/registry2.0/receipt_sqlite.tcl:57889-122997
</span><span class="cx">/users/perry/base-bugs_and_notes/src/registry1.0/receipt_sqlite.tcl:45682-46060
</span><span class="cx">/users/perry/base-select/src/registry1.0/receipt_sqlite.tcl:44044-44692
</span><a id="branchesnewhelpsystembasesrcregistry20registryc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/registry2.0/registry.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/registry.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/registry2.0/registry.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> * $Id$
</span><span class="cx"> *
</span><span class="cx"> * Copyright (c) 2007 Chris Pickel <sfiera@macports.org>
</span><del>- * Copyright (c) 2012 The MacPorts Project
</del><ins>+ * Copyright (c) 2012, 2014 The MacPorts Project
</ins><span class="cx"> * All rights reserved.
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> #include <tcl.h>
</span><span class="cx">
</span><span class="cx"> #include <cregistry/registry.h>
</span><ins>+#include <cregistry/portgroup.h>
</ins><span class="cx"> #include <cregistry/entry.h>
</span><span class="cx"> #include <cregistry/file.h>
</span><span class="cx">
</span><span class="lines">@@ -46,6 +47,7 @@
</span><span class="cx"> #include "file.h"
</span><span class="cx"> #include "graph.h"
</span><span class="cx"> #include "item.h"
</span><ins>+#include "portgroup.h"
</ins><span class="cx"> #include "registry.h"
</span><span class="cx"> #include "util.h"
</span><span class="cx">
</span><span class="lines">@@ -320,6 +322,57 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+/*
+ * registry::metadata cmd ?arg ...?
+ *
+ * Commands manipulating metadata in the registry. This can be called `registry::metadata`
+ */
+int metadata_cmd(ClientData clientData UNUSED, Tcl_Interp* interp, int objc,
+ Tcl_Obj* CONST objv[]) {
+ if (objc < 3) {
+ Tcl_WrongNumArgs(interp, 1, objv, "cmd key ?value?");
+ return TCL_ERROR;
+ }
+ reg_registry* reg = registry_for(interp, reg_attached);
+ if (reg == NULL) {
+ return TCL_ERROR;
+ }
+ const char *cmdstring = Tcl_GetString(objv[1]);
+ reg_error error;
+ if (strcmp(cmdstring, "get") == 0) {
+ char *data;
+ if (reg_get_metadata(reg, Tcl_GetString(objv[2]), &data, &error)) {
+ Tcl_Obj* result = Tcl_NewStringObj(data, -1);
+ Tcl_SetObjResult(interp, result);
+ free(data);
+ return TCL_OK;
+ } else if (error.code == REG_NOT_FOUND) {
+ Tcl_Obj* result = Tcl_NewIntObj(-1);
+ Tcl_SetObjResult(interp, result);
+ return TCL_OK;
+ } else {
+ return registry_failed(interp, &error);
+ }
+ } else if (strcmp(cmdstring, "set") == 0) {
+ if (objc < 4) {
+ Tcl_WrongNumArgs(interp, 1, objv, "set key value");
+ return TCL_ERROR;
+ }
+ if (reg_set_metadata(reg, Tcl_GetString(objv[2]), Tcl_GetString(objv[3]), &error)) {
+ return TCL_OK;
+ } else {
+ return registry_failed(interp, &error);
+ }
+ } else if (strcmp(cmdstring, "del") == 0) {
+ if (reg_del_metadata(reg, Tcl_GetString(objv[2]), &error)) {
+ return TCL_OK;
+ } else {
+ return registry_failed(interp, &error);
+ }
+ }
+ return TCL_ERROR;
+}
+
</ins><span class="cx"> /**
</span><span class="cx"> * Initializer for the registry lib.
</span><span class="cx"> *
</span><span class="lines">@@ -338,6 +391,8 @@
</span><span class="cx"> /* Tcl_CreateObjCommand(interp, "registry::item", item_cmd, NULL, NULL); */
</span><span class="cx"> Tcl_CreateObjCommand(interp, "registry::entry", entry_cmd, NULL, NULL);
</span><span class="cx"> Tcl_CreateObjCommand(interp, "registry::file", file_cmd, NULL, NULL);
</span><ins>+ Tcl_CreateObjCommand(interp, "registry::portgroup", portgroup_cmd, NULL, NULL);
+ Tcl_CreateObjCommand(interp, "registry::metadata", metadata_cmd, NULL, NULL);
</ins><span class="cx"> if (Tcl_PkgProvide(interp, "registry2", "2.0") != TCL_OK) {
</span><span class="cx"> return TCL_ERROR;
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20registryh"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/registry2.0/registry.h (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/registry.h        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/registry2.0/registry.h        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx">
</span><span class="cx"> #include <tcl.h>
</span><span class="cx"> #include <sqlite3.h>
</span><ins>+#include <cregistry/portgroup.h>
</ins><span class="cx"> #include <cregistry/entry.h>
</span><span class="cx">
</span><span class="cx"> typedef struct _entry_list {
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20registry_utiltcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/registry2.0/registry_util.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/registry_util.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/registry2.0/registry_util.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx"> if {[catch {set result [mportexec $mport $target]} result] || $result != 0} {
</span><span class="cx"> global errorInfo
</span><span class="cx"> ui_debug "$errorInfo"
</span><del>- catch {mportclose_installed $mport}
</del><ins>+ catch {mportclose $mport}
</ins><span class="cx"> ui_warn "Failed to execute portfile from registry for $portspec"
</span><span class="cx"> switch $target {
</span><span class="cx"> activate {
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx"> if {(![info exists keeplogs] || !$keeplogs) && $target ne "activate"} {
</span><span class="cx"> catch {mportexec $mport clean}
</span><span class="cx"> }
</span><del>- mportclose_installed $mport
</del><ins>+ mportclose $mport
</ins><span class="cx"> return 1
</span><span class="cx"> }
</span><span class="cx"> } else {
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20testsdependstcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/registry2.0/tests/depends.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/tests/depends.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/registry2.0/tests/depends.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx"> load $pextlibname
</span><span class="cx">
</span><span class="cx"> # totally lame that file delete won't do it
</span><del>-        eval exec rm -f [glob -nocomplain test.db*]
</del><ins>+        exec rm -f {*}[glob -nocomplain test.db*]
</ins><span class="cx">
</span><span class="cx"> registry::open test.db
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20testsentrytcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/registry2.0/tests/entry.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/tests/entry.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/registry2.0/tests/entry.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx"> load $pextlibname
</span><span class="cx">
</span><span class="cx"> # totally lame that file delete won't do it
</span><del>- eval exec rm -f [glob -nocomplain test.db*]
</del><ins>+ exec rm -f {*}[glob -nocomplain test.db*]
</ins><span class="cx">
</span><span class="cx"> # can't create registry in some brain-dead place or in protected place
</span><span class="cx"> test_throws {registry::open /some/brain/dead/place} registry::cannot-init
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20utilc"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/registry2.0/util.c (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/util.c        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/registry2.0/util.c        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> #include "util.h"
</span><span class="cx"> #include "entryobj.h"
</span><span class="cx"> #include "fileobj.h"
</span><ins>+#include "portgroupobj.h"
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Generates a unique proc name starting with prefix.
</span><span class="lines">@@ -214,6 +215,29 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><ins>+ * Sets a given name to be a portgroup object.
+ *
+ * @param [in] interp Tcl interpreter to create the portgroup within
+ * @param [in] name name to associate the given portgroup with
+ * @param [in] portgroup portgroup to associate with the given name
+ * @param [out] errPtr description of error if it couldn't be set
+ * @return true if success; false if failure
+ * @see set_object
+ */
+int set_portgroup(Tcl_Interp* interp, char* name, reg_portgroup* portgroup,
+ reg_error* errPtr) {
+ if (set_object(interp, name, portgroup, "portgroup", portgroup_obj_cmd, NULL,
+ errPtr)) {
+ portgroup->proc = strdup(name);
+ if (!portgroup->proc) {
+ return 0;
+ }
+ return 1;
+ }
+ return 0;
+}
+
+/**
</ins><span class="cx"> * Reports a sqlite3 error to Tcl.
</span><span class="cx"> *
</span><span class="cx"> * Queries the database for the most recent error message and sets it as the
</span><span class="lines">@@ -297,6 +321,23 @@
</span><span class="cx"> return 1;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+int portgroup_to_obj(Tcl_Interp* interp, Tcl_Obj** obj, reg_portgroup* portgroup,
+ int* lower_bound, reg_error* errPtr) {
+ if (portgroup->proc == NULL) {
+ char* name = unique_name(interp, "::registry::portgroup", lower_bound);
+ if (!name) {
+ return 0;
+ }
+ if (!set_portgroup(interp, name, portgroup, errPtr)) {
+ free(name);
+ return 0;
+ }
+ free(name);
+ }
+ *obj = Tcl_NewStringObj(portgroup->proc, -1);
+ return 1;
+}
+
</ins><span class="cx"> int list_entry_to_obj(Tcl_Interp* interp, Tcl_Obj*** objs,
</span><span class="cx"> reg_entry** entries, int entry_count, reg_error* errPtr) {
</span><span class="cx"> int lower_bound = 0;
</span><span class="lines">@@ -311,6 +352,13 @@
</span><span class="cx"> (void***)objs, (void**)files, file_count, errPtr);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+int list_portgroup_to_obj(Tcl_Interp* interp, Tcl_Obj*** objs,
+ reg_portgroup** portgroups, int portgroup_count, reg_error* errPtr) {
+ int lower_bound = 0;
+ return recast(interp, (cast_function*)portgroup_to_obj, &lower_bound, NULL,
+ (void***)objs, (void**)portgroups, portgroup_count, errPtr);
+}
+
</ins><span class="cx"> static int obj_to_string(void* userdata UNUSED, char** string, Tcl_Obj* obj,
</span><span class="cx"> void* param UNUSED, reg_error* errPtr UNUSED) {
</span><span class="cx"> *string = Tcl_GetString(obj);
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcregistry20utilh"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/registry2.0/util.h (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/registry2.0/util.h        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/registry2.0/util.h        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include <sqlite3.h>
</span><span class="cx">
</span><span class="cx"> #include <cregistry/registry.h>
</span><ins>+#include <cregistry/portgroup.h>
</ins><span class="cx"> #include <cregistry/entry.h>
</span><span class="cx"> #include <cregistry/file.h>
</span><span class="cx">
</span><span class="lines">@@ -60,6 +61,8 @@
</span><span class="cx"> reg_error* errPtr);
</span><span class="cx"> int set_file(Tcl_Interp* interp, char* name, reg_file* file,
</span><span class="cx"> reg_error* errPtr);
</span><ins>+int set_portgroup(Tcl_Interp* interp, char* name, reg_portgroup* portgroup,
+ reg_error* errPtr);
</ins><span class="cx">
</span><span class="cx"> void set_sqlite_result(Tcl_Interp* interp, sqlite3* db, const char* query);
</span><span class="cx">
</span><span class="lines">@@ -77,6 +80,10 @@
</span><span class="cx"> int* lower_bound, reg_error* errPtr);
</span><span class="cx"> int list_file_to_obj(Tcl_Interp* interp, Tcl_Obj*** objs,
</span><span class="cx"> reg_file** files, int file_count, reg_error* errPtr);
</span><ins>+int portgroup_to_obj(Tcl_Interp* interp, Tcl_Obj** ibj, reg_portgroup* portgroup,
+ int* lower_bound, reg_error* errPtr);
+int list_portgroup_to_obj(Tcl_Interp* interp, Tcl_Obj*** objs,
+ reg_portgroup** portgroups, int portgroup_count, reg_error* errPtr);
</ins><span class="cx">
</span><span class="cx"> void free_strings(void* userdata UNUSED, char** strings, int count);
</span><span class="cx">
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrctclobjc10Makefilein"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/src/tclobjc1.0/Makefile.in (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/tclobjc1.0/Makefile.in        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/tclobjc1.0/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,9 +1,13 @@
</span><ins>+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include ../../Mk/macports.autoconf.mk
+
</ins><span class="cx"> OBJS=                tclobjc.o tclobjc_types.o MPMethodSignatureExtensions.o objc_encoding.o
</span><span class="cx"> SHLIB_NAME=        tclobjc${SHLIB_SUFFIX}
</span><del>-INSTALLDIR=        ${DESTDIR}${datadir}/macports/Tcl/tclobjc1.0
</del><ins>+INSTALLDIR=        ${DESTDIR}${TCL_PACKAGE_PATH}/tclobjc1.0
</ins><span class="cx">
</span><del>-include ../../Mk/macports.autoconf.mk
-include ../../Mk/macports.tea.mk
</del><ins>+include $(srcdir)/../../Mk/macports.tea.mk
</ins><span class="cx">
</span><span class="cx"> LDFLAGS+=        ${OBJC_FOUNDATION_LDFLAGS}
</span><span class="cx"> CPPFLAGS+=        ${OBJC_FOUNDATION_CPPFLAGS}
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcthread26diff"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/src/thread2.6.diff (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/thread2.6.diff        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/thread2.6.diff        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,79 +0,0 @@
</span><del>-diff -ru src/thread2.6/Makefile.in src/thread2.6.mine/Makefile.in
---- src/thread2.6/Makefile.in        Sat Dec 18 09:26:02 2004
-+++ src/thread2.6.mine/Makefile.in        Mon Apr 17 02:42:43 2006
-@@ -67,12 +67,12 @@
-
- srcdir                = @srcdir@
- prefix                = @prefix@
--exec_prefix        = @exec_prefix@
-+exec_prefix        = @prefix@
-
- bindir                = @bindir@
--libdir                = @libdir@
-+libdir                = @prefix@/share/macports/Tcl
- datadir                = @datadir@
--mandir                = @mandir@
-+mandir                = @prefix@/share/macports/man
- includedir        = @includedir@
-
- DESTDIR                =
-diff -ru src/thread2.6/configure src/thread2.6.mine/configure
---- src/thread2.6/configure        Thu Dec 23 05:48:44 2004
-+++ src/thread2.6.mine/configure        Mon Apr 17 02:27:46 2006
-@@ -6374,13 +6374,11 @@
- { (exit 1); exit 1; }; }
-          fi
-         else
--         # Check order: pkg --prefix location, Tcl's --prefix location,
-+         # Check order:
-          # directory of tclConfig.sh, and Tcl source directory.
-          # Looking in the source dir is not ideal, but OK.
-
--         eval "temp_includedir=${includedir}"
--         list="`ls -d ${temp_includedir} 2>/dev/null` \
--                `ls -d ${TCL_PREFIX}/include 2>/dev/null` \
-+         list="`ls -d ${TCL_PREFIX}/include 2>/dev/null` \
-                 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-                 `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
-          if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-diff -ru src/thread2.6/lib/ttrace.tcl src/thread2.6.mine/lib/ttrace.tcl
---- src/thread2.6/lib/ttrace.tcl        Fri Jul 30 01:37:50 2004
-+++ src/thread2.6.mine/lib/ttrace.tcl        Mon Apr 17 02:27:46 2006
-@@ -50,8 +50,8 @@
- variable mutex ns_mutex
- variable elock [$mutex create traceepochmutex]
- variable store nsv_
-- } elseif {![catch {package require Thread} version]} {
-- variable tvers $version
-+ } elseif {![catch {package require Thread} thread_pkg_version]} {
-+ variable tvers $thread_pkg_version
- variable mutex thread::mutex
- variable elock [$mutex create]
- variable store tsv::
-# tcl-64/tcl_ext/thread/thread.diff
---- src/thread2.6/generic/threadPoolCmd.c.orig        2003-11-27 11:54:19.000000000 -0800
-+++ src/thread2.6/generic/threadPoolCmd.c        2005-07-20 23:10:12.000000000 -0700
-@@ -1710,18 +1710,21 @@
- *
- *----------------------------------------------------------------------
- */
-+#ifdef __WIN32__
-+#include <sys/timeb.h>
-+#else
-+#include <sys/time.h>
-+#endif
- static void
- GetTime(timePtr)
- Tcl_Time *timePtr;
- {
- #ifdef __WIN32__
--#include <sys/timeb.h>
- struct timeb tb;
- (void)ftime(&tb);
- timePtr->sec = tb.time;
- timePtr->usec = tb.millitm * 1000;
- #else
--#include <sys/time.h>
- struct timeval tv;
- (void)gettimeofday(&tv, NULL);
- timePtr->sec = tv.tv_sec;
</del></span></pre></div>
<a id="branchesnewhelpsystembasesrcthread26targz"></a>
<div class="binary"><h4>Deleted: branches/new-help-system/base/src/thread2.6.tar.gz</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="branchesnewhelpsystembasesrcupgrade_sources_conf_defaulttcl"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/src/upgrade_sources_conf_default.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/upgrade_sources_conf_default.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/src/upgrade_sources_conf_default.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,121 +0,0 @@
</span><del>-#!/usr/bin/env tclsh
-#
-# $Id$
-#
-# Upgrade sources.conf for a given prefix (passed as the first and only
-# argument).
-#
-# For an rsync: repository, if it is the standard MacPorts one and not
-# already tagged, then make it default, if another wasn't already default.
-# For a file:// respository, if it is an svn checkout from the MacPorts
-# server, then make it default if another hasn't already been tagged.
-#
-
-if {[llength $::argv] == 0} {
- puts "Usage: ${::argv0} <prefix>"
- exit 1
-}
-
-set prefix [lindex $::argv 0]
-set sourcesConf ${prefix}/etc/macports/sources.conf
-if {[catch {set sourcesConfChannel [open $sourcesConf r]}]} {
- exit 0
-}
-
-if {[file executable /usr/bin/mktemp]} {
- set mktemp /usr/bin/mktemp
-} elseif {[file executable /bin/mktemp]} {
- set mktemp /bin/mktemp
-} else {
- set mktemp mktemp
-}
-
-set mktempChannel [open "|$mktemp -t macports_sources_upgrade.XXXXXXXXXX" r]
-set tempfile [read -nonewline $mktempChannel]
-close $mktempChannel
-
-set tempfileChannel [open $tempfile w]
-set defaultSeen false
-set defaultWritten false
-
-while {[gets $sourcesConfChannel line] >= 0} {
- set addDefault false
- if {!$defaultSeen && ![regexp {^\s*#|^$} $line]} {
- if {[regexp {^([\w-]+://\S+)(?:\s+\[(\w+(?:,\w+)*)\])?$} $line -> url flags]} {
- set flags [split $flags ,]
- if {[lsearch $flags default] >= 0} {
- set defaultSeen true
- } elseif {[regexp {rsync://rsync\.(macports|darwinports)\.org/(release|dpupdate)/d?ports} $url]} {
- set addDefault true
- } elseif {[regexp {file://(/.+)} $url -> filepath]} {
- if {[file exists [file join ${filepath} .svn]]} {
- if {![info exists svnCmd]} {
- set svnCmd ""
- foreach path [concat [list ${prefix}/bin] [split $env(PATH) :]] {
- if {[file executable ${path}/svn]} {
- set svnCmd ${path}/svn
- break
- }
- }
- }
- if {$svnCmd eq ""} {
- puts "WARNING: Unable to check svn URL for '$filepath' because no svn command could be found; please manually verify $sourcesConf!"
- continue
- }
- if {![catch {set svnChannel [open "|$svnCmd info ${filepath}" r]} err]} {
- set svnURL {}
- while {[gets $svnChannel svnLine] >= 0} {
- regexp {^URL: (.*)} $svnLine -> svnURL
- }
- if {[catch {close $svnChannel} err]} {
- puts $err
- puts "WARNING: Unable to check svn URL for '$filepath'; please manually verify $sourcesConf!"
- }
- if {[regexp {^https?://svn\.(macports|macosforge)\.org/repository/macports/trunk/dports} $svnURL]} {
- set addDefault true
- }
- } else {
- puts $err
- puts "WARNING: Unable to check svn URL for '$filepath'; please manually verify $sourcesConf!"
- }
- }
- }
- if {$addDefault} {
- lappend flags default
- set line "$url \[[join $flags ,]\]"
- set defaultSeen true
- set defaultWritten true
- }
- }
- }
- puts $tempfileChannel $line
-}
-close $tempfileChannel
-close $sourcesConfChannel
-
-if {$defaultWritten} {
- set attributes [file attributes ${sourcesConf}]
- if {[catch {file rename ${sourcesConf} "${sourcesConf}.mpsaved"}]} {
- file rename -force ${sourcesConf} "${sourcesConf}.mpsaved_[clock seconds]"
- }
- file rename ${tempfile} ${sourcesConf}
- eval file attributes ${sourcesConf} $attributes
-} else {
- file delete ${tempfile}
- if {!$defaultSeen} {
- puts "[string repeat - 72]
-Warning, your source config file at:
-
- $sourcesConf
-
-needs to have a \[default\] tag added to the primary MacPorts repository,
-however the proper entry could not be determined. Please add the tag
-manually by either appending \[default\] to the end of the correct line,
-or if there are already tags, adding it to the list, e.g.
-\[nosync,default\].
-[string repeat - 72]"
- }
-}
-
-exit 0
-
</del></span></pre></div>
<a id="branchesnewhelpsystembasesrcupgrade_sources_conf_defaulttclinfromrev122997trunkbasesrcupgrade_sources_conf_defaulttclin"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/src/upgrade_sources_conf_default.tcl.in (from rev 122997, trunk/base/src/upgrade_sources_conf_default.tcl.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/src/upgrade_sources_conf_default.tcl.in         (rev 0)
+++ branches/new-help-system/base/src/upgrade_sources_conf_default.tcl.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,121 @@
</span><ins>+#!@TCLSH@
+#
+# $Id$
+#
+# Upgrade sources.conf for a given prefix (passed as the first and only
+# argument).
+#
+# For an rsync: repository, if it is the standard MacPorts one and not
+# already tagged, then make it default, if another wasn't already default.
+# For a file:// respository, if it is an svn checkout from the MacPorts
+# server, then make it default if another hasn't already been tagged.
+#
+
+if {[llength $::argv] == 0} {
+ puts "Usage: ${::argv0} <prefix>"
+ exit 1
+}
+
+set prefix [lindex $::argv 0]
+set sourcesConf ${prefix}/etc/macports/sources.conf
+if {[catch {set sourcesConfChannel [open $sourcesConf r]}]} {
+ exit 0
+}
+
+if {[file executable /usr/bin/mktemp]} {
+ set mktemp /usr/bin/mktemp
+} elseif {[file executable /bin/mktemp]} {
+ set mktemp /bin/mktemp
+} else {
+ set mktemp mktemp
+}
+
+set mktempChannel [open "|$mktemp -t macports_sources_upgrade.XXXXXXXXXX" r]
+set tempfile [read -nonewline $mktempChannel]
+close $mktempChannel
+
+set tempfileChannel [open $tempfile w]
+set defaultSeen false
+set defaultWritten false
+
+while {[gets $sourcesConfChannel line] >= 0} {
+ set addDefault false
+ if {!$defaultSeen && ![regexp {^\s*#|^$} $line]} {
+ if {[regexp {^([\w-]+://\S+)(?:\s+\[(\w+(?:,\w+)*)\])?$} $line -> url flags]} {
+ set flags [split $flags ,]
+ if {[lsearch $flags default] >= 0} {
+ set defaultSeen true
+ } elseif {[regexp {rsync://rsync\.(macports|darwinports)\.org/(release|dpupdate)/d?ports} $url]} {
+ set addDefault true
+ } elseif {[regexp {file://(/.+)} $url -> filepath]} {
+ if {[file exists [file join ${filepath} .svn]]} {
+ if {![info exists svnCmd]} {
+ set svnCmd ""
+ foreach path [concat [list ${prefix}/bin] [split $env(PATH) :]] {
+ if {[file executable ${path}/svn]} {
+ set svnCmd ${path}/svn
+ break
+ }
+ }
+ }
+ if {$svnCmd eq ""} {
+ puts "WARNING: Unable to check svn URL for '$filepath' because no svn command could be found; please manually verify $sourcesConf!"
+ continue
+ }
+ if {![catch {set svnChannel [open "|$svnCmd info ${filepath}" r]} err]} {
+ set svnURL {}
+ while {[gets $svnChannel svnLine] >= 0} {
+ regexp {^URL: (.*)} $svnLine -> svnURL
+ }
+ if {[catch {close $svnChannel} err]} {
+ puts $err
+ puts "WARNING: Unable to check svn URL for '$filepath'; please manually verify $sourcesConf!"
+ }
+ if {[regexp {^https?://svn\.(macports|macosforge)\.org/repository/macports/trunk/dports} $svnURL]} {
+ set addDefault true
+ }
+ } else {
+ puts $err
+ puts "WARNING: Unable to check svn URL for '$filepath'; please manually verify $sourcesConf!"
+ }
+ }
+ }
+ if {$addDefault} {
+ lappend flags default
+ set line "$url \[[join $flags ,]\]"
+ set defaultSeen true
+ set defaultWritten true
+ }
+ }
+ }
+ puts $tempfileChannel $line
+}
+close $tempfileChannel
+close $sourcesConfChannel
+
+if {$defaultWritten} {
+ set attributes [file attributes ${sourcesConf}]
+ if {[catch {file rename ${sourcesConf} "${sourcesConf}.mpsaved"}]} {
+ file rename -force ${sourcesConf} "${sourcesConf}.mpsaved_[clock seconds]"
+ }
+ file rename ${tempfile} ${sourcesConf}
+ file attributes ${sourcesConf} {*}$attributes
+} else {
+ file delete ${tempfile}
+ if {!$defaultSeen} {
+ puts "[string repeat - 72]
+Warning, your source config file at:
+
+ $sourcesConf
+
+needs to have a \[default\] tag added to the primary MacPorts repository,
+however the proper entry could not be determined. Please add the tag
+manually by either appending \[default\] to the end of the correct line,
+or if there are already tags, adding it to the list, e.g.
+\[nosync,default\].
+[string repeat - 72]"
+ }
+}
+
+exit 0
+
</ins></span></pre></div>
<a id="branchesnewhelpsystembasestandard_configureshfromrev122997trunkbasestandard_configuresh"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/standard_configure.sh (from rev 122997, trunk/base/standard_configure.sh) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/standard_configure.sh         (rev 0)
+++ branches/new-help-system/base/standard_configure.sh        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+#!/bin/sh
+
+# This is how we run configure when building binary packages (more or less,
+# minus architecture selection). If you don't want a custom build, this
+# is probably how you should run it too.
+env PATH=/usr/bin:/bin:/usr/sbin:/sbin CFLAGS="-pipe -Os" ./configure --enable-readline
+
+# If you want to use a different prefix, add this to the above:
+# --prefix=/some/path --with-applications-dir=/some/path/Applications
</ins></span></pre></div>
<a id="branchesnewhelpsystembasetests"></a>
<div class="propset"><h4>Property changes: branches/new-help-system/base/tests</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="addfile"><h4>Added: svn:ignore</h4></div>
<span class="cx">test.tcl
</span><a id="branchesnewhelpsystembasetestsMakefile"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/tests/Makefile (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/Makefile        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/tests/Makefile        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,14 +0,0 @@
</span><del>-include ../Mk/macports.autoconf.mk
-
-all:: ../Mk/macports.autoconf.mk
-
-install::
-
-# Run all regression tests
-# tclsh test.tcl -h for more options.
-test::
-        $(TCLSH) test.tcl -nocolor
-
-clean::
-
-distclean:: clean
</del></span></pre></div>
<a id="branchesnewhelpsystembasetestsMakefileinfromrev122997trunkbasetestsMakefilein"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/tests/Makefile.in (from rev 122997, trunk/base/tests/Makefile.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/Makefile.in         (rev 0)
+++ branches/new-help-system/base/tests/Makefile.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include ../Mk/macports.autoconf.mk
+
+all:: ../Mk/macports.autoconf.mk
+
+install::
+
+# Run all regression tests
+# tclsh test.tcl -h for more options.
+test::
+        $(TCLSH) $(srcdir)/test.tcl -nocolor
+
+clean::
+
+distclean:: clean
+        rm -f Makefile
+        rm -f test.tcl
+        rm -f test/library.tcl
+        rm -f test/trace/test.tcl
</ins></span></pre></div>
<a id="branchesnewhelpsystembaseteststest"></a>
<div class="propset"><h4>Property changes: branches/new-help-system/base/tests/test</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="addfile"><h4>Added: svn:ignore</h4></div>
<a id="branchesnewhelpsystembaseteststestlibrarytcl"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/tests/test/library.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/test/library.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/tests/test/library.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,172 +0,0 @@
</span><del>-set autoconf [file dirname $argv0]/../../../Mk/macports.autoconf.mk
-eval ::tcltest::configure $::argv
-
-set output_file "output"
-set work_dir "work"
-
-# Set of procs used for testing.
-
-# Sets $bindir variable from macports.autoconf.mk
-# autogenerated file.
-proc load_variables {pwd} {
- global autoconf bindir datadir portsrc cpwd
-
- if { ![file exists $autoconf] } {
- puts "ERROR: $autoconf does not exist."
- exit 1
- }
-
- set cpwd [file dirname [file dirname $pwd]]
-
- set line [get_line $autoconf "prefix*"]
- set prefix [lrange [split $line " "] 1 1]
-
- set line [get_line $autoconf "bindir*"]
- set bin [lrange [split $line "/"] 1 1]
-
- set bindir ${prefix}/${bin}
- set datadir ${prefix}/share
- set portsrc ${cpwd}/test-macports.conf
-
-}
-
-proc cleanup {} {
- global cpwd
-
- file delete -force /tmp/macports-tests
- file delete -force ${cpwd}/PortIndex ${cpwd}/PortIndex.quick
-}
-
-# Sets initial directories
-proc set_dir {} {
- global datadir cpwd
-
- cleanup
-
- file mkdir /tmp/macports-tests/ports \
- /tmp/macports-tests/opt/local/etc/macports \
- /tmp/macports-tests/opt/local/share \
- /tmp/macports-tests/opt/local/var/macports/receipts \
- /tmp/macports-tests/opt/local/var/macports/registry \
- /tmp/macports-tests/opt/local/var/macports/build
-
- file link -symbolic /tmp/macports-tests/opt/local/share/macports $datadir/macports
- file link -symbolic /tmp/macports-tests/ports/test $cpwd/test
-}
-
-# Run portindex
-proc port_index {} {
- global bindir datadir cpwd
-
- # Move up 2 level to run portindex.
- set path [pwd]
- cd ../..
- # Avoid warning about ports tree being old
- exec sh -c {touch */*/Portfile}
-
- exec ${bindir}/portindex 2>@1
-
- file copy ${cpwd}/sources.conf /tmp/macports-tests/opt/local/etc/macports/
- file copy ${cpwd}/PortIndex ${cpwd}/PortIndex.quick /tmp/macports-tests/ports/
-
- cd $path
-}
-
-# Executes port clean.
-proc port_clean {pwd} {
- global bindir datadir portsrc
-
- set back [pwd]
- cd $pwd
-
- catch {exec env PORTSRC=${portsrc} ${bindir}/port clean 2>@1}
- cd $back
-}
-
-# Runs the portfile.
-proc port_run {pwd} {
- global bindir datadir portsrc
-
- set back [pwd]
- cd $pwd
-
- set result [catch {exec env PORTSRC=${portsrc} ${bindir}/port -d test >&output} ]
- cd $back
- return $result
-}
-
-# Runs port trace.
-proc port_trace {pwd} {
- global bindir datadir portsrc
-
- set back [pwd]
- cd $pwd
-
- set result [catch {exec env PORTSRC=${portsrc} ${bindir}/port -t test >&output 2>@1} ]
- cd $back
- return $result
-}
-
-# Installs new portfile.
-proc port_install {} {
- global bindir portsrc
-
- set result [catch {exec env PORTSRC=${portsrc} ${bindir}/port install > output 2>@1} ]
-}
-
-# Run configure command.
-proc port_config {pwd} {
- global path bindir portsrc
-
- set result [catch {exec env PORTSRC=${portsrc} ${bindir}/port configure 2>@1} ]
-}
-
-# Run desroot command.
-proc port_desroot {pwd} {
- global path bindir portsrc work_dir output_file
-
- file copy -force ${path}/statefile ${work_dir}/.macports.statefile-unknown-version.state
- if { [exec id -u] == 0 } {
- exec chown macports ${work_dir}/.macports.statefile-unknown-version.state
- }
- set result [catch {exec env PORTSRC=${portsrc} ${bindir}/port destroot >$output_file 2>@1} ]
-}
-
-# Uninstalls portfile.
-proc port_uninstall {} {
- global bindir portsrc
-
- set result [catch {exec env PORTSRC=${portsrc} ${bindir}/port uninstall > output 2>@1} ]
-}
-
-# Returns the line containint a given string
-# from a given file, or -1 if nothing is found.
-proc get_line {filename lookup} {
- set fp [open $filename r]
-
- while {[gets $fp line] != -1} {
- set line [string tolower $line]
-
- if {[string match $lookup $line] != 0} {
- close $fp
- return $line
- }
- }
- return -1
-}
-
-# This proc contains all the steps necesary
-# to install a port and save the output to a file.
-# Needed for the majority of regression tests.
-proc initial_setup {} {
- global output_file work_dir path
-
- makeFile "" $output_file
- makeDirectory $work_dir
-
- load_variables $path
- set_dir
- port_index
- port_clean $path
- port_run $path
-}
</del></span></pre></div>
<a id="branchesnewhelpsystembaseteststestlibrarytclinfromrev122997trunkbaseteststestlibrarytclin"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/tests/test/library.tcl.in (from rev 122997, trunk/base/tests/test/library.tcl.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/test/library.tcl.in         (rev 0)
+++ branches/new-help-system/base/tests/test/library.tcl.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,167 @@
</span><ins>+eval ::tcltest::configure $::argv
+
+set output_file "output"
+set work_dir "work"
+
+# constraint for tests that should only run on Darwin
+::tcltest::testConstraint darwin [expr {"@OS_PLATFORM@" eq "darwin"}]
+
+# constraint indicating whether the platform supports trace mode
+::tcltest::testConstraint tracemode_support [expr {@TRACEMODE_SUPPORT@ != 0}]
+
+# Set of procs used for testing.
+
+# Sets $bindir variable from autoconf
+proc load_variables {pwd} {
+ global bindir datadir portsrc cpwd
+
+ set cpwd [file dirname [file dirname $pwd]]
+
+ set prefix "@prefix@"
+ set exec_prefix "@exec_prefix@"
+ set bindir "@bindir@"
+ set datadir "@datarootdir@"
+ set portsrc ${cpwd}/test-macports.conf
+
+}
+
+proc cleanup {} {
+ global cpwd
+
+ file delete -force /tmp/macports-tests
+ file delete -force ${cpwd}/PortIndex ${cpwd}/PortIndex.quick
+}
+
+# Sets initial directories
+proc set_dir {} {
+ global datadir cpwd
+
+ cleanup
+
+ file mkdir /tmp/macports-tests/ports \
+ /tmp/macports-tests/opt/local/etc/macports \
+ /tmp/macports-tests/opt/local/share \
+ /tmp/macports-tests/opt/local/var/macports/receipts \
+ /tmp/macports-tests/opt/local/var/macports/registry \
+ /tmp/macports-tests/opt/local/var/macports/build
+
+ file link -symbolic /tmp/macports-tests/opt/local/share/macports $datadir/macports
+ file link -symbolic /tmp/macports-tests/ports/test $cpwd/test
+}
+
+# Run portindex
+proc port_index {} {
+ global bindir datadir cpwd
+
+ # Move up 2 level to run portindex.
+ set path [pwd]
+ cd ../..
+ # Avoid warning about ports tree being old
+ exec sh -c {touch */*/Portfile}
+
+ exec ${bindir}/portindex 2>@1
+
+ file copy ${cpwd}/sources.conf /tmp/macports-tests/opt/local/etc/macports/
+ file copy ${cpwd}/PortIndex ${cpwd}/PortIndex.quick /tmp/macports-tests/ports/
+
+ cd $path
+}
+
+# Executes port clean.
+proc port_clean {pwd} {
+ global bindir datadir portsrc
+
+ set back [pwd]
+ cd $pwd
+
+ catch {exec env PORTSRC=${portsrc} ${bindir}/port clean 2>@1}
+ cd $back
+}
+
+# Runs the portfile.
+proc port_run {pwd} {
+ global bindir datadir portsrc
+
+ set back [pwd]
+ cd $pwd
+
+ set result [catch {exec env PORTSRC=${portsrc} ${bindir}/port -d test >&output} ]
+ cd $back
+ return $result
+}
+
+# Runs port trace.
+proc port_trace {pwd} {
+ global bindir datadir portsrc
+
+ set back [pwd]
+ cd $pwd
+
+ set result [catch {exec env PORTSRC=${portsrc} ${bindir}/port -t test >&output 2>@1} ]
+ cd $back
+ return $result
+}
+
+# Installs new portfile.
+proc port_install {} {
+ global bindir portsrc
+
+ set result [catch {exec env PORTSRC=${portsrc} ${bindir}/port install > output 2>@1} ]
+}
+
+# Run configure command.
+proc port_config {pwd} {
+ global path bindir portsrc
+
+ set result [catch {exec env PORTSRC=${portsrc} ${bindir}/port configure 2>@1} ]
+}
+
+# Run destroot command.
+proc port_destroot {pwd} {
+ global path bindir portsrc work_dir output_file
+
+ file copy -force ${path}/statefile ${work_dir}/.macports.statefile-unknown-version.state
+ if { [exec id -u] == 0 } {
+ exec chown macports ${work_dir}/.macports.statefile-unknown-version.state
+ }
+ set result [catch {exec env PORTSRC=${portsrc} ${bindir}/port destroot >$output_file 2>@1} ]
+}
+
+# Uninstalls portfile.
+proc port_uninstall {} {
+ global bindir portsrc
+
+ set result [catch {exec env PORTSRC=${portsrc} ${bindir}/port uninstall > output 2>@1} ]
+}
+
+# Returns the line containint a given string
+# from a given file, or -1 if nothing is found.
+proc get_line {filename lookup} {
+ set fp [open $filename r]
+
+ while {[gets $fp line] != -1} {
+ set line [string tolower $line]
+
+ if {[string match $lookup $line] != 0} {
+ close $fp
+ return $line
+ }
+ }
+ return -1
+}
+
+# This proc contains all the steps necesary
+# to install a port and save the output to a file.
+# Needed for the majority of regression tests.
+proc initial_setup {} {
+ global output_file work_dir path
+
+ makeFile "" $output_file
+ makeDirectory $work_dir
+
+ load_variables $path
+ set_dir
+ port_index
+ port_clean $path
+ port_run $path
+}
</ins></span></pre></div>
<a id="branchesnewhelpsystembaseteststeststatefileunknownversiontesttcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/tests/test/statefile-unknown-version/test.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/test/statefile-unknown-version/test.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/tests/test/statefile-unknown-version/test.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx"> set_dir
</span><span class="cx"> port_index
</span><span class="cx"> port_config $path
</span><del>-port_desroot $path
</del><ins>+port_destroot $path
</ins><span class="cx"> port_clean $path
</span><span class="cx">
</span><span class="cx"> proc state_unknown {warn} {
</span></span></pre></div>
<a id="branchesnewhelpsystembaseteststeststatefileversion1testtcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/tests/test/statefile-version1/test.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/test/statefile-version1/test.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/tests/test/statefile-version1/test.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> set_dir
</span><span class="cx"> port_index
</span><span class="cx"> port_config $path
</span><del>-port_desroot $path
</del><ins>+port_destroot $path
</ins><span class="cx"> port_clean $path
</span><span class="cx">
</span><span class="cx"> proc statefile_v1 {warn} {
</span></span></pre></div>
<a id="branchesnewhelpsystembaseteststeststatefileversion1outdatedtesttcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/tests/test/statefile-version1-outdated/test.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/test/statefile-version1-outdated/test.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/tests/test/statefile-version1-outdated/test.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -12,8 +12,9 @@
</span><span class="cx"> port_index
</span><span class="cx"> port_config $path
</span><span class="cx"> file copy -force $path/statefile $work_dir/.macports.statefile-version1-outdated.state
</span><ins>+file attributes $work_dir/.macports.statefile-version1-outdated.state -permissions 0664
</ins><span class="cx"> exec touch -t 197001010000.09 $work_dir/.macports.statefile-version1-outdated.state
</span><del>-port_desroot $path
</del><ins>+port_destroot $path
</ins><span class="cx"> port_clean $path
</span><span class="cx">
</span><span class="cx"> proc state_v1 {warn} {
</span></span></pre></div>
<a id="branchesnewhelpsystembaseteststeststatefileversion2testtcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/tests/test/statefile-version2/test.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/test/statefile-version2/test.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/tests/test/statefile-version2/test.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx"> file copy -force $path/statefile $work_dir/.macports.statefile-version2.state
</span><span class="cx"> exec sed -i'' -E "s/@CHECKSUM@/`openssl dgst -sha256 Portfile | \
</span><span class="cx"> awk '{print \$\$2}'`/" $work_dir/.macports.statefile-version2.state
</span><del>-port_desroot $path
</del><ins>+port_destroot $path
</ins><span class="cx"> port_clean $path
</span><span class="cx">
</span><span class="cx"> proc statefile_v2 {arg} {
</span></span></pre></div>
<a id="branchesnewhelpsystembaseteststeststatefileversion2invalidtesttcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/tests/test/statefile-version2-invalid/test.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/test/statefile-version2-invalid/test.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/tests/test/statefile-version2-invalid/test.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -12,7 +12,8 @@
</span><span class="cx"> port_index
</span><span class="cx"> port_config $path
</span><span class="cx"> file copy -force $path/statefile $work_dir/.macports.statefile-version2-invalid.state
</span><del>-port_desroot $path
</del><ins>+file attributes $work_dir/.macports.statefile-version2-invalid.state -permissions 0664
+port_destroot $path
</ins><span class="cx"> port_clean $path
</span><span class="cx">
</span><span class="cx"> proc state_v2_invalid {warn} {
</span></span></pre></div>
<a id="branchesnewhelpsystembaseteststeststatefileversion2outdatedtesttcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/tests/test/statefile-version2-outdated/test.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/test/statefile-version2-outdated/test.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/tests/test/statefile-version2-outdated/test.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -12,7 +12,8 @@
</span><span class="cx"> port_index
</span><span class="cx"> port_config $path
</span><span class="cx"> file copy -force $path/statefile $work_dir/.macports.statefile-version2-outdated.state
</span><del>-port_desroot $path
</del><ins>+file attributes $work_dir/.macports.statefile-version2-outdated.state -permissions 0664
+port_destroot $path
</ins><span class="cx"> port_clean $path
</span><span class="cx">
</span><span class="cx"> proc state_v2_out {warn} {
</span></span></pre></div>
<a id="branchesnewhelpsystembaseteststestsvnandpatchsitesPortfile"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/tests/test/svn-and-patchsites/Portfile (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/test/svn-and-patchsites/Portfile        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/tests/test/svn-and-patchsites/Portfile        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,31 +1,42 @@
</span><ins>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</ins><span class="cx"> # $Id$
</span><span class="cx">
</span><del>-PortSystem 1.0
</del><ins>+PortSystem 1.0
</ins><span class="cx">
</span><del>-name                svn-and-patchsites
-version                1
-categories        test
-maintainers        nomaintainer
-description        Test port for svn+distant patchfiles functionalities
-homepage        http://www.macports.org/
-platforms        darwin
</del><ins>+name svn-and-patchsites
+version 2
</ins><span class="cx">
</span><del>-long_description ${description}
</del><ins>+categories test
+maintainers nomaintainer
+platforms darwin
</ins><span class="cx">
</span><ins>+homepage http://www.macports.org/
+description Test port for svn+distant patchfiles functionalities
+long_description ${description}
+
+# use a MacPorts svn URL so we don't ping a remote SVN server every time the
+# tests are run
+# taken from the mpvim port
</ins><span class="cx"> fetch.type svn
</span><del>-svn.url http://svn.pythonmac.org/altgraph/altgraph/tags/altgraph-0.7.0/
-worksrcdir altgraph-0.7.0
</del><ins>+svn.url https://svn.macports.org/repository/macports/contrib/mpvim
</ins><span class="cx">
</span><del>-patch_sites http://home.uchicago.edu/~dgc/sw/mutt/
-patchfiles patch-1.5.14.dgc.xlabel_ext.9
-checksums patch-1.5.14.dgc.xlabel_ext.9 md5 c5badc733020187b6677f31b343195e8
</del><ins>+# use a MacPorts distfiles server to avoid hitting a remote server every time
+# the tests are run (and possibly causing failures when the server is down)
+# taken from the vim port
+patch_sites http://distfiles.macports.org/vim/7.4
+patchfiles 7.4.001 \
+ 7.4.002 \
+ 7.4.003
+checksums 7.4.001 md5 f234692c9ab5265ba6ba6f55c0f81764 \
+ 7.4.002 md5 a03e1a5ad3722f2011751dda977641af \
+ 7.4.003 md5 e6d070f592bb6da4d8cf2f7f134425e5
</ins><span class="cx">
</span><span class="cx"> # Set depends_fetch to be empty to remove the dependency on svn added by base,
</span><span class="cx"> # as it is not available in the test suite. Otherwise MacPorts will try to
</span><span class="cx"> # verify a subversion port exists.
</span><span class="cx"> depends_fetch
</span><span class="cx">
</span><del>-# disable the patch phase in case the svn code gets out of sync with the patch.
</del><ins>+# disable the patch phase because the patches would never apply
</ins><span class="cx"> patch                {}
</span><span class="cx"> extract                {}
</span><span class="cx"> configure        {}
</span></span></pre></div>
<a id="branchesnewhelpsystembaseteststesttrace"></a>
<div class="propset"><h4>Property changes: branches/new-help-system/base/tests/test/trace</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="modfile"><h4>Modified: svn:ignore</h4></div>
<span class="cx"> + output
</span><span class="cx">test.tcl
</span><a id="branchesnewhelpsystembaseteststesttracetesttcl"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/tests/test/trace/test.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/test/trace/test.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/tests/test/trace/test.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,57 +0,0 @@
</span><del>-package require tcltest 2
-namespace import tcltest::*
-
-source [file dirname $argv0]/../library.tcl
-
-makeFile "" $output_file
-makeDirectory $work_dir
-set path [file dirname [file normalize $argv0]]
-
-load_variables $path
-
-proc test_trace {} {
- global path autoconf output_file
-
- set line [get_line $autoconf "runusr*"]
- set user [lrange [split $line " "] 1 1]
-
- set_dir
- port_index
- port_clean $path
-
-
- makeDirectory ../tracetesttmp
- file attributes ../tracetesttmp -owner $user
- exec sudo -u $user touch ../tracetesttmp/delete-trace
- exec sudo -u $user touch ../tracetesttmp/rename-trace
- exec sudo -u $user mkdir ../tracetesttmp/rmdir-trace
- file delete -force /tmp/hello-trace
- file attributes /usr/include/unistd.h -owner $user
- file link -symbolic /tmp/link-trace2 /usr/include/unistd.h
- exec chown -h $user /tmp/link-trace2
-
- port_trace $path
-
- #file delete -force /tmp/link-trace2
- file delete -force /tmp/hello-trace
-
- set err "error*"
- set line [get_line $path/$output_file $err]
- if { $line == -1 } {
- return "No errors found."
- } else {
- return $line
- }
-}
-
-test trace {
- Regression test for trace.
-} -constraints {
- root
-} -body {
- test_trace
-} -result "No errors found."
-
-
-cleanup
-cleanupTests
</del></span></pre></div>
<a id="branchesnewhelpsystembaseteststesttracetesttclinfromrev122997trunkbaseteststesttracetesttclin"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/tests/test/trace/test.tcl.in (from rev 122997, trunk/base/tests/test/trace/test.tcl.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/test/trace/test.tcl.in         (rev 0)
+++ branches/new-help-system/base/tests/test/trace/test.tcl.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,70 @@
</span><ins>+package require tcltest 2
+
+# need pextlib to drop privs
+package require Pextlib 1.0
+
+namespace import tcltest::*
+
+source [file dirname $argv0]/../library.tcl
+
+makeFile "" $output_file
+makeDirectory $work_dir
+set path [file dirname [file normalize $argv0]]
+
+load_variables $path
+
+proc test_trace {} {
+ global path output_file
+
+ set user "@RUNUSR@"
+
+ set_dir
+ port_index
+ port_clean $path
+
+ file delete -force /tmp/hello-trace
+ file delete -force /tmp/link-trace2
+ file link -symbolic /tmp/link-trace2 /usr/include/unistd.h
+
+ makeDirectory ../tracetesttmp
+ if {[getuid] == 0} {
+ file attributes ../tracetesttmp -owner $user
+ exec chown -h $user /tmp/link-trace2
+ }
+
+ if {[getuid] == 0} {
+ seteuid [name_to_uid $user]
+ }
+ exec touch ../tracetesttmp/delete-trace
+ exec touch ../tracetesttmp/rename-trace
+ exec mkdir ../tracetesttmp/rmdir-trace
+ if {[getuid] == 0} {
+ seteuid 0
+ }
+
+ port_trace $path
+
+ file delete -force /tmp/link-trace2
+ file delete -force /tmp/hello-trace
+
+ set err "error*"
+ set line [get_line $path/$output_file $err]
+ set unsupported [get_line $path/$output_file "*tracelib not supported on this platform*"]
+ if {$unsupported != -1 || $line == -1} {
+ return "No errors found."
+ } else {
+ return $line
+ }
+}
+
+test trace {
+ Regression test for trace.
+} -constraints {
+ tracemode_support
+} -body {
+ test_trace
+} -result "No errors found."
+
+
+cleanup
+cleanupTests
</ins></span></pre></div>
<a id="branchesnewhelpsystembaseteststestuniversaltesttcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/tests/test/universal/test.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/test/universal/test.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/tests/test/universal/test.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -38,6 +38,8 @@
</span><span class="cx">
</span><span class="cx"> test universal {
</span><span class="cx"> Regression test for universal variant.
</span><ins>+} -constraints {
+ darwin
</ins><span class="cx"> } -body {
</span><span class="cx"> univ_test "yes"
</span><span class="cx"> } -result "variants: universal"
</span></span></pre></div>
<a id="branchesnewhelpsystembaseteststestxcodeversiontesttcl"></a>
<div class="modfile"><h4>Modified: branches/new-help-system/base/tests/test/xcodeversion/test.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/test/xcodeversion/test.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/tests/test/xcodeversion/test.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -24,12 +24,16 @@
</span><span class="cx">
</span><span class="cx"> test envvariables {
</span><span class="cx"> Regression test for XCode version.
</span><ins>+} -constraints {
+ darwin
</ins><span class="cx"> } -body {
</span><span class="cx"> xcode_ver
</span><span class="cx"> } -result "xcodeversion >= 2.1"
</span><span class="cx">
</span><span class="cx"> test xcode_path {
</span><span class="cx"> Regression test for XCode path.
</span><ins>+} -constraints {
+ darwin
</ins><span class="cx"> } -body {
</span><span class="cx"> xcode_binpath
</span><span class="cx"> } -result "xcodebuildcmd = /usr/bin/xcodebuild"
</span></span></pre></div>
<a id="branchesnewhelpsystembaseteststesttcl"></a>
<div class="delfile"><h4>Deleted: branches/new-help-system/base/tests/test.tcl (122998 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/test.tcl        2014-08-03 14:35:14 UTC (rev 122998)
+++ branches/new-help-system/base/tests/test.tcl        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -1,143 +0,0 @@
</span><del>-set test_suite {
- case-insensitive-deactivate
- checksums-1
- dependencies-a
- dependencies-b
- dependencies-c
- dependencies-d
- dependencies-e
- envvariables
- site-tags
- statefile-unknown-version
- statefile-version1
- statefile-version1-outdated
- statefile-version2
- statefile-version2-invalid
- statefile-version2-outdated
- svn-and-patchsites
- trace
- universal
- variants
- xcodeversion
-}
-set arguments ""
-set test_name ""
-set color_out ""
-set tcl ""
-set err ""
-
-# Get tclsh path.
-set autoconf ../Mk/macports.autoconf.mk
-set fp [open $autoconf r]
-while {[gets $fp line] != -1} {
- if {[string match "TCLSH*" $line] != 0} {
- set tcl [lrange [split $line " "] 1 1]
- }
-}
-
-proc print_help {arg} {
- if { $arg eq "tests" } {
- puts "The list of available tests is:"
- foreach test $::test_suite {
- puts [puts -nonewline " "]$test
- }
- } else {
- puts "Usage: tclsh test.tcl \[-debug level\] \[-t test\] \[-l\]\n"
- puts " -debug LVL : sets the level of printed debug info \[0-3\]"
- puts " -t TEST : run a specific test"
- puts " -nocolor : disable color output (for automatic testing)"
- puts " -l : print the list of available tests"
- puts " -h, -help : print this message\n"
- }
-}
-
-# Process args
-foreach arg $argv {
- if { $arg eq "-h" || $arg eq "-help" } {
- print_help ""
- exit 0
- } elseif { $arg eq "-debug" } {
- set index [expr {[lsearch $argv $arg] + 1}]
- set level [lindex $argv $index]
- if { $level >= 0 && $level <= 3 } {
- append arguments "-debug " $level
- } else {
- puts "Invalid debug level."
- exit 1
- }
- } elseif { $arg eq "-t" } {
- set index [expr {[lsearch $argv $arg] + 1}]
- set test_name [lindex $argv $index]
- set no 0
- foreach test $test_suite {
- if { $test_name != $test } {
- set no [expr {$no + 1}]
- }
- }
- if { $no == [llength $test_suite] } {
- print_help tests
- exit 1
- }
- } elseif { $arg eq "-l" } {
- print_help tests
- exit 0
- } elseif { $arg eq "-nocolor" } {
- set color_out "no"
- }
-}
-
-
-# Run tests
-if {$test_name ne ""} {
- cd test/$test_name
-
- set result [eval exec $tcl test.tcl $arguments 2>@stderr]
- puts $result
-
-} else {
- foreach test $test_suite {
- cd test/$test
-
- set result [eval exec $tcl test.tcl $arguments 2>@stderr]
- set lastline [lindex [split $result "\n"] end]
-
- if {[lrange [split $lastline "\t"] 1 1] != "Total"} {
- set lastline [lindex [split $result "\n"] end-2]
- set errmsg [lindex [split $result "\n"] end]
- }
-
- set splitresult [split $lastline "\t"]
- set total [lindex $splitresult 2]
- set pass [lindex $splitresult 4]
- set skip [lindex $splitresult 6]
- set fail [lindex $splitresult 8]
-
- # Check for errors.
- if { $fail != 0 } { set err "yes" }
-
- set out ""
- if { ($fail != 0 || $skip != 0) && $color_out eq "" } {
- # Color failed tests.
- append out "\x1b\[1;31mTotal:" $total " Passed:" $pass " Failed:" $fail " Skipped:" $skip " \x1b\[0m" $test
- } else {
- append out "Total:" $total " Passed:" $pass " Failed:" $fail " Skipped:" $skip " " $test
- }
-
- # Print results and constrints for auto-skipped tests.
- puts $out
- if { $skip != 0 } {
- set out " Constraint: "
- append out [string trim $errmsg "\t {}"]
- puts $out
- }
-
- cd ../..
- }
-}
-
-# Return 1 if errors were found.
-if {$err ne ""} {
- exit 1
-}
-
-return 0
</del></span></pre></div>
<a id="branchesnewhelpsystembaseteststesttclinfromrev122997trunkbaseteststesttclin"></a>
<div class="copfile"><h4>Copied: branches/new-help-system/base/tests/test.tcl.in (from rev 122997, trunk/base/tests/test.tcl.in) (0 => 122999)</h4>
<pre class="diff"><span>
<span class="info">--- branches/new-help-system/base/tests/test.tcl.in         (rev 0)
+++ branches/new-help-system/base/tests/test.tcl.in        2014-08-03 15:04:12 UTC (rev 122999)
</span><span class="lines">@@ -0,0 +1,138 @@
</span><ins>+set test_suite {
+ case-insensitive-deactivate
+ checksums-1
+ dependencies-a
+ dependencies-b
+ dependencies-c
+ dependencies-d
+ dependencies-e
+ envvariables
+ site-tags
+ statefile-unknown-version
+ statefile-version1
+ statefile-version1-outdated
+ statefile-version2
+ statefile-version2-invalid
+ statefile-version2-outdated
+ svn-and-patchsites
+ trace
+ universal
+ variants
+ xcodeversion
+}
+
+set arguments ""
+set test_name ""
+set color_out ""
+set tcl ""
+set err ""
+
+# Get tclsh path.
+set tcl "@TCLSH@"
+
+proc print_help {arg} {
+ if { $arg eq "tests" } {
+ puts "The list of available tests is:"
+ foreach test $::test_suite {
+ puts [puts -nonewline " "]$test
+ }
+ } else {
+ puts "Usage: tclsh test.tcl \[-debug level\] \[-t test\] \[-l\]\n"
+ puts " -debug LVL : sets the level of printed debug info \[0-3\]"
+ puts " -t TEST : run a specific test"
+ puts " -nocolor : disable color output (for automatic testing)"
+ puts " -l : print the list of available tests"
+ puts " -h, -help : print this message\n"
+ }
+}
+
+# Process args
+foreach arg $argv {
+ if { $arg eq "-h" || $arg eq "-help" } {
+ print_help ""
+ exit 0
+ } elseif { $arg eq "-debug" } {
+ set index [expr {[lsearch $argv $arg] + 1}]
+ set level [lindex $argv $index]
+ if { $level >= 0 && $level <= 3 } {
+ append arguments "-debug " $level
+ } else {
+ puts "Invalid debug level."
+ exit 1
+ }
+ } elseif { $arg eq "-t" } {
+ set index [expr {[lsearch $argv $arg] + 1}]
+ set test_name [lindex $argv $index]
+ set no 0
+ foreach test $test_suite {
+ if { $test_name != $test } {
+ set no [expr {$no + 1}]
+ }
+ }
+ if { $no == [llength $test_suite] } {
+ print_help tests
+ exit 1
+ }
+ } elseif { $arg eq "-l" } {
+ print_help tests
+ exit 0
+ } elseif { $arg eq "-nocolor" } {
+ set color_out "no"
+ }
+}
+
+
+# Run tests
+if {$test_name ne ""} {
+ cd test/$test_name
+
+ set result [eval exec $tcl test.tcl $arguments 2>@stderr]
+ puts $result
+
+} else {
+ foreach test $test_suite {
+ cd test/$test
+
+ set result [eval exec $tcl test.tcl $arguments 2>@stderr]
+ set lastline [lindex [split $result "\n"] end]
+
+ if {[lrange [split $lastline "\t"] 1 1] != "Total"} {
+ set lastline [lindex [split $result "\n"] end-2]
+ set errmsg [lindex [split $result "\n"] end]
+ }
+
+ set splitresult [split $lastline "\t"]
+ set total [lindex $splitresult 2]
+ set pass [lindex $splitresult 4]
+ set skip [lindex $splitresult 6]
+ set fail [lindex $splitresult 8]
+
+ # Check for errors.
+ if { $fail != 0 } { set err "yes" }
+
+ set out ""
+ if { ($fail != 0 || $skip != 0) && $color_out eq "" } {
+ # Color failed tests.
+ append out "\x1b\[1;31mTotal:" $total " Passed:" $pass " Failed:" $fail " Skipped:" $skip " \x1b\[0m" $test
+ } else {
+ append out "Total:" $total " Passed:" $pass " Failed:" $fail " Skipped:" $skip " " $test
+ }
+
+ # Print results and constrints for auto-skipped tests.
+ puts $out
+ if { $skip != 0 } {
+ set out " Constraint: "
+ append out [string trim $errmsg "\t {}"]
+ puts $out
+ }
+
+ cd ../..
+ }
+}
+
+# Return 1 if errors were found.
+if {$err ne ""} {
+ exit 1
+}
+
+return 0
</ins></span></pre>
</div>
</div>
</body>
</html>