Ticket #12224: macports-major.patch
File macports-major.patch, 4.0 KB (added by afb@…, 17 years ago) |
---|
-
src/port1.0/portmain.tcl
42 42 # define options 43 43 options prefix name version revision epoch categories maintainers 44 44 options long_description description homepage 45 options worksrcdir filesdir distname portdbpath libpath distpath sources_conf os.platform os.version os. arch os.endian platforms default_variants install.user install.group45 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 46 46 47 47 # Export options via PortInfo 48 48 options_export name version revision epoch categories maintainers platforms description long_description homepage … … 82 82 # Platform Settings 83 83 set os_arch $tcl_platform(machine) 84 84 if {$os_arch == "Power Macintosh"} { set os_arch "powerpc" } 85 regexp {([0-9]*)[0-9\.]?} $tcl_platform(osVersion) match os_major 85 86 86 87 default os.platform {[string tolower $tcl_platform(os)]} 87 88 default os.version {$tcl_platform(osVersion)} 89 default os.major {$os_major} 88 90 default os.arch {$os_arch} 89 91 # Remove trailing "Endian" 90 92 default os.endian {[string range $tcl_platform(byteOrder) 0 end-6]} -
src/port1.0/portutil.tcl
485 485 # Basically, just wrap 'variant', so that Portfiles' platform declarations can 486 486 # be more readable, and support arch and version specifics 487 487 proc platform {args} { 488 global all_variants PortInfo os.platform os.arch os.version 488 global all_variants PortInfo os.platform os.arch os.version os.major 489 489 490 490 set len [llength $args] 491 491 set code [lindex $args end] … … 522 522 set matches 1 523 523 if {[info exists os.platform] && ${os.platform} == $os} { 524 524 set sel_platform $os 525 if {[info exists os.version] && [info exists release]} { 526 regexp {([0-9]*)[0-9\.]?} ${os.version} match major 527 if {$major == $release } { 525 if {[info exists os.major] && [info exists release]} { 526 if {${os.major} == $release } { 528 527 set sel_platform ${sel_platform}_${release} 529 528 } else { 530 529 set matches 0 -
src/package1.0/portrpm.tcl
52 52 53 53 proc rpm_pkg {portname portversion portrevision} { 54 54 global UI_PREFIX package.destpath portdbpath destpath workpath prefix portresourcepath categories maintainers description long_description homepage epoch portpath 55 global os.platform os.arch os.version 55 global os.platform os.arch os.version os.major 56 56 57 57 set rpmdestpath "" 58 58 if {![string equal ${package.destpath} ${workpath}] && ![string equal ${package.destpath} ""]} { … … 111 111 } 112 112 113 113 # depend on system (virtual packages for apple stuff) 114 regexp {[0-9]+} ${os.version} major 115 lappend dependencies "org.macports.${os.platform}${major}" 114 lappend dependencies "org.macports.${os.platform}${os.major}" 116 115 117 116 set listpath ${workpath}/${portname}.filelist 118 117 system "rm -f '${workpath}/${portname}.filelist' && touch '${workpath}/${portname}.filelist'" -
src/package1.0/portsrpm.tcl
53 53 54 54 proc srpm_pkg {portname portversion portrevision} { 55 55 global UI_PREFIX package.destpath portdbpath destpath workpath distpath prefix portresourcepath categories maintainers description long_description homepage epoch portpath distfiles fetch_urls 56 global os.platform os.arch os.version 56 global os.platform os.arch os.version os.major 57 57 58 58 set rpmdestpath "" 59 59 if {![string equal ${package.destpath} ${workpath}] && ![string equal ${package.destpath} ""]} {