Skip to content

Commit 68f0d73

Browse files
committed
wip
1 parent 6fbf093 commit 68f0d73

26 files changed

Lines changed: 186 additions & 101 deletions

File tree

.github/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ RUN apt-get update && apt-get install -y curl
33
RUN curl https://pkgx.sh/$(uname)/$(uname -m).tgz | tar xz -C /usr/local/bin
44

55
ENV PKGX_DIST_URL="https://dist.pkgx.dev/v2"
6-
RUN pkgx +llvm.org +patchelf +deno^2 +gnu.org/gcc/libstdcxx@14
6+
RUN pkgx +llvm.org +patchelf +deno^2 +gnu.org/gcc/libstdcxx^14
77
COPY ./brewkit /work/brewkit
88
COPY ./.github /work/.github
99
COPY ./deno.jsonc /work/deno.jsonc

projects/ffmpeg.org/package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies:
1010
sf.net/lame: '>=3.98.3'
1111
# libsdl.org: ^2
1212
freetype.org: ^2
13-
# harfbuzz.org: ^8
13+
harfbuzz.org: ^8
1414
videolan.org/x264: ^0.165
1515
videolan.org/x265: ^4
1616
google.com/libvpx: ^1

projects/imagemagick.org/build.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,15 @@
11
import { BuildOptions, unarchive, run, inreplace } from "brewkit";
2+
import env_include from "../../brewkit/env-include.ts";
23

34
export default async function ({ prefix, tag, version }: BuildOptions) {
45
await unarchive(`https://github.com/ImageMagick/ImageMagick/archive/${tag}.tar.gz`);
56

67
// we use the DESTDIR trick or the install fails due to trying to write to /etc
78
// (despite the fact `--enable-zero-configuration` embeds them in the binaries)
8-
Deno.env.set("DESTDIR", prefix.parent().parent().string);
9-
10-
let extra = '';
11-
if (Deno.build.os == "darwin") {
12-
// stolen from the Honebrew formula
13-
extra = `
14-
"ac_cv_prog_c_openmp=-Xpreprocessor -fopenmp"
15-
"ac_cv_prog_cxx_openmp=-Xpreprocessor -fopenmp"
16-
LDFLAGS=-lomp
17-
`;
18-
}
9+
Deno.env.set("DESTDIR", prefix.string);
1910

2011
run`./configure
21-
--prefix=/imagemagick.org/v${version}
12+
--prefix=/usr/local
2213
--disable-debug
2314
--sysconfdir=/etc
2415
--enable-osx-universal-binary=no
@@ -51,6 +42,11 @@ export default async function ({ prefix, tag, version }: BuildOptions) {
5142

5243
run`make --jobs ${navigator.hardwareConcurrency} install`;
5344

45+
for await (const [path] of prefix.join("usr/local").ls()) {
46+
path.mv({ into: prefix });
47+
}
48+
prefix.join("usr/local").rm().parent().rm();
49+
5450
for (const x of ["Magick++", "MagickCore", "MagickWand"]) {
5551
const fn = prefix.bin.join(`${x}-config`);
5652
inreplace(

projects/imagemagick.org/package.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,17 @@ dependencies:
4343
jpeg.org/jpegxl: ^0.11
4444
github.com/strukturag/libheif: ^1
4545
libzip.org: ^1.11
46-
llvm.org/openmp: ^20
4746

4847
linux:
4948
dependencies:
5049
gnu.org/gcc/libstdcxx: ^14
5150
sourceware.org/bzip2: ^1
5251
zlib.net: ^1
5352
x.org/libx11: ^1
53+
llvm.org/openmp: ^20
54+
# ^^ TODO we want this on darwin too but we need to make our own llvm work
55+
# because the Apple provided one does not support `-fopenmp`
56+
5457

5558
env:
5659
MAGICK_HOME: '{{prefix}}'

projects/libsdl.org/build.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { BuildOptions, unarchive, run, env_include } from "brewkit";
2+
3+
export default async function ({ prefix, version, deps, tag, props }: BuildOptions) {
4+
await unarchive(`https://github.com/libsdl-org/SDL/archive/refs/tags/release-${version}.tar.gz`);
5+
6+
if (Deno.build.os === "linux") {
7+
env_include("x.org/protocol x.org/util-macros");
8+
}
9+
10+
run`cmake
11+
-B bld
12+
-DCMAKE_INSTALL_PREFIX=${prefix}
13+
-Wno-dev
14+
-DSDL_INSTALL=ON
15+
-DSDL_HIDAPI=ON
16+
-DSDL_PULSEAUDIO=ON
17+
-DSDL_PULSEAUDIO_SHARED=ON
18+
-DSDL_DUMMYVIDEO=ON
19+
-DSDL_OPENGL=ON
20+
-DSDL_OPENGLES=ON
21+
-DSDL_X11=ON
22+
-DSDL_X11_XSCRNSAVER=ON
23+
-DSDL_X11_XCURSOR=ON
24+
-DSDL_X11_XINPUT=ON
25+
-DSDL_X11_XRANDR=ON
26+
-DSDL_X11_XSHAPE=ON
27+
-DSDL_X11_SHARED=ON`;
28+
run`cmake --build bld --target install`;
29+
}

projects/libsdl.org/package.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
repository:
2+
https://github.com/libsdl-org/SDL
3+
4+
platforms:
5+
- darwin/aarch64
6+
- linux/x86-64
7+
8+
linux:
9+
dependencies:
10+
x.org/libx11: '*'
11+
# x.org/xcursor: '*'
12+
# x.org/xi: '*'
13+
# x.org/xrandr: '*'
14+
# x.org/xfixes: '*'
15+
# x.org/xrender: '*'
16+
# x.org/xscrnsaver: '*'
17+
# x.org/exts: '*'
18+
19+
env:
20+
CPATH: '{{prefix}}/include{{version.major}}:$CPATH'

projects/libsdl.org/test.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <SDL.h>
2+
int main() {
3+
SDL_Init(SDL_INIT_VIDEO);
4+
SDL_Quit();
5+
return 0;
6+
}

projects/libsdl.org/test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { run, TestOptions } from "brewkit";
2+
3+
export default async function ({version}: TestOptions) {
4+
run`cc test.c -lSDL${version.major}`;
5+
run`./a.out`;
6+
}

projects/llvm.org/package.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ linux:
4141
zlib.net: ^1
4242
gnu.org/gcc/libstdcxx: ^14
4343

44-
# works on all platforms but is very slow to build
45-
# and we only *need* it on Linux
4644
platforms:
45+
- darwin/aarch64
4746
- linux/x86-64

projects/x.org/libx11/versions.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
1-
import { SemVer } from "brewkit";
1+
import versions from '../versions.ts';
22

33
export default async function() {
4-
const rsp = await fetch('https://www.x.org/archive/individual/lib/');
5-
const txt = await rsp.text();
6-
const matches = txt.matchAll(/libX11-(\d+(\.\d+)+)\.tar\.gz/g);
7-
const rv = []
8-
for (const m of matches) {
9-
rv.push({
10-
tag: m[1],
11-
version: new SemVer(m[1])
12-
});
13-
}
14-
return rv;
4+
return versions('libX11');
155
}

0 commit comments

Comments
 (0)