Skip to content

Commit dfd64d4

Browse files
committed
wip
1 parent aa3448a commit dfd64d4

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

brewkit/build-template.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ if (Deno.build.os != "windows") {
9898
prefix,
9999
deps_prefixes,
100100
dstdir,
101+
PKGX_DIR,
101102
process_fixup,
102103
);
103104
}

brewkit/fixup.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default async function default_fixups(
1414
prefix: Path,
1515
dep_prefixes: Path[],
1616
PKGX_DIR: Path,
17+
original_PKGX_DIR: Path,
1718
process: (path: Path) => boolean = () => true,
1819
) {
1920
// fix pkgs putting man at the root rather than in `share`
@@ -88,7 +89,7 @@ export default async function default_fixups(
8889
switch (path.extname()) {
8990
case ".pc":
9091
{
91-
await fix_pkg_config_file(path, prefix);
92+
await fix_pkg_config_file(path, prefix, PKGX_DIR, original_PKGX_DIR);
9293
}
9394
break;
9495
case ".pyc":

brewkit/fixups/fix-pkg-config-file.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Path from "../path.ts";
22

3-
export async function fix_pkg_config_file(path: Path, install_prefix: Path) {
3+
export async function fix_pkg_config_file(path: Path, install_prefix: Path, PKGX_DIR: Path, og_PKGX_DIR: Path) {
44
const orig = await path.read();
55
const relative_path = install_prefix.relative({ to: path.parent() });
66
const text = orig.replaceAll(
@@ -9,6 +9,9 @@ export async function fix_pkg_config_file(path: Path, install_prefix: Path) {
99
).replaceAll(
1010
"/usr/local", // we also sometimes pretend to install to /usr/local so that the package requires less fuckery, eg. python
1111
`\${pcfiledir}/${relative_path}`,
12+
).replaceAll(
13+
og_PKGX_DIR.string, // for dependency paths that leak into these pcfiles
14+
`\${prefix}/${PKGX_DIR.relative({ to: install_prefix })}`,
1215
);
1316
if (orig !== text) {
1417
console.log("%c+", "color:yellow", "fixing:", path);

projects/imagemagick.org/package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ linux:
5555

5656
env:
5757
MAGICK_HOME: '{{prefix}}'
58-
CPATH: "{{prefix}}/include/Magick-{{version.major}}:$CPATH"
58+
CPATH: "{{prefix}}/include/ImageMagick-{{version.major}}:$CPATH"

projects/imagemagick.org/test.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ export default async function ({ version }: TestOptions) {
3737

3838
run`convert -delay 20 -loop 0 ${fixture('png')} ${fixture('png')} anim.gif`;
3939

40-
switch (version.major) {
41-
case 6:
42-
run`pkgx +ruby@3 gem install rmagick -v "~> 4.2"`;
43-
break;
44-
case 7:
45-
run`pkgx +ruby@3 gem install rmagick -v "~> 5"`;
46-
}
40+
// the gem builds a native extension and it should *just work*
41+
run`pkgx +ruby@3 gem install rmagick`;
4742
}

0 commit comments

Comments
 (0)