mirror of
https://github.com/ivabus/pantry
synced 2025-06-08 08:20:32 +03:00
tweaks based on using our own semver
This commit is contained in:
parent
4ec52e6c6a
commit
746f2f16f3
5 changed files with 17 additions and 10 deletions
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
@ -57,9 +57,6 @@ jobs:
|
||||||
|
|
||||||
#FIXME needed for gdk-pixbuf
|
#FIXME needed for gdk-pixbuf
|
||||||
apt --yes install shared-mime-info
|
apt --yes install shared-mime-info
|
||||||
|
|
||||||
#FIXME needed for teaxyz/setup
|
|
||||||
apt --yes install curl
|
|
||||||
;;
|
;;
|
||||||
macos-11)
|
macos-11)
|
||||||
# screws up a lot of build scripts
|
# screws up a lot of build scripts
|
||||||
|
@ -92,8 +89,7 @@ jobs:
|
||||||
run: scripts/sort.ts ${{ inputs.projects }}
|
run: scripts/sort.ts ${{ inputs.projects }}
|
||||||
id: sorted
|
id: sorted
|
||||||
|
|
||||||
- run: |
|
- run: ../cli/scripts/install.ts ${{ steps.sorted.outputs.pre-install }}
|
||||||
../cli/scripts/install.ts ${{ steps.sorted.outputs.pre-install }}
|
|
||||||
|
|
||||||
- run: scripts/build.ts ${{ steps.sorted.outputs.pkgs }}
|
- run: scripts/build.ts ${{ steps.sorted.outputs.pkgs }}
|
||||||
id: build
|
id: build
|
||||||
|
|
|
@ -4,6 +4,7 @@ distributable:
|
||||||
|
|
||||||
versions:
|
versions:
|
||||||
github: mirror/ncurses/tags
|
github: mirror/ncurses/tags
|
||||||
|
strip: /v/
|
||||||
|
|
||||||
build:
|
build:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
|
@ -4,7 +4,6 @@ distributable:
|
||||||
|
|
||||||
versions:
|
versions:
|
||||||
github: madler/zlib/tags
|
github: madler/zlib/tags
|
||||||
ignore: v1.0-pre
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
|
@ -13,16 +13,24 @@ const pantry = usePantry()
|
||||||
const { platform } = host()
|
const { platform } = host()
|
||||||
|
|
||||||
export default async function _build(pkg: Package) {
|
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()
|
const [deps, wet] = await calc_deps()
|
||||||
await clean()
|
await clean()
|
||||||
const env = await mkenv()
|
const env = await mkenv()
|
||||||
const dst = cellar.keg(pkg)
|
const dst = cellar.keg(pkg).mkpath()
|
||||||
const src = await fetch_src(pkg)
|
const src = await fetch_src(pkg)
|
||||||
const installation = await build()
|
const installation = await build()
|
||||||
await link(installation)
|
await link(installation)
|
||||||
await fix_binaries(installation)
|
await fix_binaries(installation)
|
||||||
await fix_pkg_config_files(installation)
|
await fix_pkg_config_files(installation)
|
||||||
|
|
||||||
return installation
|
return installation
|
||||||
|
|
||||||
//////// utils
|
//////// utils
|
||||||
|
@ -39,7 +47,10 @@ export default async function _build(pkg: Package) {
|
||||||
const installation = await should_clean()
|
const installation = await should_clean()
|
||||||
if (installation) {
|
if (installation) {
|
||||||
console.log({ cleaning: installation.path })
|
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() {
|
async function should_clean() {
|
||||||
|
|
|
@ -100,7 +100,7 @@ async function get_rpaths(exename: Path): Promise<string[]> {
|
||||||
it.next()
|
it.next()
|
||||||
rv.push(it.next().value.trim().match(/^path\s+(.+)$/)[1])
|
rv.push(it.next().value.trim().match(/^path\s+(.+)$/)[1])
|
||||||
|
|
||||||
console.debug(rv.slice(-1)[0])
|
console.debug(rv.at(-1))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rv
|
return rv
|
||||||
|
|
Loading…
Reference in a new issue