Ticket #1068: dports.patch
File dports.patch, 2.5 KB (added by jdputsch@…, 21 years ago) |
---|
-
./base/src/port1.0/portinstall.tcl
old new 111 111 cd $pwd 112 112 } 113 113 114 proc run_inst_helper_script {script} { 115 global workdir 116 117 set script_src [file join [option filespath] [option $script]] 118 set script_exe [file join $workdir [option $script]] 119 120 if {[file exists $script_src]} { 121 system "cp $script_src $script_exe" 122 reinplace "s|@PREFIX@|$prefix|g" $script_exe 123 system $script_exe 124 } 125 } 126 127 114 128 proc install_main {args} { 115 129 global portname portversion portpath categories description long_description homepage depends_run installPlist package-install uninstall workdir worksrcdir prefix UI_PREFIX destroot 116 130 131 # Run preinstall script if it exists 132 run_inst_helper_script [option preinstall] 133 117 134 # Install ${destroot} contents into / 118 135 directory_dig ${destroot} ${destroot} 136 137 # Run postinstall script if it exists 138 run_inst_helper_script [option postinstall] 119 139 120 140 # Package installed successfully, so now we must register it 121 141 set rhandle [registry_new $portname $portversion] -
./base/src/port1.0/portmain.tcl
old new 68 68 default filesdir {files} 69 69 default filespath {[file join $portpath $filesdir]} 70 70 default worksrcpath {[file join $workpath $worksrcdir]} 71 default preinstall {preinstall} 72 default postinstall {postinstall} 73 default postremove {postremove} 71 74 72 75 # Compatibility namespace 73 76 default portname {$name} -
./base/src/port1.0/portpackage.tcl
old new 77 77 set pkg_$variable [set $variable] 78 78 } 79 79 } 80 # Add pre/post install scripts if they exist 81 82 foreach script {preinstall postinstall postremove} { 83 set script_src [file join [option filespath] [option $script]] 84 set script_dst "${pkgpath}/Contents/Resources/$script" 85 86 if {[file exists $script_src]} { 87 system "cp ${script_src} ${script_dst}" 88 reinplace "s|@PREFIX@|$prefix|g" $script_dst 89 system "chmod a+rx ${script_dst}" 90 } 91 } 92 80 93 write_welcome_html ${pkgpath}/Contents/Resources/Welcome.html $portname $portversion $pkg_long_description $pkg_description $pkg_homepage 81 94 file copy -force -- ${portresourcepath}/package/background.tiff ${pkgpath}/Contents/Resources/background.tiff 82 95 system "mkbom ${destpath} ${pkgpath}/Contents/Archive.bom"