tweaks based on using our own semver

This commit is contained in:
Max Howell 2022-09-23 09:54:00 -04:00
parent 4ec52e6c6a
commit 746f2f16f3
5 changed files with 17 additions and 10 deletions

View file

@ -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

View file

@ -4,6 +4,7 @@ distributable:
versions:
github: mirror/ncurses/tags
strip: /v/
build:
dependencies:

View file

@ -4,7 +4,6 @@ distributable:
versions:
github: madler/zlib/tags
ignore: v1.0-pre
build:
dependencies:

View file

@ -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() // dont 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() {

View file

@ -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