[MacPorts] #52091: cctools, ld64: circular dependencies

MacPorts noreply at macports.org
Fri Aug 26 14:56:54 PDT 2016


#52091: cctools, ld64: circular dependencies
----------------------------+------------------------
  Reporter:  ryandesign@…   |      Owner:  jeremyhu@…
      Type:  defect         |     Status:  new
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.3.4
Resolution:                 |   Keywords:  leopard
      Port:  cctools, ld64  |
----------------------------+------------------------

Comment (by mojca@…):

 Jeremy, why not using
 {{{
 if {${os.major} < 11} {
     variant llvm34 conflicts llvm33 llvm38 llvm39 llvmdev description {Use
 llvm-3.4 for libLTO and llvm-mc} {
         set llvm_version        3.4
         depends_lib-append      port:llvm-${llvm_version}

         set has_llvm_nm         false
         set has_llvm_size       false
     }
 }
 }}}
 instead of
 {{{
 variant llvm34 conflicts llvm33 llvm38 llvm39 llvmdev description {Use
 llvm-3.4 for libLTO and llvm-mc} {
     set llvm_version        3.4
     depends_lib-append      port:llvm-${llvm_version}

     set has_llvm_nm         false
     set has_llvm_size       false

     if {${os.major} >= 11} {
         ui_error "The +llvm34 variant is not supported on Lion and later."
         error "Invalid variant selected"
     }
 }
 }}}
 ?

 Similar for `ld64`:
 {{{
 #!patch
 --- devel/ld64/Portfile (revision 152012)
 +++ devel/ld64/Portfile (working copy)
 @@ -42,6 +42,7 @@
                      sha256
 307f73678a3e5c9ed4d1bcf77da7399d84efac32916c5df6cd477c3b5c36f953


 +if {${os.major} < 14} {
  subport ld64-97 {
      # XCode 3.2.6
      version             97.17
 @@ -62,14 +63,8 @@
          ld64-97-no-Availability.h.patch \
          ld64-97-BaseAtomImplicitDecl.patch \
          ld64-97-no-ppc-thread_status.patch
 -
 -    if {${os.major} >= 14} {
 -        pre-fetch {
 -            ui_error "$subport is not supported on Yosemite or later."
 -            error "unsupported platform"
 -        }
 -    }
  }
 +}

  subport ld64-127 {
      # XCode 4.2
 @@ -94,6 +89,7 @@
          ld64-ppc-9610466.patch
  }

 +if {${os.major} > 9} {
  subport ld64-136 {
      # XCode 4.6
      version             136
 @@ -113,15 +109,10 @@
      if {${configure.cxx_stdlib} eq "libstdc++"} {
          patchfiles-append   ld64-136-hash_set.patch
      }
 -
 -    if {${os.major} <= 9} {
 -        pre-fetch {
 -            ui_error "$subport is not supported on Leopard or earlier.
 It requires the blocks runtime."
 -            error "unsupported platform"
 -        }
 -    }
  }
 +}

 +if {${os.major} > 9} {
  subport ld64-236 {
      # XCode 5.1
      version             236.3
 @@ -146,15 +137,11 @@
      if {${configure.cxx_stdlib} eq "libstdc++"} {
          patchfiles-append   ld64-236-hash_set.patch
      }
 -
 -    if {${os.major} <= 9} {
 -        pre-fetch {
 -            ui_error "$subport is not supported on Leopard or earlier.
 It requires the blocks runtime."
 -            error "unsupported platform"
 -        }
 -    }
  }
 +}

 +# requires a C++11 runtime
 +if {[file exists /usr/lib/libc++.dylib]} {
  subport ld64-latest {
      # XCode 7.3.1
      version             264.3.102
 @@ -180,14 +167,8 @@
      configure.cxxflags-append -std=c++11

      supported_archs i386 x86_64
 -
 -    pre-fetch {
 -        if {![file exists /usr/lib/libc++.dylib]} {
 -            ui_error "$name requires a C++11 runtime, which your
 configuration does not allow"
 -            error "unsupported configuration"
 -        }
 -    }
  }
 +}

  subport ld64-xcode {
      version             1

 }}}

 Anyway, I'm not sure if it's just because I made a partial update of your
 commits (I only checked out `ld64` and ran `portindex`), but this fails
 for me already during the `portindex` phase:
 {{{
 Adding port devel/ld64
 Error: The +llvm34 variant is not supported on Lion and later.
 Error: ld64: Error executing llvm34: Invalid variant selected
 Failed to parse file devel/ld64/Portfile with subport 'ld64-97': Error
 evaluating variants
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/52091#comment:9>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list