(packageDir, platformName, projectName string)
| 401 | } |
| 402 | |
| 403 | func (p Port) PackageFiles(packageDir, platformName, projectName string) ([]string, error) { |
| 404 | if !fileio.PathExists(packageDir) { |
| 405 | return nil, nil |
| 406 | } |
| 407 | |
| 408 | var files []string |
| 409 | if err := filepath.WalkDir(packageDir, func(path string, d os.DirEntry, err error) error { |
| 410 | if err != nil { |
| 411 | return err |
| 412 | } |
| 413 | |
| 414 | if d.IsDir() { |
| 415 | return nil |
| 416 | } |
| 417 | |
| 418 | relativePath, err := filepath.Rel(packageDir, path) |
| 419 | if err != nil { |
| 420 | return err |
| 421 | } |
| 422 | |
| 423 | if p.DevDep || p.HostDep { |
| 424 | file := filepath.Join(p.ctx.Platform().GetHostName()+"-dev", relativePath) |
| 425 | files = append(files, file) |
| 426 | } else { |
| 427 | libraryDir := filepath.Join(platformName, projectName, p.ctx.BuildType()) |
| 428 | file := filepath.Join(libraryDir, relativePath) |
| 429 | files = append(files, file) |
| 430 | } |
| 431 | return nil |
| 432 | }); err != nil { |
| 433 | return nil, err |
| 434 | } |
| 435 | |
| 436 | return files, nil |
| 437 | } |
| 438 | |
| 439 | func (p Port) IsHostSupported() bool { |
| 440 | // Only build_tool ports (like m4, automake, libtool, autoconf) are restricted to Linux/Darwin. |
no test coverage detected