[MacPorts] #55471: Use separate portindexes for libc++ on older systems

MacPorts noreply at macports.org
Sat Mar 3 11:09:49 UTC 2018


#55471: Use separate portindexes for libc++ on older systems
--------------------------+-----------------
  Reporter:  ryandesign   |      Owner:
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  base         |    Version:
Resolution:               |   Keywords:
      Port:               |
--------------------------+-----------------

Comment (by mojca):

 Modifying the following chunk of code of `mprsyncup` seems trivial:
 {{{
 #!bash
 PLATFORMS="8_powerpc 8_i386 9_powerpc 9_i386 10_i386 11_i386 12_i386
 13_i386 14_i386 15_i386 16_i386 17_i386"
 for PLATFORM in $PLATFORMS; do
     INDEX="PortIndex_darwin_${PLATFORM}"
     ${PORTINDEX} -p "macosx_${PLATFORM}" -o "${INDEX}" \
         | ${AWK} '{ print "Updating " idx ":\t" $0 }' idx="$INDEX" \
         | expand -t 40,48,56,64,72,80 &
 done
 }}}
 Looking at the sources of `portindex`:
 {{{
 #!tcl
 } elseif {$arg eq "-p"} { # Set platform
     incr i
     set platlist [split [lindex $argv $i] _]
     set os_platform [lindex $platlist 0]
     set os_major [lindex $platlist 1]
     set os_arch [lindex $platlist 2]
     if {$os_platform eq "macosx"} {
         lappend port_options os.subplatform $os_platform
 os.universal_supported yes
         set os_platform darwin
     }
 }}}
 it kind of looks like a bad idea to try to squeeze `_libc++` into
 `10_i386` as in
 {{{
 portindex -p macosx_10_libcxx_i386
 }}}
 and break indexing. Maybe something like
 {{{
 portindex -p macosx_10_i386 -stdlib libc++
 }}}
 or (less ideal)
 {{{
 portindex -p macosx-libc++_10_i386
 }}}
 would be a better fit?

 I also wouldn't really mind having a directory structure like this one:
 {{{
     PortIndex_darwin_8_i386
     PortIndex_darwin_8_i386/libc++
     PortIndex_darwin_8_powerpc
     PortIndex_darwin_8_powerpc/libstdc++
     PortIndex_darwin_9_i386
     PortIndex_darwin_9_i386/libc++
     PortIndex_darwin_9_powerpc
     PortIndex_darwin_9_powerpc/libstdc++
 }}}
 if that doesn't bring too many additional complications for generating the
 tarballs or calling selfupdate (one can exclude folders when using rsync).

 While at it: why do we have a separate `portindex` for `powerpc`, but not
 for `x86_64`?

 One further question. While writing some `Portfiles` I remember
 experiencing problems by not being able to tell the difference between the
 globally set stdlib and the one that could have come from a PortGroup. I
 hope that won't be a problem for `Portindex`, I need to check.

--
Ticket URL: <https://trac.macports.org/ticket/55471#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list