mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
+ninja+cmake (#61)
This commit is contained in:
parent
2ea19001cf
commit
f45667553a
3 changed files with 79 additions and 2 deletions
53
projects/cmake.org/package.yml
Normal file
53
projects/cmake.org/package.yml
Normal 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
|
21
projects/ninja-build.org/package.yml
Normal file
21
projects/ninja-build.org/package.yml
Normal 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
|
|
@ -55,9 +55,12 @@ async function get_versions(pkg: Package): Promise<SemVer[]> {
|
|||
|
||||
//FIXME? API isn’t 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()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue