Skip to content

Commit 4cd9ab9

Browse files
committed
wip
1 parent ccb09da commit 4cd9ab9

File tree

3 files changed

+22
-37
lines changed

3 files changed

+22
-37
lines changed

projects/cmake.org/build.ts

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
import { BuildOptions, run, unarchive } from "brewkit";
22

3-
//TODO has more deps that it vendors
4-
// use --sysmem-libs to use them
3+
//NOTE we statically link everything because we have a policy
4+
// where build tools have no deps to prevent their deps inadvertently
5+
// leaking into other builds
56

67
export default async function ({ prefix, deps, version }: BuildOptions) {
78
await unarchive(`https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}.tar.gz`);
89

9-
const extra_args = Deno.build.os != "darwin"
10-
? `-DZLIB_LIBRARY=${deps["zlib.net"].prefix}/lib/libz.so
11-
-DZLIB_INCLUDE_DIR=${deps["zlib.net"].prefix}/include
12-
-DCURL_LIBRARY=${deps["curl.se"].prefix}/lib/libcurl.so
13-
-DCURL_INCLUDE_DIR=${deps["curl.se"].prefix}/include
14-
-DBZIP2_LIBRARIES=${deps["sourceware.org/bzip2"].prefix}/lib/libbz2.so
15-
-DBZIP2_INCLUDE_DIR=${deps["sourceware.org/bzip2"].prefix}/include`
16-
: "";
17-
18-
if (Deno.build.os != "windows") {
10+
try {
11+
env_include("cmake.org");
12+
} catch {
1913
run`./bootstrap
2014
--prefix=${prefix}
2115
--docdir=/share/doc
@@ -26,18 +20,21 @@ export default async function ({ prefix, deps, version }: BuildOptions) {
2620
--
2721
-DCMake_BUILD_LTO=ON
2822
-DCMAKE_BUILD_TYPE=Release
29-
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
30-
${extra_args}
3123
`;
32-
run`make --jobs ${navigator.hardwareConcurrency} install`;
33-
} else {
34-
run`cmake . -B build
35-
-DCMAKE_INSTALL_PREFIX=${prefix}
36-
-DCMAKE_BUILD_TYPE=Release
37-
${extra_args}`;
38-
run`cmake --build build --config Release --target install --parallel ${navigator.hardwareConcurrency}`;
3924
}
4025

26+
run`cmake
27+
-S .
28+
-B build
29+
-DCMake_BUILD_LTO=ON
30+
-DCMAKE_INSTALL_PREFIX=${prefix}
31+
-DCMAKE_BUILD_TYPE=Release`;
32+
run`cmake
33+
--build build
34+
--config Release
35+
--target install
36+
--parallel`;
37+
4138
// we have a “docs are on the Internet” policy
4239
prefix.share.join(`cmake-${version.marketing}/Help`).rm("rf");
4340
}

projects/cmake.org/package.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@ darwin:
1010
programs:
1111
- bin/ccmake
1212

13-
linux:
14-
dependencies:
15-
curl.se: ">=5"
16-
zlib.net: ^1
17-
sourceware.org/bzip2: ^1
18-
19-
windows:
20-
dependencies:
21-
curl.se: ">=5"
22-
zlib.net: ^1
23-
sourceware.org/bzip2: ^1
24-
2513
platforms:
2614
- linux
2715
- darwin

projects/python.org/package.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@ dependencies:
1414
linux:
1515
dependencies:
1616
github.com/libexpat: ^2
17-
sourceware.org/bzip2: ^1
1817
gnu.org/readline: ^7,^8
1918
invisible-island.net/ncurses: ^6
20-
zlib.net: ^1
21-
tukaani.org/xz: ^5
22-
sqlite.org: ^3
19+
sourceware.org/bzip2: ^1
2320
sourceware.org/libffi: ^3
21+
sqlite.org: ^3
22+
zlib.net: ^1
2423
# TODO
2524
# bytereef.org/mpdecimal: 2
2625
# tcl-lang.org: 8
@@ -35,6 +34,7 @@ programs:
3534
platforms:
3635
- darwin
3736
- linux
37+
- windows
3838

3939
knobs:
4040
- side-by-side

0 commit comments

Comments
 (0)