(nameVersion string)
| 16 | ) |
| 17 | |
| 18 | func (p *Port) initBuildConfig(nameVersion string) error { |
| 19 | buildType := p.ctx.BuildType() |
| 20 | hostName := p.ctx.Platform().GetHostName() |
| 21 | platformName := p.ctx.Platform().GetName() |
| 22 | projectName := p.ctx.Project().GetName() |
| 23 | |
| 24 | // host example: x86_64-linux-dev |
| 25 | // target example: aarch64-linux-ubuntu-22.04-gcc-11.5.0-test_project_001-release |
| 26 | buildFolder := expr.If(p.DevDep || p.HostDep, |
| 27 | filepath.Join(nameVersion, hostName+"-dev"), |
| 28 | filepath.Join(nameVersion, fmt.Sprintf("%s-%s-%s", platformName, projectName, buildType)), |
| 29 | ) |
| 30 | |
| 31 | // host example: x86_64-linux-dev |
| 32 | // target example: aarch64-linux-ubuntu-22.04-gcc-11.5.0/test_project_001/release |
| 33 | libraryDir := expr.If(p.DevDep || p.HostDep, |
| 34 | hostName+"-dev", filepath.Join(platformName, projectName, buildType), |
| 35 | ) |
| 36 | |
| 37 | // host example: installed/celer/x86_64-linux-dev/x264@stable.trace |
| 38 | // target example: installed/celer/aarch64-linux-ubuntu-22.04-gcc-11.5.0/test_project_001/release/x264@stable.trace |
| 39 | p.traceFile = filepath.Join(dirs.InstalledDir, "celer", "traces", libraryDir, nameVersion+".trace") |
| 40 | |
| 41 | // host example: installed/celer/x86_64-linux-dev/x264@stable.meta |
| 42 | // target example: installed/celer/aarch64-linux-ubuntu-22.04-gcc-11.5.0/test_project_001/release/x264@stable.meta |
| 43 | p.metaFile = filepath.Join(dirs.InstalledDir, "celer", "metas", libraryDir, nameVersion+".meta") |
| 44 | |
| 45 | // host example: installed/celer/x86_64-linux-dev/x264@stable |
| 46 | // target example: installed/celer/aarch64-linux-ubuntu-22.04-gcc-11.5.0/test_project_001/release/x264@stable |
| 47 | p.PackageDir = filepath.Join(dirs.WorkspaceDir, "packages", filepath.Join(libraryDir, nameVersion)) |
| 48 | |
| 49 | // host example: installed/celer/x86_64-linux-dev/x264@stable |
| 50 | // target example: installed/celer/aarch64-linux-ubuntu-22.04-gcc-11.5.0/test_project_001/release/x264@stable |
| 51 | p.InstalledDir = filepath.Join(dirs.InstalledDir, libraryDir) |
| 52 | |
| 53 | // host example: installed/celer/x86_64-linux-dev/deps/x264@stable |
| 54 | // target example: installed/celer/aarch64-linux-ubuntu-22.04-gcc-11.5.0/test_project_001/release/deps/x264@stable |
| 55 | p.tmpDepsDir = filepath.Join(dirs.TmpDepsDir, libraryDir) |
| 56 | |
| 57 | portConfig := buildsystems.PortConfig{ |
| 58 | Ctx: p.ctx, |
| 59 | LibName: p.Name, |
| 60 | LibVersion: p.Version, |
| 61 | Archive: p.Package.Archive, |
| 62 | Url: p.Package.Url, |
| 63 | Checksum: p.Package.Checksum, |
| 64 | IgnoreSubmodule: p.Package.IgnoreSubmodule, |
| 65 | ProjectName: projectName, |
| 66 | HostName: hostName, |
| 67 | SrcDir: filepath.Join(dirs.WorkspaceDir, "buildtrees", nameVersion, "src"), |
| 68 | BuildDir: filepath.Join(dirs.WorkspaceDir, "buildtrees", buildFolder), |
| 69 | PackageDir: p.PackageDir, |
| 70 | LibraryDir: libraryDir, |
| 71 | DevDep: p.DevDep, |
| 72 | HostDev: p.HostDep || p.DevDep, |
| 73 | Jobs: p.ctx.Jobs(), |
| 74 | RepoDir: filepath.Join(dirs.WorkspaceDir, "buildtrees", nameVersion, "src"), |
| 75 | PortFile: p.portFile, |
no test coverage detected