mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
tweaks based on using our own semver
This commit is contained in:
parent
4ec52e6c6a
commit
746f2f16f3
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
@ -57,9 +57,6 @@ jobs:
|
|||
|
||||
#FIXME needed for gdk-pixbuf
|
||||
apt --yes install shared-mime-info
|
||||
|
||||
#FIXME needed for teaxyz/setup
|
||||
apt --yes install curl
|
||||
;;
|
||||
macos-11)
|
||||
# screws up a lot of build scripts
|
||||
|
@ -92,8 +89,7 @@ jobs:
|
|||
run: scripts/sort.ts ${{ inputs.projects }}
|
||||
id: sorted
|
||||
|
||||
- run: |
|
||||
../cli/scripts/install.ts ${{ steps.sorted.outputs.pre-install }}
|
||||
- run: ../cli/scripts/install.ts ${{ steps.sorted.outputs.pre-install }}
|
||||
|
||||
- run: scripts/build.ts ${{ steps.sorted.outputs.pkgs }}
|
||||
id: build
|
||||
|
|
|
@ -4,6 +4,7 @@ distributable:
|
|||
|
||||
versions:
|
||||
github: mirror/ncurses/tags
|
||||
strip: /v/
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
|
|
|
@ -4,7 +4,6 @@ distributable:
|
|||
|
||||
versions:
|
||||
github: madler/zlib/tags
|
||||
ignore: v1.0-pre
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
|
|
|
@ -13,16 +13,24 @@ const pantry = usePantry()
|
|||
const { platform } = host()
|
||||
|
||||
export default async function _build(pkg: Package) {
|
||||
try {
|
||||
await __build(pkg)
|
||||
} catch (e) {
|
||||
cellar.keg(pkg).isEmpty()?.rm() // don’t leave empty kegs around
|
||||
throw e
|
||||
}
|
||||
}
|
||||
|
||||
async function __build(pkg: Package) {
|
||||
const [deps, wet] = await calc_deps()
|
||||
await clean()
|
||||
const env = await mkenv()
|
||||
const dst = cellar.keg(pkg)
|
||||
const dst = cellar.keg(pkg).mkpath()
|
||||
const src = await fetch_src(pkg)
|
||||
const installation = await build()
|
||||
await link(installation)
|
||||
await fix_binaries(installation)
|
||||
await fix_pkg_config_files(installation)
|
||||
|
||||
return installation
|
||||
|
||||
//////// utils
|
||||
|
@ -39,7 +47,10 @@ export default async function _build(pkg: Package) {
|
|||
const installation = await should_clean()
|
||||
if (installation) {
|
||||
console.log({ cleaning: installation.path })
|
||||
installation.path.rm({ recursive: true })
|
||||
for await (const [path] of installation.path.ls()) {
|
||||
// we delete contents rather than the directory itself to prevent broken vx.y symlinks
|
||||
path.rm({ recursive: true })
|
||||
}
|
||||
}
|
||||
|
||||
async function should_clean() {
|
||||
|
|
|
@ -100,7 +100,7 @@ async function get_rpaths(exename: Path): Promise<string[]> {
|
|||
it.next()
|
||||
rv.push(it.next().value.trim().match(/^path\s+(.+)$/)[1])
|
||||
|
||||
console.debug(rv.slice(-1)[0])
|
||||
console.debug(rv.at(-1))
|
||||
}
|
||||
}
|
||||
return rv
|
||||
|
|
Loading…
Reference in a new issue