diff --git a/devel/cctools/Portfile b/devel/cctools/Portfile
index 2e44ceff..c26ea37c 100644
a
|
b
|
variant xtools description "Use darwin-xtools as cctools" { |
184 | 184 | } |
185 | 185 | } |
186 | 186 | |
| 187 | variant libmacho conflicts xcode xtools description {build libmacho} {} |
| 188 | default_variants-append +libmacho |
| 189 | |
187 | 190 | destroot.args RAW_DSTROOT=${destroot} DSTROOT=${destroot}${prefix} RC_ProjectSourceVersion=${version} |
188 | 191 | |
189 | 192 | # reconfirmed 20210818 - cctools +llvm10 will not build universal on BigSur |
… |
… |
pre-build { |
316 | 319 | } |
317 | 320 | } |
318 | 321 | |
| 322 | post-build { |
| 323 | if {[variant_isset libmacho]} { |
| 324 | if {${llvm_version} ne ""} { |
| 325 | system -W ${worksrcpath}/libmacho "${build.cmd} ${build.pre_args} \ |
| 326 | RC_ProjectSourceVersion=${version} \ |
| 327 | USE_DEPENDENCY_FILE=NO \ |
| 328 | BUILD_DYLIBS=NO \ |
| 329 | DEPENDENT_LIBS= \ |
| 330 | CC=\"${configure.cc} ${configure.cflags}\" \ |
| 331 | CXX=\"${configure.cxx} ${configure.cxxflags}\" \ |
| 332 | CXXLIB=\"${cxx_stdlibflags}\" \ |
| 333 | TRIE=-DTRIE_SUPPORT \ |
| 334 | RC_ARCHS=\"[get_canonical_archs]\" \ |
| 335 | SDK=\"${configure.cppflags}\" |
| 336 | LTO=-DLTO_SUPPORT \ |
| 337 | RC_CFLAGS=\"[get_canonical_archflags] `llvm-config-mp-${llvm_version} --cflags`\" \ |
| 338 | LLVM_MC=\"llvm-mc-mp-${llvm_version}\" RC_OS=\"macos\"" |
| 339 | } else { |
| 340 | system -W ${worksrcpath}/libmacho "${build.cmd} ${build.pre_args} \ |
| 341 | RC_ProjectSourceVersion=${version} \ |
| 342 | USE_DEPENDENCY_FILE=NO \ |
| 343 | BUILD_DYLIBS=NO \ |
| 344 | DEPENDENT_LIBS= \ |
| 345 | CC=\"${configure.cc} ${configure.cflags}\" \ |
| 346 | CXX=\"${configure.cxx} ${configure.cxxflags}\" \ |
| 347 | CXXLIB=\"${cxx_stdlibflags}\" \ |
| 348 | TRIE=-DTRIE_SUPPORT \ |
| 349 | RC_ARCHS=\"[get_canonical_archs]\" \ |
| 350 | SDK=\"${configure.cppflags}\" |
| 351 | LTO= \ |
| 352 | RC_CFLAGS=\"[get_canonical_archflags]\" RC_OS=\"macos\"" |
| 353 | } |
| 354 | } |
| 355 | } |
| 356 | |
319 | 357 | pre-destroot { |
320 | 358 | if {![variant_isset xcode] && ![variant_isset xtools]} { |
321 | 359 | destroot.args-append \ |
… |
… |
platform macosx { |
350 | 388 | destroot.target install_tools |
351 | 389 | destroot.args-append DSTROOT=${destroot} |
352 | 390 | post-destroot { |
| 391 | if {[variant_isset libmacho]} { |
| 392 | xinstall -d -m 755 ${destroot}${prefix}/lib/system |
| 393 | xinstall -m 755 ${worksrcpath}/libmacho/dtmp_obj/libmacho.dylib ${destroot}${prefix}/lib/system |
| 394 | } |
| 395 | |
353 | 396 | if {![variant_isset xcode] && ![variant_isset xtools]} { |
354 | 397 | file delete -force ${destroot}${prefix}/OpenSourceLicenses |
355 | 398 | file delete -force ${destroot}${prefix}/OpenSourceVersions |
… |
… |
post-destroot { |
379 | 422 | ln -s llvm-size-mp-${llvm_version} ${destroot}${prefix}/bin/size |
380 | 423 | } |
381 | 424 | } |
| 425 | if {[file exists ${workpath}/build.log]} { |
| 426 | xinstall -m 755 -d ${destroot}${prefix}/share/doc/cctools |
| 427 | xinstall -m 644 ${workpath}/build.log ${destroot}${prefix}/share/doc/cctools/ |
| 428 | } |
382 | 429 | } |
383 | 430 | |
384 | 431 | livecheck.type regex |