Skip to content
Permalink
Browse files

Resync with changes accidentally made on lamancha.

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@1200 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Torrey Lyons
Torrey Lyons committed Nov 6, 2002
1 parent 9b7d0c9 commit 121e8814745776942541aae2ed21008d065c0a09
@@ -37,7 +37,6 @@ proc pindex {portdir} {
return -1
}
array set portinfo [dportinfo $interp]
puts "Doing $target for port: $portinfo(name)"
dportexec $interp $target
dportclose $interp
}
@@ -36,6 +36,7 @@ set com.apple.build [target_new com.apple.build build_main]
${com.apple.build} provides build
${com.apple.build} requires main fetch extract checksum patch configure
${com.apple.build} deplist depends_build depends_lib
${com.apple.build} set prerun build_start

# define options
options build.target.all
@@ -79,10 +80,15 @@ proc build_getmaketype {args} {
}
}

proc build_start {args} {
global UI_PREFIX portname build.target.all

ui_msg "$UI_PREFIX Building $portname with target ${build.target.all}"
}

proc build_main {args} {
global portname portpath workdir prefix build.type build.cmd build.env build.target.all build.target.current UI_PREFIX worksrcdir

ui_msg "$UI_PREFIX Building $portname with target ${build.target.all}"
set build.target.current ${build.target.all}
system "[command build]"
return 0
@@ -35,6 +35,7 @@ package require portutil 1.0
set com.apple.checksum [target_new com.apple.checksum checksum_main]
${com.apple.checksum} provides checksum
${com.apple.checksum} requires main fetch
${com.apple.checksum} set prerun checksum_start

# define options
options checksums
@@ -73,6 +74,12 @@ proc dmd5 {file} {
return -1
}

proc checksum_start {args} {
global UI_PREFIX portname

ui_msg "$UI_PREFIX Checksumming $portname"
}

proc checksum_main {args} {
global checksums distpath portpath all_dist_files UI_PREFIX

@@ -38,6 +38,13 @@ set com.apple.clean [target_new com.apple.clean clean_main]
${com.apple.clean} set runtype always
${com.apple.clean} provides clean
${com.apple.clean} requires main
${com.apple.clean} set prerun clean_start

proc clean_start {args} {
global UI_PREFIX portname

ui_msg "$UI_PREFIX Cleaning $portname"
}

proc clean_main {args} {
global portpath workdir
@@ -36,6 +36,7 @@ set com.apple.configure [target_new com.apple.configure configure_main]
${com.apple.configure} provides configure
${com.apple.configure} requires main fetch extract checksum patch
${com.apple.configure} deplist depends_build depends_lib
${com.apple.configure} set prerun configure_start

# define options
commands configure automake autoconf xmkmf libtool
@@ -51,6 +52,12 @@ default use_configure yes

set UI_PREFIX "---> "

proc configure_start {args} {
global UI_PREFIX portname

ui_msg "$UI_PREFIX Configuring $portname"
}

proc configure_main {args} {
global [info globals]
global global configure configure.args configure.dir automake automake.env automake.args automake.dir autoconf autoconf.env autoconf.args autoconf.dir xmkmf libtool portname portpath worksrcpath prefix workpath UI_PREFIX use_configure use_autoconf use_automake use_xmkmf
@@ -82,7 +89,6 @@ proc configure_main {args} {
system "cd ${worksrcpath} && make Makefiles"
}
} elseif [tbool use_configure] {
ui_msg "$UI_PREFIX Running configure script"
if {[catch {system "[command configure]"} result]} {
ui_error "configure target failed: $result"
return -code error "configure target failed: $result"
@@ -37,6 +37,7 @@ ${com.apple.extract} set init extract_init
${com.apple.extract} provides extract
${com.apple.extract} requires fetch checksum
${com.apple.extract} deplist depends_extract
${com.apple.extract} set prerun extract_start

# define options
options extract.only
@@ -66,6 +67,12 @@ proc extract_init {args} {
}
}

proc extract_start {args} {
global UI_PREFIX portname

ui_msg "$UI_PREFIX Extracting $portname"
}

proc extract_main {args} {
global portname portpath workdir distname distpath distfiles use_bzip2 extract.only extract.cmd extract.before_args extract.after_args extract.args UI_PREFIX

@@ -37,6 +37,7 @@ ${com.apple.fetch} set init fetch_init
${com.apple.fetch} provides fetch
${com.apple.fetch} requires main
${com.apple.fetch} deplist depends_fetch
${com.apple.fetch} set prerun fetch_start

# define options: distname master_sites
options master_sites patch_sites extract.sufx distfiles patchfiles use_zip use_bzip2 dist_subdir fetch.type cvs.module cvs.root cvs.password cvs.tag
@@ -274,6 +275,12 @@ proc fetch_init {args} {
}
}

proc fetch_start {args} {
global UI_PREFIX portname

ui_msg "$UI_PREFIX Fetching $portname"
}

# Main fetch routine
# If all_dist_files is not populated and $fetch.type == standard, then
# there are no files to download. Otherwise, either do a cvs checkout
@@ -36,6 +36,7 @@ set com.apple.install [target_new com.apple.install install_main]
${com.apple.install} provides install
${com.apple.install} requires main fetch extract checksum patch configure build
${com.apple.install} deplist depends_run depends_lib
${com.apple.install} set prerun install_start

# define options
options build.target.install
@@ -44,6 +45,12 @@ default build.target.install install

set UI_PREFIX "---> "

proc install_start {args} {
global UI_PREFIX portname build.target.install

ui_msg "$UI_PREFIX Installing $portname with target ${build.target.install}"
}

proc install_main {args} {
global portname portversion portpath categories description depends_run contents workdir worksrcdir prefix build.type build.cmd build.target.install UI_PREFIX build.target.current

@@ -54,7 +61,7 @@ proc install_main {args} {
return -code error "Could not make directory for ${prefix}: $err"
}
}
ui_msg "$UI_PREFIX Installing $portname with target ${build.target.install}"

set build.target.current ${build.target.install}
if [catch {system "[command build]"}] {
ui_error "Installation failed."
@@ -36,6 +36,7 @@ set com.apple.registry [target_new com.apple.registry registry_main]
${com.apple.registry} provides registry
${com.apple.registry} requires main fetch extract checksum patch configure build install
${com.apple.registry} deplist depends_run depends_lib
${com.apple.registry} set prerun registry_start

# define options
options contents long_description description registry.nochecksum registry.path registry.nobzip registry.contents_recurse
@@ -47,6 +48,12 @@ default registry.path {[file join ${portdbpath} receipts]}

set UI_PREFIX "---> "

proc registry_start {args} {
global UI_PREFIX portname

ui_msg "$UI_PREFIX Adding $portname to registry, this may take a moment..."
}

# For now, just write stuff to a file for debugging.

proc registry_new {portname {portversion 1.0}} {
@@ -204,7 +211,6 @@ proc registry_main {args} {

# Package installed successfully, so now we must register it
set rhandle [registry_new $portname $portversion]
ui_msg "$UI_PREFIX Adding $portname to registry, this may take a moment..."

registry_store $rhandle [list prefix $prefix]
registry_store $rhandle [list categories $categories]
@@ -36,12 +36,21 @@ set com.apple.uninstall [target_new com.apple.uninstall uninstall_main]
${com.apple.uninstall} set runtype always
${com.apple.uninstall} provides uninstall
${com.apple.uninstall} requires main
${com.apple.uninstall} set prerun uninstall_start

# define options
options uninstall.force uninstall.nochecksum

set UI_PREFIX "---> "

proc uninstall_start {args} {
global portname portversion UI_PREFIX

if [string length [registry_exists $portname $portversion]] {
ui_msg "$UI_PREFIX Uninstalling $portname-$portversion"
}
}

proc uninstall_main {args} {
global portname portversion uninstall.force uninstall.nochecksum ports_force UI_PREFIX

@@ -52,7 +61,6 @@ proc uninstall_main {args} {

set rfile [registry_exists $portname $portversion]
if [string length $rfile] {
ui_msg "$UI_PREFIX Uninstalling $portname-$portversion"
if [regexp .bz2$ $rfile] {
set fd [open "|bunzip2 -c $rfile" r]
} else {

0 comments on commit 121e881

Please sign in to comment.
You can’t perform that action at this time.