Ticket #3425: darwinports-diff

File darwinports-diff, 4.5 KB (added by erickt@…, 19 years ago)

a couple diffs to add the extra fetch functionality

Line 
1Index: configure.ac
2===================================================================
3RCS file: /Volumes/src/cvs/od/proj/darwinports/base/configure.ac,v
4retrieving revision 1.41
5diff -r1.41 configure.ac
617a18,19
7> AC_PATH_PROG(RSYNC, [rsync], [])
8> AC_PATH_PROG(ENV, [env], [])
9Index: src/port1.0/port_autoconf.tcl.in
10===================================================================
11RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port1.0/port_autoconf.tcl.in,v
12retrieving revision 1.3
13diff -r1.3 port_autoconf.tcl.in
1434a35,36
15>       variable rsync_path "@RSYNC@"
16>       variable env_path "@ENV@"
17Index: src/port1.0/portfetch.tcl
18===================================================================
19RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port1.0/portfetch.tcl,v
20retrieving revision 1.97
21diff -r1.97 portfetch.tcl
2242c42
23< options master_sites patch_sites extract.suffix distfiles patchfiles use_zip use_bzip2 dist_subdir fetch.type cvs.module cvs.root cvs.password cvs.date cvs.tag master_sites.mirror_subdir patch_sites.mirror_subdir portname
24---
25> options master_sites patch_sites extract.suffix distfiles patchfiles use_zip use_bzip2 dist_subdir fetch.type cvs.module cvs.root cvs.password cvs.date cvs.tag svn.root svn.username svn.password svn.revision rsync.root rsync.module custom.cmd master_sites.mirror_subdir patch_sites.mirror_subdir portname
2645a46,48
27> commands svn
28> commands rsync
29> commands custom
3050a54,55
31>
32> # CVS defaults
3354a60
34> default cvs.env {CVS_PASSFILE=${workpath}/.cvspass}
3557d62
36< default cvs.env {CVS_PASSFILE=${workpath}/.cvspass}
3761a67,97
38> # SVN (subversion) defaults
39> # we have to cheat a little in order to find svn since it is
40> # not installed by default. So we search for it on the path. Is there
41> # some way of forcing a dependancy to install subversion?
42> default svn.cmd {"${portutil::autoconf::env_path} svn"}
43> default svn.revision ""
44> default svn.username ""
45> default svn.password ""
46> default svn.dir {${workpath}}
47> default svn.env {}
48> default svn.pre_args {"co"}
49> default svn.args ""
50> default svn.post_args {"${svn.root} ."}
51>
52> # RSYNC defaults
53> default rsync.cmd {$portutil::autoconf::rsync_path}
54> default rsync.dir {${workpath}}
55> default rsync.module {${distname}}
56> default rsync.env {}
57> default rsync.pre_args {"-z -a -v ${rsync.root}/${rsync.module}"}
58> default rsync.args ""
59> default rsync.post_args {"."}
60>
61> # custom fetch command defaults
62> default custom.dir {${workpath}}
63> default custom.env {}
64> default custom.pre_args ""
65> default custom.args ""
66> default custom.post_args ""
67>
68>
69103a140,147
70>     } elseif {"${fetch.type}" == "svn"} {
71>         return ""
72>     } elseif {"${fetch.type}" == "rsync"} {
73>         return ""
74>     } elseif {"${fetch.type}" == "custom"} {
75>         return ""
76>     } else {
77>         return ${distname}${extract.suffix}
78105d148
79<     return ${distname}${extract.suffix}
80289c332
81<       set cvs.cmd "echo ${cvs.password} | /usr/bin/env ${cvs.env} $portutil::autoconf::cvs_path"
82---
83>       set cvs.cmd "echo ${cvs.password} | ${portutil::autoconf::env_path} ${cvs.env} ${portutil::autoconf::cvs_path}"
84310a354,400
85> # Perform a SVN fetch
86> proc svnfetch {args} {
87>     global workpath svn.env svn.cmd svn.args svn.post_args
88>     global svn.root svn.revision svn.username svn.password
89>
90>     if {[string length ${svn.revision}]} {
91>       set svn.args "${svn.args} -r ${svn.revision}"
92>     }
93>
94>     if {[string length ${svn.username}]} {
95>       set svn.args "${svn.args} --username ${svn.username}"
96>     }
97>
98>     if {[string length ${svn.password}]} {
99>       set svn.args "${svn.args} --password ${svn.password}"
100>     }
101>
102>     if {[catch {system "[command svn] 2>&1"} result]} {
103>       return -code error [msgcat::mc "SVN check out failed"]
104>     }
105>
106>     return 0
107> }
108>
109> # Perform a RSYNC fetch
110> proc rsyncfetch {args} {
111>     global workpath rsync.env rsync.cmd rsync.args rsync.post_args
112>     global rsync.root
113>
114>     if {[catch {system "[command rsync] 2>&1"} result]} {
115>       return -code error [msgcat::mc "RSYNC check out failed"]
116>     }
117>
118>     return 0
119> }
120>
121> # Perform a custom fetch
122> proc customfetch {args} {
123>     global workpath custom.env custom.cmd custom.args custom.post_args
124>
125>     if {[catch {system "[command custom] 2>&1"} result]} {
126>       return -code error [msgcat::mc "custom check out failed"]
127>     }
128>
129>     return 0
130> }
131>
132385a476,481
133>     } elseif {"${fetch.type}" == "svn"} {
134>         return [svnfetch]
135>     } elseif {"${fetch.type}" == "rsync"} {
136>         return [rsyncfetch]
137>     } elseif {"${fetch.type}" == "custom"} {
138>         return [customfetch]