[37509] branches/variant-descs-14482/base
raimue at macports.org
raimue at macports.org
Tue Jun 10 07:48:15 PDT 2008
Revision: 37509
http://trac.macosforge.org/projects/macports/changeset/37509
Author: raimue at macports.org
Date: 2008-06-10 07:48:05 -0700 (Tue, 10 Jun 2008)
Log Message:
-----------
Merged revisions 34872-37508 via svnmerge from
https://svn.macports.org/repository/macports/trunk/base
........
r34874 | raimue at macports.org | 2008-03-10 01:04:09 +0100 (Mon, 10 Mar 2008) | 4 lines
port1.0/portlivecheck.tcl:
Fix livecheck for ports using customized ${livecheck.version}.
Thanks to Simon Ruderich for the report.
........
r34875 | eridius at macports.org | 2008-03-10 05:50:45 +0100 (Mon, 10 Mar 2008) | 2 lines
Add support for fetch.type git (Fixes #14232)
........
r34885 | raimue at macports.org | 2008-03-10 14:30:18 +0100 (Mon, 10 Mar 2008) | 3 lines
ChangeLog:
New fetch.type git
........
r34886 | eridius at macports.org | 2008-03-10 14:38:11 +0100 (Mon, 10 Mar 2008) | 2 lines
Add reference to #14232 to the ChangeLog
........
r34887 | afb at macports.org | 2008-03-10 14:46:16 +0100 (Mon, 10 Mar 2008) | 2 lines
update changelog, #13968
........
r34901 | raimue at macports.org | 2008-03-10 17:24:07 +0100 (Mon, 10 Mar 2008) | 3 lines
port1.0/portmain.tcl:
Add a variant description for the built-in +universal
........
r34977 | eridius at macports.org | 2008-03-13 15:13:51 +0100 (Thu, 13 Mar 2008) | 2 lines
Add new --recursive option to port uninstall to uninstall dependents (#14637)
........
r35030 | ryandesign at macports.org | 2008-03-15 00:49:07 +0100 (Sat, 15 Mar 2008) | 2 lines
fix typos: "the the" => "the"
........
r35042 | eridius at macports.org | 2008-03-15 15:30:32 +0100 (Sat, 15 Mar 2008) | 2 lines
Fix recursive uninstall for case where multiple branches of dep tree contain the same port
........
r35103 | raimue at macports.org | 2008-03-17 15:33:01 +0100 (Mon, 17 Mar 2008) | 4 lines
HACKING:
* Replace 'filetype' by shorter 'ft' in vim modeline
* Remove trailing whitespace
........
r35138 | afb at macports.org | 2008-03-18 09:57:09 +0100 (Tue, 18 Mar 2008) | 2 lines
put applications_dir and frameworks_dir in global variables
........
r35139 | afb at macports.org | 2008-03-18 10:04:27 +0100 (Tue, 18 Mar 2008) | 2 lines
mention tcldoc/tcldox in changelog
........
r35140 | afb at macports.org | 2008-03-18 10:12:53 +0100 (Tue, 18 Mar 2008) | 2 lines
mention default MDT in changelog
........
r35171 | afb at macports.org | 2008-03-19 09:59:44 +0100 (Wed, 19 Mar 2008) | 2 lines
use applications_dir and frameworks_dir instead of hardcoded paths
........
r35195 | afb at macports.org | 2008-03-20 10:22:41 +0100 (Thu, 20 Mar 2008) | 2 lines
fix typo in workaround (interactive installs are evil)
........
r35196 | afb at macports.org | 2008-03-20 10:24:39 +0100 (Thu, 20 Mar 2008) | 2 lines
use explicit external tclthread/sqlite3/gnuobjc/gnustep for configure
........
r35211 | wsiegrist at apple.com | 2008-03-21 01:35:36 +0100 (Fri, 21 Mar 2008) | 2 lines
Use proper mail headers. Also cleaned up some variable case and layout weirdness
........
r35249 | wsiegrist at apple.com | 2008-03-22 06:22:09 +0100 (Sat, 22 Mar 2008) | 2 lines
Add distfiles command for listing each distfile for a given port spec and the list of URLs that fetch will use. This will eventually be used for distfile mirroring.
........
r35256 | wsiegrist at apple.com | 2008-03-22 23:18:17 +0100 (Sat, 22 Mar 2008) | 2 lines
added checksum display and an early exit when master_sites is not provided
........
r35257 | wsiegrist at apple.com | 2008-03-22 23:31:11 +0100 (Sat, 22 Mar 2008) | 2 lines
added distfiles to port manpage
........
r35279 | epimenov at macports.org | 2008-03-23 21:46:32 +0100 (Sun, 23 Mar 2008) | 5 lines
Tracelib
1) I allow /Developer, not only /Developer/Headers. Because Xcode 3.1 (aka iPhone SDK) uses a lot of stuff here. It can't compile without /Developer/Platform/MacOSX.platform for example. Also SDK redirection will not work with Xcode 3.1. Also it introduce ablitity to change /Developer folder, so we should handle this somehow.
2) Also this commit fixes issue with recv overflow. If you run xcodebuild with old rules you'll see a lot of sandbox viloations (xcode scans for plugins, platforms and so on), and you'll see malformed commands. It happens when tracelib sends more than 1024 bytes of data. Now it properly handled.
........
r35299 | wsiegrist at apple.com | 2008-03-24 23:50:32 +0100 (Mon, 24 Mar 2008) | 2 lines
Add distfiles target to port. This should have gone in with r35249.
........
r35474 | wsiegrist at apple.com | 2008-03-29 02:33:33 +0100 (Sat, 29 Mar 2008) | 3 lines
Made checkouts non-recursive since lint doesnt rely on actual files/ contents.
Added logging to help debug things server side.
........
r35476 | wsiegrist at apple.com | 2008-03-29 02:48:25 +0100 (Sat, 29 Mar 2008) | 2 lines
Emails now go to both committer and maintainers
........
r35606 | jmr at macports.org | 2008-03-31 03:12:12 +0200 (Mon, 31 Mar 2008) | 2 lines
sort the list of mirror groups like the comment says
........
r35630 | raimue at macports.org | 2008-04-01 00:13:05 +0200 (Tue, 01 Apr 2008) | 3 lines
macports1.0/macports.tcl:
Error out if syncing a source failed, but continue instead of returning an error code
........
r35643 | jmr at macports.org | 2008-04-01 13:05:03 +0200 (Tue, 01 Apr 2008) | 2 lines
Fix or remove broken mirrors.
........
r35644 | jmr at macports.org | 2008-04-01 13:51:46 +0200 (Tue, 01 Apr 2008) | 2 lines
List master download sites last.
........
r35647 | raimue at macports.org | 2008-04-01 15:09:48 +0200 (Tue, 01 Apr 2008) | 5 lines
macports1.0/macports.tcl:
Implement fetching of daily snapshot tarballs as an alternative to rsync.
Just add the following line to sources.conf instead of rsync:
http://macports.org/files/ports.tar.gz
........
r35648 | raimue at macports.org | 2008-04-01 15:48:23 +0200 (Tue, 01 Apr 2008) | 4 lines
port/port.tcl, macports/macports.tcl:
* Pass optional $optionslist to mportsync
* Only sync daily snapshot if the tarball is newer than the local ports directory
........
r35649 | raimue at macports.org | 2008-04-01 15:52:20 +0200 (Tue, 01 Apr 2008) | 3 lines
ChangeLog:
Fetching of daily snapshot tarballs of the ports tree as an alternative to rsync
........
r35654 | jmr at macports.org | 2008-04-01 18:05:15 +0200 (Tue, 01 Apr 2008) | 2 lines
Add some new mirror sites.
........
r35675 | raimue at macports.org | 2008-04-02 01:27:08 +0200 (Wed, 02 Apr 2008) | 3 lines
port1.0/portutil.tcl:
tracemode: always allow gzip in destroot phase, as it is used to compress man pages
........
r35714 | jmr at macports.org | 2008-04-03 23:14:14 +0200 (Thu, 03 Apr 2008) | 2 lines
fix typo
........
r35748 | jmr at macports.org | 2008-04-04 21:58:24 +0200 (Fri, 04 Apr 2008) | 2 lines
Try mirrors in ascending order of ping time in fetch.
........
r35749 | jmr at macports.org | 2008-04-04 22:09:59 +0200 (Fri, 04 Apr 2008) | 2 lines
Add full modeline to portfetch.tcl.
........
r35750 | jmr at macports.org | 2008-04-04 22:20:05 +0200 (Fri, 04 Apr 2008) | 2 lines
ChangeLog: fetch prefers mirrors with lower ping times.
........
r35772 | eridius at macports.org | 2008-04-05 20:39:49 +0200 (Sat, 05 Apr 2008) | 2 lines
Get rid of all usage of _cd and [exec find ...] in ruby-1.0.tcl
........
r35773 | eridius at macports.org | 2008-04-05 21:00:12 +0200 (Sat, 05 Apr 2008) | 2 lines
ruby.setup now takes type "fetch" for just fetch/extract. Thanks to Mr_Bond for the patch
........
r35790 | raimue at macports.org | 2008-04-06 21:00:49 +0200 (Sun, 06 Apr 2008) | 4 lines
port1.0/portutil.tcl:
Avoid parsing Portfiles multiple times in recursive_collect_deps.
This makes tracemode a lot faster if there are many deps.
........
r35806 | raimue at macports.org | 2008-04-07 01:40:58 +0200 (Mon, 07 Apr 2008) | 7 lines
port1.0/portfetch.tcl:
Move checkfiles from fetch_init to fetch_start:
* Assemble fetch URLs only when needed
* Do not ping servers if not actually fetching
Reverted in r36734.
........
r35807 | raimue at macports.org | 2008-04-07 01:43:32 +0200 (Mon, 07 Apr 2008) | 4 lines
ChangeLog:
Add r35806,
> * Do not ping servers if not actually fetching
........
r35808 | jmr at macports.org | 2008-04-07 02:26:39 +0200 (Mon, 07 Apr 2008) | 2 lines
Only call sortsites when we actually need to fetch something.
........
r35809 | raimue at macports.org | 2008-04-07 03:26:42 +0200 (Mon, 07 Apr 2008) | 3 lines
ChangeLog:
Another ping related change
........
r35812 | raimue at macports.org | 2008-04-07 04:09:22 +0200 (Mon, 07 Apr 2008) | 3 lines
doc/Makefile:
Compress man pages before installation, see #14668.
........
r35929 | jmr at macports.org | 2008-04-10 10:29:46 +0200 (Thu, 10 Apr 2008) | 2 lines
Account for the space between words in length calculation when wrapping lines.
........
r35970 | afb at macports.org | 2008-04-11 23:33:16 +0200 (Fri, 11 Apr 2008) | 2 lines
add missing global variable declaration
........
r35975 | jmr at macports.org | 2008-04-12 08:17:27 +0200 (Sat, 12 Apr 2008) | 2 lines
remove keywords property from binary file
........
r36002 | jkh at apple.com | 2008-04-14 06:07:30 +0200 (Mon, 14 Apr 2008) | 3 lines
Pick a reasonable default for people without EDITOR set, following existing
precedent for editor escapes.
........
r36127 | markd at macports.org | 2008-04-19 03:46:17 +0200 (Sat, 19 Apr 2008) | 2 lines
Add comments for binpath.
........
r36160 | raimue at macports.org | 2008-04-20 03:47:23 +0200 (Sun, 20 Apr 2008) | 3 lines
registry1.0/portuninstall.tcl:
Rename --recursive to --follow-dependents
........
r36285 | eridius at macports.org | 2008-04-25 16:46:00 +0200 (Fri, 25 Apr 2008) | 2 lines
Make the auto-lint script catch errors too, not just warnings
........
r36379 | raimue at macports.org | 2008-04-29 05:29:37 +0200 (Tue, 29 Apr 2008) | 3 lines
base/src:
Adapting $portname @$version notation
........
r36500 | raimue at macports.org | 2008-05-04 19:09:55 +0200 (Sun, 04 May 2008) | 4 lines
cregistry/registry.c:
Fix build error. dirname(3) might change the passed argument, therefore we need
to strdup() the const char *path first.
........
r36501 | raimue at macports.org | 2008-05-04 20:18:13 +0200 (Sun, 04 May 2008) | 3 lines
base/src:
Addition to r36379, Adapting $portname @$version notation
........
r36545 | jmr at macports.org | 2008-05-06 07:23:54 +0200 (Tue, 06 May 2008) | 2 lines
_libtest: add /usr/X11/lib to search_path in case the /usr/X11R6 link goes away in future
........
r36640 | afb at macports.org | 2008-05-09 09:00:28 +0200 (Fri, 09 May 2008) | 2 lines
always edit scripts, just in case user changed their mind and reconfigured
........
r36648 | jmr at macports.org | 2008-05-09 11:43:47 +0200 (Fri, 09 May 2008) | 2 lines
mportdepends: make sure we always error out on nonexistent ports
........
r36656 | jmr at macports.org | 2008-05-09 18:02:15 +0200 (Fri, 09 May 2008) | 2 lines
ruby portgroup: make doc install in post-destroot actually work
........
r36679 | jmr at macports.org | 2008-05-11 10:18:24 +0200 (Sun, 11 May 2008) | 4 lines
fetch_init, archive_init, unarchive_init:
Avoid creating too many subdirectory levels when these procedures are called
more than once. Fix for #11971.
........
r36687 | jmr at macports.org | 2008-05-12 00:01:57 +0200 (Mon, 12 May 2008) | 2 lines
back out the fetch part of r36679, as it breaks other phases
........
r36688 | jmr at macports.org | 2008-05-12 00:37:38 +0200 (Mon, 12 May 2008) | 2 lines
simpler, working fix for #11971.
........
r36708 | ryandesign at macports.org | 2008-05-13 05:27:25 +0200 (Tue, 13 May 2008) | 2 lines
Allow distfiles to be disk images with new "use_dmg yes" port option; #13509.
........
r36709 | ryandesign at macports.org | 2008-05-13 05:28:43 +0200 (Tue, 13 May 2008) | 2 lines
ChangeLog: whitespace changes only
........
r36710 | ryandesign at macports.org | 2008-05-13 05:29:24 +0200 (Tue, 13 May 2008) | 2 lines
ChangeLog: whitespace changes only
........
r36711 | ryandesign at macports.org | 2008-05-13 05:34:13 +0200 (Tue, 13 May 2008) | 4 lines
ChangeLog: add info about 'use_dmg yes' option from r36708; #13509
The change to PortIndex2MySQL.tcl was not intended and was reverted in r36712.
........
r36712 | ryandesign at macports.org | 2008-05-13 05:35:20 +0200 (Tue, 13 May 2008) | 2 lines
PortIndex2MySQL.tcl: revert change inadvertently committed in r36711
........
r36719 | afb at macports.org | 2008-05-13 13:04:28 +0200 (Tue, 13 May 2008) | 2 lines
add unsetenv command, for working around bugs in Leopard tcl
........
r36722 | afb at macports.org | 2008-05-13 13:21:41 +0200 (Tue, 13 May 2008) | 2 lines
explicitly unset all env vars (an extra time), to work around Leopard Tcl bugs (#13930 and friends)
........
r36723 | afb at macports.org | 2008-05-13 13:32:11 +0200 (Tue, 13 May 2008) | 2 lines
add patch needed for Leopard, to the included tclthread (#13495)
........
r36724 | afb at macports.org | 2008-05-13 13:34:05 +0200 (Tue, 13 May 2008) | 2 lines
update changelog, #13930 #13495
........
r36728 | afb at macports.org | 2008-05-13 13:47:16 +0200 (Tue, 13 May 2008) | 2 lines
test the env CC problem explicitly
........
r36734 | raimue at macports.org | 2008-05-13 15:41:48 +0200 (Tue, 13 May 2008) | 4 lines
port1.0/portfetch.tcl:
Revert r35806. The checkfiles proc must always be run as the checksum phase depends on
global variables from there.
........
r36735 | jmr at macports.org | 2008-05-13 15:43:23 +0200 (Tue, 13 May 2008) | 3 lines
In image mode, don't count dependencies as being satisfied when the satisfying
port is not active. Fix for #7361.
........
r36736 | markd at macports.org | 2008-05-13 21:15:11 +0200 (Tue, 13 May 2008) | 2 lines
Fix hardcoded paths in binpath comments.
........
r36745 | jmr at macports.org | 2008-05-14 05:22:56 +0200 (Wed, 14 May 2008) | 2 lines
Prevent duplicate dep_map entries from being inserted. Fix for #8763.
........
r36747 | jmr at macports.org | 2008-05-14 06:53:20 +0200 (Wed, 14 May 2008) | 3 lines
uninstall: allow unforced removal of a port with dependents, iff it is
inactive and there is at least one other version of the same port installed.
........
r36750 | jmr at macports.org | 2008-05-14 07:17:05 +0200 (Wed, 14 May 2008) | 2 lines
update changelog
........
r36762 | jmr at macports.org | 2008-05-14 10:48:55 +0200 (Wed, 14 May 2008) | 4 lines
upgrade: if the latest installed version of a port is not active, deactivate
the currently active version, if any, before trying to activate the latest
version. Fix for #12013.
........
r36764 | jmr at macports.org | 2008-05-14 11:11:07 +0200 (Wed, 14 May 2008) | 3 lines
Reworked the handling of the default universal variant. We can now avoid
adding it at all when we know it won't work. Fix for #12170.
........
r36765 | ryandesign at macports.org | 2008-05-14 11:36:20 +0200 (Wed, 14 May 2008) | 2 lines
Fix comment: universal support requires the universal SDK be installed
........
r36770 | afb at macports.org | 2008-05-14 13:08:23 +0200 (Wed, 14 May 2008) | 2 lines
only edit when reconfigured, always is not needed
........
r36771 | jmr at macports.org | 2008-05-14 13:34:23 +0200 (Wed, 14 May 2008) | 2 lines
update changelog
........
r36773 | afb at macports.org | 2008-05-14 13:49:20 +0200 (Wed, 14 May 2008) | 2 lines
include epoch in archive
........
r36774 | afb at macports.org | 2008-05-14 13:57:44 +0200 (Wed, 14 May 2008) | 2 lines
create destroot for archive +JUNK, even if there are no files
........
r36800 | raimue at macports.org | 2008-05-15 02:36:20 +0200 (Thu, 15 May 2008) | 4 lines
port1.0/portutil.tcl:
Put checks for universal SDK in the default +universal variant into a pre-fetch
block to avoid breaking commands like `port info +universal`.
........
r36801 | raimue at macports.org | 2008-05-15 02:55:33 +0200 (Thu, 15 May 2008) | 3 lines
doc/macports.conf.in:
Be more clear about the startupitem_type option.
........
r36880 | jmr at macports.org | 2008-05-17 08:25:29 +0200 (Sat, 17 May 2008) | 2 lines
add an xorg mirror group
........
r36890 | afb at macports.org | 2008-05-17 10:38:01 +0200 (Sat, 17 May 2008) | 2 lines
don't include build.nice and build.jobs in destroot.cmd, only in the build.cmd (#15295)
........
r36904 | afb at macports.org | 2008-05-18 10:11:44 +0200 (Sun, 18 May 2008) | 2 lines
update changelog for r36890
........
r36905 | afb at macports.org | 2008-05-18 10:28:46 +0200 (Sun, 18 May 2008) | 2 lines
add fetch.remote_time for curl --remote-time (#12629)
........
r36907 | nox at macports.org | 2008-05-18 14:00:46 +0200 (Sun, 18 May 2008) | 2 lines
merge procedure now uses configure.universal_archs
........
r36909 | afb at macports.org | 2008-05-18 18:50:36 +0200 (Sun, 18 May 2008) | 2 lines
update documentation, from r36890
........
r36913 | afb at macports.org | 2008-05-18 20:32:16 +0200 (Sun, 18 May 2008) | 2 lines
better fix for #15295, restore build.cmd to sanity
........
r36914 | afb at macports.org | 2008-05-18 20:35:37 +0200 (Sun, 18 May 2008) | 2 lines
restore previous destroot.cmd, undo build.cmd workaround
........
r36915 | afb at macports.org | 2008-05-18 20:47:10 +0200 (Sun, 18 May 2008) | 2 lines
oops, nice was applied to cd instead of make
........
r36959 | jmr at macports.org | 2008-05-21 12:27:53 +0200 (Wed, 21 May 2008) | 2 lines
Add a CTAN mirror group.
........
r37023 | afb at macports.org | 2008-05-23 11:59:26 +0200 (Fri, 23 May 2008) | 2 lines
sqlite3-threads port was removed, sqlite3 port threads are enabled by default
........
r37046 | jmr at macports.org | 2008-05-24 16:24:54 +0200 (Sat, 24 May 2008) | 6 lines
upgrade: when following dependents (-R), only upgrade the dependents of the
specified port, not those of all its dependencies as well. Also use the
depscache for dependents as well as dependencies. These changes reduce the
amount of work done by 'port -R upgrade', by an enormous amount in some cases.
Fixes #10827.
........
r37047 | jmr at macports.org | 2008-05-24 16:41:50 +0200 (Sat, 24 May 2008) | 2 lines
Update changelog for r37046.
........
r37070 | afb at macports.org | 2008-05-25 11:09:08 +0200 (Sun, 25 May 2008) | 2 lines
need to look at build.cmd, not default getmaketype (#15426)
........
r37118 | raimue at macports.org | 2008-05-27 00:37:25 +0200 (Tue, 27 May 2008) | 4 lines
port/port.tcl:
In opUnion: add items only once to the result as it was meant to be.
Fixes #15433.
........
r37119 | raimue at macports.org | 2008-05-27 01:59:56 +0200 (Tue, 27 May 2008) | 5 lines
port/port.tcl:
port search looks now in name, description and long_description for the search
pattern and prints the list sorted.
Fixes #15434.
........
r37120 | raimue at macports.org | 2008-05-27 02:05:08 +0200 (Tue, 27 May 2008) | 2 lines
Update ChangeLog for r15434
........
r37121 | raimue at macports.org | 2008-05-27 02:12:46 +0200 (Tue, 27 May 2008) | 3 lines
port/port.tcl:
Fix number of ports found in port search
........
r37122 | raimue at macports.org | 2008-05-27 02:16:34 +0200 (Tue, 27 May 2008) | 2 lines
Update ChangeLog for r37121
........
r37217 | jmr at macports.org | 2008-05-30 14:12:21 +0200 (Fri, 30 May 2008) | 2 lines
Add our new distfile mirror (distfiles.macports.org) and automatically append it to master_sites.
........
r37218 | jmr at macports.org | 2008-05-30 14:21:32 +0200 (Fri, 30 May 2008) | 2 lines
update changelog for r37217
........
r37231 | raimue at macports.org | 2008-05-31 19:28:34 +0200 (Sat, 31 May 2008) | 3 lines
port/port.tcl:
Add a list of arguments the commands accept
........
r37232 | raimue at macports.org | 2008-05-31 19:33:00 +0200 (Sat, 31 May 2008) | 3 lines
port/port.tcl:
Check if an action is valid before parsing its arguments
........
r37233 | raimue at macports.org | 2008-05-31 20:11:45 +0200 (Sat, 31 May 2008) | 3 lines
port/port.tcl:
Remove unused variable
........
r37238 | raimue at macports.org | 2008-05-31 22:03:34 +0200 (Sat, 31 May 2008) | 3 lines
port/port.tcl:
Only expand portlist when needed
........
r37240 | raimue at macports.org | 2008-05-31 22:20:27 +0200 (Sat, 31 May 2008) | 3 lines
port/port.tcl:
If the 'current' port does not expand to any port, return an error
........
r37241 | raimue at macports.org | 2008-05-31 22:36:51 +0200 (Sat, 31 May 2008) | 7 lines
port/port.tcl:
Do some half-intelligent string matching for port search.
If the specified search string already contained an *, use it as direct glob
expression, otherwise add * around the search string.
As an example see how the output from 'port search less' and 'port search less*' differs.
........
r37242 | raimue at macports.org | 2008-05-31 23:12:13 +0200 (Sat, 31 May 2008) | 3 lines
port/port.tcl:
Output a nice usage list of arguments on port help <action>
........
r37243 | raimue at macports.org | 2008-05-31 23:57:15 +0200 (Sat, 31 May 2008) | 3 lines
port/port-help.tcl:
More helpful action desriptions
........
r37244 | raimue at macports.org | 2008-06-01 01:07:53 +0200 (Sun, 01 Jun 2008) | 3 lines
port/port.tcl:
Correct the list of arguments for the commands and sort each of them
........
r37247 | raimue at macports.org | 2008-06-01 04:53:03 +0200 (Sun, 01 Jun 2008) | 3 lines
port/port.tcl:
Enable multiple arguments for --options
........
r37248 | raimue at macports.org | 2008-06-01 04:59:15 +0200 (Sun, 01 Jun 2008) | 4 lines
port/port.tcl:
Re-add --info and --index for port info which got lost in previous attempts to
complete the list
........
r37249 | raimue at macports.org | 2008-06-01 06:20:31 +0200 (Sun, 01 Jun 2008) | 3 lines
port/port.tcl:
Rework the previous action array
........
r37251 | raimue at macports.org | 2008-06-01 06:52:50 +0200 (Sun, 01 Jun 2008) | 3 lines
port/port.tcl:
Remove hardcoded values and use action_args_const instead
........
r37253 | raimue at macports.org | 2008-06-01 07:12:23 +0200 (Sun, 01 Jun 2008) | 4 lines
port/port.tcl:
port usage <action> gives the basic usage as in port help <action> on the top
Removed hardcoded values and use action_args_const instead
........
r37254 | raimue at macports.org | 2008-06-01 07:22:03 +0200 (Sun, 01 Jun 2008) | 3 lines
port/port.tcl:
Fix output on occurrences of proc wrap
........
r37255 | jmr at macports.org | 2008-06-01 08:27:45 +0200 (Sun, 01 Jun 2008) | 2 lines
The distfile mirror does in fact have patchfiles as well, so append it to patch_sites.
........
r37264 | raimue at macports.org | 2008-06-02 01:09:49 +0200 (Mon, 02 Jun 2008) | 3 lines
test/Makefile:
Add missing definition of $(PWD)
........
r37265 | raimue at macports.org | 2008-06-02 01:11:10 +0200 (Mon, 02 Jun 2008) | 4 lines
tests/Makefile:
test-port.conf was renamed to test-macports.conf in r25535,
but was not changed in the Makefile
........
r37266 | raimue at macports.org | 2008-06-02 01:13:04 +0200 (Mon, 02 Jun 2008) | 3 lines
test/test/cvs-and-patchfiles:
Use a working CVS server for the test
........
r37267 | raimue at macports.org | 2008-06-02 01:21:39 +0200 (Mon, 02 Jun 2008) | 4 lines
tests/:
case-insensitive-deactivate can now be invoked from the test framework:
sudo make test TESTS=case-insensitive-deactivate
........
r37268 | raimue at macports.org | 2008-06-02 01:27:34 +0200 (Mon, 02 Jun 2008) | 3 lines
port/port.tcl:
Errors should go to stderr
........
r37269 | raimue at macports.org | 2008-06-02 01:34:43 +0200 (Mon, 02 Jun 2008) | 5 lines
port/port.tcl:
Output an empty field instead of nothing in port info if the requested
field is not specified for the port. This makes is easier to parse the output,
if needed.
........
r37270 | raimue at macports.org | 2008-06-02 02:05:20 +0200 (Mon, 02 Jun 2008) | 3 lines
tests/test/dependencies_c:
Fix dependency check, new @version notation
........
r37271 | raimue at macports.org | 2008-06-02 02:06:59 +0200 (Mon, 02 Jun 2008) | 4 lines
tests/test/universal{,-2}:
Use port info --variants to check for the variant instead of the whole info
output. Should be more error prone if we make further changes.
........
r37290 | raimue at macports.org | 2008-06-02 17:05:26 +0200 (Mon, 02 Jun 2008) | 5 lines
port/port.tcl:
Add a new option --line to port search.
This works a little bit like the old output of port search in 1.6.1, but uses
tabs to separate fields instead of hardcoded spaces (easy parsing with awk or similar).
........
r37314 | raimue at macports.org | 2008-06-03 00:10:22 +0200 (Tue, 03 Jun 2008) | 3 lines
port/port.tcl:
Make port mirror --new available again.
........
r37315 | raimue at macports.org | 2008-06-03 00:45:18 +0200 (Tue, 03 Jun 2008) | 2 lines
Update the ChangeLog
........
r37316 | raimue at macports.org | 2008-06-03 01:37:43 +0200 (Tue, 03 Jun 2008) | 5 lines
port/port.tcl, macports1.0/macports.tcl:
Use current terminal size instead of a hardcoded width. This uses the COLUMNS
environment variable which therefore should be preserved by the env cleanup in
macports.tcl. See #15488.
........
r37336 | jmr at macports.org | 2008-06-03 21:06:00 +0200 (Tue, 03 Jun 2008) | 3 lines
Python portgroups: fix incorrect python.include paths, and add a new variable
python.libdir (#15226)
........
r37349 | jmr at macports.org | 2008-06-04 10:32:15 +0200 (Wed, 04 Jun 2008) | 8 lines
Try to be case-insensitive and case-preserving with port names as much as
possible. Match names case-insensitively in the registry (previously this was
not done when running on a case-sensitive FS), but return the name with its
correct case. Additionally, make sure to use the correctly-cased name whenever
possible, where previously the name as entered by the user was used. This
changeset fixes the bug where giving the port name with incorrect case when
deactivating would fail to delete the port's files from $prefix (#11759).
........
r37373 | raimue at macports.org | 2008-06-05 02:08:35 +0200 (Thu, 05 Jun 2008) | 4 lines
port/port.tcl:
Add new option --depends to port info,
which is a shorthand for --depends_bin --depends_lib --depends_build
........
r37386 | raimue at macports.org | 2008-06-05 12:31:37 +0200 (Thu, 05 Jun 2008) | 3 lines
port/port.tcl:
port provides was broken by r37238, closes #15515.
........
r37433 | jmr at macports.org | 2008-06-07 17:54:47 +0200 (Sat, 07 Jun 2008) | 7 lines
upgrade: refactor handling of dependencies
* depscache entries are now added by the callee instead of the caller
* a 'port:' entry is always added if the port is installed
* a 'port:' entry in the cache immediately satisfies other depspecs involving that port
* factored out redundant code for different depends_* types
Fixes #15520.
........
r37442 | jmr at macports.org | 2008-06-08 01:28:20 +0200 (Sun, 08 Jun 2008) | 3 lines
Make uninstalling the old version of a port during upgrade work without -f,
whether due to -u, epoch override, or being in direct mode.
........
r37453 | jmr at macports.org | 2008-06-08 14:39:45 +0200 (Sun, 08 Jun 2008) | 3 lines
Check depends_build before configure phase, and check dependencies before
alll packaging targets. This is a step towards fixing #15161.
........
r37501 | afb at macports.org | 2008-06-10 11:31:54 +0200 (Tue, 10 Jun 2008) | 2 lines
make missing sed extended regexp into a run-time error instead of configure-time
........
r37502 | afb at macports.org | 2008-06-10 11:41:07 +0200 (Tue, 10 Jun 2008) | 2 lines
update changelog, #15577/r37501
........
r37503 | afb at macports.org | 2008-06-10 12:02:33 +0200 (Tue, 10 Jun 2008) | 2 lines
stop abusing command_exec filter/redirect arguments for build nice/jobs, and improve debugging output (#15530)
........
Modified Paths:
--------------
branches/variant-descs-14482/base/ChangeLog
branches/variant-descs-14482/base/HACKING
branches/variant-descs-14482/base/aclocal.m4
branches/variant-descs-14482/base/configure
branches/variant-descs-14482/base/configure.ac
branches/variant-descs-14482/base/doc/Makefile
branches/variant-descs-14482/base/doc/macports.conf.in
branches/variant-descs-14482/base/doc/port.1
branches/variant-descs-14482/base/doc/portfile.7
branches/variant-descs-14482/base/m4/tcl.m4
branches/variant-descs-14482/base/portmgr/fedora/macports.spec.in
branches/variant-descs-14482/base/portmgr/freebsd/Makefile.in
branches/variant-descs-14482/base/portmgr/jobs/PortIndex2MySQL.tcl
branches/variant-descs-14482/base/portmgr/jobs/portfile_lint.pl
branches/variant-descs-14482/base/portmgr/ubuntu/macports_1.6.0-0.diff.gz
branches/variant-descs-14482/base/portmgr/ubuntu/macports_1.6.0-0.dsc
branches/variant-descs-14482/base/src/cregistry/registry.c
branches/variant-descs-14482/base/src/macports1.0/macports.tcl
branches/variant-descs-14482/base/src/package1.0/portarchive.tcl
branches/variant-descs-14482/base/src/package1.0/portunarchive.tcl
branches/variant-descs-14482/base/src/pextlib1.0/Pextlib.c
branches/variant-descs-14482/base/src/pextlib1.0/curl.h
branches/variant-descs-14482/base/src/pextlib1.0/tracelib.c
branches/variant-descs-14482/base/src/pextlib1.0/xinstall.c
branches/variant-descs-14482/base/src/port/Makefile
branches/variant-descs-14482/base/src/port/port-help.tcl
branches/variant-descs-14482/base/src/port/port.tcl
branches/variant-descs-14482/base/src/port1.0/Makefile
branches/variant-descs-14482/base/src/port1.0/port.tcl
branches/variant-descs-14482/base/src/port1.0/port_autoconf.tcl.in
branches/variant-descs-14482/base/src/port1.0/portbuild.tcl
branches/variant-descs-14482/base/src/port1.0/portconfigure.tcl
branches/variant-descs-14482/base/src/port1.0/portextract.tcl
branches/variant-descs-14482/base/src/port1.0/portfetch.tcl
branches/variant-descs-14482/base/src/port1.0/portinstall.tcl
branches/variant-descs-14482/base/src/port1.0/portlivecheck.tcl
branches/variant-descs-14482/base/src/port1.0/portmain.tcl
branches/variant-descs-14482/base/src/port1.0/portutil.tcl
branches/variant-descs-14482/base/src/port1.0/resources/fetch/mirror_sites.tcl
branches/variant-descs-14482/base/src/port1.0/resources/group/python24-1.0.tcl
branches/variant-descs-14482/base/src/port1.0/resources/group/python25-1.0.tcl
branches/variant-descs-14482/base/src/port1.0/resources/group/python30-1.0.tcl
branches/variant-descs-14482/base/src/port1.0/resources/group/ruby-1.0.tcl
branches/variant-descs-14482/base/src/port1.0/resources/group/xcode-1.0.tcl
branches/variant-descs-14482/base/src/registry1.0/portimage.tcl
branches/variant-descs-14482/base/src/registry1.0/portuninstall.tcl
branches/variant-descs-14482/base/src/registry1.0/receipt_flat.tcl
branches/variant-descs-14482/base/src/registry2.0/portimage.tcl
branches/variant-descs-14482/base/src/registry2.0/portuninstall.tcl
branches/variant-descs-14482/base/src/thread2.6.diff
branches/variant-descs-14482/base/tests/Makefile
branches/variant-descs-14482/base/tests/test/case-insensitive-deactivate/Makefile
branches/variant-descs-14482/base/tests/test/cvs-and-patchsites/Portfile
branches/variant-descs-14482/base/tests/test/dependencies-c/master
branches/variant-descs-14482/base/tests/test/universal/Makefile
branches/variant-descs-14482/base/tests/test/universal/master
branches/variant-descs-14482/base/tests/test/universal-2/Makefile
branches/variant-descs-14482/base/tests/test/universal-2/master
Added Paths:
-----------
branches/variant-descs-14482/base/src/pextlib1.0/tests/unsetenv.tcl
branches/variant-descs-14482/base/src/port1.0/portdistfiles.tcl
Property Changed:
----------------
branches/variant-descs-14482/base/
branches/variant-descs-14482/base/src/thread2.6.tar.gz
Property changes on: branches/variant-descs-14482/base
___________________________________________________________________
Name: svnmerge-integrated
- /trunk/base:1-34871
+ /trunk/base:1-37508
Modified: branches/variant-descs-14482/base/ChangeLog
===================================================================
--- branches/variant-descs-14482/base/ChangeLog 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/ChangeLog 2008-06-10 14:48:05 UTC (rev 37509)
@@ -5,19 +5,88 @@
Unreleased:
+ - Make missing sed extended regexp (for reinplace -E) into a runtime error.
+ (#15577, afb in r37501)
+
+ - More helpful strings for 'port help' (needs more work #15467, raimue)
+
+ - Command line options are checked if the command accepts it before
+ running (raimue)
+
+ - We now have a mirror of (almost) all distfiles at distfiles.macports.org,
+ and it is automatically appended to master_sites (#15456, jmr in r37217)
+
+ - port search looks now in name, description and long_description for the
+ search pattern and prints the list sorted (#15434, raimue in r37119,
+ r37121)
+
+ - Stopped 'port -R upgrade' from processing more ports than it should, and
+ from processing ports multiple times. (#10827, jmr in r37046)
+
+ - Don't include build.nice and build.jobs in destroot.cmd (#15295)
+
+ - The default universal variant is no longer added when we know it won't
+ work. (#12170, jmr in r36764)
+
+ - During upgrade, if the latest installed version of a port is not active,
+ the currently active version (if any) is now deactivated before trying
+ to activate the latest version. (#12013, jmr in r36762)
+
+ - A port with dependents can now be removed without forcing iff it is
+ inactive and there is at least one other version of the same port
+ installed (#11501, jmr in r36747)
+
+ - Duplicate entries can no longer build up in the dependency map (#8763,
+ jmr in r36745)
+
+ - In image mode, dependencies are no longer treated as being satisfied
+ when the satisfying port is not active (#7361, jmr in r36735)
+
+ - Fixed a bug where upgrade could create too many nested subdirectories
+ in distpath, archive.destpath and unarchive.srcpath (#11971, jmr in
+ r36679, r36687, r36688)
+
+ - Declaring a dependency on a nonexistent port now always causes an error
+ (#10768, jmr in r36648)
+
+ - Explicitly use unsetenv(3) on all environment variables (#13930)
+
+ - Make the included tclthread compile on Leopard if configured (#13495)
+
+ - Allow distfiles to be disk images with "use_dmg yes" port option (#13509,
+ ryandesign in r36708)
+
+ - ruby.setup now takes a type 'fetch' to just fetch/extract (eridius in r35773)
+
+ - Fetch now prefers mirrors with lower ping times (#14891, jmr in r35748,
+ r35806, r35808)
+
+ - Fetching of daily snapshot tarballs of the ports tree as an alternative to rsync
+ (raimue in r35647, r35648)
+
+ - port uninstall now takes --recursive to uninstall all dependents (#14637, eridius in r34977)
+
+ - New fetch.type git (#14232, eridius in r34875)
+
+ - fixed "port mdmg" getting block size wrong for the disk image (#13968, afb in r34844)
+
+ - always set MACOSX_DEPLOYMENT_TARGET, to avoid bugs with older glibtool (afb in r34541)
+
- port lint now checks all dependencies so that the ports actually exist (#14380)
- added target_state to avoid the need for privileges for lint/livecheck (#13458)
- Overhauled output for port info/deps/dependents/search (raimue in
- r34354, r34371, r34391, r34395, r34402, r34420)
+ r34354, r34371, r34391, r34395, r34402, r34420)
- Revert the default +universal MDT/SDK to 10.4/10.4u on Tiger and 10.5/10.5 on Leopard
- port lint shouldn't require variable master_sites for fetch.type != standard (#14377)
+ - Add "tcldoc" documentation comments and "tcldox" Doxyfile for doxygen (#12048)
+
- Add --pretend and --nosync flags to selfupdate (raimue in r33938, r33939,
- r33940, 33941)
+ r33940, 33941)
- Work around autoconf X11 detection bugs on darwin (afb in r33717)
@@ -77,11 +146,11 @@
- Remove LD_PREBIND & LD_PREBIND_ALLOW_OVERLAP variables from MacPorts' environment to prevent
prebinding of binaries, which can be harmful on Tiger and above (#13436, mww in r31786).
- - Add 'gcc-4.2' option to the configure.compiler Portfile command (mww in r31891).
+ - Add 'gcc-4.2' option to the configure.compiler Portfile command (mww in r31891).
- Flush port(1) output channel after issuing prompt, when readline is not
available, to ensure prompt is displayed at proper time. (jberry r31338).
-
+
- readline is now disabled by default, in order to avoid support issues.
use --enable-readine parameter to configure to enable support for readine.
(jberry r31139, r31140).
@@ -538,7 +607,7 @@
- Add new 'touch' & 'ln' portfile writing commands, their usage being similar to their BSD equivalents,
along with 'move' and 'copy' shorthands for TCL's "file rename/copy" calls (eridius in r22007).
- - Fix a dangerous bug in parsing filenames with spaces in the the 'delete' command, while reworking it
+ - Fix a dangerous bug in parsing filenames with spaces in the 'delete' command, while reworking it
to no longer be a plain 'system "rm -rf <path>"' call (eridius in r22007).
- Checksum phase no longer deletes distfiles upon checksums mistmatch, eliminating "file not found"
Modified: branches/variant-descs-14482/base/HACKING
===================================================================
--- branches/variant-descs-14482/base/HACKING 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/HACKING 2008-06-10 14:48:05 UTC (rev 37509)
@@ -48,11 +48,11 @@
* All source code files SHOULD have the following as the first line of
the file:
-
- # -*- 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
-
+
+ # -*- 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
+
This is a modeline that works for both emacs and vim.
-
+
* Portfiles SHOULD use soft tabs at a tabstop of 4, but implementation
of this is left up to the discretion of the maintainer.
@@ -62,9 +62,9 @@
SHOULD use a tab stop of 8.
* Makefiles MAY use a modeline. The following works for emacs and vim:
-
- # -*- coding: utf-8; mode: Makefile; tab-width: 8; indent-tabs-mode: t -*- vim:fenc=utf-8:filetype=Makefile:noet:sw=8:ts=8
+ # -*- coding: utf-8; mode: Makefile; tab-width: 8; indent-tabs-mode: t -*- vim:fenc=utf-8:ft=Makefile:noet:sw=8:ts=8
+
* All other files (documentation, etc) SHOULD use soft tabs at a tabstop
of 4 if the document format allows.
Modified: branches/variant-descs-14482/base/aclocal.m4
===================================================================
--- branches/variant-descs-14482/base/aclocal.m4 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/aclocal.m4 2008-06-10 14:48:05 UTC (rev 37509)
@@ -912,8 +912,8 @@
AC_MSG_RESULT([-r (GNU)])
SED_EXT=-r
else
- AC_MSG_RESULT([no idea])
- AC_MSG_ERROR([cannot determine flag to use for $SED])
+ AC_MSG_RESULT([not available])
+ SED_EXT='N/A'
fi
AC_SUBST(SED_EXT)
])
Modified: branches/variant-descs-14482/base/configure
===================================================================
--- branches/variant-descs-14482/base/configure 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/configure 2008-06-10 14:48:05 UTC (rev 37509)
@@ -686,6 +686,7 @@
MTREE
CVS
SVN
+GIT
RSYNC
SED
TAR
@@ -3594,6 +3595,46 @@
fi
+# Extract the first word of "git", so it can be a program name with args.
+set dummy git; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_GIT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $GIT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GIT="$GIT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GIT="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+GIT=$ac_cv_path_GIT
+if test -n "$GIT"; then
+ { echo "$as_me:$LINENO: result: $GIT" >&5
+echo "${ECHO_T}$GIT" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
# Extract the first word of "rsync", so it can be a program name with args.
set dummy rsync; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -4164,11 +4205,9 @@
echo "${ECHO_T}-r (GNU)" >&6; }
SED_EXT=-r
else
- { echo "$as_me:$LINENO: result: no idea" >&5
-echo "${ECHO_T}no idea" >&6; }
- { { echo "$as_me:$LINENO: error: cannot determine flag to use for $SED" >&5
-echo "$as_me: error: cannot determine flag to use for $SED" >&2;}
- { (exit 1); exit 1; }; }
+ { echo "$as_me:$LINENO: result: not available" >&5
+echo "${ECHO_T}not available" >&6; }
+ SED_EXT='N/A'
fi
@@ -13045,6 +13084,7 @@
MTREE!$MTREE$ac_delim
CVS!$CVS$ac_delim
SVN!$SVN$ac_delim
+GIT!$GIT$ac_delim
RSYNC!$RSYNC$ac_delim
SED!$SED$ac_delim
TAR!$TAR$ac_delim
@@ -13071,7 +13111,6 @@
OBJC_RUNTIME_FLAGS!$OBJC_RUNTIME_FLAGS$ac_delim
OBJC_LIBS!$OBJC_LIBS$ac_delim
OBJC_PTHREAD_LIBS!$OBJC_PTHREAD_LIBS$ac_delim
-OBJC_PTHREAD_CFLAGS!$OBJC_PTHREAD_CFLAGS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -13113,6 +13152,7 @@
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+OBJC_PTHREAD_CFLAGS!$OBJC_PTHREAD_CFLAGS$ac_delim
OBJC_FOUNDATION!$OBJC_FOUNDATION$ac_delim
OBJC_FOUNDATION_LDFLAGS!$OBJC_FOUNDATION_LDFLAGS$ac_delim
OBJC_FOUNDATION_CPPFLAGS!$OBJC_FOUNDATION_CPPFLAGS$ac_delim
@@ -13180,7 +13220,7 @@
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 65; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 66; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Modified: branches/variant-descs-14482/base/configure.ac
===================================================================
--- branches/variant-descs-14482/base/configure.ac 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/configure.ac 2008-06-10 14:48:05 UTC (rev 37509)
@@ -74,6 +74,7 @@
AC_PATH_PROG(MTREE, [mtree], [], [$PATH:/usr/sbin])
AC_PATH_PROG(CVS, [cvs], [])
AC_PATH_PROG(SVN, [svn], [])
+AC_PATH_PROG(GIT, [git], [])
AC_PATH_PROG(RSYNC, [rsync], [])
AC_PATH_PROG(SED, [sed])
AC_PATH_PROG(TAR, [tar])
Modified: branches/variant-descs-14482/base/doc/Makefile
===================================================================
--- branches/variant-descs-14482/base/doc/Makefile 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/doc/Makefile 2008-06-10 14:48:05 UTC (rev 37509)
@@ -11,13 +11,23 @@
all:
clean:
+ rm -f *.{1,5,7}.gz
test:
distclean: clean
rm -f prefix.mtree macports.conf macosx.mtree
-install:
+%.1.gz: %.1
+ gzip -c $^ > $@
+
+%.5.gz: %.5
+ gzip -c $^ > $@
+
+%.7.gz: %.7
+ gzip -c $^ > $@
+
+install: ${MAN1:.1=.1.gz} ${MAN5:.5=.5.gz} ${MAN7:.7=.7.gz}
$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${DESTDIR}${mpconfigdir}
@@ -43,12 +53,17 @@
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 variants.conf ${DESTDIR}${mpconfigdir}; \
fi
+ # 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/resources/port1.0/install
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 prefix.mtree ${INSTALLDIR}/share/macports/resources/port1.0/install/
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 macosx.mtree ${INSTALLDIR}/share/macports/resources/port1.0/install/
- $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 port.1 ${INSTALLDIR}/share/man/man1
- $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 macports.conf.5 ${INSTALLDIR}/share/man/man5
- $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portfile.7 ${INSTALLDIR}/share/man/man7
- $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portstyle.7 ${INSTALLDIR}/share/man/man7
- $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 porthier.7 ${INSTALLDIR}/share/man/man7
- $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portgroup.7 ${INSTALLDIR}/share/man/man7
+ $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 port.1.gz ${INSTALLDIR}/share/man/man1
+ $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 macports.conf.5.gz ${INSTALLDIR}/share/man/man5
+ $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portfile.7.gz ${INSTALLDIR}/share/man/man7
+ $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portstyle.7.gz ${INSTALLDIR}/share/man/man7
+ $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 porthier.7.gz ${INSTALLDIR}/share/man/man7
+ $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portgroup.7.gz ${INSTALLDIR}/share/man/man7
Modified: branches/variant-descs-14482/base/doc/macports.conf.in
===================================================================
--- branches/variant-descs-14482/base/doc/macports.conf.in 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/doc/macports.conf.in 2008-06-10 14:48:05 UTC (rev 37509)
@@ -14,6 +14,10 @@
# Type of installation to do for ports, "direct" or "image". See macports.conf(5) and online documentation.
portinstalltype image
+# PATH settings that are used for external tools (configure, make, etc.) while installing ports. The default
+# paths are given in the example; it need not be uncommented. Customizing binpath is intended for advanced users only.
+#binpath @prefix_expanded@/bin:@prefix_expanded@/sbin:/bin:/sbin:/usr/bin:/usr/sbin:@x11prefix@/bin
+
# Directory containing the X11 installation.
x11prefix @x11prefix@
@@ -89,9 +93,10 @@
# Options for generated startup items
# startupitem_type may be "default", "systemstarter", "launchd", or "none";
# if the option is empty or "default" then a startupitem type appropriate
-# to the platform will be chosen. Tiger will default to launchd, while
-# older Mac OS X systems will default to systemstarter. If option "none"
-# is chosen, port startupitems are ignored and no startupitems are installed.
+# to the platform will be chosen. Mac OS X 10.4 Tiger and above will default to
+# launchd, while older Mac OS X systems will default to systemstarter. If
+# option "none" is chosen, port startupitems are ignored and no startupitems
+# are installed.
startupitem_type default
# Extra environment variables to keep. Any variables listed here are added
Modified: branches/variant-descs-14482/base/doc/port.1
===================================================================
--- branches/variant-descs-14482/base/doc/port.1 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/doc/port.1 2008-06-10 14:48:05 UTC (rev 37509)
@@ -289,10 +289,14 @@
.Ar portname .
To uninstall all installed but inactive ports, use
.Fl u .
+To recursively uninstall all dependents of this port, use
+.Fl -recursive .
+.Pp
For example:
.Pp
.Dl "port uninstall vim"
.Dl "port -u uninstall"
+.Dl "port uninstall --recursive python24"
.Ss activate
Activate the installed
.Ar portname .
@@ -400,7 +404,7 @@
.Dl port echo maintainer:jmpp and \e(\ net* or category:text\ \e)
.Pp
.Ss list
-If no argument is given, display a list of the the latest version of all available ports.
+If no argument is given, display a list of the latest version of all available ports.
If portname(s) are given as arguments, display a list of the latest version of each port.
.Ss version
Display the release number of the installed MacPorts infrastructure.
@@ -480,6 +484,8 @@
target is called explicitly.
.Ss distcheck
Check if the distfiles haven't changed and can be fetched.
+.Ss distfiles
+Display each distfile, its checksums, and the URLs used to fetch it.
.Ss livecheck
Check if the software hasn't been updated since the Portfile was last modified.
.Sh PACKAGING TARGETS
Modified: branches/variant-descs-14482/base/doc/portfile.7
===================================================================
--- branches/variant-descs-14482/base/doc/portfile.7 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/doc/portfile.7 2008-06-10 14:48:05 UTC (rev 37509)
@@ -736,7 +736,7 @@
.Dl svn.url http://www.domain.com/svn-repo/mydirectory
svn.url svn://www.domain.com/svn-repo/mydirectory
.It Ic svn.tag
-Specify the a tag from which svn should fetch files. This
+Specify a tag from which svn should fetch files. This
corresponds to the -r option to the svn cli. Note that you
will need to use backslashes to escape characters that have
meaning to the Tcl interpreter, such as braces and double
@@ -752,6 +752,37 @@
.Dl svn.tag 37192
svn.tag \\{\\"2006-02-17 15:30 +0230\\"\\}
.El
+.Ss FETCHING FROM GIT
+As an alternative to fetching distribution files, pulling the sources
+from a git repository is supported. Use of git can give rise to
+non-reproducible builds, so it is strongly discouraged.
+.Bl -tag -width lc
+.It Ic git.url
+Specify the url from which to fetch files
+.br
+.Sy Type:
+.Em required
+.br
+.Sy Default:
+.Em none
+.br
+.Sy Example:
+.Dl git.url git://git.kernel.org/pub/scm/git/git.git
+ git.url http://www.kernel.org/pub/scm/git/git.git
+.It Ic git.branch
+Specify a branch (or other commit-ish) that git should checkout.
+Note that any branch besides HEAD should be prefixed by origin/.
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Default:
+.Em none
+.br
+.Sy Example:
+.Dl git.branch 72bf1c8
+ git.branch origin/next
+.El
.Sh EXTRACT OPTIONS
Extract all compressed/archived files.
.Bl -tag -width lc
Modified: branches/variant-descs-14482/base/m4/tcl.m4
===================================================================
--- branches/variant-descs-14482/base/m4/tcl.m4 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/m4/tcl.m4 2008-06-10 14:48:05 UTC (rev 37509)
@@ -2033,7 +2033,7 @@
#
# Results:
#
-# Sets the the following vars:
+# Sets the following vars:
# XINCLUDES
# XLIBSW
#
Modified: branches/variant-descs-14482/base/portmgr/fedora/macports.spec.in
===================================================================
--- branches/variant-descs-14482/base/portmgr/fedora/macports.spec.in 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/portmgr/fedora/macports.spec.in 2008-06-10 14:48:05 UTC (rev 37509)
@@ -29,7 +29,7 @@
%prep
%setup -n MacPorts-%{version}
# avoid the whole upgrade and information procedure
-perl -pe 's/^install::/interactive:/' -i Makefile.in
+perl -pe 's/^install::/interactive::/' -i Makefile.in
%define _prefix %{prefix}
%define _bindir %{prefix}/bin
Modified: branches/variant-descs-14482/base/portmgr/freebsd/Makefile.in
===================================================================
--- branches/variant-descs-14482/base/portmgr/freebsd/Makefile.in 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/portmgr/freebsd/Makefile.in 2008-06-10 14:48:05 UTC (rev 37509)
@@ -20,7 +20,7 @@
gmake:${PORTSDIR}/devel/gmake
LIB_DEPENDS= tcl84:${PORTSDIR}/lang/tcl84-thread \
curl:${PORTSDIR}/ftp/curl \
- sqlite3:${PORTSDIR}/databases/sqlite3-threads
+ sqlite3:${PORTSDIR}/databases/sqlite3
BUILD_DEPENDS= ${LOCALBASE}/lib/thread2.6.5:${PORTSDIR}/devel/tclthread \
bash:${PORTSDIR}/shells/bash
Modified: branches/variant-descs-14482/base/portmgr/jobs/PortIndex2MySQL.tcl
===================================================================
--- branches/variant-descs-14482/base/portmgr/jobs/PortIndex2MySQL.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/portmgr/jobs/PortIndex2MySQL.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -65,10 +65,16 @@
set lockfile "/tmp/portsdb.lock"
set mailprog "/usr/sbin/sendmail"
set DATE [clock format [clock seconds] -format "%A %Y-%m-%d at %T"]
-set subject "PortIndex2MySQL run failure on $DATE"
+
set SPAM_LOVERS macports-dev at lists.macosforge.org
+set SUBJECT "PortIndex2MySQL run failure on $DATE"
+set FROM macports-mgr at lists.macosforge.org
+set HEADERS "To: $SPAM_LOVERS\r\nFrom: $FROM\r\nSubject: $SUBJECT\r\n\r\n"
+# We first initialize the runlog with proper mail headers
+puts $runlog_fd $HEADERS
+
# House keeping on exit.
proc cleanup {args} {
foreach file_to_clean $args {
@@ -91,10 +97,6 @@
exit $exit_status
}
-
-# We first initialize the runlog with a proper mail subject.
-puts $runlog_fd "Subject: $subject"
-
# Check if there are any stray sibling jobs before moving on, bail in such case.
if {[file exists $lockfile]} {
puts $runlog_fd "PortIndex2MySQL lock file found, is another job running?"
Modified: branches/variant-descs-14482/base/portmgr/jobs/portfile_lint.pl
===================================================================
--- branches/variant-descs-14482/base/portmgr/jobs/portfile_lint.pl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/portmgr/jobs/portfile_lint.pl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -14,7 +14,7 @@
my $REPOHOST = "http://svn.macosforge.org/repository/macports";
my $SVNLOOK = "/opt/local/bin/svnlook";
my $PORTCMD = "/opt/local/bin/port";
-my $SVN = "/opt/local/bin/svn -q --non-interactive";
+my $SVN = "/opt/local/bin/svn -Nq --non-interactive";
my $MKDIR = "/bin/mkdir -p";
@@ -23,6 +23,11 @@
my @changes = `$SVNLOOK changed $REPOPATH -r $rev`;
+my $author = `$SVNLOOK author $REPOPATH -r $rev`;
+chomp($author);
+
+_log("Rev: $rev");
+
foreach my $change (@changes) {
if ($change =~ /Portfile/) {
# remove svn status and whitespace
@@ -36,6 +41,8 @@
my $group = $change;
$group =~ s/^.*\/([^\/]+)\/[^\/]+\/Portfile$/$1/g;
+ _log("Port: $group / $port ");
+
# make a temporary work area
`$MKDIR $TMPROOT/$group/$port`;
chdir("$TMPROOT/$group/$port") or die("Failed to change dir for port: $port");
@@ -52,9 +59,10 @@
sub _lint {
my ($port) = @_;
- my $errors = `$PORTCMD -qc lint`;
+ my $errors = `$PORTCMD -qc lint 2>&1`;
if ($errors) {
+ _log("Error: $errors ");
my $maintainers = `$PORTCMD -q info --maintainer $port`;
# strip everything but the email addresses
$maintainers =~ s/maintainer: //;
@@ -62,6 +70,8 @@
$maintainers =~ s/nomaintainer\@macports.org//;
chop($maintainers);
+ _log("Maintainers: $maintainers ");
+
_mail($port, $maintainers, $errors);
}
}
@@ -70,21 +80,27 @@
my ($port, $maintainers, $errors) = @_;
my %mail = (
- To => $maintainers,
+ To => "$author, $maintainers",
From => 'noreply at macports.org',
- Subject => "[MacPorts Lint] Portfile Lint Errors for: $port",
- Message => "Portfile: $port \n\n\n Errors: $errors \n\n",
+ Subject => "[$rev] $port Lint Report",
+ Message => "Portfile: $port\n\n\n$errors \n\n",
smtp => 'relay.apple.com',
);
+ _log("Mailto: $maintainers ");
+
sendmail(%mail) or die $Mail::Sendmail::error;
}
+sub _log {
+ my ($errors) = @_;
+ open(LOG, ">>$TMPROOT/errors") or return;
+ print LOG "$errors\n";
+ close(LOG);
+}
+
sub usage {
print "usage: portfile_lint.pl <rev>\n";
exit();
}
-
-
-
Modified: branches/variant-descs-14482/base/portmgr/ubuntu/macports_1.6.0-0.diff.gz
===================================================================
(Binary files differ)
Modified: branches/variant-descs-14482/base/portmgr/ubuntu/macports_1.6.0-0.dsc
===================================================================
--- branches/variant-descs-14482/base/portmgr/ubuntu/macports_1.6.0-0.dsc 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/portmgr/ubuntu/macports_1.6.0-0.dsc 2008-06-10 14:48:05 UTC (rev 37509)
@@ -8,4 +8,4 @@
Build-Depends: autotools-dev, debhelper (>= 5), gobjc, libcurl3-dev, libgnustep-base-dev, libsqlite3-dev, libssl-dev, mtree, tcl-dev, tclthread
Files:
67e61ebf25389ccee8ab09b859397c83 2116892 macports_1.6.0.orig.tar.gz
- 0a020177fd8e89147df75fe10e5e2d98 3868 macports_1.6.0-0.diff.gz
+ 11cf5fe5ba1e98861472e980648e56c5 3868 macports_1.6.0-0.diff.gz
Modified: branches/variant-descs-14482/base/src/cregistry/registry.c
===================================================================
--- branches/variant-descs-14482/base/src/cregistry/registry.c 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/cregistry/registry.c 2008-06-10 14:48:05 UTC (rev 37509)
@@ -34,6 +34,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <libgen.h>
+#include <string.h>
#include <stdarg.h>
#include <sqlite3.h>
#include <sys/stat.h>
@@ -161,9 +162,12 @@
if (stat(path, &sb) != 0) {
initialized = 0;
if (errno == ENOENT) {
- if (stat(dirname(path), &sb) != 0) {
+ char *mypath = strdup(path);
+ mypath = dirname(mypath);
+ if (stat(mypath, &sb) != 0) {
can_write = 0;
}
+ free(mypath);
} else {
can_write = 0;
}
Modified: branches/variant-descs-14482/base/src/macports1.0/macports.tcl
===================================================================
--- branches/variant-descs-14482/base/src/macports1.0/macports.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/macports1.0/macports.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -45,7 +45,7 @@
porttrace portverbose destroot_umask variants_conf rsync_server rsync_options \
rsync_dir startupitem_type place_worksymlink xcodeversion xcodebuildcmd \
mp_remote_url mp_remote_submit_url configureccache configuredistcc configurepipe buildnicevalue buildmakejobs \
- universal_target universal_sysroot universal_archs"
+ applications_dir frameworks_dir universal_target universal_sysroot universal_archs"
variable user_options "submitter_name submitter_email submitter_key"
variable portinterp_options "\
portdbpath porturl portpath portbuildpath auto_path prefix prefix_frozen x11prefix portsharepath \
@@ -53,7 +53,7 @@
portarchivetype portautoclean porttrace portverbose destroot_umask rsync_server \
rsync_options rsync_dir startupitem_type place_worksymlink \
mp_remote_url mp_remote_submit_url configureccache configuredistcc configurepipe buildnicevalue buildmakejobs \
- universal_target universal_sysroot universal_archs $user_options"
+ applications_dir frameworks_dir universal_target universal_sysroot universal_archs $user_options"
# deferred options are only computed when needed.
# they are not exported to the trace thread.
@@ -658,6 +658,7 @@
PATCH_SITE_LOCAL PATH PORTSRC RSYNC_PROXY TMP TMPDIR
USER GROUP
http_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY NO_PROXY
+ COLUMNS LINES
}
if {[info exists extra_env]} {
set keepenvkeys [concat ${keepenvkeys} ${extra_env}]
@@ -970,6 +971,12 @@
macports::worker_init $workername $portpath $porturl [macports::getportbuildpath $portpath] $options $variations
$workername eval source Portfile
+
+ # add the default universal variant, but only if
+ # it will work and another one isn't already present
+ if {[$workername eval default_universal_variant_allowed]} {
+ $workername eval add_default_universal_variant
+ }
# evaluate the variants
if {[$workername eval eval_variants variations] != 0} {
@@ -1080,7 +1087,7 @@
if {[info exists env(DYLD_LIBRARY_PATH)]} {
lappend search_path $env(DYLD_LIBRARY_PATH)
}
- lappend search_path /lib /usr/lib /usr/X11R6/lib ${prefix}/lib
+ lappend search_path /lib /usr/lib /usr/X11R6/lib /usr/X11/lib ${prefix}/lib
if {[info exists env(DYLD_FALLBACK_LIBRARY_PATH)]} {
lappend search_path $env(DYLD_FALLBACK_LIBRARY_PATH)
}
@@ -1158,21 +1165,30 @@
}
}
+# Determine if a port is active (only for image mode)
+proc _mportactive {mport} {
+ set workername [ditem_key $mport workername]
+ if {[catch {set reslist [$workername eval registry_active \${portname}]} res]} {
+ return 0
+ } else {
+ return [expr [llength $reslist] > 0]
+ }
+}
+
### _mportispresent is private; may change without notice
-# Determine if some depspec is satisfied or if the given port is installed.
+# Determine if some depspec is satisfied or if the given port is installed
+# (and active, if we're in image mode).
# We actually start with the registry (faster?)
#
# mport the port to test (to figure out if it's present)
# depspec the dependency test specification (path, bin, lib, etc.)
proc _mportispresent {mport depspec} {
- # Check for the presense of the port in the registry
- set workername [ditem_key $mport workername]
ui_debug "Searching for dependency: [ditem_key $mport provides]"
- if {[catch {set reslist [$workername eval registry_installed \${portname}]} res]} {
- set res 0
+ if {[string equal ${macports::registry.installtype} "image"]} {
+ set res [_mportactive $mport]
} else {
- set res [llength $reslist]
+ set res [_mportinstalled $mport]
}
if {$res != 0} {
ui_debug "Found Dependency: receipt exists for [ditem_key $mport provides]"
@@ -1244,8 +1260,10 @@
|| $target == "test"
|| $target == "destroot" || $target == "install"
|| $target == "archive"
+ || $target == "dmg" || $target == "mdmg"
|| $target == "pkg" || $target == "mpkg"
- || $target == "rpm" || $target == "dpkg" } {
+ || $target == "rpm" || $target == "dpkg"
+ || $target == "srpm" } {
if {[mportdepends $mport $target] != 0} {
return 1
@@ -1261,7 +1279,7 @@
# xxx: as with below, this is ugly. and deps need to be fixed to
# understand Port Images before this can get prettier
if { [string equal ${macports::registry.installtype} "image"] } {
- set result [dlist_eval $dlist _mportinstalled [list _mportexec "activate"]]
+ set result [dlist_eval $dlist _mportactive [list _mportexec "activate"]]
} else {
set result [dlist_eval $dlist _mportinstalled [list _mportexec "install"]]
}
@@ -1309,10 +1327,37 @@
proc macports::getsourcepath {url} {
global macports::portdbpath
+
set source_path [split $url ://]
+
+ if {[_source_is_snapshot $url]} {
+ # daily snapshot tarball
+ return [file join $portdbpath sources [join [lrange $source_path 3 end-1] /] ports]
+ }
+
return [file join $portdbpath sources [lindex $source_path 3] [lindex $source_path 4] [lindex $source_path 5]]
}
+##
+# Checks whether a supplied source URL is for a daily snapshot tarball
+# (private)
+#
+# @param url source URL to check
+# @return a list containing filename and extension or an empty list
+proc _source_is_snapshot {url {filename ""} {extension ""}} {
+ upvar $filename myfilename
+ upvar $extension myextension
+
+ if {[regexp {^(?:https?|ftp)://.+/(.+\.(tar\.gz|tar\.bz2))$} $url -> f e]} {
+ set myfilename $f
+ set myextension $e
+
+ return 1
+ }
+
+ return 0
+}
+
proc macports::getportbuildpath {id} {
global macports::portdbpath
regsub {://} $id {.} port_path
@@ -1345,10 +1390,14 @@
mportsync
}
-proc mportsync {} {
+proc mportsync {{optionslist {}}} {
global macports::sources macports::portdbpath macports::rsync_options tcl_platform
- global macports::autoconf::rsync_path
-
+ global macports::portverbose
+ global macports::autoconf::rsync_path
+ array set options $optionslist
+
+ set numfailed 0
+
ui_debug "Synchronizing ports tree(s)"
foreach source $sources {
set flags [lrange $source 1 end]
@@ -1377,7 +1426,9 @@
}]
} {
ui_debug "$::errorInfo"
- return -code error "Synchronization of the local ports tree failed doing an svn update"
+ ui_error "Synchronization of the local ports tree failed doing an svn update"
+ incr numfailed
+ continue
}
}
}
@@ -1396,22 +1447,84 @@
set rsync_commandline "${macports::autoconf::rsync_path} ${rsync_options} ${source} ${destdir}"
ui_debug $rsync_commandline
if {[catch {system $rsync_commandline}]} {
- return -code error "Synchronization of the local ports tree failed doing rsync"
+ ui_error "Synchronization of the local ports tree failed doing rsync"
+ incr numfailed
+ continue
}
if {[catch {system "chmod -R a+r \"$destdir\""}]} {
ui_warn "Setting world read permissions on parts of the ports tree failed, need root?"
}
}
{^https?$|^ftp$} {
- set indexfile [macports::getindex $source]
- file mkdir [file dirname $indexfile]
- exec curl -L -s -S -o $indexfile $source/PortIndex
+ if {[_source_is_snapshot $source filename extension]} {
+ # sync a daily port snapshot tarball
+ set indexfile [macports::getindex $source]
+ set destdir [file dirname $indexfile]
+ set tarpath [file join [file normalize [file join $destdir ..]] $filename]
+
+ set updated 1
+ if {[file isdirectory $destdir]} {
+ set moddate [file mtime $destdir]
+ if {[catch {set updated [curl isnewer $source $moddate]} error]} {
+ ui_warn "Cannot check if $source was updated, ($error)"
+ }
+ }
+
+ if {(![info exists options(ports_force)] || $options(ports_force) != "yes") && $updated <= 0} {
+ ui_info "No updates for $source"
+ continue
+ }
+
+ file mkdir [file dirname $indexfile]
+
+ set verboseflag {}
+ if {$macports::portverbose == "yes"} {
+ set verboseflag "-v"
+ }
+
+ if {[catch {eval curl fetch $verboseflag {$source} {$tarpath}} error]} {
+ ui_error "Fetching $source failed ($error)"
+ incr numfailed
+ continue
+ }
+
+ set extflag {}
+ switch $extension {
+ {tar.gz} {
+ set extflag "-z"
+ }
+ {tar.bz2} {
+ set extflag "-j"
+ }
+ }
+
+ if { [catch { system "cd $destdir/.. && tar ${verboseflag} ${extflag} -xf $filename" } error] } {
+ ui_error "Extracting $source failed ($error)"
+ incr numfailed
+ continue
+ }
+
+ if {[catch {system "chmod -R a+r \"$destdir\""}]} {
+ ui_warn "Setting world read permissions on parts of the ports tree failed, need root?"
+ }
+
+ file delete $tarpath
+ } else {
+ # sync just a PortIndex file
+ set indexfile [macports::getindex $source]
+ file mkdir [file dirname $indexfile]
+ exec curl -L -s -S -o $indexfile $source/PortIndex
+ }
}
default {
ui_warn "Unknown synchronization protocol for $source"
}
}
}
+
+ if {$numfailed > 0} {
+ return -code error "Synchronization of $numfailed source(s) failed"
+ }
}
# dportsearch
@@ -1477,6 +1590,15 @@
# Rsync files are local
set source_url "file://[macports::getsourcepath $source]"
}
+ {^https?$|^ftp$} {
+ if {[_source_is_snapshot $source filename extension]} {
+ # daily snapshot tarball
+ set source_url "file://[macports::getsourcepath $source]"
+ } else {
+ # default action
+ set source_url $source
+ }
+ }
default {
set source_url $source
}
@@ -1580,17 +1702,19 @@
# Determine deptypes to look for based on target
switch $target {
- configure { set deptypes "depends_lib" }
-
+ configure -
build { set deptypes "depends_lib depends_build" }
test -
destroot -
install -
archive -
+ dmg -
pkg -
+ mdmg -
mpkg -
rpm -
+ srpm -
dpkg -
"" { set deptypes "depends_lib depends_build depends_run" }
}
@@ -1616,6 +1740,8 @@
ui_error "Internal error: port search failed: $error"
return 1
}
+
+ unset -nocomplain porturl
foreach {name array} $res {
array set portinfo $array
if {[info exists portinfo(porturl)]} {
@@ -1676,7 +1802,7 @@
# syncing ports tree.
if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) != "yes"} {
- if {[catch {mportsync} result]} {
+ if {[catch {mportsync $optionslist} result]} {
return -code error "Couldn't sync the ports tree: $result"
}
}
@@ -1796,6 +1922,8 @@
}
# fill array with information
array set portinfo [lindex $result 1]
+ # set portname again since the one we were passed may not have had the correct case
+ set portname $portinfo(name)
# set version_in_tree and revision_in_tree
if {![info exists portinfo(version)]} {
@@ -1835,18 +1963,25 @@
ui_error "Unable to exec port: $result"
return 1
}
+ # we just installed it, so mark it done in the cache
+ set depscache(port:${portname}) 1
} else {
# port installed outside MacPorts
ui_debug "$portname installed outside the MacPorts system"
set depflag 1
+ # mark this depspec as satisfied in the cache
+ set depscache($dspec) 1
}
} else {
ui_error "Checking installed version failed: $result"
exit 1
}
+ } else {
+ # we'll now take care of upgrading it, so we can add it to the cache
+ set depscache(port:${portname}) 1
}
- set anyactive 0
+ set anyactive no
set version_installed {}
set revision_installed {}
set epoch_installed 0
@@ -1854,6 +1989,7 @@
# XXX this sets $version_installed to $version_in_tree even if not installed!!
set version_installed $version_in_tree
set revision_installed $revision_in_tree
+ set iname $portname
# That was a very dirty hack showing how ugly our depencendy and upgrade code is.
# To get it working when user provides -f, we also need to set the variant to
# avoid a future failure.
@@ -1871,33 +2007,40 @@
[rpm-vercomp $version $version_installed] > 0
|| ([rpm-vercomp $version $version_installed] == 0
&& [rpm-vercomp $revision $revision_installed] > 0)} {
+ set iname [lindex $i 0]
set version_installed $version
set revision_installed $revision
- set epoch_installed [registry::property_retrieve [registry::open_entry $portname [lindex $i 1] [lindex $i 2] $variant] epoch]
+ set variant_installed $variant
+ set epoch_installed [registry::property_retrieve [registry::open_entry $iname [lindex $i 1] [lindex $i 2] $variant] epoch]
set num $i
}
set isactive [lindex $i 4]
if {$isactive == 1} {
- if { [rpm-vercomp $version_installed $version] < 0
- || ([rpm-vercomp $version_installed $version] == 0
- && [rpm-vercomp $revision_installed $revision] < 0)} {
- # deactivate version
- if {[catch {portimage::deactivate $portname $version $optionslist} result]} {
- global errorInfo
- ui_debug "$errorInfo"
- ui_error "Deactivating $portname $version_installed_$revision_installed failed: $result"
- return 1
- }
- }
+ set anyactive yes
+ set active_name [lindex $i 0]
+ set version_active $version
+ set revision_active $revision
+ set variant_active $variant
}
}
+ if { $anyactive && ([rpm-vercomp $version_installed $version_active] != 0
+ || [rpm-vercomp $revision_installed $revision_active] != 0
+ || [string compare $variant_installed $variant_active] != 0)} {
+ # deactivate version
+ if {[catch {portimage::deactivate $active_name ${version_active}_${revision_active}${variant_active} $optionslist} result]} {
+ global errorInfo
+ ui_debug "$errorInfo"
+ ui_error "Deactivating $active_name @${version_active}_${revision_active} failed: $result"
+ return 1
+ }
+ }
if { [lindex $num 4] == 0 && 0 == [string compare "image" ${macports::registry.installtype}] } {
# activate the latest installed version
- if {[catch {portimage::activate $portname ${version_installed}_$revision_installed$variant $optionslist} result]} {
+ if {[catch {portimage::activate $iname ${version_installed}_${revision_installed}$variant $optionslist} result]} {
global errorInfo
ui_debug "$errorInfo"
- ui_error "Activating $portname ${version_installed}_$revision_installed failed: $result"
+ ui_error "Activating $iname @${version_installed}_${revision_installed} failed: $result"
return 1
}
}
@@ -1906,7 +2049,7 @@
# output version numbers
ui_debug "epoch: in tree: $epoch_in_tree installed: $epoch_installed"
ui_debug "$portname ${version_in_tree}_$revision_in_tree exists in the ports tree"
- ui_debug "$portname ${version_installed}_$revision_installed is installed"
+ ui_debug "$iname ${version_installed}_$revision_installed is installed"
# set the nodeps option
if {![info exists options(ports_nodeps)]} {
@@ -1919,36 +2062,34 @@
ui_debug "Not following dependencies"
set depflag 0
} else {
- # build depends is upgraded
- if {[info exists portinfo(depends_build)]} {
- foreach i $portinfo(depends_build) {
- if {![llength [array get depscache $i]]} {
- set d [lindex [split $i :] end]
- set depscache($i) 1
- upgrade $d $i $variationslist $optionslist depscache
- }
+ # If we're following dependents, we only want to follow this port's
+ # dependents, not those of all its dependencies. Otherwise, we would
+ # end up processing this port's dependents n+1 times (recursively!),
+ # where n is the number of dependencies this port has, since this port
+ # is of course a dependent of each of its dependencies. Plus the
+ # dependencies could have any number of unrelated dependents.
+
+ # So we save whether we're following dependents, unset the option
+ # while doing the dependencies, and restore it afterwards.
+ set saved_do_dependents [info exists options(ports_do_dependents)]
+ unset -nocomplain options(ports_do_dependents)
+
+ # each dep type is upgraded
+ foreach dtype {depends_build depends_lib depends_run} {
+ if {[info exists portinfo($dtype)]} {
+ foreach i $portinfo($dtype) {
+ set d [lindex [split $i :] end]
+ if {![llength [array get depscache port:${d}]] && ![llength [array get depscache $i]]} {
+ upgrade $d $i $variationslist [array get options] depscache
+ }
+ }
}
}
- # library depends is upgraded
- if {[info exists portinfo(depends_lib)]} {
- foreach i $portinfo(depends_lib) {
- if {![llength [array get depscache $i]]} {
- set d [lindex [split $i :] end]
- set depscache($i) 1
- upgrade $d $i $variationslist $optionslist depscache
- }
- }
+
+ # restore dependent-following to its former value
+ if {$saved_do_dependents} {
+ set options(ports_do_dependents) yes
}
- # runtime depends is upgraded
- if {[info exists portinfo(depends_run)]} {
- foreach i $portinfo(depends_run) {
- if {![llength [array get depscache $i]]} {
- set d [lindex [split $i :] end]
- set depscache($i) 1
- upgrade $d $i $variationslist $optionslist depscache
- }
- }
- }
}
# check installed version against version in ports
@@ -1956,7 +2097,7 @@
|| ([rpm-vercomp $version_installed $version_in_tree] == 0
&& [rpm-vercomp $revision_installed $revision_in_tree] >= 0 ))
&& ![info exists options(ports_force)] } {
- ui_debug "No need to upgrade! $portname ${version_installed}_$revision_installed >= $portname ${version_in_tree}_$revision_in_tree"
+ ui_debug "No need to upgrade! $iname ${version_installed}_$revision_installed >= $portname ${version_in_tree}_$revision_in_tree"
if { $epoch_installed >= $epoch_in_tree } {
# Check if we have to do dependents
if {[info exists options(ports_do_dependents)]} {
@@ -1964,12 +2105,14 @@
set options(ports_nodeps) 1
registry::open_dep_map
- set deplist [registry::list_dependents $portname]
+ set deplist [registry::list_dependents $iname]
if { [llength deplist] > 0 } {
foreach dep $deplist {
- set mpname [lindex $dep 2]
- macports::upgrade $mpname "port:$mpname" [array get variations] [array get options]
+ set mpname [lindex $dep 2]
+ if {![llength [array get depscache port:${mpname}]]} {
+ macports::upgrade $mpname port:${mpname} [array get variations] [array get options] depscache
+ }
}
}
}
@@ -2028,23 +2171,34 @@
}
# uninstall old ports
- if {[info exists options(port_uninstall_old)] || $epoch_override == 1 || [info exists options(ports_force)] || 0 != [string compare "image" ${macports::registry.installtype}] } {
+ if { $epoch_override == 1 || [info exists options(ports_force)] || 0 != [string compare "image" ${macports::registry.installtype}] } {
# uninstall old
- ui_debug "Uninstalling $portname ${version_installed}_$revision_installed$oldvariant"
- if {[catch {portuninstall::uninstall $portname ${version_installed}_$revision_installed$oldvariant $optionslist} result]} {
+ ui_debug "Uninstalling $iname ${version_installed}_$revision_installed$oldvariant"
+ # we have to force the uninstall in case of dependents
+ set force_cur [info exists options(ports_force)]
+ set options(ports_force) yes
+ if {[catch {portuninstall::uninstall $iname ${version_installed}_$revision_installed$oldvariant [array get options]} result]} {
global errorInfo
ui_debug "$errorInfo"
- ui_error "Uninstall $portname ${version_installed}_$revision_installed$oldvariant failed: $result"
+ ui_error "Uninstall $iname ${version_installed}_$revision_installed$oldvariant failed: $result"
return 1
}
+ if {!$force_cur} {
+ unset options(ports_force)
+ }
} else {
# XXX deactivate version_installed
- if {[catch {portimage::deactivate $portname ${version_installed}_$revision_installed$oldvariant $optionslist} result]} {
+ if {[catch {portimage::deactivate $iname ${version_installed}_$revision_installed$oldvariant $optionslist} result]} {
global errorInfo
ui_debug "$errorInfo"
- ui_error "Deactivating $portname ${version_installed}_$revision_installed failed: $result"
+ ui_error "Deactivating $iname ${version_installed}_$revision_installed failed: $result"
return 1
}
+ if { [info exists options(port_uninstall_old)] } {
+ # uninstalling now could fail due to dependents when not forced,
+ # because the new version is not installed
+ set uninstall_later yes
+ }
}
if {[catch {set result [mportexec $workername install]} result]} {
@@ -2053,6 +2207,16 @@
ui_error "Couldn't activate $portname ${version_in_tree}_$revision_in_tree$oldvariant: $result"
return 1
}
+
+ if { [info exists uninstall_later] && $uninstall_later == yes } {
+ ui_debug "Uninstalling $iname ${version_installed}_$revision_installed$oldvariant"
+ if {[catch {portuninstall::uninstall $iname ${version_installed}_$revision_installed$oldvariant $optionslist} result]} {
+ global errorInfo
+ ui_debug "$errorInfo"
+ ui_error "Uninstall $iname ${version_installed}_$revision_installed$oldvariant failed: $result"
+ return 1
+ }
+ }
# Check if we have to do dependents
if {[info exists options(ports_do_dependents)]} {
@@ -2064,8 +2228,10 @@
if { [llength deplist] > 0 } {
foreach dep $deplist {
- set mpname [lindex $dep 2]
- macports::upgrade $mpname "port:$mpname" [array get variations] [array get options]
+ set mpname [lindex $dep 2]
+ if {![llength [array get depscache port:${mpname}]]} {
+ macports::upgrade $mpname port:${mpname} [array get variations] [array get options] depscache
+ }
}
}
}
Modified: branches/variant-descs-14482/base/src/package1.0/portarchive.tcl
===================================================================
--- branches/variant-descs-14482/base/src/package1.0/portarchive.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/package1.0/portarchive.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -61,7 +61,7 @@
global variations package.destpath workpath
global ports_force ports_source_only ports_binary_only
global portname portversion portrevision portvariants
- global archive.destpath archive.type archive.file archive.path
+ global archive.destpath archive.type archive.file archive.path archive.fulldestpath
# Check mode in case archive called directly by user
if {[option portarchivemode] != "yes"} {
@@ -82,7 +82,9 @@
# Define archive destination directory and target filename
if {![string equal ${archive.destpath} ${workpath}] && ![string equal ${archive.destpath} ""]} {
- set archive.destpath [file join ${archive.destpath} [option os.platform] [option os.arch]]
+ set archive.fulldestpath [file join ${archive.destpath} [option os.platform] [option os.arch]]
+ } else {
+ set archive.fulldestpath ${archive.destpath}
}
# Determine if archive should be skipped
@@ -100,7 +102,7 @@
foreach archive.type [option portarchivetype] {
if {[catch {archiveTypeIsSupported ${archive.type}} errmsg] == 0} {
set archive.file "${portname}-${portversion}_${portrevision}${portvariants}.[option os.arch].${archive.type}"
- set archive.path "[file join ${archive.destpath} ${archive.file}]"
+ set archive.path "[file join ${archive.fulldestpath} ${archive.file}]"
} else {
ui_debug "Skipping [string toupper ${archive.type}] archive: $errmsg"
set unsupported [expr $unsupported + 1]
@@ -237,14 +239,19 @@
proc archive_main {args} {
global UI_PREFIX variations
global workpath destpath portpath ports_force
- global portname portversion portrevision portvariants
- global archive.destpath archive.type archive.file archive.path
+ global portname portepoch portversion portrevision portvariants
+ global archive.fulldestpath archive.type archive.file archive.path
# Create archive destination path (if needed)
- if {![file isdirectory ${archive.destpath}]} {
- system "mkdir -p ${archive.destpath}"
+ if {![file isdirectory ${archive.fulldestpath}]} {
+ system "mkdir -p ${archive.fulldestpath}"
}
+ # Create (if no files) destroot for archiving
+ if {![file isdirectory ${destpath}]} {
+ system "mkdir -p ${destpath}"
+ }
+
# Copy state file into destroot for archiving
# +STATE contains a copy of the MacPorts state information
set statefile [file join $workpath .macports.${portname}.state]
@@ -284,6 +291,7 @@
set fd [open [file join $destpath "+CONTENTS"] w]
puts $fd "@name ${portname}-${portversion}_${portrevision}${portvariants}"
puts $fd "@portname ${portname}"
+ puts $fd "@portepoch ${portepoch}"
puts $fd "@portversion ${portversion}"
puts $fd "@portrevision ${portrevision}"
set vlist [lsort -ascii [array names variations]]
@@ -317,7 +325,7 @@
if {[catch {archiveTypeIsSupported ${archive.type}} errmsg] == 0} {
# Define archive file/path
set archive.file "${portname}-${portversion}_${portrevision}${portvariants}.[option os.arch].${archive.type}"
- set archive.path "[file join ${archive.destpath} ${archive.file}]"
+ set archive.path "[file join ${archive.fulldestpath} ${archive.file}]"
# Setup archive command
archive_command_setup
Modified: branches/variant-descs-14482/base/src/package1.0/portunarchive.tcl
===================================================================
--- branches/variant-descs-14482/base/src/package1.0/portunarchive.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/package1.0/portunarchive.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -61,7 +61,7 @@
global UI_PREFIX target_state_fd variations workpath
global ports_force ports_source_only ports_binary_only
global portname portversion portrevision portvariants portpath
- global unarchive.srcpath unarchive.type unarchive.file unarchive.path
+ global unarchive.srcpath unarchive.type unarchive.file unarchive.path unarchive.fullsrcpath
# Check mode in case archive called directly by user
if {[option portarchivemode] != "yes"} {
@@ -82,7 +82,9 @@
# Define archive directory, file, and path
if {![string equal ${unarchive.srcpath} ${workpath}] && ![string equal ${unarchive.srcpath} ""]} {
- set unarchive.srcpath [file join ${unarchive.srcpath} [option os.platform] [option os.arch]]
+ set unarchive.fullsrcpath [file join ${unarchive.srcpath} [option os.platform] [option os.arch]]
+ } else {
+ set unarchive.fullsrcpath ${unarchive.srcpath}
}
# Determine if unarchive should be skipped
@@ -104,7 +106,7 @@
foreach unarchive.type [option portarchivetype] {
if {[catch {archiveTypeIsSupported ${unarchive.type}} errmsg] == 0} {
set unarchive.file "${portname}-${portversion}_${portrevision}${portvariants}.[option os.arch].${unarchive.type}"
- set unarchive.path "[file join ${unarchive.srcpath} ${unarchive.file}]"
+ set unarchive.path "[file join ${unarchive.fullsrcpath} ${unarchive.file}]"
if {[file exist ${unarchive.path}]} {
set found 1
break
Modified: branches/variant-descs-14482/base/src/pextlib1.0/Pextlib.c
===================================================================
--- branches/variant-descs-14482/base/src/pextlib1.0/Pextlib.c 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/pextlib1.0/Pextlib.c 2008-06-10 14:48:05 UTC (rev 37509)
@@ -1118,6 +1118,52 @@
return TCL_OK;
}
+/**
+ * deletes environment variable
+ *
+ * Syntax is:
+ * unsetenv name (* for all)
+ */
+int UnsetEnvCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
+{
+ char *name;
+ char **envp;
+ char *equals;
+ size_t len;
+
+ if (objc != 2) {
+ Tcl_WrongNumArgs(interp, 1, objv, "name");
+ return TCL_ERROR;
+ }
+
+ name = Tcl_GetString(objv[1]);
+ if (strchr(name, '=') != NULL) {
+ Tcl_SetResult(interp, "only the name should be given", TCL_STATIC);
+ return TCL_ERROR;
+ }
+
+ if (strcmp(name, "*") == 0) {
+ /* unset all current environment variables */
+ for (envp = environ; *envp != NULL; envp++) {
+ equals = strchr(*envp, '=');
+ if (equals != NULL) {
+ len = equals - *envp;
+ name = malloc(len+1);
+ if (name != NULL) {
+ memcpy(name, *envp, len);
+ name[len] = '\0';
+ (void) unsetenv(name);
+ free(name);
+ }
+ }
+ }
+ } else {
+ (void) unsetenv(name);
+ }
+
+ return TCL_OK;
+}
+
int Pextlib_Init(Tcl_Interp *interp)
{
if (Tcl_InitStubs(interp, "8.3", 0) == NULL)
@@ -1149,6 +1195,7 @@
Tcl_CreateObjCommand(interp, "pipe", PipeCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "curl", CurlCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "symlink", CreateSymlinkCmd, NULL, NULL);
+ Tcl_CreateObjCommand(interp, "unsetenv", UnsetEnvCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "readline", ReadlineCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "rl_history", RLHistoryCmd, NULL, NULL);
Modified: branches/variant-descs-14482/base/src/pextlib1.0/curl.h
===================================================================
--- branches/variant-descs-14482/base/src/pextlib1.0/curl.h 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/pextlib1.0/curl.h 2008-06-10 14:48:05 UTC (rev 37509)
@@ -57,7 +57,7 @@
*
* curl getsize url
* Determine the file size of some resource. Try to not fetch the resource
- * if possible. The size returned is the the number of bytes.
+ * if possible. The size returned is the number of bytes.
*/
int CurlCmd(ClientData clientData, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]);
Copied: branches/variant-descs-14482/base/src/pextlib1.0/tests/unsetenv.tcl (from rev 37503, trunk/base/src/pextlib1.0/tests/unsetenv.tcl)
===================================================================
--- branches/variant-descs-14482/base/src/pextlib1.0/tests/unsetenv.tcl (rev 0)
+++ branches/variant-descs-14482/base/src/pextlib1.0/tests/unsetenv.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -0,0 +1,29 @@
+# Test file for Pextlib's unsetenv.
+# tclsh <Pextlib name>
+
+proc main {pextlibname} {
+ load $pextlibname
+
+ global env
+ puts [array get env]
+
+ array unset env *
+ puts [array get env]
+
+ unsetenv *
+ puts [array get env]
+
+
+ set env(CC) "gcc"
+
+ array unset env CC
+ if {[info exists env(CC)]} {
+ puts "note: your TclUnsetEnv is broken... (need to use unsetenv too)"
+ }
+ unsetenv CC
+ if {[info exists env(CC)]} {
+ exit 1
+ }
+}
+
+main $argv
Modified: branches/variant-descs-14482/base/src/pextlib1.0/tracelib.c
===================================================================
--- branches/variant-descs-14482/base/src/pextlib1.0/tracelib.c 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/pextlib1.0/tracelib.c 2008-06-10 14:48:05 UTC (rev 37509)
@@ -123,21 +123,56 @@
}
/*
+ * Is there more data? (return 1 if more data in socket, 0 otherwise)
+ */
+static char can_I_recv_more(int sock)
+{
+ struct timeval tv;
+ fd_set fdr;
+ tv.tv_sec = 0;
+ tv.tv_usec = 0;
+
+ FD_ZERO(&fdr);
+ FD_SET(sock, &fdr);
+ return select(sock+1, &fdr, 0, 0, &tv) == 1;
+}
+
+/*
* receive line from socket, parse it and send answer
*/
static char process_line(int sock)
{
- char * t, buf[1024]={0}, *f;
+ char * t, buf[1024]={0}, *f, *next_t;
int len;
- if((len=recv(sock, buf, sizeof(buf), 0))==-1)
+ if((len=recv(sock, buf, sizeof(buf) - 1, 0))==-1)
return 0;
if(!len)
return 0;
buf[len]=0;
- /* sometimes two messages come in one recv.. I ain't caring about it now, but it can be a problem */
- for(t=buf;*t&&t-buf<(int)sizeof(buf);t=f+strlen(f)+1)
+ for(t=buf;*t&&t-buf<(int)sizeof(buf);t=next_t)
{
+ next_t = t+strlen(t)+1;
+ if(next_t == buf + sizeof(buf) && len == sizeof(buf) - 1)
+ {
+ memmove(buf, t, next_t - t);
+ t = buf;
+ {
+ char * end_of_t = t + strlen(t);
+ *end_of_t = ' ';
+ for(;can_I_recv_more(sock);)
+ {
+ if(recv(sock, end_of_t, 1, 0) != 1)
+ {
+ ui_warn("recv failed");
+ return 0;
+ }
+ if(*end_of_t++ == 0)
+ break;
+ }
+ }
+ }
+
f=strchr(t, '\t');
if(!f)
{
@@ -145,6 +180,7 @@
break;
}
*f++=0;
+
if(!strcmp(t, "filemap"))
{
send_file_map(sock);
@@ -206,7 +242,7 @@
append_allow("/usr", 0);
append_allow("/System/Library", 0);
append_allow("/Library", 0);
- append_allow("/Developer/Headers", 0);
+ append_allow("/Developer", 0);
}
}else
append_allow("/", 0);
Modified: branches/variant-descs-14482/base/src/pextlib1.0/xinstall.c
===================================================================
--- branches/variant-descs-14482/base/src/pextlib1.0/xinstall.c 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/pextlib1.0/xinstall.c 2008-06-10 14:48:05 UTC (rev 37509)
@@ -749,7 +749,7 @@
* flags, except for the dump flag.
* NFS does not support flags. Ignore EOPNOTSUPP flags if we're just
* trying to turn off UF_NODUMP. If we're trying to set real flags,
- * then warn if the the fs doesn't support it, otherwise fail.
+ * then warn if the fs doesn't support it, otherwise fail.
*/
#if defined(UF_NODUMP)
if (!devnull && (flags & SETFLAGS ||
Modified: branches/variant-descs-14482/base/src/port/Makefile
===================================================================
--- branches/variant-descs-14482/base/src/port/Makefile 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port/Makefile 2008-06-10 14:48:05 UTC (rev 37509)
@@ -10,13 +10,13 @@
all: ${SCRIPTS}
-portmirror: portmirror.tcl
+portmirror: portmirror.tcl ../../Mk/macports.autoconf.mk
${edit} portmirror.tcl > $@
-portindex: portindex.tcl
+portindex: portindex.tcl ../../Mk/macports.autoconf.mk
${edit} portindex.tcl > $@
-port: port.tcl
+port: port.tcl ../../Mk/macports.autoconf.mk
${edit} port.tcl > $@
mkdirs:
Modified: branches/variant-descs-14482/base/src/port/port-help.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port/port-help.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port/port-help.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -6,64 +6,264 @@
# port-help.tcl
# $Id$
-set porthelp(activate) "activate a port"
-set porthelp(archive) "archive a port"
-set porthelp(build) "build a port"
-set porthelp(cat) "cat a port"
-set porthelp(cd) "cd to a port"
-set porthelp(checksum) "checksum a port"
-set porthelp(clean) "clean a port"
-set porthelp(compact) "compact a port"
-set porthelp(configure) "configure a port"
-set porthelp(contents) "get contents for a port"
-set porthelp(deactivate) "deactivate a port"
-set porthelp(dependents) "dependents a port"
-set porthelp(deps) "show deps for a port"
-set porthelp(destroot) "destroot a port"
-set porthelp(dir) "dir a port"
-set porthelp(distcheck) "distcheck a port"
-set porthelp(dmg) "dmg a port"
-set porthelp(dpkg) "dpkg a port"
-set porthelp(echo) "echo a port"
-set porthelp(ed) "ed a port"
-set porthelp(edit) "edit a port"
-set porthelp(exit) "exit a port"
-set porthelp(extract) "extract a port"
-set porthelp(fetch) "fetch a port"
-set porthelp(file) "file a port"
-set porthelp(gohome) "gohome a port"
-set porthelp(help) "help a port"
-set porthelp(info) "info a port"
-set porthelp(install) "install a port"
-set porthelp(installed) "installed a port"
-set porthelp(lint) "lint a port"
-set porthelp(list) "list a port"
-set porthelp(livecheck) "livecheck a port"
-set porthelp(load) "load a port"
-set porthelp(location) "location a port"
-set porthelp(mdmg) "mdmg a port"
-set porthelp(mirror) "mirror a port"
-set porthelp(mpkg) "mpkg a port"
-set porthelp(outdated) "outdated a port"
-set porthelp(patch) "patch a port"
-set porthelp(pkg) "pkg a port"
-set porthelp(platform) "platform a port"
-set porthelp(provides) "provides a port"
-set porthelp(quit) "quit a port"
-set porthelp(rpm) "rpm a port"
-set porthelp(search) "search a port"
-set porthelp(selfupdate) "selfupdate a port"
-set porthelp(srpm) "srpm a port"
-set porthelp(submit) "submit a port"
-set porthelp(sync) "sync a port"
-set porthelp(test) "test a port"
-set porthelp(trace) "trace a port"
-set porthelp(unarchive) "unarchive a port"
-set porthelp(uncompact) "uncompact a port"
-set porthelp(uninstall) "uninstall a port"
-set porthelp(unload) "unload a port"
-set porthelp(upgrade) "upgrade a port"
-set porthelp(url) "url a port"
-set porthelp(usage) "usage a port"
-set porthelp(variants) "variants a port"
-set porthelp(version) "version a port"
+
+set porthelp(activate) {
+Activate the given ports
+}
+
+set porthelp(archive) {
+Archive the given ports
+}
+
+set porthelp(build) {
+Build the given ports
+}
+
+set porthelp(cat) {
+Writes the Portfiles of the given ports to stdout
+}
+
+set porthelp(cd) {
+Changes to the directory of the given port
+
+Only in interactive mode.
+}
+
+set porthelp(checksum) {
+Compares the checksums for the downloaded files of the given ports
+}
+
+set porthelp(clean) {
+Removes file associates with given ports
+
+--archives Removes created archives
+--dist Removes downloaded distfiles
+--work Removes work directory
+--all Removes everything from above
+}
+
+set porthelp(compact) {
+Compact the given ports
+}
+
+set porthelp(configure) {
+Configure the given ports
+}
+
+set porthelp(contents) {
+Returns a list of files installed by given ports
+}
+
+set porthelp(deactivate) {
+Deactivates the given ports
+}
+
+set porthelp(dependents) {
+Returns a list of installed dependents for each of the given ports
+
+Note: Don't get fooled by the language!
+Dependents are those ports which depend on the given port, not vice-versa!
+}
+
+set porthelp(deps) {
+Returns a list of dependencies for each of the given ports
+}
+
+set porthelp(destroot) {
+Destroot the given ports
+}
+
+set porthelp(dir) {
+Returns the directories of the given ports
+
+This can be quite handy to be used in your shell:
+cd $(port dir <portname>)
+}
+
+set porthelp(distcheck) {
+Checks if the given ports can be fetched from all of its master_sites
+}
+
+set porthelp(distfiles) {
+Returns a list of distfiles for the given port
+}
+
+set porthelp(dmg) {
+Creates a dmg for each of the given ports
+}
+
+set porthelp(dpkg) {
+Creates a dpkg for each of the given ports
+}
+
+set porthelp(echo) {
+Returns the list of ports the argument expands to
+
+This can be useful to what a pseudo-port expands.
+}
+
+set porthelp(edit) {
+Edit given ports
+}
+
+set porthelp(ed) $porthelp(edit)
+
+set porthelp(exit) {
+Exit port
+
+Only in interactive mode.
+}
+
+set porthelp(extract) {
+Extract the downloaded files of the given ports
+}
+
+set porthelp(fetch) {
+Downloaded distfiles for the given ports
+}
+
+set porthelp(file) {
+Returns the path to the Portfile for each of the given ports
+}
+
+set porthelp(gohome) {
+Opens the homepages of the given ports in your browser
+}
+
+set porthelp(help) {
+Displays short help texts for the given ports
+}
+
+set porthelp(info) {
+Returns informations about the given ports
+}
+
+set porthelp(install) {
+Installs the given ports
+}
+
+set porthelp(installed) {
+List installed versions of the given port
+}
+
+set porthelp(lint) {
+Checks if the Portfile is lint-free for each of the given ports
+}
+
+set porthelp(list) {
+List the available version for each of the given ports
+}
+
+set porthelp(livecheck) {
+Checks if a new version of the software is available
+}
+
+set porthelp(load) {
+Interface to launchctl(1) for ports providing startup items
+}
+
+set porthelp(location) {
+Returns the install location for each of the given ports
+}
+
+set porthelp(mdmg) {
+Creates a dmg for each of the given ports
+}
+
+set porthelp(mirror) {
+Fetches distfiles for the given ports
+}
+
+set porthelp(mpkg) {
+Creates a mpkg for each of the given ports
+}
+
+set porthelp(outdated) {
+Returns a list of outdated ports
+}
+
+set porthelp(patch) {
+Applies patches on each of the given port
+}
+
+set porthelp(pkg) {
+Creates a pkg for each of the given ports
+}
+
+set porthelp(platform) {
+Returns the current platform you are on
+}
+
+set porthelp(provides) {
+Return a list of files provided by the given ports
+}
+
+set porthelp(quit) $porthelp(exit)
+
+set porthelp(rpm) {
+Creates a rpm for each of the given ports
+}
+
+set porthelp(search) {
+Search for a port
+
+This looks in name, desription and long_description of each port for the given search string.
+}
+
+set porthelp(selfupdate) {
+Upgrade MacPorts itself
+}
+
+set porthelp(srpm) {
+Creates a srpm for each of the given ports
+}
+
+set porthelp(submit) {
+Submit a port to the MacPorts Web Application
+}
+
+set porthelp(sync) {
+Synchronize the set of Portfiles
+}
+
+set porthelp(test) {
+Run tests on each of the given ports
+}
+
+set porthelp(trace) {
+Trace a port
+}
+
+set porthelp(unarchive) {
+Unarchive a port
+}
+
+set porthelp(uncompact) {
+Uncompact a port
+}
+
+set porthelp(uninstall) {
+Uninstall the given ports
+}
+
+set porthelp(unload) $porthelp(load)
+
+set porthelp(upgrade) {
+Upgrades the given ports to the latest version
+}
+
+set porthelp(url) {
+Returns the URL for each of the given ports
+}
+
+set porthelp(usage) {
+Returns basic usage of the port command
+}
+
+set porthelp(variants) {
+Returns a list of variants with descriptions available for the given ports
+}
+
+set porthelp(version) {
+Returns the version of MacPorts
+}
Modified: branches/variant-descs-14482/base/src/port/port.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port/port.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port/port.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -209,6 +209,8 @@
proc registry_installed {portname {portversion ""}} {
set ilist [registry::installed $portname $portversion]
if { [llength $ilist] > 1 } {
+ # set portname again since the one we were passed may not have had the correct case
+ set portname [lindex [lindex $ilist 0] 0]
puts "The following versions of $portname are currently installed:"
foreach i [portlist_sortint $ilist] {
set iname [lindex $i 0]
@@ -316,6 +318,11 @@
if {[llength $portlist] == 0} {
set portlist [get_current_port]
+
+ if {[llength $portlist] == 0} {
+ # there was no port in current directory
+ return 1
+ }
}
return 0
@@ -392,18 +399,42 @@
}
##
+# Makes sure we get the current terminal size
+proc set_term_size {} {
+ global env
+
+ if {![info exists env(COLUMNS)] || ![info exists env(LINES)]} {
+ if {![catch {exec stty size} err]} {
+ regexp {(\d+) (\d+)} $err -> rows cols
+ set env(COLUMNS) $cols
+ set env(LINES) $rows
+ } else {
+ puts stderr "Warning: Unable to get terminal size, using 80x24!"
+ set cols 80
+ set rows 24
+ }
+ }
+}
+
+##
# Wraps a multi-line string at specified textwidth
#
# @see wrapline
#
# @param string input string
-# @param maxlen text width (indent length not counted)
+# @param maxlen text width (0 defaults to current terminal width)
# @param indent prepend to every line
# @return wrapped string
-proc wrap {string maxlen {indent ""}} {
+proc wrap {string maxlen {indent ""} {indentfirstline 1}} {
+ global env
+
+ if {$maxlen == 0} {
+ set maxlen $env(COLUMNS)
+ }
+
set splitstring {}
foreach line [split $string "\n"] {
- lappend splitstring [wrapline $line $maxlen $indent]
+ lappend splitstring [wrapline $line $maxlen $indent $indentfirstline]
}
return [join $splitstring "\n"]
}
@@ -414,22 +445,38 @@
# @see wrap
#
# @param line input line
-# @param maxlen text width (indent length not counted)
+# @param maxlen text width (0 defaults to current terminal width)
# @param indent prepend to every line
# @return wrapped string
-proc wrapline {line maxlen {indent ""}} {
+proc wrapline {line maxlen {indent ""} {indentfirstline 1}} {
+ global env
+
+ if {$maxlen == 0} {
+ set maxlen $env(COLUMNS)
+ }
+
set string [split $line " "]
- set newline $indent
+ if {$indentfirstline == 0} {
+ set newline ""
+ set maxlen [expr $maxlen - [string length $indent]]
+ } else {
+ set newline $indent
+ }
append newline [lindex $string 0]
set joiner " "
+ set first 1
foreach word [lrange $string 1 end] {
- if {[string length $newline]+[string length $word] > $maxlen} {
+ if {[string length $newline]+[string length $word] >= $maxlen} {
lappend lines $newline
set newline $indent
set joiner ""
}
append newline $joiner $word
set joiner " "
+ set first 0
+ if {$first == 1 && $indentfirstline == 0} {
+ set maxlen [expr $maxlen + [string length $indent]]
+ }
}
lappend lines $newline
return [join $lines "\n"]
@@ -507,6 +554,7 @@
ui_msg "To use the current port, you must be in a port's directory."
ui_msg "(you might also see this message if a pseudo-port such as"
ui_msg "outdated or installed expands to no ports)."
+ return [list]
}
set results {}
@@ -894,12 +942,14 @@
foreach item $a {
array set port $item
if {[info exists onetime($port(fullname))]} continue
+ set onetime($port(fullname)) 1
lappend result $item
}
foreach item $b {
array set port $item
if {[info exists onetime($port(fullname))]} continue
+ set onetime($port(fullname)) 1
lappend result $item
}
@@ -1138,39 +1188,95 @@
# Action Handlers
##########################################
+proc action_get_usage { action } {
+ global action_array cmd_args_array
+
+ if {[info exists action_array($action)]} {
+ set cmds ""
+ if {[info exists cmd_args_array($action)]} {
+ foreach cmd $cmd_args_array($action) {
+ set name [lindex $cmd 0]
+ set argc [lindex $cmd 1]
+
+ append cmds " --$name"
+
+ for {set i 1} {$i <= $argc} {incr i} {
+ append cmds " <arg$i>"
+ }
+ }
+ }
+ set args ""
+ set needed [action_needs_portlist $action]
+ if {[action_args_const strings] == $needed} {
+ set args " <arguments>"
+ } elseif {[action_args_const strings] == $needed} {
+ set args " <portlist>"
+ }
+
+ set ret "Usage: "
+ set len [string length $action]
+ append ret [wrap "$action$cmds$args" 0 [string repeat " " [expr 8 + $len]] 0]
+ append ret "\n"
+
+ return $ret
+ }
+
+ return -1
+}
+
proc action_usage { action portlist opts } {
- print_usage
- return 0
+ if {[llength $portlist] == 0} {
+ print_usage
+ return 0
+ }
+
+ foreach topic $portlist {
+ set usage [action_get_usage $topic]
+ if {$usage != -1} {
+ puts -nonewline stderr $usage
+ } else {
+ ui_error "No usage for topic $topic"
+ return 1
+ }
+ }
}
proc action_help { action portlist opts } {
- set pl [lindex $portlist 0]
- set x [lsearch $pl name*]
set helpfile "$macports::prefix/var/macports/port-help.tcl"
- if {$x != -1} {
- set topic [lindex $pl [expr $x + 1]]
+ if {[llength $portlist] == 0} {
+ print_help
+ return 0
+ }
+
if {[file exists $helpfile]} {
if {[catch {source $helpfile} err]} {
puts stderr "Error reading helpfile $helpfile: $err"
return 1
- } else {
- if {[info exists porthelp($topic)]} {
- puts stderr $porthelp($topic)
- return 0
- } else {
- puts stderr "No help for topic $topic"
- return 1
- }
}
- } else {
+ } else {
puts stderr "Unable to open help file $helpfile"
return 1
}
- } else {
- print_help
+
+ foreach topic $portlist {
+ if {![info exists porthelp($topic)]} {
+ puts stderr "No help for topic $topic"
+ return 1
+ }
+
+ set usage [action_get_usage $topic]
+ if {$usage != -1} {
+ puts -nonewline stderr $usage
+ } else {
+ ui_error "No usage for topic $topic"
+ return 1
+ }
+
+ puts stderr $porthelp($topic)
}
+
return 0
}
@@ -1241,6 +1347,13 @@
platforms 1
variants 1
"
+
+ if {[info exists options(ports_info_depends)] && $options(ports_info_depends) == "yes"} {
+ array unset options ports_info_depends
+ set options(ports_info_depends_build) yes
+ set options(ports_info_depends_lib) yes
+ set options(ports_info_depends_run) yes
+ }
# Set up our field separators
set show_label 1
@@ -1278,9 +1391,11 @@
# If there's no such info, move on
if {![info exists portinfo($ropt)]} {
if {!$quiet} {
- puts "no info for '$opt'"
+ puts stderr "no info for '$opt'"
}
- continue
+ set inf ""
+ } else {
+ set inf $portinfo($ropt)
}
# Calculate field label
@@ -1290,7 +1405,6 @@
}
# Format the data
- set inf $portinfo($ropt)
if { $ropt eq "maintainers" } {
set inf [unobscure_maintainers $inf]
}
@@ -1319,8 +1433,8 @@
if {[info exists portinfo(variants)]} {
global global_variations
- puts -nonewline "Variants: "
set joiner ""
+ set vars ""
foreach v [lsort $portinfo(variants)] {
set mod ""
if {[info exists variations($v)]} {
@@ -1331,17 +1445,18 @@
set mod "($global_variations($v))"
}
# TODO: selected by default_variants (with [+]/[-])
- puts -nonewline "$joiner$mod$v"
+ append vars "$joiner$mod$v"
set joiner ", "
}
- puts ""
+ puts -nonewline "Variants: "
+ puts [wrap $vars 0 [string repeat " " 13] 0]
}
puts ""
if {[info exists portinfo(long_description)]} {
- puts [wrap [join $portinfo(long_description)] 80]
+ puts [wrap [join $portinfo(long_description)] 0]
} else {
if {[info exists portinfo(description)]} {
- puts [wrap [join $portinfo(description)] 80]
+ puts [wrap [join $portinfo(description)] 0]
}
}
if {[info exists portinfo(homepage)]} {
@@ -1393,6 +1508,8 @@
ui_debug "$errorInfo"
break_softcontinue "port location failed: $result" 1 status
} else {
+ # set portname again since the one we were passed may not have had the correct case
+ set portname [lindex $ilist 0]
set version [lindex $ilist 1]
set revision [lindex $ilist 2]
set variants [lindex $ilist 3]
@@ -1420,11 +1537,11 @@
ui_error "Please specify a filename to check which port provides that file."
return 1
}
- foreachport $portlist {
- set file [compat filenormalize $portname]
+ foreach filename $portlist {
+ set file [compat filenormalize $filename]
if {[file exists $file]} {
if {![file isdirectory $file]} {
- set port [registry::file_registered $file]
+ set port [registry::file_registered $file]
if { $port != 0 } {
puts "$file is provided by: $port"
} else {
@@ -1577,6 +1694,9 @@
global errorInfo
ui_debug "$errorInfo"
break_softcontinue "$result" 1 status
+ } else {
+ # set portname again since the one we were passed may not have had the correct case
+ set portname [lindex [lindex $ilist 0] 0]
}
set deplist [registry::list_dependents $portname]
@@ -1807,6 +1927,10 @@
return 1
}
foreachport $portlist {
+ if { ![catch {set ilist [registry::installed $portname]} result] } {
+ # set portname again since the one we were passed may not have had the correct case
+ set portname [lindex [lindex $ilist 0] 0]
+ }
set files [registry::port_registered $portname]
if { $files != 0 } {
if { [llength $files] > 0 } {
@@ -1845,6 +1969,8 @@
array unset portinfo
array set portinfo [lindex $result 1]
+ # set portname again since the one we were passed may not have had the correct case
+ set portname $portinfo(name)
set depstypes {depends_build depends_lib depends_run}
set depstypes_descr {"build" "library" "runtime"}
@@ -1893,6 +2019,8 @@
array unset portinfo
array set portinfo [lindex $result 1]
+ # set portname again since the one we were passed may not have had the correct case
+ set portname $portinfo(name)
set porturl $portinfo(porturl)
set portdir $portinfo(portdir)
@@ -1940,7 +2068,7 @@
proc action_search { action portlist opts } {
- global private_options
+ global private_options global_options
set status 0
if {![llength $portlist] && [info exists private_options(ports_no_args)] && $private_options(ports_no_args) == "yes"} {
ui_error "You must specify a search pattern"
@@ -1948,19 +2076,53 @@
}
set separator ""
- foreachport $portlist {
+ foreach portname $portlist {
puts -nonewline $separator
+ if {[string first "*" $portname] == -1} {
+ set searchstring "*$portname*"
+ } else {
+ set searchstring $portname
+ }
+
set portfound 0
- if {[catch {set res [mportsearch $portname no]} result]} {
+ set res {}
+ if {[catch {set matches [mportsearch $searchstring no glob name]} result]} {
global errorInfo
ui_debug "$errorInfo"
- break_softcontinue "search for portname $portname failed: $result" 1 status
+ break_softcontinue "search for name $portname failed: $result" 1 status
}
+ set tmp {}
+ foreach {name info} $matches {
+ add_to_portlist tmp [concat [list name $name] $info]
+ }
+ set res [opUnion $res $tmp]
+ if {[catch {set matches [mportsearch $searchstring no glob description]} result]} {
+ global errorInfo
+ ui_debug "$errorInfo"
+ break_softcontinue "search for description $portname failed: $result" 1 status
+ }
+ set tmp {}
+ foreach {name info} $matches {
+ add_to_portlist tmp [concat [list name $name] $info]
+ }
+ set res [opUnion $res $tmp]
+ if {[catch {set matches [mportsearch $searchstring no glob long_description]} result]} {
+ global errorInfo
+ ui_debug "$errorInfo"
+ break_softcontinue "search for long_description $portname failed: $result" 1 status
+ }
+ set tmp {}
+ foreach {name info} $matches {
+ add_to_portlist tmp [concat [list name $name] $info]
+ }
+ set res [opUnion $res $tmp]
+ set res [portlist_sort $res]
+
set joiner ""
- foreach {name array} $res {
+ foreach info $res {
array unset portinfo
- array set portinfo $array
+ array set portinfo $info
# XXX is this the right place to verify an entry?
if {![info exists portinfo(name)]} {
@@ -1979,14 +2141,19 @@
if {[macports::ui_isset ports_quiet]} {
puts $portinfo(name)
} else {
- puts -nonewline $joiner
+ if {[info exists global_options(ports_search_line)]
+ && $global_options(ports_search_line) == "yes"} {
+ puts "$portinfo(name)\t$portinfo(version)\t$portinfo(categories)\t$portinfo(description)"
+ } else {
+ puts -nonewline $joiner
- puts -nonewline "$portinfo(name) @$portinfo(version)"
- if {[info exists portinfo(categories)]} {
- puts -nonewline " ([join $portinfo(categories) ", "])"
+ puts -nonewline "$portinfo(name) @$portinfo(version)"
+ if {[info exists portinfo(categories)]} {
+ puts -nonewline " ([join $portinfo(categories) ", "])"
+ }
+ puts ""
+ puts [wrap [join $portinfo(description)] 0 [string repeat " " 4]]
}
- puts ""
- puts [wrap [join $portinfo(description)] 76 [string repeat " " 4]]
}
set joiner "\n"
@@ -1994,8 +2161,11 @@
}
if { !$portfound } {
ui_msg "No match for $portname found"
- } elseif {[llength $res] > 2} {
- ui_msg "\nFound [expr [llength $res] / 2] ports."
+ } elseif {[llength $res] > 1} {
+ if {![info exists global_options(ports_search_line)]
+ || $global_options(ports_search_line) != "yes"} {
+ ui_msg "\nFound [llength $res] ports."
+ }
}
set separator "--\n"
@@ -2125,15 +2295,12 @@
}
}
- # Invoke the editor
- if { $editor == "" } {
- break_softcontinue "No EDITOR is specified in your environment" 1 status
- } else {
- if {[catch {eval exec >/dev/stdout </dev/stdin $editor $portfile} result]} {
- global errorInfo
- ui_debug "$errorInfo"
- break_softcontinue "unable to invoke editor $editor: $result" 1 status
- }
+ # Invoke the editor, with a reasonable canned default.
+ if { $editor == "" } { set editor "/usr/bin/vi" }
+ if {[catch {eval exec >/dev/stdout </dev/stdin $editor $portfile} result]} {
+ global errorInfo
+ ui_debug "$errorInfo"
+ break_softcontinue "unable to invoke editor $editor: $result" 1 status
}
# Restore internal MacPorts environment
@@ -2196,8 +2363,10 @@
proc action_sync { action portlist opts } {
+ global global_options
+
set status 0
- if {[catch {mportsync} result]} {
+ if {[catch {mportsync [array get global_options]} result]} {
global errorInfo
ui_debug "$errorInfo"
ui_msg "port sync failed: $result"
@@ -2312,99 +2481,189 @@
return 0
}
-
+# action_array specifies which action to run on the given command
+# and if the action wants an expanded portlist.
+# The value is a list of the form {action expand},
+# where action is a string and expand a value:
+# 0 none Does not expect any text argument
+# 1 strings Expects some strings as text argument
+# 2 ports Wants an expanded list of ports as text argument
+# Use action_args_const to translate them
global action_array
-array set action_array {
- usage action_usage
- help action_help
-
- echo action_echo
-
- info action_info
- location action_location
- provides action_provides
-
- activate action_activate
- deactivate action_deactivate
-
- sync action_sync
- selfupdate action_selfupdate
-
- upgrade action_upgrade
-
- version action_version
- platform action_platform
- compact action_compact
- uncompact action_uncompact
-
- uninstall action_uninstall
-
- installed action_installed
- outdated action_outdated
- contents action_contents
- dependents action_dependents
- deps action_deps
- variants action_variants
-
- search action_search
- list action_list
-
- ed action_portcmds
- edit action_portcmds
- cat action_portcmds
- dir action_portcmds
- work action_portcmds
- cd action_portcmds
- url action_portcmds
- file action_portcmds
- gohome action_portcmds
-
- fetch action_target
- checksum action_target
- extract action_target
- patch action_target
- configure action_target
- build action_target
- destroot action_target
- install action_target
- clean action_target
- test action_target
- lint action_target
- submit action_target
- trace action_target
- livecheck action_target
- distcheck action_target
- mirror action_target
- load action_target
- unload action_target
-
- archive action_target
- unarchive action_target
- dmg action_target
- mdmg action_target
- dpkg action_target
- mpkg action_target
- pkg action_target
- rpm action_target
- srpm action_target
-
- quit action_exit
- exit action_exit
+proc action_args_const {arg} {
+ switch -- $arg {
+ none {
+ return 0
+ }
+ strings {
+ return 1
+ }
+ default -
+ ports {
+ return 2
+ }
+ }
}
+array set action_array [list \
+ usage [list action_usage [action_args_const strings]] \
+ help [list action_help [action_args_const strings]] \
+ \
+ echo [list action_echo [action_args_const ports]] \
+ \
+ info [list action_info [action_args_const ports]] \
+ location [list action_location [action_args_const ports]] \
+ provides [list action_provides [action_args_const strings]] \
+ \
+ activate [list action_activate [action_args_const ports]] \
+ deactivate [list action_deactivate [action_args_const ports]] \
+ \
+ sync [list action_sync [action_args_const none]] \
+ selfupdate [list action_selfupdate [action_args_const none]] \
+ \
+ upgrade [list action_upgrade [action_args_const ports]] \
+ \
+ version [list action_version [action_args_const none]] \
+ platform [list action_platform [action_args_const none]] \
+ compact [list action_compact [action_args_const ports]] \
+ uncompact [list action_uncompact [action_args_const ports]] \
+ \
+ uninstall [list action_uninstall [action_args_const ports]] \
+ \
+ installed [list action_installed [action_args_const ports]] \
+ outdated [list action_outdated [action_args_const ports]] \
+ contents [list action_contents [action_args_const ports]] \
+ dependents [list action_dependents [action_args_const ports]] \
+ deps [list action_deps [action_args_const ports]] \
+ variants [list action_variants [action_args_const ports]] \
+ \
+ search [list action_search [action_args_const strings]] \
+ list [list action_list [action_args_const ports]] \
+ \
+ ed [list action_portcmds [action_args_const ports]] \
+ edit [list action_portcmds [action_args_const ports]] \
+ cat [list action_portcmds [action_args_const ports]] \
+ dir [list action_portcmds [action_args_const ports]] \
+ work [list action_portcmds [action_args_const ports]] \
+ cd [list action_portcmds [action_args_const ports]] \
+ url [list action_portcmds [action_args_const ports]] \
+ file [list action_portcmds [action_args_const ports]] \
+ gohome [list action_portcmds [action_args_const ports]] \
+ \
+ fetch [list action_target [action_args_const ports]] \
+ checksum [list action_target [action_args_const ports]] \
+ extract [list action_target [action_args_const ports]] \
+ patch [list action_target [action_args_const ports]] \
+ configure [list action_target [action_args_const ports]] \
+ build [list action_target [action_args_const ports]] \
+ destroot [list action_target [action_args_const ports]] \
+ install [list action_target [action_args_const ports]] \
+ clean [list action_target [action_args_const ports]] \
+ test [list action_target [action_args_const ports]] \
+ lint [list action_target [action_args_const ports]] \
+ submit [list action_target [action_args_const ports]] \
+ trace [list action_target [action_args_const ports]] \
+ livecheck [list action_target [action_args_const ports]] \
+ distcheck [list action_target [action_args_const ports]] \
+ mirror [list action_target [action_args_const ports]] \
+ load [list action_target [action_args_const ports]] \
+ unload [list action_target [action_args_const ports]] \
+ distfiles [list action_target [action_args_const ports]] \
+ \
+ archive [list action_target [action_args_const ports]] \
+ unarchive [list action_target [action_args_const ports]] \
+ dmg [list action_target [action_args_const ports]] \
+ mdmg [list action_target [action_args_const ports]] \
+ dpkg [list action_target [action_args_const ports]] \
+ mpkg [list action_target [action_args_const ports]] \
+ pkg [list action_target [action_args_const ports]] \
+ rpm [list action_target [action_args_const ports]] \
+ srpm [list action_target [action_args_const ports]] \
+ \
+ quit [list action_exit [action_args_const none]] \
+ exit [list action_exit [action_args_const none]] \
+]
-
proc find_action_proc { action } {
global action_array
set action_proc ""
if { [info exists action_array($action)] } {
- set action_proc $action_array($action)
+ set action_proc [lindex $action_array($action) 0]
}
return $action_proc
}
+# Returns whether an action expects text arguments at all,
+# expects text arguments or wants an expanded list of ports
+# Return value:
+# 0 none Does not expect any text argument
+# 1 strings Expects some strings as text argument
+# 2 ports Wants an expanded list of ports as text argument
+# Use action_args_const to translate them
+proc action_needs_portlist { action } {
+ global action_array
+ set ret 0
+ if {[info exists action_array($action)]} {
+ set ret [lindex $action_array($action) 1]
+ }
+
+ return $ret
+}
+
+# cmd_args_array specifies which arguments the commands accept
+# Commands not listed here do not accept any arguments
+# Syntax if {option argn}
+# Where option is the name of the option and argn specifies how many arguments
+# this argument takes
+global cmd_args_array
+array set cmd_args_array {
+ info {{category 0} {categories 0} {depends_build 0} {depends_lib 0}
+ {depends_run 0} {depends 0} {description 0} {epoch 0}
+ {homepage 0} {index 0} {line 0} {long_description 0}
+ {maintainer 0} {maintainers 0} {name 0} {platform 0}
+ {platforms 0} {portdir 0} {revision 0} {variant 0} {variants 0}
+ {version 0}}
+ search {{line 0}}
+ selfupdate {{nosync 0} {pretend 0}}
+ uninstall {{follow-dependents 0}}
+ variants {{index 0}}
+ clean {{all 0} {archive 0} {dist 0} {work 0}}
+ mirror {{new 0}}
+}
+
+##
+# Checks whether the given option is valid
+#
+# œparam action for which action
+# @param option the option to check
+# @param upoptargc reference to upvar for storing the number of arguments for
+# this option
+proc cmd_option_exists { action option {upoptargc ""}} {
+ global cmd_args_array
+ upvar 1 $upoptargc optargc
+
+ # This could be so easy with lsearch -index,
+ # but that's only available as of Tcl 8.5
+
+ if {![info exists cmd_args_array($action)]} {
+ return 0
+ }
+
+ foreach item $cmd_args_array($action) {
+ set name [lindex $item 0]
+ set argc [lindex $item 1]
+
+ if {$name == $option} {
+ set optargc $argc
+ return 1
+ }
+ }
+
+ return 0
+}
+
# Parse global options
#
# Note that this is called several times:
@@ -2416,7 +2675,7 @@
proc parse_options { action ui_options_name global_options_name } {
upvar $ui_options_name ui_options
upvar $global_options_name global_options
- global cmdname
+ global cmdname cmd_args_array
while {[moreargs]} {
set arg [lookahead]
@@ -2431,7 +2690,24 @@
}
default {
set key [string range $arg 2 end]
- set global_options(ports_${action}_${key}) yes
+ set kargc 0
+ if {![cmd_option_exists $action $key kargc]} {
+ return -code error "${action} does not accept --${key}"
+ }
+ if {$kargc == 0} {
+ set global_options(ports_${action}_${key}) yes
+ } else {
+ set args {}
+ while {[moreargs] && $kargc > 0} {
+ advance
+ lappend args [lookahead]
+ set kargc [expr $kargc - 1]
+ }
+ if {$kargc > 0} {
+ return -code error "--${key} expects [expr $kargc + [llength $args]] parameters!"
+ }
+ set global_options(ports_${action}_${key}) $args
+ }
}
}
} else {
@@ -2553,11 +2829,28 @@
# Reset global_options from base before each action, as we munge it just below...
array set global_options $global_options_base
+ # Find an action to execute
+ set action_proc [find_action_proc $action]
+ if { $action_proc == "" } {
+ puts "Unrecognized action \"$action\""
+ set action_status 1
+ break
+ }
+
# Parse options that will be unique to this action
# (to avoid abiguity with -variants and a default port, either -- must be
# used to terminate option processing, or the pseudo-port current must be specified).
- parse_options $action ui_options global_options
-
+ if {[catch {parse_options $action ui_options global_options} result]} {
+ global errorInfo
+ ui_debug "$errorInfo"
+ ui_error $result
+ set action_status 1
+ break
+ }
+
+ # What kind of arguments does the command expect?
+ set expand [action_needs_portlist $action]
+
# Parse action arguments, setting a special flag if there were none
# We otherwise can't tell the difference between arguments that evaluate
# to the empty set, and the empty set itself.
@@ -2568,23 +2861,28 @@
set private_options(ports_no_args) yes
}
default {
- # Parse port specifications into portlist
- if {![portExpr portlist]} {
- ui_error "Improper expression syntax while processing parameters"
+ if {[action_args_const none] == $expand} {
+ ui_error "$action does not accept string arguments"
set action_status 1
break
+ } elseif {[action_args_const strings] == $expand} {
+ while { [moreargs] && ![match ";"] } {
+ lappend portlist [lookahead]
+ advance
+ }
+ } elseif {[action_args_const ports] == $expand} {
+ # Parse port specifications into portlist
+ if {![portExpr portlist]} {
+ ui_error "Improper expression syntax while processing parameters"
+ set action_status 1
+ break
+ }
}
}
}
- # Find an action to execute
- set action_proc [find_action_proc $action]
- if { $action_proc != "" } {
- set action_status [$action_proc $action $portlist [array get global_options]]
- } else {
- puts "Unrecognized action \"$action\""
- set action_status 1
- }
+ # execute the action
+ set action_status [$action_proc $action $portlist [array get global_options]]
# semaphore to exit
if {$action_status == -999} break
@@ -2600,7 +2898,6 @@
proc complete_portname { text state } {
- global action_array
global complete_choices complete_position
if {$state == 0} {
@@ -2806,6 +3103,10 @@
# Global options private to this script
array set private_options {}
+# Make sure we get the size of the terminal
+# We do this here to save it in the boot_env, in case we determined it manually
+set_term_size
+
# Save off a copy of the environment before mportinit monkeys with it
global env boot_env
array set boot_env [array get env]
Modified: branches/variant-descs-14482/base/src/port1.0/Makefile
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/Makefile 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/Makefile 2008-06-10 14:48:05 UTC (rev 37509)
@@ -5,7 +5,8 @@
portinstall.tcl portdepends.tcl portdestroot.tcl portlint.tcl \
portclean.tcl porttest.tcl portactivate.tcl portsubmit.tcl \
port_autoconf.tcl portstartupitem.tcl porttrace.tcl portlivecheck.tcl \
- portdistcheck.tcl portmirror.tcl portload.tcl portunload.tcl
+ portdistcheck.tcl portmirror.tcl portload.tcl portunload.tcl \
+ portdistfiles.tcl
SUBDIR= resources
Modified: branches/variant-descs-14482/base/src/port1.0/port.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/port.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/port.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -54,3 +54,5 @@
package require portmirror 1.0
package require portload 1.0
package require portunload 1.0
+
+package require portdistfiles 1.0
Modified: branches/variant-descs-14482/base/src/port1.0/port_autoconf.tcl.in
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/port_autoconf.tcl.in 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/port_autoconf.tcl.in 2008-06-10 14:48:05 UTC (rev 37509)
@@ -33,6 +33,7 @@
namespace eval portutil::autoconf {
variable cvs_path "@CVS@"
variable svn_path "@SVN@"
+ variable git_path "@GIT@"
variable rsync_path "@RSYNC@"
variable mtree_path "@MTREE@"
variable xar_path "@XAR@"
Modified: branches/variant-descs-14482/base/src/port1.0/portbuild.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/portbuild.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/portbuild.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -45,7 +45,7 @@
commands build parallel_build
# defaults
default build.dir {${workpath}/${worksrcdir}}
-default build.cmd {[build_getnicevalue][build_getmaketype][build_getmakejobs]}
+default build.cmd {[build_getmaketype]}
default build.nice {${buildnicevalue}}
default build.jobs {${buildmakejobs}}
default build.pre_args {${build.target}}
@@ -118,7 +118,7 @@
}
ui_debug "port allows a parallel build"
- if {![exists build.jobs] || ![string match "*make*" [build_getmaketype]]} {
+ if {![exists build.jobs] || ![string match "*make*" [option build.cmd]]} {
return ""
}
set jobs [option build.jobs]
@@ -143,6 +143,14 @@
}
proc build_main {args} {
+ global build.cmd
+
+ set nice_prefix [build_getnicevalue]
+ set jobs_suffix [build_getmakejobs]
+
+ set realcmd ${build.cmd}
+ set build.cmd "$nice_prefix${build.cmd}$jobs_suffix"
command_exec build
+ set build.cmd ${realcmd}
return 0
}
Modified: branches/variant-descs-14482/base/src/port1.0/portconfigure.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/portconfigure.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/portconfigure.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -200,7 +200,7 @@
# internal function to determine the CFLAGS for the compiler
proc configure_get_universal_cflags {args} {
- global configure.universal_sysroot
+ global configure.universal_sysroot configure.universal_target
global os.platform os.arch os.version os.major
set flags [configure_get_universal_archflags]
# these flags should be valid for C/C++ and similar compiler frontends
@@ -216,7 +216,7 @@
# internal function to determine the LDFLAGS for the compiler
proc configure_get_universal_ldflags {args} {
- global configure.universal_sysroot configure.universal_target
+ global configure.universal_sysroot configure.universal_target
global os.platform os.arch os.version os.major
set flags [configure_get_universal_archflags]
# works around linking without using the CFLAGS, outside of automake
Copied: branches/variant-descs-14482/base/src/port1.0/portdistfiles.tcl (from rev 37503, trunk/base/src/port1.0/portdistfiles.tcl)
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/portdistfiles.tcl (rev 0)
+++ branches/variant-descs-14482/base/src/port1.0/portdistfiles.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -0,0 +1,94 @@
+# -*- 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
+# portdistfiles.tcl
+# $Id: portdistfiles.tcl $
+#
+# Copyright (c) 2008 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 Apple Computer, Inc. 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.
+#
+
+package provide portdistfiles 1.0
+package require portutil 1.0
+package require portfetch 1.0
+package require portchecksum 1.0
+
+set org.macports.distfiles [target_new org.macports.distfiles distfiles_main]
+target_runtype ${org.macports.distfiles} always
+target_state ${org.macports.distfiles} no
+target_provides ${org.macports.distfiles} distfiles
+target_requires ${org.macports.distfiles} main
+target_prerun ${org.macports.distfiles} distfiles_start
+
+set_ui_prefix
+
+proc distfiles_start {args} {
+ global UI_PREFIX portname
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Distfiles for %s"] ${portname}]"
+}
+
+proc distfiles_main {args} {
+ global UI_PREFIX master_sites fetch_urls url_var distfile checksums_array
+
+ # give up on ports that do not provide URLs
+ if {$master_sites == "{}"} {
+ return 0
+ }
+
+ # from portfetch... process the sites, files and patches
+ checkfiles
+
+ # get checksum data from the portfile and parse it
+ set checksums_str [option checksums]
+ set result [parse_checksums $checksums_str]
+
+ foreach {url_var distfile} $fetch_urls {
+
+ ui_msg "\[$distfile\]"
+
+ # print checksums if available
+ if {$result == "yes" && [array get checksums_array $distfile] != ""} {
+ foreach {type sum} $checksums_array($distfile) {
+ ui_msg " $type: $sum"
+ }
+ }
+
+ # determine sites to download from
+ global portfetch::$url_var
+ if {![info exists $url_var]} {
+ set url_var master_sites
+ global portfetch::$url_var
+ }
+
+ # determine URLs to download
+ foreach site [set $url_var] {
+ set file_url [portfetch::assemble_url $site $distfile]
+ ui_msg " $file_url"
+ }
+
+ ui_msg " "
+
+ }
+}
\ No newline at end of file
Modified: branches/variant-descs-14482/base/src/port1.0/portextract.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/portextract.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/portextract.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -58,7 +58,7 @@
set_ui_prefix
proc extract_init {args} {
- global extract.only extract.dir extract.cmd extract.pre_args extract.post_args extract.mkdir distfiles use_bzip2 use_zip workpath
+ global extract.only extract.dir extract.cmd extract.pre_args extract.post_args extract.mkdir distfiles use_bzip2 use_zip use_dmg workpath
# should the distfiles be extracted to worksrcpath instead?
if {[tbool extract.mkdir]} {
@@ -74,6 +74,14 @@
option extract.cmd [binaryInPath "unzip"]
option extract.pre_args -q
option extract.post_args "-d [option extract.dir]"
+ } elseif {[tbool use_dmg]} {
+ global worksrcdir
+ set dmg_tmp_dir [exec mktemp -d -q "/tmp/mports.XXXXXXXX"]
+ set dmg_mount ${dmg_tmp_dir}/${worksrcdir}
+ file mkdir ${dmg_mount}
+ option extract.cmd [binaryInPath "hdiutil"]
+ option extract.pre_args attach
+ option extract.post_args "-private -readonly -nobrowse -mountpoint ${dmg_mount} && [binaryInPath "cp"] -Rp ${dmg_mount} ${extract.dir} && ${extract.cmd} detach ${dmg_mount} && [binaryInPath "rmdir"] ${dmg_mount} ${dmg_tmp_dir}"
}
}
Modified: branches/variant-descs-14482/base/src/port1.0/portfetch.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/portfetch.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/portfetch.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -1,4 +1,4 @@
-# et:ts=4
+# -*- 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
# portfetch.tcl
# $Id$
#
@@ -41,11 +41,12 @@
target_prerun ${org.macports.fetch} fetch_start
# define options: distname master_sites
-options master_sites patch_sites extract.suffix distfiles patchfiles use_zip use_bzip2 dist_subdir \
+options master_sites patch_sites extract.suffix distfiles patchfiles use_zip use_bzip2 use_dmg dist_subdir \
fetch.type fetch.user fetch.password fetch.use_epsv fetch.ignore_sslcert \
master_sites.mirror_subdir patch_sites.mirror_subdir portname \
cvs.module cvs.root cvs.password cvs.date cvs.tag \
- svn.url svn.tag
+ svn.url svn.tag \
+ git.url git.branch
# XXX we use the command framework to buy us some useful features,
# but this is not a user-modifiable command
@@ -75,6 +76,9 @@
default svn.args ""
default svn.post_args {"${svn.url}"}
+default git.dir {${workpath}}
+default git.branch {}
+
# Set distfiles
default distfiles {[suffix $distname]}
default dist_subdir {${portname}}
@@ -86,14 +90,18 @@
default fetch.use_epsv "yes"
# Ignore SSL certificate
default fetch.ignore_sslcert "no"
+# Use remote timestamps
+default fetch.remote_time "no"
default fallback_mirror_site "macports"
+default global_mirror_site "macports_distfiles"
default mirror_sites.listfile {"mirror_sites.tcl"}
default mirror_sites.listpath {"${portresourcepath}/fetch/"}
# Option-executed procedures
option_proc use_bzip2 fix_extract_suffix
option_proc use_zip fix_extract_suffix
+option_proc use_dmg fix_extract_suffix
proc fix_extract_suffix {option action args} {
global extract.suffix
@@ -105,6 +113,9 @@
use_zip {
set extract.suffix .zip
}
+ use_dmg {
+ set extract.suffix .dmg
+ }
}
}
}
@@ -115,12 +126,13 @@
set_ui_prefix
-# Given a distname, return a suffix based on the use_zip / use_bzip2 / extract.suffix options
+# Given a distname, return a suffix based on the use_zip / use_bzip2 / use_dmg / extract.suffix options
proc suffix {distname} {
global extract.suffix fetch.type
switch -- "${fetch.type}" {
cvs -
- svn { return "" }
+ svn -
+ git { return "" }
standard -
default { return "${distname}${extract.suffix}" }
}
@@ -207,14 +219,14 @@
# sites
proc checksites {args} {
global patch_sites master_sites master_sites.mirror_subdir \
- patch_sites.mirror_subdir fallback_mirror_site env
+ patch_sites.mirror_subdir fallback_mirror_site global_mirror_site env
- append master_sites " ${fallback_mirror_site}"
+ append master_sites " ${global_mirror_site} ${fallback_mirror_site}"
if {[info exists env(MASTER_SITE_LOCAL)]} {
set master_sites [concat $env(MASTER_SITE_LOCAL) $master_sites]
}
- append patch_sites " ${fallback_mirror_site}"
+ append patch_sites " ${global_mirror_site} ${fallback_mirror_site}"
if {[info exists env(PATCH_SITE_LOCAL)]} {
set patch_sites [concat $env(PATCH_SITE_LOCAL) $patch_sites]
}
@@ -296,6 +308,75 @@
}
}
+# sorts fetch_urls in order of ping time
+proc sortsites {args} {
+ global fetch_urls fallback_mirror_site
+
+ set fallback_mirror_list [mirror_sites $fallback_mirror_site {} {}]
+
+ foreach {url_var distfile} $fetch_urls {
+ global portfetch::$url_var
+ if {![info exists $url_var]} {
+ ui_error [format [msgcat::mc "No defined site for tag: %s, using master_sites"] $url_var]
+ set url_var master_sites
+ global portfetch::$url_var
+ }
+ set urllist [set $url_var]
+ set hosts {}
+ set hostregex {[a-zA-Z]+://([a-zA-Z0-9\.\-_]+)}
+
+ if {[llength $urllist] - [llength $fallback_mirror_list] <= 1} {
+ # there is only one mirror, no need to ping or sort
+ continue
+ }
+
+ foreach site $urllist {
+ regexp $hostregex $site -> host
+
+ if { [info exists seen($host)] } {
+ continue
+ }
+ foreach fallback $fallback_mirror_list {
+ if {[string match [append fallback *] $site]} {
+ # don't bother pinging fallback mirrors
+ set seen($host) yes
+ # and make them sort to the very end of the list
+ set pingtimes($host) 20000
+ break
+ }
+ }
+ if { ![info exists seen($host)] } {
+ set seen($host) yes
+ lappend hosts $host
+ ui_debug "Pinging $host..."
+ set fds($host) [open "|ping -noq -c3 -t3 $host | grep round-trip | cut -d / -f 5"]
+ }
+ }
+
+ foreach host $hosts {
+ set len [gets $fds($host) pingtimes($host)]
+ if { [catch { close $fds($host) }] || ![string is double -strict $pingtimes($host)] } {
+ # ping failed, so put it last in the list (but before the fallback mirrors)
+ set pingtimes($host) 10000
+ }
+ ui_debug "$host ping time is $pingtimes($host)"
+ }
+
+ set pinglist {}
+ foreach site $urllist {
+ regexp $hostregex $site -> host
+ lappend pinglist [ list $site $pingtimes($host) ]
+ }
+
+ set pinglist [ lsort -real -index 1 $pinglist ]
+
+ set $url_var {}
+ foreach pair $pinglist {
+ lappend $url_var [lindex $pair 0]
+ }
+ }
+}
+
# Perform the full checksites/checkpatchfiles/checkdistfiles sequence.
# This method is used by distcheck target.
proc checkfiles {args} {
@@ -387,11 +468,57 @@
return 0
}
+# Perform a git fetch
+proc gitfetch {args} {
+ global worksrcpath prefix_frozen
+ global git.url git.branch git.sha1
+
+ # Look for the git command
+ set git.cmd {}
+ foreach gitcmd "$portutil::autoconf::git_path $prefix_frozen/bin/git git" {
+ if {[file executable $gitcmd]} {
+ set git.cmd $gitcmd
+ break
+ }
+ }
+ if {${git.cmd} == {}} {
+ ui_error "git is required to fetch ${git.url}"
+ ui_error "Please install the git-core port before proceeding."
+ return -code error [msgcat::mc "Git command not found"]
+ }
+
+ set options "-q"
+ if {[string length ${git.branch}] == 0} {
+ # if we're just using HEAD, we can make a shallow repo
+ set options "$options --depth=1"
+ }
+ set cmdstring "${git.cmd} clone $options ${git.url} ${worksrcpath} 2>&1"
+ ui_debug "Executing: $cmdstring"
+ if {[catch {system $cmdstring} result]} {
+ return -code error [msgcat::mc "Git clone failed"]
+ }
+
+ if {[string length ${git.branch}] > 0} {
+ set env "GIT_DIR=${worksrcpath}/.git GIT_WORK_TREE=${worksrcpath}"
+ set cmdstring "$env ${git.cmd} checkout -q ${git.branch} 2>&1"
+ ui_debug "Executing $cmdstring"
+ if {[catch {system $cmdstring} result]} {
+ return -code error [msgcat::mc "Git checkout failed"]
+ }
+ }
+
+ if {[info exists patchfiles]} {
+ return [fetchfiles]
+ }
+
+ return 0
+}
+
# Perform a standard fetch, assembling fetch urls from
# the listed url varable and associated distfile
proc fetchfiles {args} {
global distpath all_dist_files UI_PREFIX fetch_urls
- global fetch.user fetch.password fetch.use_epsv fetch.ignore_sslcert
+ global fetch.user fetch.password fetch.use_epsv fetch.ignore_sslcert fetch.remote_time
global distfile site
global portverbose
@@ -412,9 +539,13 @@
if {${fetch.ignore_sslcert} != "no"} {
lappend fetch_options "--ignore-ssl-cert"
}
+ if {${fetch.remote_time} != "no"} {
+ lappend fetch_options "--remote-time"
+ }
if {$portverbose == "yes"} {
lappend fetch_options "-v"
}
+ set sorted no
foreach {url_var distfile} $fetch_urls {
if {![file isfile $distpath/$distfile]} {
@@ -422,6 +553,10 @@
if {![file writable $distpath]} {
return -code error [format [msgcat::mc "%s must be writable"] $distpath]
}
+ if {!$sorted} {
+ sortsites
+ set sorted yes
+ }
global portfetch::$url_var
if {![info exists $url_var]} {
ui_error [format [msgcat::mc "No defined site for tag: %s, using master_sites"] $url_var]
@@ -490,10 +625,11 @@
# Initialize fetch target and call checkfiles.
proc fetch_init {args} {
- global distfiles distname distpath all_dist_files dist_subdir fetch.type
+ global distfiles distname distpath all_dist_files dist_subdir fetch.type fetch_init_done
- if {[info exist distpath] && [info exists dist_subdir]} {
- set distpath ${distpath}/${dist_subdir}
+ if {[info exists distpath] && [info exists dist_subdir] && ![info exists fetch_init_done]} {
+ set distpath ${distpath}/${dist_subdir}
+ set fetch_init_done yes
}
checkfiles
}
@@ -520,6 +656,7 @@
switch -- "${fetch.type}" {
cvs { return [cvsfetch] }
svn { return [svnfetch] }
+ git { return [gitfetch] }
standard -
default { return [fetchfiles] }
}
Modified: branches/variant-descs-14482/base/src/port1.0/portinstall.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/portinstall.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/portinstall.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -48,7 +48,7 @@
proc install_start {args} {
global UI_PREFIX portname portversion portrevision variations portvariants
- ui_msg "$UI_PREFIX [format [msgcat::mc "Installing %s %s_%s%s"] $portname $portversion $portrevision $portvariants]"
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Installing %s @%s_%s%s"] $portname $portversion $portrevision $portvariants]"
}
proc install_element {src_element dst_element} {
Modified: branches/variant-descs-14482/base/src/port1.0/portlivecheck.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/portlivecheck.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/portlivecheck.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -187,7 +187,7 @@
while {[gets $chan line] >= 0} {
if {[regexp $the_re $line matched upver]} {
set foundmatch 1
- if {[rpm-vercomp $upver $updated_version] > 0} {
+ if {$updated_version == 0 || [rpm-vercomp $upver $updated_version] > 0} {
set updated_version $upver
}
ui_debug "The regex matched \"$matched\", extracted \"$upver\""
Modified: branches/variant-descs-14482/base/src/port1.0/portmain.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/portmain.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/portmain.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -44,6 +44,7 @@
options prefix name version revision epoch categories maintainers
options long_description description homepage
options worksrcdir filesdir distname portdbpath libpath distpath sources_conf os.platform os.version os.major os.arch os.endian platforms default_variants install.user install.group macosx_deployment_target
+options universal_variant os.universal_supported
# Export options via PortInfo
options_export name version revision epoch categories maintainers platforms description long_description homepage
@@ -58,6 +59,8 @@
default worksymlink {[file join $portpath work]}
default prefix /opt/local
default x11prefix /usr/X11R6
+default applications_dir /Applications/MacPorts
+default frameworks_dir /Library/Frameworks
default destdir destroot
default destpath {${workpath}/${destdir}}
# destroot is provided as a clearer name for the "destpath" variable
@@ -94,6 +97,7 @@
default os.arch {$os_arch}
# Remove trailing "Endian"
default os.endian {[string range $tcl_platform(byteOrder) 0 end-6]}
+default os.universal_supported no
set macosx_version {}
if {$os_platform == "darwin"} {
@@ -103,26 +107,18 @@
default macosx_deployment_target {$macosx_version}
+default universal_variant yes
+
# Select implicit variants
if {[info exists os.platform] && ![info exists variations(${os.platform})]} { variant_set ${os.platform}}
if {[info exists os.arch] && ![info exists variations(${os.arch})]} { variant_set ${os.arch} }
if {[info exists os.platform] && (${os.platform} == "darwin") && ![file isdirectory /System/Library/Frameworks/Carbon.framework] && ![info exists variations(puredarwin)]} { variant_set puredarwin }
if {[info exists os.platform] && (${os.platform} == "darwin") && [file isdirectory /System/Library/Frameworks/Carbon.framework] && ![info exists variations(macosx)]} { variant_set macosx }
if {[info exists variations(macosx)] && $variations(macosx) == "+"} {
- # Declare default universal variant, on >10.3
- variant universal {
- if {[tbool use_xmkmf] || ![tbool use_configure]} {
- return -code error "Default universal variant only works with ports based on configure"
- }
- eval configure.args-append ${configure.universal_args}
- if {![file exists ${configure.universal_sysroot}]} {
- return -code error "Universal SDK is not installed (are we running on 10.3? did you forget to install it?) and building with +universal will very likely fail"
- }
- eval configure.cflags-append ${configure.universal_cflags}
- eval configure.cppflags-append ${configure.universal_cppflags}
- eval configure.cxxflags-append ${configure.universal_cxxflags}
- eval configure.ldflags-append ${configure.universal_ldflags}
- }
+ # the universal variant itself is now created in
+ # add_default_universal_variant, which is called from mportopen
+ option os.universal_supported yes
+
if {[info exists variations(universal)] && $variations(universal) == "+"} {
# cannot go into the variant, due to the amount of ports overriding it
global configure.universal_target
@@ -130,20 +126,6 @@
eval macosx_deployment_target ${configure.universal_target}
}
}
-
- # This is not a standard option, because we need to take an action when it's
- # set, in order to alter the PortInfo structure in time.
- proc universal_variant {state} {
- if {${state} == "no"} {
- variant_undef universal
- }
- }
-} else {
- proc universal_variant {state} {
- if {${state} != "no"} {
- ui_error "+universal is only available on +macosx"
- }
- }
}
proc main {args} {
Modified: branches/variant-descs-14482/base/src/port1.0/portutil.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/portutil.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/portutil.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -356,6 +356,7 @@
# Restore the environment.
array unset env *
+ unsetenv *
array set env [array get saved_env]
# Return as if system had been called directly.
@@ -804,6 +805,10 @@
set cmdline $portutil::autoconf::sed_command
if {$extended} {
+ if {$portutil::autoconf::sed_ext_flag == "N/A"} {
+ ui_debug "sed extended regexp not available"
+ return -code error "reinplace sed(1) too old"
+ }
lappend cmdline $portutil::autoconf::sed_ext_flag
}
set cmdline [concat $cmdline [list $pattern < $file >@ $tmpfd]]
@@ -1234,19 +1239,20 @@
# Determine deptypes to look for based on target
switch $target {
- configure { set deptypes "depends_lib depends_build" }
-
+ configure -
build { set deptypes "depends_lib depends_build" }
test -
destroot -
install -
archive -
+ dmg -
pkg -
mpkg -
rpm -
srpm -
dpkg -
+ mdmg -
activate -
"" { set deptypes "depends_lib depends_build depends_run" }
}
@@ -1266,16 +1272,18 @@
set dep_portname [lindex [split $depspec :] end]
lappend depsPorts $dep_portname
}
+
+ # always allow gzip in destroot as it is used to compress man pages
+ if {$target == "destroot"} {
+ lappend depsPorts "gzip"
+ }
set portlist $depsPorts
foreach depName $depsPorts {
- set portlist [concat $portlist [recursive_collect_deps $depName $deptypes]]
+ set portlist [recursive_collect_deps $depName $deptypes $portlist]
}
- #uniquer from http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/147663
- array set a [split "[join $portlist {::}]:" {:}]
- set depsPorts [array names a]
- if {[llength $deptypes] > 0} {tracelib setdeps $depsPorts}
+ if {[llength $deptypes] > 0} {tracelib setdeps $portlist}
}
}
@@ -1347,9 +1355,8 @@
return $result
}
-# recursive found depends for portname
-# It isn't ideal, because it scan many ports multiple time
-proc recursive_collect_deps {portname deptypes} \
+# recursive dependency search for portname
+proc recursive_collect_deps {portname deptypes {depsfound {}}} \
{
set res [mport_search ^$portname\$]
if {[llength $res] < 2} \
@@ -1367,13 +1374,15 @@
set depends [concat $depends $portinfo($deptype)]
}
}
-
- set portdeps {}
+
+ set portdeps $depsfound
foreach depspec $depends \
{
set portname [lindex [split $depspec :] end]
- lappend portdeps $portname
- set portdeps [concat $portdeps [recursive_collect_deps $portname $deptypes]]
+ if {[lsearch -exact $portdeps $portname] == -1} {
+ lappend portdeps $portname
+ set portdeps [recursive_collect_deps $portname $deptypes $portdeps]
+ }
}
return $portdeps
}
@@ -1695,6 +1704,46 @@
return $result
}
+proc default_universal_variant_allowed {args} {
+
+ if {[variant_exists universal]} {
+ ui_debug "universal variant already exists, so not adding the default one"
+ return no
+ } elseif {[exists universal_variant] && ![option universal_variant]} {
+ ui_debug "'universal_variant no' specified, so not adding the default universal variant"
+ return no
+ } elseif {[exists use_xmkmf] && [option use_xmkmf]} {
+ ui_debug "using xmkmf, so not adding the default universal variant"
+ return no
+ } elseif {[exists use_configure] && ![option use_configure]} {
+ ui_debug "not using configure, so not adding the default universal variant"
+ return no
+ } elseif {![exists os.universal_supported] || ![option os.universal_supported]} {
+ ui_debug "OS doesn't support universal builds, so not adding the default universal variant"
+ return no
+ } else {
+ ui_debug "adding the default universal variant"
+ return yes
+ }
+}
+
+proc add_default_universal_variant {args} {
+ # Declare default universal variant if universal SDK is installed
+ variant universal description {Build for multiple architectures} {
+ pre-fetch {
+ if {![file exists ${configure.universal_sysroot}]} {
+ return -code error "Universal SDK is not installed (are we running on 10.3? did you forget to install it?) and building with +universal will very likely fail"
+ }
+ }
+
+ eval configure.args-append ${configure.universal_args}
+ eval configure.cflags-append ${configure.universal_cflags}
+ eval configure.cppflags-append ${configure.universal_cppflags}
+ eval configure.cxxflags-append ${configure.universal_cxxflags}
+ eval configure.ldflags-append ${configure.universal_ldflags}
+ }
+}
+
# Target class definition.
# constructor for target object
@@ -2101,12 +2150,12 @@
# 'base' is the path where the different directories (one for each arch) are
# e.g. call 'merge ${workpath}/pre-dest' with having a destroot in ${workpath}/pre-dest/i386 and ${workpath}/pre-dest/ppc64 -- single arch -- each
proc merge {base} {
- global destroot
+ global destroot configure.universal_archs
# test which architectures are available, set one as base-architecture
set archs ""
set base_arch ""
- foreach arch {"i386" "x86_64" "ppc" "ppc64"} {
+ foreach arch ${configure.universal_archs} {
if [file exists "${base}/${arch}"] {
set archs [concat ${archs} ${arch}]
set base_arch ${arch}
Modified: branches/variant-descs-14482/base/src/port1.0/resources/fetch/mirror_sites.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/resources/fetch/mirror_sites.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/resources/fetch/mirror_sites.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -13,44 +13,71 @@
namespace eval portfetch::mirror_sites { }
set portfetch::mirror_sites::sites(afterstep) {
- ftp://ftp.afterstep.org/
ftp://ftp.kddlabs.co.jp/X11/AfterStep/
ftp://ftp.chg.ru/pub/X11/windowmanagers/afterstep/
+ ftp://ftp.dti.ad.jp/pub/X/AfterStep/
+ ftp://ftp.planetmirror.com/pub/afterstep/
+ ftp://ftp.afterstep.org/
}
set portfetch::mirror_sites::sites(apache) {
+ http://www.ibiblio.org/pub/mirrors/apache/
+ http://www.gtlib.gatech.edu/pub/apache/
+ http://apache.mirror.rafal.ca/
+ http://apache.mirroring.de/
+ ftp://ftp.planetmirror.com/pub/apache/dist/
+ ftp://ftp.infoscience.co.jp/pub/net/apache/dist/
+ http://apache.multidist.com/
+ http://mirror.internode.on.net/pub/apache/
+ http://mirror.pacific.net.au/pub1/apache-dist/
+ http://apache.wildit.net.au/
+ ftp://ftp.pop-mg.com.br/data/apache/dist/
+ http://www.mirrorservice.org/sites/ftp.apache.org/
+ http://mirror.aarnet.edu.au/pub/apache/
+ http://apache.adcserver.com.ar/
+ http://apache.mirror.phpchina.com/
+ http://apache-mirror.dkuug.dk/
+ http://apache.digimirror.nl/
+ http://apache.rediska.ru/
+ http://apache.is.co.za/
http://www.apache.org/dist/
http://archive.apache.org/dist/
- http://apache.planetmirror.com.au/dist/
- ftp://ftp.planetmirror.com/pub/apache/dist/
- ftp://ftp.is.co.za/Apache/dist/
- ftp://ftp.infoscience.co.jp/pub/net/apache/dist/
}
set portfetch::mirror_sites::sites(freebsd) {
- ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/:nosubdir
- ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/:nosubdir
+ ftp://ftp5.freebsd.org/pub/FreeBSD/ports/distfiles/:nosubdir
+ ftp://ftp5.freebsd.org/pub/FreeBSD/ports/local-distfiles/:nosubdir
ftp://ftp.uk.FreeBSD.org/pub/FreeBSD/ports/distfiles/:nosubdir
ftp://ftp.uk.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/:nosubdir
ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/ports/distfiles/:nosubdir
ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/:nosubdir
ftp://ftp.tw.FreeBSD.org/pub/FreeBSD/ports/distfiles/:nosubdir
ftp://ftp.tw.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/:nosubdir
+ ftp://ftp.ru.FreeBSD.org/pub/FreeBSD/ports/distfiles/:nosubdir
+ ftp://ftp.ru.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/:nosubdir
+ ftp://ftp.se.FreeBSD.org/pub/FreeBSD/ports/distfiles/:nosubdir
+ ftp://ftp.se.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/:nosubdir
+ http://mirror.aarnet.edu.au/pub/FreeBSD/ports/distfiles/:nosubdir
+ http://mirror.aarnet.edu.au/pub/FreeBSD/ports/local-distfiles/:nosubdir
+ ftp://ftp.planetmirror.com/pub/freebsd/ports/distfiles/:nosubdir
+ ftp://ftp.planetmirror.com/pub/freebsd/ports/local-distfiles/:nosubdir
+ http://www.mirrorservice.org/sites/ftp.freebsd.org/pub/FreeBSD/ports/distfiles/:nosubdir
+ http://www.mirrorservice.org/sites/ftp.freebsd.org/pub/FreeBSD/ports/local-distfiles/:nosubdir
+ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/:nosubdir
+ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/:nosubdir
}
set portfetch::mirror_sites::sites(gnome) {
- http://mandril.creatis.insa-lyon.fr/linux/gnome.org/
+ ftp://ftp.cse.buffalo.edu/pub/Gnome/
+ http://www.gtlib.cc.gatech.edu/pub/gnome/
+ http://www.mirrorservice.org/sites/ftp.gnome.org/pub/GNOME/
+ http://fr2.rpmfind.net/linux/gnome.org/
http://mirror.aarnet.edu.au/pub/GNOME/
http://ftp.unina.it/pub/linux/GNOME/
- http://fr.rpmfind.net/linux/gnome.org/
- http://fr2.rpmfind.net/linux/gnome.org/
http://ftp.acc.umu.se/pub/GNOME/
http://ftp.belnet.be/mirror/ftp.gnome.org/
http://ftp.linux.org.uk/mirrors/ftp.gnome.org/
http://ftp.nara.wide.ad.jp/pub/X11/GNOME/
- http://ftp.gnome.org/pub/GNOME/
- ftp://mirror.pacific.net.au/linux/GNOME
- ftp://ftp.dataplus.se/pub/GNOME/
ftp://ftp.dit.upm.es/pub/GNOME/
ftp://ftp.no.gnome.org/pub/GNOME/
ftp://ftp.isu.edu.tw/pub/Unix/Desktop/GNOME/
@@ -58,33 +85,47 @@
ftp://ftp.chg.ru/pub/X11/gnome/
ftp://ftp.kddlabs.co.jp/pub/GNOME/
ftp://ftp.dti.ad.jp/pub/X/gnome/
+ http://mirror.internode.on.net/pub/gnome/
+ ftp://ftp.planetmirror.com/pub/gnome/
+ http://ftp.gnome.org/pub/GNOME/
}
set portfetch::mirror_sites::sites(gnu) {
- http://ftp.gnu.org/gnu/
- ftp://ftp.gnu.org/gnu/
+ http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/
+ http://mirrors.kernel.org/gnu/
+ http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/
ftp://ftp.uu.net/archive/systems/gnu/
ftp://ftp.funet.fi/pub/gnu/prep/
- ftp://ftp.kddlabs.co.jp/pub/gnu/
+ ftp://ftp.kddlabs.co.jp/pub/gnu/gnu/
+ ftp://ftp.kddlabs.co.jp/pub/gnu/old-gnu/
ftp://ftp.dti.ad.jp/pub/GNU/
ftp://ftp.informatik.hu-berlin.de/pub/gnu/
ftp://ftp.lip6.fr/pub/gnu/
ftp://ftp.chg.ru/pub/gnu/
- ftp://ftp.mirror.ac.uk/sites/ftp.gnu.org/gnu/
+ http://mirror.internode.on.net/pub/gnu/
+ http://mirror.pacific.net.au/pub1/gnu/gnu/
+ http://mirror.aarnet.edu.au/pub/GNU/
+ ftp://ftp.unicamp.br/pub/gnu/
+ http://gnu.glug-nith.org/
+ ftp://ftp.gnu.org/gnu/
+ http://ftp.gnu.org/gnu/
ftp://ftp.gnu.org/old-gnu/
}
set portfetch::mirror_sites::sites(gnupg) {
- http://ftp.gnupg.org/gcrypt/
http://mirrors.rootmode.com/ftp.gnupg.org/
+ http://gulus.USherbrooke.ca/pub/appl/GnuPG/
+ http://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/
http://ftp.freenet.de/pub/ftp.gnupg.org/gcrypt/
+ ftp://ftp.planetmirror.com/pub/gcrypt/
+ http://www.ring.gr.jp/pub/net/gnupg/
ftp://ftp.gnupg.org/gcrypt/
+ http://ftp.gnupg.org/gcrypt/
}
set portfetch::mirror_sites::sites(gnustep) {
- http://ftp.easynet.nl/mirror/GNUstep/pub/gnustep/
+ ftp://ftp.planetmirror.com/pub/gnustep/gnustep/
http://ftpmain.gnustep.org/pub/gnustep/
- ftp://ftp.easynet.nl/mirror/GNUstep/pub/gnustep/
ftp://ftp.gnustep.org/pub/gnustep/
}
@@ -93,7 +134,10 @@
}
set portfetch::mirror_sites::sites(isc) {
- ftp://ftp.isc.org/isc/
+ ftp://ftp.epix.net/pub/isc/
+ ftp://ftp.nominum.com/pub/isc/
+ http://mirrors.24-7-solutions.net/pub/isc/
+ http://www.mirrorservice.org/sites/ftp.isc.org/isc/
ftp://gd.tuwien.ac.at/infosys/servers/isc/
ftp://ftp.ciril.fr/pub/isc/
ftp://ftp.grolier.fr/pub/isc/
@@ -104,24 +148,29 @@
ftp://ftp.dti.ad.jp/pub/net/isc/
ftp://ftp.task.gda.pl/mirror/ftp.isc.org/isc/
ftp://ftp.sunet.se/pub/network/isc/
- ftp://ftp.epix.net/pub/isc/
- ftp://ftp.nominum.com/pub/isc/
ftp://ftp.ripe.net/mirrors/sites/ftp.isc.org/isc/
- ftp://ftp.pop-mg.com.br/pub/isc/
ftp://ftp.ntua.gr/pub/net/isc/isc/
ftp://ftp.metu.edu.tr/pub/mirrors/ftp.isc.org/
+ http://mirror.internode.on.net/pub/isc/
+ ftp://ftp.planetmirror.com/pub/isc/
+ ftp://ftp.isc.org/isc/
}
set portfetch::mirror_sites::sites(kde) {
+ http://ibiblio.org/pub/mirrors/kde/
http://kde.mirrors.hoobly.com/
+ http://ftp.gtlib.cc.gatech.edu/pub/kde/
+ http://www.mirrorservice.org/sites/ftp.kde.org/pub/kde/
http://gd.tuwien.ac.at/kde/
http://mirrors.isc.org/pub/kde/
- http://ftp.gtlib.cc.gatech.edu/pub/kde/
- http://ftp.du.se/pub/mirrors/kde/
- http://kde.mirrors.tds.net/pub/kde
- http://ftp.caliu.info/pub/mirrors/kde
+ http://kde.mirrors.tds.net/pub/kde/
ftp://ftp.oregonstate.edu/pub/kde/
ftp://ftp.solnet.ch/mirror/KDE/
+ http://mirror.internode.on.net/pub/kde/
+ http://mirror.aarnet.edu.au/pub/kde/
+ ftp://ftp.planetmirror.com/pub/kde/
+ http://ftp.chg.ru/pub/kde/
+ http://ftp.kddlabs.co.jp/pub/X11/kde/
ftp://ftp.kde.org/pub/kde/
}
@@ -131,36 +180,80 @@
http://svn.macports.org/repository/macports/downloads/
}
+set portfetch::mirror_sites::sites(macports_distfiles) {
+ http://distfiles.macports.org/:mirror
+}
+
+set portfetch::mirror_sites::sites(openbsd) {
+ http://mirror.roothell.org/pub/OpenBSD/
+ http://www.mirrorservice.org/sites/ftp.openbsd.org/pub/OpenBSD/
+ http://ftp-stud.fht-esslingen.de/pub/OpenBSD/
+ ftp://carroll.cac.psu.edu/pub/OpenBSD/
+ ftp://openbsd.informatik.uni-erlangen.de/pub/OpenBSD/
+ ftp://gd.tuwien.ac.at/opsys/OpenBSD/
+ ftp://ftp.stacken.kth.se/pub/OpenBSD/
+ ftp://ftp3.usa.openbsd.org/pub/OpenBSD/
+ ftp://ftp5.usa.openbsd.org/pub/OpenBSD/
+ ftp://rt.fm/pub/OpenBSD/
+ ftp://ftp.openbsd.md5.com.ar/pub/OpenBSD/
+ ftp://ftp.jp.openbsd.org/pub/OpenBSD/
+ http://mirror.internode.on.net/pub/OpenBSD/
+ http://mirror.aarnet.edu.au/pub/OpenBSD/
+ ftp://ftp.planetmirror.com/pub/OpenBSD/
+ ftp://ftp.chg.ru/pub/OpenBSD/
+ ftp://ftp.openbsd.org/pub/OpenBSD/
+}
+
set portfetch::mirror_sites::sites(perl_cpan) {
+ http://mirrors.ibiblio.org/pub/mirrors/CPAN/modules/by-module/
+ http://www.mirrorservice.org/sites/ftp.cpan.org/pub/CPAN/modules/by-module/
http://ftp.ucr.ac.cr/Unix/CPAN/modules/by-module/
ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module/
- ftp://ftp.cpan.org/pub/CPAN/modules/by-module/
ftp://ftp.kddlabs.co.jp/lang/perl/CPAN/modules/by-module/
ftp://ftp.sunet.se/pub/lang/perl/CPAN/modules/by-module/
ftp://mirror.hiwaay.net/CPAN/modules/by-module/
- ftp://ftp.bora.net/pub/CPAN/modules/by-module/
- ftp://ftp.mirror.ac.uk/sites/ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module/
ftp://csociety-ftp.ecn.purdue.edu/pub/CPAN/modules/by-module/
ftp://ftp.auckland.ac.nz/pub/perl/CPAN/modules/by-module/
ftp://ftp.cs.colorado.edu/pub/perl/CPAN/modules/by-module/
ftp://cpan.pop-mg.com.br/pub/CPAN/modules/by-module/
ftp://ftp.is.co.za/programming/perl/CPAN/modules/by-module/
- ftp://sunsite.org.uk/packages/perl/CPAN/modules/by-module/
ftp://ftp.chg.ru/pub/lang/perl/CPAN/modules/by-module/
+ http://mirror.internode.on.net/pub/cpan/modules/by-module/
+ http://cpan.mirrors.ilisys.com.au/modules/by-module/
+ http://mirror.aarnet.edu.au/pub/CPAN/modules/by-module/
+ ftp://ftp.planetmirror.com/pub/cpan/modules/by-module/
+ ftp://ftp.cpan.org/pub/CPAN/modules/by-module/
}
+set portfetch::mirror_sites::sites(postgresql) {
+ http://ftp8.us.postgresql.org/postgresql/
+ http://ftp9.us.postgresql.org/pub/mirrors/postgresql/
+ http://www.mirrorservice.org/sites/ftp.postgresql.org/
+ http://ftp7.de.postgresql.org/ftp.postgresql.org/
+ http://ftp2.jp.postgresql.org/pub/postgresql/
+ ftp://ftp2.ch.postgresql.org/pub/mirrors/postgresql
+ ftp://ftp.de.postgresql.org/mirror/postgresql/
+ ftp://ftp.fr.postgresql.org/
+ http://mirror.aarnet.edu.au/pub/postgresql/
+ ftp://ftp.au.postgresql.org/pub/postgresql/
+ ftp://ftp.ru.postgresql.org/pub/unix/database/pgsql/
+ ftp://ftp.postgresql.org/pub/
+}
+
set portfetch::mirror_sites::sites(ruby) {
http://www.ibiblio.org/pub/languages/ruby/
+ http://www.mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby/
http://mirrors.sunsite.dk/ruby/
ftp://xyz.lcs.mit.edu/pub/ruby/
ftp://ftp.iij.ad.jp/pub/lang/ruby/
- ftp://ftp.ruby-lang.org/pub/ruby/
ftp://ftp.fu-berlin.de/unix/languages/ruby/
ftp://ftp.easynet.be/ruby/ruby/
ftp://ftp.ntua.gr/pub/lang/ruby/
ftp://ftp.chg.ru/pub/lang/ruby/
ftp://ftp.kr.FreeBSD.org/pub/ruby/
ftp://ftp.iDaemons.org/pub/mirror/ftp.ruby-lang.org/ruby/
+ ftp://ftp.planetmirror.com/pub/ruby/
+ ftp://ftp.ruby-lang.org/pub/ruby/
}
set portfetch::mirror_sites::sites(sourceforge) {
@@ -169,6 +262,15 @@
http://ufpr.dl.sourceforge.net/
http://kent.dl.sourceforge.net/
http://jaist.dl.sourceforge.net/
+ http://optusnet.dl.sourceforge.net/
+ http://nchc.dl.sourceforge.net/
+ http://switch.dl.sourceforge.net/
+ http://puzzle.dl.sourceforge.net/
+ http://garr.dl.sourceforge.net/
+ http://surfnet.dl.sourceforge.net/
+ http://internap.dl.sourceforge.net/
+ http://superb-east.dl.sourceforge.net/
+ http://superb-west.dl.sourceforge.net/
}
set portfetch::mirror_sites::sites(sourceforge_jp) {
@@ -181,31 +283,62 @@
set portfetch::mirror_sites::sites(sunsite) {
http://www.ibiblio.org/pub/Linux/
+ http://www.gtlib.cc.gatech.edu/pub/Linux/
ftp://ftp.unicamp.br/pub/systems/Linux/
ftp://ftp.tuwien.ac.at/pub/linux/ibiblio/
ftp://ftp.cs.tu-berlin.de/pub/linux/Mirrors/sunsite.unc.edu/
ftp://ftp.lip6.fr/pub/linux/sunsite/
ftp://ftp.nvg.ntnu.no/pub/mirrors/metalab.unc.edu/
- ftp://ftp.icm.edu.pl/vol/rzm1/linux-sunsite/
+ ftp://ftp.icm.edu.pl/vol/rzm1/linux-ibiblio/
ftp://ftp.cse.cuhk.edu.hk/pub4/Linux/
ftp://ftp.kddlabs.co.jp/Linux/metalab.unc.edu/
ftp://ftp.chg.ru/pub/Linux/sunsite/
+ ftp://ftp.planetmirror.com/pub/ibiblio/
}
set portfetch::mirror_sites::sites(tcltk) {
+ http://www.mirrorservice.org/sites/ftp.tcl.tk/pub/tcl/
+ ftp://mirror.switch.ch/mirror/tcl.tk/
+ ftp://ftp.informatik.uni-hamburg.de/pub/soft/lang/tcl/
ftp://ftp.funet.fi/pub/languages/tcl/tcl/
ftp://ftp.kddlabs.co.jp/lang/tcl/ftp.scriptics.com/
+ http://www.etsimo.uniovi.es/pub/mirrors/ftp.scriptics.com/
+ http://ftp.chg.ru/pub/lang/tcl/
+ ftp://ftp.tcl.tk/pub/tcl/
}
+set portfetch::mirror_sites::sites(tex_ctan) {
+ http://mirrors.ibiblio.org/pub/mirrors/CTAN/
+ http://ctan.math.utah.edu/ctan/tex-archive/
+ ftp://ftp.funet.fi/pub/TeX/CTAN/
+ http://mirror.internode.on.net/pub/ctan/
+ ftp://ctan.unsw.edu.au/tex-archive/
+ http://mirror.aarnet.edu.au/pub/CTAN/
+ ftp://ftp.kddlabs.co.jp/CTAN/
+ ftp://ftp.chg.ru/pub/TeX/CTAN/
+ ftp://mirror.macomnet.net/pub/CTAN/
+ http://ftp.sun.ac.za/ftp/CTAN/
+ http://ftp.inf.utfsm.cl/pub/tex-archive/
+ http://ftp.das.ufsc.br/pub/ctan/
+ ftp://ftp.tex.ac.uk/tex-archive/
+ ftp://ftp.dante.de/tex-archive/
+ ftp://ctan.tug.org/tex-archive/
+}
+
set portfetch::mirror_sites::sites(xcontrib) {
ftp://ftp.net.ohio-state.edu/pub/X11/contrib/
+ http://www.mirrorservice.org/sites/ftp.x.org/contrib/
ftp://ftp.gwdg.de/pub/x11/x.org/contrib/
+ http://mirror.aarnet.edu.au/pub/X11/contrib/
+ ftp://ftp.planetmirror.com/pub/x11/contrib/
+ ftp://ftp.chg.ru/pub/X11/x.org/contrib/
+ ftp://ftp2.x.org/contrib/
ftp://ftp.x.org/contrib/
- ftp://ftp2.x.org/contrib/
- ftp://ftp.mirror.ac.uk/sites/ftp.x.org/contrib/
}
set portfetch::mirror_sites::sites(xfree) {
+ http://www.gtlib.cc.gatech.edu/pub/XFree86/
+ http://www.mirrorservice.org/sites/ftp.xfree86.org/pub/XFree86/
http://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.xfree86.org/XFree86/
ftp://ftp.fit.vutbr.cz/pub/XFree86/
ftp://mir1.ovh.net/ftp.xfree86.org/
@@ -213,36 +346,27 @@
ftp://ftp.rediris.es/mirror/XFree86/
ftp://ftp.esat.net/pub/X11/XFree86/
ftp://sunsite.uio.no/pub/XFree86/
- ftp://ftp.task.gda.pl/pub/XFree86/
ftp://ftp.physics.uvt.ro/pub/XFree86/
ftp://ftp.chg.ru/pub/XFree86/
+ http://mirror.aarnet.edu.au/pub/XFree86/
+ ftp://ftp.planetmirror.com/pub/xfree86/
ftp://ftp.xfree86.org/pub/XFree86/
}
-set portfetch::mirror_sites::sites(openbsd) {
- http://mirror.roothell.org/pub/OpenBSD/
- http://ftp-stud.fht-esslingen.de/pub/OpenBSD/
- http://mirror.paranoidbsd.org/pub/OpenBSD/
- ftp://ftp.openbsd.org/pub/OpenBSD/
- ftp://ftp.jp.openbsd.org/pub/OpenBSD/
- ftp://carroll.cac.psu.edu/pub/OpenBSD/
- ftp://openbsd.informatik.uni-erlangen.de/pub/OpenBSD/
- ftp://gd.tuwien.ac.at/opsys/OpenBSD/
- ftp://ftp.stacken.kth.se/pub/OpenBSD/
- ftp://ftp3.usa.openbsd.org/pub/OpenBSD/
- ftp://ftp5.usa.openbsd.org/pub/OpenBSD/
- ftp://rt.fm/pub/OpenBSD/
- ftp://ftp.openbsd.md5.com.ar/pub/OpenBSD/
+set portfetch::mirror_sites::sites(xorg) {
+ http://x.paracoda.com/pub/
+ http://www.mirrorservice.org/sites/ftp.x.org/pub/
+ ftp://ftp.gwdg.de/pub/x11/x.org/pub/
+ ftp://ftp.cs.cuhk.edu.hk/pub/X11/
+ http://ftp.nara.wide.ad.jp/pub/X11/x.org/pub/
+ http://www.qtopia.org.cn/ftp/mirror/ftp.x.org/pub/
+ ftp://ftp.cica.es/pub/X/pub/
+ ftp://ftp.ntua.gr/pub/X11/X.org/
+ ftp://ftp.task.gda.pl/mirror/ftp.x.org/pub/
+ ftp://ftp.sunet.se/pub/X11/ftp.x.org/
+ ftp://sunsite.uio.no/pub/X11/
+ ftp://ftp.chg.ru/pub/X11/x.org/pub/
+ ftp://ftp.is.co.za/pub/x.org/pub/
+ http://xorg.freedesktop.org/releases/
+ ftp://ftp.x.org/pub/
}
-
-set portfetch::mirror_sites::sites(postgresql) {
- http://ftp8.us.postgresql.org/postgresql/
- http://ftp9.us.postgresql.org/pub/mirrors/postgresql/
- http://ftp7.de.postgresql.org/pub/ftp.postgresql.org/
- http://ftp2.jp.postgresql.org/pub/postgresql/
- ftp://ftp2.ch.postgresql.org/mirror/postgresql/
- ftp://ftp.postgresql.org/pub/
- ftp://ftp.de.postgresql.org/mirror/postgresql/
- ftp://ftp.fr.postgresql.org/
- ftp://ftp2.uk.postgresql.org/
-}
Modified: branches/variant-descs-14482/base/src/port1.0/resources/group/python24-1.0.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/resources/group/python24-1.0.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/resources/group/python24-1.0.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -34,8 +34,9 @@
set python.bin ${prefix}/bin/python2.4
set python.lib ${prefix}/lib/libpython2.4.dylib
+set python.libdir ${prefix}/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
set python.pkgd ${prefix}/lib/python2.4/site-packages
-set python.include ${prefix}/include/python/2.4
+set python.include ${prefix}/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4
categories python
Modified: branches/variant-descs-14482/base/src/port1.0/resources/group/python25-1.0.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/resources/group/python25-1.0.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/resources/group/python25-1.0.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -34,8 +34,9 @@
set python.bin ${prefix}/bin/python2.5
set python.lib ${prefix}/lib/libpython2.5.dylib
+set python.libdir ${prefix}/lib/python2.5
set python.pkgd ${prefix}/lib/python2.5/site-packages
-set python.include ${prefix}/include/python/2.5
+set python.include ${prefix}/include/python2.5
categories python
Modified: branches/variant-descs-14482/base/src/port1.0/resources/group/python30-1.0.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/resources/group/python30-1.0.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/resources/group/python30-1.0.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -36,8 +36,9 @@
set python.bin ${prefix}/bin/python3.0
set python.lib ${prefix}/lib/libpython3.0.dylib
+set python.libdir ${prefix}/lib/python3.0
set python.pkgd ${prefix}/lib/python3.0/site-packages
-set python.include ${prefix}/include/python/3.0
+set python.include ${prefix}/include/python3.0
categories python
Modified: branches/variant-descs-14482/base/src/port1.0/resources/group/ruby-1.0.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/resources/group/ruby-1.0.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/resources/group/ruby-1.0.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -180,16 +180,19 @@
build {}
destroot {
- _cd ${worksrcpath}/${ruby.srcdir}
+ set root ${worksrcpath}/${ruby.srcdir}
xinstall -d -m 0755 ${destroot}${ruby.lib}
- foreach dir [exec find . -type d] {
- set dir [strsed ${dir} {s|^[.]/||}]
- xinstall -d -m 0755 ${destroot}${ruby.lib}/${dir}
+ fs-traverse file $root {
+ set file [trimroot $root $file]
+ if {$file ne ""} {
+ set filepath [file join $root $file]
+ if {[file isdirectory $filepath]} {
+ xinstall -d -m 0755 ${destroot}${ruby.lib}/${file}
+ } else {
+ xinstall -m 0644 $filepath ${destroot}${ruby.lib}/${file}
+ }
+ }
}
- foreach file [exec find . -type f] {
- set file [strsed ${file} {s|^[.]/||}]
- xinstall -m 0644 ${file} ${destroot}${ruby.lib}/${file}
- }
}
}
install.rb {
@@ -272,18 +275,20 @@
}
destroot {
- _cd ${worksrcpath}
- system "${prefix}/bin/gem install --local --force --install-dir ${destroot}${prefix}/lib/ruby/gems/${ruby.version} ${distpath}/${distname}"
+ system "cd ${worksrcpath} && ${prefix}/bin/gem install --local --force --install-dir ${destroot}${prefix}/lib/ruby/gems/${ruby.version} ${distpath}/${distname}"
set binDir ${destroot}${prefix}/lib/ruby/gems/${ruby.version}/bin
if {[file isdirectory $binDir]} {
- _cd $binDir
foreach file [readdir $binDir] {
- file copy $file ${destroot}${prefix}/bin
+ file copy [file join $binDir $file] ${destroot}${prefix}/bin
}
}
}
}
+ fetch {
+ # do nothing but fetch and extract - for strange installers
+ build {}
+ }
default {
ui_error "ruby.setup: unknown setup type '${type}' specified!"
return -code error "ruby.setup failed"
@@ -291,19 +296,26 @@
}
post-destroot {
- _cd ${worksrcpath}
# Install documentation files (if specified)
if {[llength ${ruby.docs}] > 0} {
set docPath ${prefix}/share/doc/${name}
xinstall -d -m 0755 ${destroot}${docPath}
foreach docitem ${ruby.docs} {
+ set docitem [file join ${worksrcpath} ${docitem}]
if {[file isdirectory ${docitem}]} {
- foreach dir [exec find ${docitem} -type d] {
- xinstall -d -m 0755 ${destroot}${docPath}/${dir}
+ set subdir [file tail $docitem]
+ xinstall -d -m 0755 ${destroot}${docPath}/${subdir}
+ fs-traverse file $docitem {
+ set file [trimroot $docitem $file]
+ if {$file ne ""} {
+ set filepath [file join $docitem $file]
+ if {[file isdirectory $filepath]} {
+ xinstall -d -m 0755 ${destroot}${docPath}/${subdir}/${file}
+ } else {
+ xinstall -m 0644 $filepath ${destroot}${docPath}/${subdir}/${file}
+ }
+ }
}
- foreach file [exec find ${docitem} -type f] {
- xinstall -m 0644 ${file} ${destroot}${docPath}/${file}
- }
} else {
xinstall -m 0644 ${docitem} ${destroot}${docPath}
}
@@ -311,3 +323,25 @@
}
}
}
+
+proc trimroot {root path} {
+ set acc {}
+ set skiproot no
+ foreach rootf [file split $root] pathf [file split $path] {
+ if {$pathf eq ""} {
+ # we've hit the end of the path
+ break
+ } elseif {$skiproot eq "yes" || $rootf eq ""} {
+ lappend acc $pathf
+ } elseif {$rootf ne $pathf} {
+ # diverged from the root
+ lappend acc $pathf
+ set skiproot yes
+ }
+ }
+ if {[llength $acc] == 0} {
+ return ""
+ } else {
+ return [eval [subst -nobackslashes -nocommands {file join $acc}]]
+ }
+}
Modified: branches/variant-descs-14482/base/src/port1.0/resources/group/xcode-1.0.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port1.0/resources/group/xcode-1.0.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/port1.0/resources/group/xcode-1.0.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -170,11 +170,12 @@
# get the install path setting
# remark: xcodebuild take care of creating the directory if required.
proc xcode::get_install_path_setting { path type } {
+ global applications_dir frameworks_dir
if {$path == ""} {
if {$type == "application"} {
- return "INSTALL_PATH=/Applications/MacPorts"
+ return "INSTALL_PATH=${applications_dir}"
} elseif {$type == "framework"} {
- return "INSTALL_PATH=/Library/Frameworks"
+ return "INSTALL_PATH=${frameworks_dir}"
} else {
return ""
}
Modified: branches/variant-descs-14482/base/src/registry1.0/portimage.tcl
===================================================================
--- branches/variant-descs-14482/base/src/registry1.0/portimage.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/registry1.0/portimage.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -79,12 +79,18 @@
set force 0
}
- ui_msg "$UI_PREFIX [format [msgcat::mc "Activating %s %s"] $name $v]"
-
set ilist [_check_registry $name $v]
+ # set name again since the one we were passed may not have had the correct case
+ set name [lindex $ilist 0]
set version [lindex $ilist 1]
set revision [lindex $ilist 2]
set variants [lindex $ilist 3]
+
+ if {$v != ""} {
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Activating %s @%s"] $name $v]"
+ } else {
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Activating %s"] $name]"
+ }
set ilist [registry::installed $name]
if { [llength $ilist] > 1 } {
@@ -142,19 +148,25 @@
set force 0
}
- ui_msg "$UI_PREFIX [format [msgcat::mc "Deactivating %s %s"] $name $v]"
-
set ilist [registry::active $name]
if { [llength $ilist] > 1 } {
return -code error "Registry error: Please specify the name of the port."
} else {
set ilist [lindex $ilist 0]
}
+ # set name again since the one we were passed may not have had the correct case
+ set name [lindex $ilist 0]
set version [lindex $ilist 1]
set revision [lindex $ilist 2]
set variants [lindex $ilist 3]
set fqversion ${version}_${revision}${variants}
+ if {$v != ""} {
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Deactivating %s @%s"] $name $v]"
+ } else {
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Deactivating %s"] $name]"
+ }
+
if { $v != "" && ![string equal ${fqversion} $v] } {
return -code error "Active version of $name is not $v but ${fqversion}."
}
@@ -209,6 +221,8 @@
set ilist [registry::installed $name $v]
if { [string equal $v ""] } {
if { [llength $ilist] > 1 } {
+ # set name again since the one we were passed may not have had the correct case
+ set name [lindex [lindex $ilist 0] 0]
ui_msg "$UI_PREFIX [msgcat::mc "The following versions of $name are currently installed:"]"
foreach i $ilist {
set iname [lindex $i 0]
Modified: branches/variant-descs-14482/base/src/registry1.0/portuninstall.tcl
===================================================================
--- branches/variant-descs-14482/base/src/registry1.0/portuninstall.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/registry1.0/portuninstall.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -44,6 +44,7 @@
set ilist [registry::installed $portname $v]
if { [llength $ilist] > 1 } {
+ set portname [lindex [lindex $ilist 0] 0]
ui_msg "$UI_PREFIX [msgcat::mc "The following versions of $portname are currently installed:"]"
foreach i $ilist {
set iname [lindex $i 0]
@@ -59,9 +60,12 @@
}
return -code error "Registry error: Please specify the full version as recorded in the port registry."
} else {
+ # set portname again since the one we were passed may not have had the correct case
+ set portname [lindex [lindex $ilist 0] 0]
set version [lindex [lindex $ilist 0] 1]
set revision [lindex [lindex $ilist 0] 2]
set variants [lindex [lindex $ilist 0] 3]
+ set active [lindex [lindex $ilist 0] 4]
}
# determine if it's the only installed port with that name or not.
@@ -91,21 +95,36 @@
# xxx: Should look at making registry::installed return 0 or
# something instead of erroring.
if { ![catch {set installed [registry::installed $depport]} res] } {
- if { [llength [registry::installed $depport]] > 0 } {
+ if { [llength installed] > 0 } {
lappend dl $depport
}
}
}
# Now see if we need to error
if { [llength $dl] > 0 } {
- ui_msg "$UI_PREFIX [format [msgcat::mc "Unable to uninstall %s %s_%s%s, the following ports depend on it:"] $portname $version $revision $variants]"
- foreach depport $dl {
- ui_msg "$UI_PREFIX [format [msgcat::mc " %s"] $depport]"
- }
- if { [info exists uninstall.force] && [string equal ${uninstall.force} "yes"] } {
- ui_warn "Uninstall forced. Proceeding despite dependencies."
+ if {[info exists options(ports_uninstall_follow-dependents)] && $options(ports_uninstall_follow-dependents) eq "yes"} {
+ foreach depport $dl {
+ # make sure it's still installed, since a previous dep uninstall may have removed it
+ # does registry::installed still error? A cursory look at the code says no, but above says yes
+ if { ![catch {set installed [registry::installed $depport]} res] } {
+ if { [llength installed] > 0 } {
+ portuninstall::uninstall $depport "" [array get options]
+ }
+ }
+ }
} else {
- return -code error "Please uninstall the ports that depend on $portname first."
+ # will need to change this when we get version/variant dependencies
+ if {$nb_versions_installed == 1 || $active == 1} {
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Unable to uninstall %s %s_%s%s, the following ports depend on it:"] $portname $version $revision $variants]"
+ foreach depport $dl {
+ ui_msg "$UI_PREFIX [format [msgcat::mc " %s"] $depport]"
+ }
+ if { [info exists uninstall.force] && [string equal ${uninstall.force} "yes"] } {
+ ui_warn "Uninstall forced. Proceeding despite dependencies."
+ } else {
+ return -code error "Please uninstall the ports that depend on $portname first."
+ }
+ }
}
}
}
@@ -116,7 +135,7 @@
portimage::deactivate $portname ${version}_${revision}${variants} $optionslist
}
- ui_msg "$UI_PREFIX [format [msgcat::mc "Uninstalling %s %s_%s%s"] $portname $version $revision $variants]"
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Uninstalling %s @%s_%s%s"] $portname $version $revision $variants]"
# Look to see if the port has registered an uninstall procedure
set uninstall [registry::property_retrieve $ref pkg_uninstall]
Modified: branches/variant-descs-14482/base/src/registry1.0/receipt_flat.tcl
===================================================================
--- branches/variant-descs-14482/base/src/registry1.0/receipt_flat.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/registry1.0/receipt_flat.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -426,6 +426,19 @@
}
# [PG] Huh?
} else {
+ # We want to be case-insensitive but case-preserving, so the name gets
+ # returned with the correct case even if it's wrong when given. To get the
+ # correct case on a case-insensitive FS, we have to list the directory and
+ # compare against each entry.
+ set name_path [file join ${query_path} *]
+ set name_entries [glob -nocomplain -types d ${name_path}]
+ foreach entry $name_entries {
+ set basename [file tail $entry]
+ if {[string equal -nocase $basename $name]} {
+ set name $basename
+ break
+ }
+ }
set query_path [file join ${query_path} ${name}]
if { $version != "" } {
set query_path [file join ${query_path} ${version}]
@@ -732,7 +745,11 @@
proc register_dep {dep type port} {
variable dep_map
- lappend dep_map [list $dep $type $port]
+ set newdep [list $dep $type $port]
+ # slow, but avoids duplicate entries building up
+ if {[lsearch -exact $dep_map $newdep] == -1} {
+ lappend dep_map $newdep
+ }
}
proc unregister_dep {dep type port} {
Modified: branches/variant-descs-14482/base/src/registry2.0/portimage.tcl
===================================================================
--- branches/variant-descs-14482/base/src/registry2.0/portimage.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/registry2.0/portimage.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -77,7 +77,11 @@
set force 0
}
- ui_msg "$UI_PREFIX [format [msgcat::mc "Activating %s %s"] $name $specifier]"
+ if {$specifier != ""} {
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Activating %s @%s"] $name $specifier]"
+ } else {
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Activating %s"] $name]"
+ }
registry::read {
@@ -131,7 +135,11 @@
set force 0
}
- ui_msg "$UI_PREFIX [format [msgcat::mc "Deactivating %s %s"] $name $v]"
+ if {$spec != ""} {
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Deactivating %s @%s"] $name $spec]"
+ } else {
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Deactivating %s"] $name]"
+ }
if { [string equal $name {}] } {
throw registry::image-error "Registry error: Please specify the name of the port."
Modified: branches/variant-descs-14482/base/src/registry2.0/portuninstall.tcl
===================================================================
--- branches/variant-descs-14482/base/src/registry2.0/portuninstall.tcl 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/registry2.0/portuninstall.tcl 2008-06-10 14:48:05 UTC (rev 37509)
@@ -90,7 +90,7 @@
}
}
- ui_msg "$UI_PREFIX [format [msgcat::mc "Uninstalling %s %s_%s%s"] $portname $version $revision $variants]"
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Uninstalling %s @%s_%s%s"] $portname $version $revision $variants]"
# pkg_uninstall isn't used anywhere as far as I can tell and I intend to add
# some proper pre-/post- hooks to uninstall/deactivate.
Modified: branches/variant-descs-14482/base/src/thread2.6.diff
===================================================================
--- branches/variant-descs-14482/base/src/thread2.6.diff 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/src/thread2.6.diff 2008-06-10 14:48:05 UTC (rev 37509)
@@ -50,3 +50,30 @@
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;
Property changes on: branches/variant-descs-14482/base/src/thread2.6.tar.gz
___________________________________________________________________
Name: svn:keywords
- Id
Modified: branches/variant-descs-14482/base/tests/Makefile
===================================================================
--- branches/variant-descs-14482/base/tests/Makefile 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/tests/Makefile 2008-06-10 14:48:05 UTC (rev 37509)
@@ -1,7 +1,9 @@
include ../Mk/macports.autoconf.mk
-TESTS?=checksums-1 cvs-and-patchsites envvariables site-tags trace universal universal-2 xcodeversion dependencies-c
+TESTS?=checksums-1 cvs-and-patchsites envvariables site-tags trace universal universal-2 xcodeversion dependencies-c case-insensitive-deactivate
+PWD=$(shell pwd)
+
.PHONY: test clean PortIndex
all:
@@ -38,11 +40,11 @@
echo ===\> test ${DIRPRFX}$$subdir; \
if [ -e ${DIRPRFX}$$subdir/Makefile ]; then \
( cd $$subdir && \
- $(MAKE) DIRPRFX=${DIRPRFX}$$subdir/ PORTSRC=$(PWD)/test-ports.conf test) || exit 1; \
+ $(MAKE) DIRPRFX=${DIRPRFX}$$subdir/ PORTSRC=$(PWD)/test-macports.conf test) || exit 1; \
else \
( cd $$subdir && \
- PORTSRC=$(PWD)/test-ports.conf $(bindir)/port clean > /dev/null && \
- PORTSRC=$(PWD)/test-ports.conf $(bindir)/port test > output 2>&1 \
+ PORTSRC=$(PWD)/test-macports.conf $(bindir)/port clean > /dev/null && \
+ PORTSRC=$(PWD)/test-macports.conf $(bindir)/port test > output 2>&1 \
|| (cat output; exit 1) && \
sed -e "s|${PWD}|PWD|g" < output > output.sed && \
diff output.sed master 2>&1 | tee difference && \
Modified: branches/variant-descs-14482/base/tests/test/case-insensitive-deactivate/Makefile
===================================================================
--- branches/variant-descs-14482/base/tests/test/case-insensitive-deactivate/Makefile 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/tests/test/case-insensitive-deactivate/Makefile 2008-06-10 14:48:05 UTC (rev 37509)
@@ -1,6 +1,7 @@
include ../../../Mk/macports.autoconf.mk
-TESTFILE=$(prefix)/var/macports/case
+# see test-macports.conf for the value of prefix
+TESTFILE=/tmp/macports-tests/opt/local/var/macports/case
TESTPORT1=casesensitive
TESTPORT2=CaseSensitivE
Modified: branches/variant-descs-14482/base/tests/test/cvs-and-patchsites/Portfile
===================================================================
--- branches/variant-descs-14482/base/tests/test/cvs-and-patchsites/Portfile 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/tests/test/cvs-and-patchsites/Portfile 2008-06-10 14:48:05 UTC (rev 37509)
@@ -12,10 +12,10 @@
long_description ${description}
fetch.type cvs
-cvs.root :pserver:anonymous at cvs.mutt.org:/home/roessler/cvs
-cvs.module mutt
+cvs.root :pserver:anonymous at common-lisp.net:/project/slime/cvsroot
+cvs.module slime
cvs.password anonymous
-worksrcdir mutt
+worksrcdir slime
patch_sites http://home.uchicago.edu/~dgc/sw/mutt/
patchfiles patch-1.5.14.dgc.xlabel_ext.9
Modified: branches/variant-descs-14482/base/tests/test/dependencies-c/master
===================================================================
--- branches/variant-descs-14482/base/tests/test/dependencies-c/master 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/tests/test/dependencies-c/master 2008-06-10 14:48:05 UTC (rev 37509)
@@ -4,8 +4,8 @@
---> Configuring dependencies-b
---> Building dependencies-b with target all
---> Staging dependencies-b into destroot
----> Installing dependencies-b 1_0
----> Activating dependencies-b 1_0
+---> Installing dependencies-b @1_0
+---> Activating dependencies-b @1_0
---> Cleaning dependencies-b
---> Fetching dependencies-a
---> Verifying checksum(s) for dependencies-a
@@ -13,8 +13,8 @@
---> Configuring dependencies-a
---> Building dependencies-a with target all
---> Staging dependencies-a into destroot
----> Installing dependencies-a 1_0+i_want_b
----> Activating dependencies-a 1_0+i_want_b
+---> Installing dependencies-a @1_0+i_want_b
+---> Activating dependencies-a @1_0+i_want_b
---> Cleaning dependencies-a
---> Fetching dependencies-c
---> Verifying checksum(s) for dependencies-c
Modified: branches/variant-descs-14482/base/tests/test/universal/Makefile
===================================================================
--- branches/variant-descs-14482/base/tests/test/universal/Makefile 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/tests/test/universal/Makefile 2008-06-10 14:48:05 UTC (rev 37509)
@@ -8,7 +8,7 @@
test:
@PORTSRC=$(PORTSRC) $(bindir)/port clean > /dev/null
- @sh -c "export PORTSRC=$(PORTSRC); $(bindir)/port info" > output 2>&1 || (cat output; exit 1)
+ @sh -c "export PORTSRC=$(PORTSRC); $(bindir)/port info --variants" > output 2>&1 || (cat output; exit 1)
@diff output master 2>&1 | tee difference
@if [ -s difference ]; then \
exit 1; \
Modified: branches/variant-descs-14482/base/tests/test/universal/master
===================================================================
--- branches/variant-descs-14482/base/tests/test/universal/master 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/tests/test/universal/master 2008-06-10 14:48:05 UTC (rev 37509)
@@ -1,7 +1 @@
-universal 1, test/universal (Variants: universal)
-http://www.macports.org/
-
-{Test port for universal variant}
-
-Platforms: darwin
-Maintainers: pguyot at kallisys.net
+variants: universal
Modified: branches/variant-descs-14482/base/tests/test/universal-2/Makefile
===================================================================
--- branches/variant-descs-14482/base/tests/test/universal-2/Makefile 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/tests/test/universal-2/Makefile 2008-06-10 14:48:05 UTC (rev 37509)
@@ -8,7 +8,7 @@
test:
@PORTSRC=$(PORTSRC) $(bindir)/port clean > /dev/null
- @sh -c "export PORTSRC=$(PORTSRC); $(bindir)/port info" > output 2>&1 || (cat output; exit 1)
+ @sh -c "export PORTSRC=$(PORTSRC); $(bindir)/port info --variants" > output 2>&1 || (cat output; exit 1)
@diff output master 2>&1 | tee difference
@if [ -s difference ]; then \
exit 1; \
Modified: branches/variant-descs-14482/base/tests/test/universal-2/master
===================================================================
--- branches/variant-descs-14482/base/tests/test/universal-2/master 2008-06-10 14:14:03 UTC (rev 37508)
+++ branches/variant-descs-14482/base/tests/test/universal-2/master 2008-06-10 14:48:05 UTC (rev 37509)
@@ -1,7 +1,2 @@
-universal-2 1, test/universal-2
-http://www.macports.org/
-
-{Test port for universal variant}
-
-Platforms: darwin
-Maintainers: pguyot at kallisys.net
+no info for 'variants'
+variants:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080610/c47259b5/attachment-0001.htm
More information about the macports-changes
mailing list