CheckHostSupported Host supported means that the port can be built natively.
(nameVersion string)
| 277 | |
| 278 | // CheckHostSupported Host supported means that the port can be built natively. |
| 279 | func (p Port) CheckHostSupported(nameVersion string) bool { |
| 280 | if v, ok := hostSupportedCache.Load(nameVersion); ok { |
| 281 | return v.(bool) |
| 282 | } |
| 283 | |
| 284 | var port = Port{DevDep: true} |
| 285 | if err := port.Init(p.ctx, nameVersion); err != nil { |
| 286 | return false |
| 287 | } |
| 288 | |
| 289 | supported := port.IsHostSupported() |
| 290 | hostSupportedCache.Store(nameVersion, supported) |
| 291 | return supported |
| 292 | } |
| 293 | |
| 294 | func (p Port) toPkgCacheBuildConfig(buildConfig *buildsystems.BuildConfig, portFile string) pkgcache.BuildConfig { |
| 295 | return pkgcache.BuildConfig{ |
no test coverage detected