+ninja+cmake (#61)

This commit is contained in:
Max Howell 2022-08-01 22:50:33 -04:00 committed by GitHub
parent 2ea19001cf
commit f45667553a
3 changed files with 79 additions and 2 deletions

View file

@ -0,0 +1,53 @@
distributable:
url: https://github.com/Kitware/CMake/releases/download/v{{ version }}/cmake-{{ version }}.tar.gz
strip-components: 1
versions:
github: Kitware/CMake/releases/tags
detect:
cmd: cmake --version
regex: cmake version \v
dependencies:
curl.se: '>=5'
zlib.net: 1
sourceware.org/bzip2: 1
provides:
- bin/cmake
- bin/ccmake
- bin/cpack
- bin/ctest
# TODO
# * --system-libs (provide all deps ourselves)
# (Zlib, Bzip2, cURL, nghttp2, Expat and libarchive)
build:
dependencies:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
script: |-
./bootstrap \
--prefix={{ prefix }} \
--parallel={{ hw.concurrency }} \
--datadir=/var \
--docdir=/share/doc \
--mandir=/share/man \
--system-zlib \
--system-bzip2 \
--system-curl \
-- \
-DCMake_BUILD_LTO=ON
make --jobs {{ hw.concurrency }} install
env:
#FIXME tea/cli does this for things that depend on cmake, but not for this
#FIXME this should at least be moustache variables per pkg
CMAKE_PREFIX_PATH: /opt/curl.se/v*:/opt/sourceware.org/bzip2/v1:/opt/zlib.net/v1
error-log:
Bootstrap.cmk/cmake_bootstrap.log
test:
script:
cmake --version

View file

@ -0,0 +1,21 @@
distributable:
url: https://github.com/ninja-build/ninja/archive/refs/tags/v{{ version }}.tar.gz
strip-components: 1
provides:
- bin/ninja
versions:
github: ninja-build/ninja
build:
dependencies:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
cmake.org: 3
script: |-
cmake ..
make --jobs {{ hw.concurrency }}
mkdir "{{ prefix }}/bin"
mv ninja "{{ prefix }}/bin"
working-directory: build-cmake

View file

@ -55,9 +55,12 @@ async function get_versions(pkg: Package): Promise<SemVer[]> {
//FIXME? API isnt clear if these nulls indicate failure or not
//NOTE if this is a new package then some empty results is expected
return rsp
const got = rsp
?.contents
?.compactMap(x => x.key?.split("/").pop())
.compactMap(semver.coerce) //FIXME coerce is too loose
.sort() ?? []
?? []
// have to add pkg.version as put and get are not atomic
return [...new Set([...got, pkg.version])].sort()
}