Skip to content

Commit c0376d0

Browse files
committed
wip
1 parent 7db2efc commit c0376d0

File tree

5 files changed

+56
-7
lines changed

5 files changed

+56
-7
lines changed

brewkit/fixups/Stripper.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ export default class Stripper {
1515
}
1616

1717
execute() {
18+
// on linux we don’t want to accidentally use eg. the just built llvm’s strip
19+
const strip = Deno.build.os == "linux" ? `${Deno.env.get("PKGX_BIN")}/strip` : "strip";
1820
for (const path of this.paths) {
1921
if (path.string.endsWith(".dylib") || /\.so(\.\d)*$/.test(path.string)) {
2022
run`strip -x ${path}`;

projects/php.net/package.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,32 @@ programs:
2323

2424
dependencies:
2525
# re2c.org: ^3
26-
# apache.org/apr: ^1
27-
# apache.org/apr-util: ^1
26+
apache.org/apr: ^1
27+
apache.org/apr-util: ^1
2828
# bcrypt.sourceforge.net: ^1
2929
gnu.org/gettext: ^0.24
3030
gnu.org/gmp: ^6
3131
libsodium.org: ^1
32-
# libzip.org: ^1.9
32+
libzip.org: ^1.9
3333
github.com/kkos/oniguruma: ^6
3434
openssl.org: ^3
3535
pcre.org: ^10.30
3636
unicode.org: ^77
3737
gnu.org/libiconv: ^1
3838
kerberos.org: ^1
39-
gnome.org/libxml2: ^2
4039
gnome.org/libxslt: ^1
4140
libpng.org: ^1
42-
# google.com/webp: ^1
43-
# ijg.org: ^9
44-
# openldap.org: ^2
41+
google.com/webp: ^1
42+
ijg.org: ^9
43+
openldap.org: ^2
4544

4645
linux:
4746
dependencies:
4847
sourceware.org/libffi: ^3.4.7
4948
gnu.org/gcc/libstdcxx: ^14
5049
sourceware.org/bzip2: ^1
5150
thrysoee.dk/editline: ^3
51+
gnome.org/libxml2: ^2
5252
sqlite.org: ^3
5353
zlib.net: ^1
5454
curl.se: ^8

projects/sf.net/bcrypt/build.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { BuildOptions, unarchive, run } from "brewkit";
2+
3+
export default async function ({ prefix, version, deps, tag, props }: BuildOptions) {
4+
await unarchive(`https://bcrypt.sourceforge.net/bcrypt-${version.marketing}.tar.gz`);
5+
run`make LDFLAGS=-lz PREFIX=${prefix} install`;
6+
}

projects/sf.net/bcrypt/package.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
platforms:
2+
- darwin/aarch64
3+
- linux/x86-64
4+
5+
versions:
6+
- 1.1.0
7+
8+
programs:
9+
- bin/bcrypt
10+
11+
linux:
12+
dependencies:
13+
zlib.net: ^1

projects/sf.net/bcrypt/test.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { nonce } from "brewkit";
2+
import { assertStringIncludes } from "jsr:@std/assert@1/string-includes";
3+
import { assertEquals } from "jsr:@std/assert@1/equals";
4+
5+
export default async function () {
6+
const nonced = nonce();
7+
Deno.writeTextFileSync("test.txt", nonced);
8+
9+
{
10+
const proc = new Deno.Command("bcrypt", {args: ["-r", "./test.txt"], stdin: "piped"}).spawn();
11+
const stdin = proc.stdin.getWriter();
12+
stdin.write(new TextEncoder().encode("12345678\n12345678\n"));
13+
stdin.close();
14+
const { code } = await proc.status;
15+
assertEquals(code, 0);
16+
17+
Deno.removeSync("test.txt");
18+
}
19+
20+
const proc = new Deno.Command("bcrypt", {args: ["-r", "./test.txt.bfe"], stdin: "piped"}).spawn();
21+
const stdin = proc.stdin.getWriter();
22+
stdin.write(new TextEncoder().encode("12345678\n"));
23+
stdin.close();
24+
const { code } = await proc.status;
25+
assertEquals(code, 0);
26+
27+
assertStringIncludes(Deno.readTextFileSync("test.txt"), nonced);
28+
}

0 commit comments

Comments
 (0)