From 517ffae2be3dc01f3fcf5c05314001ff1ec056ab Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 30 May 2026 18:38:32 +0200 Subject: [PATCH 01/12] =?UTF-8?q?new(autotrace.sourceforge.net):=20bitmap?= =?UTF-8?q?=20=E2=86=92=20vector=20tracer=20(closes=20#9454)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Autotrace's CLI + libautotrace. Same role as homebrew's `autotrace` formula. Upstream ships only `configure.ac`, so the build first runs `./autogen.sh` to regenerate the autoconf surface, then `./configure + make install`. Drops two optional features so the bottle's dep closure stays manageable: - pstoedit (no pantry recipe; provides .ps / .eps OUTPUT — input formats are still all reachable via ImageMagick). - GraphicsMagick (alternate input library — already use IM7). Closes pkgxdev/pantry#9454. Co-Authored-By: Claude Opus 4.7 --- .../autotrace.sourceforge.net/package.yml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 projects/autotrace.sourceforge.net/package.yml diff --git a/projects/autotrace.sourceforge.net/package.yml b/projects/autotrace.sourceforge.net/package.yml new file mode 100644 index 0000000000..5cc9efc30f --- /dev/null +++ b/projects/autotrace.sourceforge.net/package.yml @@ -0,0 +1,55 @@ +# AutoTrace — convert bitmap raster images to vector graphics. +# +# CLI tool + libautotrace library. Same role as homebrew's +# `autotrace` formula; closes pkgxdev/pantry#9454. +# +# Mandatory deps per upstream configure.ac: +# - glib >= 2.44 (gmodule, gthread, gobject sub-libs) +# - libpng (for PNG output) +# - ImageMagick 7 (libMagickWand-7 for input formats) +# +# Optional features dropped to keep the bottle simple: +# - pstoedit (no pantry recipe; would gain .ps / .eps output) +# - graphicsmagick (alternate to ImageMagick — pick one) + +distributable: + url: https://github.com/autotrace/autotrace/archive/refs/tags/{{version.raw}}.tar.gz + strip-components: 1 + +versions: + github: autotrace/autotrace + +dependencies: + gnome.org/glib: '>=2.44' + libpng.org: '*' + imagemagick.org: '*' + +build: + dependencies: + gnu.org/autoconf: '*' + gnu.org/automake: '*' + gnu.org/libtool: '*' + gnu.org/gettext: '*' + freedesktop.org/intltool: '*' + freedesktop.org/pkg-config: '*' + perl.org: '*' + + script: + # Upstream ships configure.ac only — autoreconf to generate configure. + - ./autogen.sh + - ./configure $ARGS + - make --jobs {{ hw.concurrency }} + - make install + + env: + ARGS: + - --prefix={{prefix}} + - --without-pstoedit # no pantry pstoedit recipe yet + - --with-magick=auto # detect IM 7 via pkg-config + +provides: + - bin/autotrace + +test: + - autotrace --version 2>&1 | grep -i "{{version}}" + - autotrace --help 2>&1 | head -3 From 4e4be8b214d5d908aedc6f05ea10242a40342b30 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 30 May 2026 18:47:32 +0200 Subject: [PATCH 02/12] fix(autotrace): --disable-nls to drop intltool/XML::Parser gate First iter failed at: configure: error: XML::Parser perl module is required for intltool autotrace's configure.ac demands intltool unconditionally; intltool in turn demands Perl's `XML::Parser` module. Pantry's perl.org doesn't ship XML::Parser, and adding a Perl-CPAN module recipe is a bigger detour than the i18n surface is worth here. `--disable-nls` short-circuits the entire intltool gate. autotrace loses its translated user-facing strings (English-only output) but the bitmap-to-vector core is unaffected. Re-enable when a pantry `perl.org/XML-Parser` (or equivalent CPAN-via-pkgx) recipe exists. Co-Authored-By: Claude Opus 4.7 --- projects/autotrace.sourceforge.net/package.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/projects/autotrace.sourceforge.net/package.yml b/projects/autotrace.sourceforge.net/package.yml index 5cc9efc30f..c4d7d9c82b 100644 --- a/projects/autotrace.sourceforge.net/package.yml +++ b/projects/autotrace.sourceforge.net/package.yml @@ -30,9 +30,12 @@ build: gnu.org/automake: '*' gnu.org/libtool: '*' gnu.org/gettext: '*' - freedesktop.org/intltool: '*' freedesktop.org/pkg-config: '*' perl.org: '*' + # intltool removed — its configure step requires Perl's XML::Parser + # module which pantry's perl recipe doesn't bundle. Compensated + # by `--disable-nls` to skip the i18n machinery autotrace uses + # intltool for. script: # Upstream ships configure.ac only — autoreconf to generate configure. @@ -46,6 +49,12 @@ build: - --prefix={{prefix}} - --without-pstoedit # no pantry pstoedit recipe yet - --with-magick=auto # detect IM 7 via pkg-config + # autotrace's configure.ac demands intltool, which in turn + # demands Perl's XML::Parser. pantry's perl.org doesn't ship + # XML::Parser as a built-in. autotrace's i18n surface is + # just translated strings — disabling nls drops the intltool + # gate entirely. Re-enable once we have an XML::Parser recipe. + - --disable-nls provides: - bin/autotrace From 3671dec6af7ad1bbf93011c43fc95aa40618ed07 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 30 May 2026 19:35:40 +0200 Subject: [PATCH 03/12] fix(autotrace): restore intltool build dep (it ships XML::Parser) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous iter dropped `freedesktop.org/intltool` and added `--disable-nls`, assuming intltool would still pull in XML::Parser unconditionally. Two things were wrong with that: 1. `./autogen.sh` requires `intltoolize` regardless of nls — it exits with "*** No intltoolize found ***" before configure ever sees `--disable-nls`. That's why iter 2 still failed at the same point on all 4 bottles. 2. Pantry's `freedesktop.org/intltool` recipe already bundles XML::Parser (via `cpanm -l {{prefix}} XML::Parser ...`). No need to add a Perl-CPAN module recipe — the existing intltool one solves it. Homebrew handles the same problem on Linux by depending on `perl-xml-parser`. Pantry's intltool wraps both intltool + the needed Perl module in one dep, so just put it back. Refs pkgxdev/pantry#9454. Co-Authored-By: Claude Opus 4.7 --- .../autotrace.sourceforge.net/package.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/projects/autotrace.sourceforge.net/package.yml b/projects/autotrace.sourceforge.net/package.yml index c4d7d9c82b..4bd96a292c 100644 --- a/projects/autotrace.sourceforge.net/package.yml +++ b/projects/autotrace.sourceforge.net/package.yml @@ -31,14 +31,17 @@ build: gnu.org/libtool: '*' gnu.org/gettext: '*' freedesktop.org/pkg-config: '*' + freedesktop.org/intltool: '*' + # `freedesktop.org/intltool` bundles Perl's XML::Parser via cpanm, + # which `intltoolize` (required by ./autogen.sh) needs. Pantry's + # `perl.org` recipe doesn't ship XML::Parser on its own — relying + # on the existing intltool recipe is the upstream-blessed path + # (homebrew uses `perl-xml-parser` on Linux for the same reason). perl.org: '*' - # intltool removed — its configure step requires Perl's XML::Parser - # module which pantry's perl recipe doesn't bundle. Compensated - # by `--disable-nls` to skip the i18n machinery autotrace uses - # intltool for. script: - # Upstream ships configure.ac only — autoreconf to generate configure. + # Upstream ships configure.ac only — autogen.sh runs autopoint + + # autoreconf with `intltoolize --automake --copy` as AUTOPOINT. - ./autogen.sh - ./configure $ARGS - make --jobs {{ hw.concurrency }} @@ -49,12 +52,6 @@ build: - --prefix={{prefix}} - --without-pstoedit # no pantry pstoedit recipe yet - --with-magick=auto # detect IM 7 via pkg-config - # autotrace's configure.ac demands intltool, which in turn - # demands Perl's XML::Parser. pantry's perl.org doesn't ship - # XML::Parser as a built-in. autotrace's i18n surface is - # just translated strings — disabling nls drops the intltool - # gate entirely. Re-enable once we have an XML::Parser recipe. - - --disable-nls provides: - bin/autotrace From 092a78847d1cc4079dc097eacc7c10b6d58d62e2 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 30 May 2026 19:40:09 +0200 Subject: [PATCH 04/12] fix(autotrace): export PERL5LIB so configure finds intltool's XML::Parser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit autogen.sh now passes (intltoolize available), but autotrace's configure script does an independent `perl -e 'use XML::Parser'` probe and pantry's perl.org doesn't ship that module — only freedesktop.org/intltool's local CPAN tree at $prefix/lib/perl5 has it. intltool sets PERL5LIB in `runtime.env` so its own binaries see the module, but that env only applies when intltool runs, not during consumer builds invoking perl directly. So point perl at intltool's perl5 dirs from autotrace's build env explicitly. Same pattern as pwmt.org/zathura and friends would need; nothing exotic. Refs pkgxdev/pantry#9454. Co-Authored-By: Claude Opus 4.7 --- projects/autotrace.sourceforge.net/package.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/autotrace.sourceforge.net/package.yml b/projects/autotrace.sourceforge.net/package.yml index 4bd96a292c..bc1b048e10 100644 --- a/projects/autotrace.sourceforge.net/package.yml +++ b/projects/autotrace.sourceforge.net/package.yml @@ -48,6 +48,11 @@ build: - make install env: + # autotrace's configure does its own `perl -e 'use XML::Parser'` + # probe; intltool's runtime.env only kicks in when its binaries + # run, so we must point perl at intltool's bundled CPAN tree + # explicitly here. + PERL5LIB: ${{deps.freedesktop.org/intltool.prefix}}/lib/perl5:{{deps.freedesktop.org/intltool.prefix}}/libexec/lib/perl5:$PERL5LIB ARGS: - --prefix={{prefix}} - --without-pstoedit # no pantry pstoedit recipe yet From cb869dea2142f24bfc1285dbc09155db279f93e3 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 30 May 2026 19:47:12 +0200 Subject: [PATCH 05/12] fix(autotrace): install XML::Parser locally for configure's perl probe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous PERL5LIB-points-at-intltool fix didn't take. autotrace's configure runs the brewkit perl wrapper (\`pkgx +perl.org -- perl\`) and that path resolution wasn't finding intltool's bundled CPAN tree even with PERL5LIB exported in build env (visible in CI log). Install XML::Parser into a scratch dir at build time via cpanm and point PERL5LIB there instead — same pattern intltool itself uses. Added a diagnostic probe to confirm the env actually works before configure runs. Co-Authored-By: Claude Opus 4.7 --- .../autotrace.sourceforge.net/package.yml | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/projects/autotrace.sourceforge.net/package.yml b/projects/autotrace.sourceforge.net/package.yml index bc1b048e10..0f6ccff745 100644 --- a/projects/autotrace.sourceforge.net/package.yml +++ b/projects/autotrace.sourceforge.net/package.yml @@ -32,14 +32,22 @@ build: gnu.org/gettext: '*' freedesktop.org/pkg-config: '*' freedesktop.org/intltool: '*' - # `freedesktop.org/intltool` bundles Perl's XML::Parser via cpanm, - # which `intltoolize` (required by ./autogen.sh) needs. Pantry's - # `perl.org` recipe doesn't ship XML::Parser on its own — relying - # on the existing intltool recipe is the upstream-blessed path - # (homebrew uses `perl-xml-parser` on Linux for the same reason). perl.org: '*' + cpanmin.us: '*' + # `freedesktop.org/intltool` brings `intltoolize` (called from + # ./autogen.sh) but autotrace's `configure` does its own + # `perl -e 'require XML::Parser'` probe and picks up brewkit's + # perl wrapper, which doesn't inherit intltool's runtime PERL5LIB. + # Install XML::Parser into a scratch dir up-front and point + # PERL5LIB at it for the configure run — same pattern intltool + # itself uses internally. script: + - mkdir -p perl-xml-parser + - cpanm -l "$SRCROOT/perl-xml-parser" XML::Parser --force --notest --verbose + # Diagnostic: show that perl can actually find XML::Parser with + # our PERL5LIB. If this prints "ok" we know the env is right. + - perl -e 'use XML::Parser; print "ok\n"' || (echo "PERL5LIB=$PERL5LIB"; ls -la "$SRCROOT/perl-xml-parser/lib/perl5/" 2>&1 || true; exit 1) # Upstream ships configure.ac only — autogen.sh runs autopoint + # autoreconf with `intltoolize --automake --copy` as AUTOPOINT. - ./autogen.sh @@ -48,11 +56,7 @@ build: - make install env: - # autotrace's configure does its own `perl -e 'use XML::Parser'` - # probe; intltool's runtime.env only kicks in when its binaries - # run, so we must point perl at intltool's bundled CPAN tree - # explicitly here. - PERL5LIB: ${{deps.freedesktop.org/intltool.prefix}}/lib/perl5:{{deps.freedesktop.org/intltool.prefix}}/libexec/lib/perl5:$PERL5LIB + PERL5LIB: $SRCROOT/perl-xml-parser/lib/perl5:$PERL5LIB ARGS: - --prefix={{prefix}} - --without-pstoedit # no pantry pstoedit recipe yet From aeeb505c5b78c4ea9732e27aee16189dda21b75f Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 30 May 2026 19:51:51 +0200 Subject: [PATCH 06/12] fix(autotrace): build XML::Parser against live perl, bypass stale intltool tree MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI revealed the root cause: intltool's bundled XML::Parser ships XS .so files (Clone.c, etc.) compiled against perl 5.40, but the current perl.org bottle is 5.42. Loading them errors with: Perl API version v5.40.0 of Clone.c does not match v5.42.0 So intltool's runtime.env PERL5LIB has been poisoning every consumer build since the perl 5.42 upgrade — but autotrace is the first new recipe to hit it. Workaround in this recipe: 1. \`unset PERL5LIB\` before cpanm so it loads no stale .so files. 2. cpanm XML::Parser into a scratch dir against the current perl. 3. Set PERL5LIB to ONLY our scratch dir (not intltool's) for the autogen.sh + configure run. intltoolize itself is still a shell script that re-execs perl with its own shebang — it doesn't read PERL5LIB at autogen.sh time, so overriding it is safe. Long-term fix is to rebuild freedesktop.org/intltool against the current perl. That belongs in its own PR. Refs pkgxdev/pantry#9454. Co-Authored-By: Claude Opus 4.7 --- .../autotrace.sourceforge.net/package.yml | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/projects/autotrace.sourceforge.net/package.yml b/projects/autotrace.sourceforge.net/package.yml index 0f6ccff745..37f9409a81 100644 --- a/projects/autotrace.sourceforge.net/package.yml +++ b/projects/autotrace.sourceforge.net/package.yml @@ -34,20 +34,22 @@ build: freedesktop.org/intltool: '*' perl.org: '*' cpanmin.us: '*' - # `freedesktop.org/intltool` brings `intltoolize` (called from - # ./autogen.sh) but autotrace's `configure` does its own - # `perl -e 'require XML::Parser'` probe and picks up brewkit's - # perl wrapper, which doesn't inherit intltool's runtime PERL5LIB. - # Install XML::Parser into a scratch dir up-front and point - # PERL5LIB at it for the configure run — same pattern intltool - # itself uses internally. + # intltool brings `intltoolize` (called from ./autogen.sh). + # XML::Parser comes from intltool's bundled CPAN tree, but that + # tree's XS .so files were compiled against an older perl ABI + # and can't load into the current perl.org (5.42.x). So we + # install XML::Parser fresh into a scratch dir against the + # current perl, and point PERL5LIB at it for both autogen.sh + # and configure — bypassing intltool's stale perl5 lib entirely. script: - - mkdir -p perl-xml-parser - - cpanm -l "$SRCROOT/perl-xml-parser" XML::Parser --force --notest --verbose - # Diagnostic: show that perl can actually find XML::Parser with - # our PERL5LIB. If this prints "ok" we know the env is right. - - perl -e 'use XML::Parser; print "ok\n"' || (echo "PERL5LIB=$PERL5LIB"; ls -la "$SRCROOT/perl-xml-parser/lib/perl5/" 2>&1 || true; exit 1) + # Build XML::Parser against the live perl. Unset PERL5LIB first + # so cpanm's own perl doesn't pick up intltool's stale XS .so + # files (Clone.c built for v5.40 vs current v5.42 ABI mismatch). + - run: | + unset PERL5LIB + mkdir -p "$SRCROOT/perl-xml-parser" + cpanm -l "$SRCROOT/perl-xml-parser" XML::Parser --notest --verbose # Upstream ships configure.ac only — autogen.sh runs autopoint + # autoreconf with `intltoolize --automake --copy` as AUTOPOINT. - ./autogen.sh @@ -56,7 +58,9 @@ build: - make install env: - PERL5LIB: $SRCROOT/perl-xml-parser/lib/perl5:$PERL5LIB + # Put our freshly-built XML::Parser first; deliberately do NOT + # include intltool's lib/perl5 (stale ABI — see comment above). + PERL5LIB: $SRCROOT/perl-xml-parser/lib/perl5 ARGS: - --prefix={{prefix}} - --without-pstoedit # no pantry pstoedit recipe yet From 0eadc3840432febc01d22817ccd143164870588f Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 30 May 2026 19:57:01 +0200 Subject: [PATCH 07/12] fix(autotrace): point configure's PERL/INTLTOOL_PERL at real perl bin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cpanm correctly built XML::Parser into the scratch dir (visible in CI log: \`Installing .../perl-xml-parser/lib/perl5/.../XML/Parser.pm\`), but configure's check still fails. Root cause: brewkit's perl wrapper at \`/libexec/perl\` invokes \`pkgx +perl.org -- perl\`, which constructs a fresh env from perl.org's runtime.env and drops the build-shell PERL5LIB. Bypass the wrapper by pointing PERL and INTLTOOL_PERL at the real perl binary at \`{{deps.perl.org.prefix}}/bin/perl\` — that one inherits PERL5LIB normally, so our scratch dir's XML::Parser is visible. Refs pkgxdev/pantry#9454. Co-Authored-By: Claude Opus 4.7 --- projects/autotrace.sourceforge.net/package.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/autotrace.sourceforge.net/package.yml b/projects/autotrace.sourceforge.net/package.yml index 37f9409a81..b099e72c6c 100644 --- a/projects/autotrace.sourceforge.net/package.yml +++ b/projects/autotrace.sourceforge.net/package.yml @@ -52,12 +52,16 @@ build: cpanm -l "$SRCROOT/perl-xml-parser" XML::Parser --notest --verbose # Upstream ships configure.ac only — autogen.sh runs autopoint + # autoreconf with `intltoolize --automake --copy` as AUTOPOINT. + # Bypass brewkit's perl wrapper (which drops PERL5LIB via + # `pkgx +perl.org -- perl`) by pointing PERL/INTLTOOL_PERL at + # the real perl binary directly. - ./autogen.sh - - ./configure $ARGS + - ./configure PERL=$REAL_PERL INTLTOOL_PERL=$REAL_PERL $ARGS - make --jobs {{ hw.concurrency }} - make install env: + REAL_PERL: '{{deps.perl.org.prefix}}/bin/perl' # Put our freshly-built XML::Parser first; deliberately do NOT # include intltool's lib/perl5 (stale ABI — see comment above). PERL5LIB: $SRCROOT/perl-xml-parser/lib/perl5 From 15f943bc17c6d4d0dbeb22630cac7fcfbb3948d6 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 30 May 2026 20:01:34 +0200 Subject: [PATCH 08/12] fix(autotrace): use \`env -u PERL5LIB\` instead of \`unset\` so PERL5LIB survives brewkit runs all script steps in a single shell, so \`unset PERL5LIB\` inside an early step leaks into ./configure and configure can't see our scratch XML::Parser tree. Scope the unset to cpanm only via \`env -u PERL5LIB cpanm ...\`. Refs pkgxdev/pantry#9454. Co-Authored-By: Claude Opus 4.7 --- .../autotrace.sourceforge.net/package.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/projects/autotrace.sourceforge.net/package.yml b/projects/autotrace.sourceforge.net/package.yml index b099e72c6c..1d033ee8b2 100644 --- a/projects/autotrace.sourceforge.net/package.yml +++ b/projects/autotrace.sourceforge.net/package.yml @@ -43,18 +43,17 @@ build: # and configure — bypassing intltool's stale perl5 lib entirely. script: - # Build XML::Parser against the live perl. Unset PERL5LIB first - # so cpanm's own perl doesn't pick up intltool's stale XS .so - # files (Clone.c built for v5.40 vs current v5.42 ABI mismatch). - - run: | - unset PERL5LIB - mkdir -p "$SRCROOT/perl-xml-parser" - cpanm -l "$SRCROOT/perl-xml-parser" XML::Parser --notest --verbose + # Build XML::Parser against the live perl. `env -u PERL5LIB` + # strips intltool's stale CPAN tree from cpanm's @INC just for + # this command (its Clone.c is compiled for v5.40 vs current + # v5.42 ABI). Using `unset` would leak into later steps because + # all script steps share one shell. + - mkdir -p "$SRCROOT/perl-xml-parser" + - env -u PERL5LIB cpanm -l "$SRCROOT/perl-xml-parser" XML::Parser --notest --verbose # Upstream ships configure.ac only — autogen.sh runs autopoint + # autoreconf with `intltoolize --automake --copy` as AUTOPOINT. - # Bypass brewkit's perl wrapper (which drops PERL5LIB via - # `pkgx +perl.org -- perl`) by pointing PERL/INTLTOOL_PERL at - # the real perl binary directly. + # Pass PERL/INTLTOOL_PERL=real-perl to bypass brewkit's perl + # wrapper (`pkgx +perl.org -- perl`), which drops PERL5LIB. - ./autogen.sh - ./configure PERL=$REAL_PERL INTLTOOL_PERL=$REAL_PERL $ARGS - make --jobs {{ hw.concurrency }} From 8dbd96402a71e20380144b1737a13e855d799508 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 30 May 2026 20:08:01 +0200 Subject: [PATCH 09/12] fix(autotrace): \`--with-magick=ImageMagick\` (not \`=auto\`) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Configure passed and build started, then failed on: src/input-magick.c:35:10: fatal error: 'magick/api.h' file not found \`--with-magick=auto\` isn't a valid value per upstream configure.ac: only \`GraphicsMagick\`, \`ImageMagick\`, \`yes\`, or \`no\` are accepted. With \`=auto\` neither PKG_CHECK_MODULES block fired, so HAVE_IMAGEMAGICK7 stayed undefined, and input-magick.c fell through to the legacy ImageMagick 6 \`magick/api.h\` include (we ship IM7). Set it explicitly to \`ImageMagick\` — configure then runs both \`PKG_CHECK_MODULES([IMAGEMAGICK7], [ImageMagick >= 7.0.1], ...)\` and the >=5.2.1 fallback, defines HAVE_IMAGEMAGICK7, and input-magick.c uses \`\`. Refs pkgxdev/pantry#9454. Co-Authored-By: Claude Opus 4.7 --- projects/autotrace.sourceforge.net/package.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/autotrace.sourceforge.net/package.yml b/projects/autotrace.sourceforge.net/package.yml index 1d033ee8b2..beb21f7832 100644 --- a/projects/autotrace.sourceforge.net/package.yml +++ b/projects/autotrace.sourceforge.net/package.yml @@ -67,7 +67,10 @@ build: ARGS: - --prefix={{prefix}} - --without-pstoedit # no pantry pstoedit recipe yet - - --with-magick=auto # detect IM 7 via pkg-config + - --with-magick=ImageMagick # pantry ships IM7; configure + # auto-detects IM>=7 via pkg-config + # and defines HAVE_IMAGEMAGICK7 so + # input-magick.c uses MagickCore.h provides: - bin/autotrace From 075c57781b85f0edba91c1d142d5e3fb39876b14 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 30 May 2026 20:12:48 +0200 Subject: [PATCH 10/12] fix(autotrace): strip +brewing from shipped .la files before link Configure + autogen now pass. Build progressed to the link step and aborted with: libtool: error: cannot find the library '/opt/littlecms.com/v2.18.0+brewing/lib/liblcms2.la' ImageMagick's libMagickCore-7.la (and friends) carry a \`dependency_libs=\` entry pointing at lcms's +brewing build dir, which is wiped post-install. libtool follows the chain during our link and aborts. \`x.org/xdmcp\` solves this at its own install time by sed'ing the +brewing suffix out of its .la files; IM doesn't yet. Workaround in this recipe: walk /opt for any .la file that still contains \`+brewing\` and strip it. Only files we can write are touched, and grep-guard ensures untouched files stay untouched. TODO: upstream the same sed into imagemagick.org and any other affected recipes (littlecms.com etc.) so future consumers don't hit this. Refs pkgxdev/pantry#9454. Co-Authored-By: Claude Opus 4.7 --- projects/autotrace.sourceforge.net/package.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/projects/autotrace.sourceforge.net/package.yml b/projects/autotrace.sourceforge.net/package.yml index beb21f7832..d83d02fb3d 100644 --- a/projects/autotrace.sourceforge.net/package.yml +++ b/projects/autotrace.sourceforge.net/package.yml @@ -50,6 +50,22 @@ build: # all script steps share one shell. - mkdir -p "$SRCROOT/perl-xml-parser" - env -u PERL5LIB cpanm -l "$SRCROOT/perl-xml-parser" XML::Parser --notest --verbose + # Some shipped .la files under /opt still reference the + # +brewing build dirs of their dependencies (e.g. IM's + # libMagickCore-7.la → /opt/littlecms.com/.../+brewing/...la). + # libtool follows those during our link step and aborts because + # the +brewing paths don't exist post-install. Strip the + # +brewing suffix from every transitively-reachable .la file + # so libtool finds the real ones. + # TODO upstream this fix into each affected pantry recipe + # (imagemagick.org and friends should sed their own .la at + # install time, the way x.org/xdmcp already does). + - run: | + for la in $(find /opt -name '*.la' 2>/dev/null); do + if [ -w "$la" ] && grep -q '+brewing' "$la" 2>/dev/null; then + sed -i.bak 's/+brewing//g' "$la" + fi + done # Upstream ships configure.ac only — autogen.sh runs autopoint + # autoreconf with `intltoolize --automake --copy` as AUTOPOINT. # Pass PERL/INTLTOOL_PERL=real-perl to bypass brewkit's perl From 0cfc5988a0613ab1bbc8fe912c18f53f1e8c3a40 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 30 May 2026 20:15:26 +0200 Subject: [PATCH 11/12] fix(autotrace): rename IM's stale .la files so libtool ignores them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous +brewing strip uncovered another layer: IM's libMagickCore-7.la pins /opt/littlecms.com/v2.18.0/lib/liblcms2.la but pantry now ships lcms v2.19.1. Stripping +brewing isn't enough. Rather than play whack-a-mole with version pinning across multiple deps' .la files, just rename IM's libMagick*.la out of the way so libtool falls back to the straightforward \`-L /opt/.../lib -lMagickCore-7.Q16HDRI\` from pkg-config — same strategy distros use when .la files are unreliable. TODO upstream: fix imagemagick.org's install to either sed its own .la at install time or skip shipping .la for shared-only libs. Refs pkgxdev/pantry#9454. Co-Authored-By: Claude Opus 4.7 --- .../autotrace.sourceforge.net/package.yml | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/projects/autotrace.sourceforge.net/package.yml b/projects/autotrace.sourceforge.net/package.yml index d83d02fb3d..f2362df857 100644 --- a/projects/autotrace.sourceforge.net/package.yml +++ b/projects/autotrace.sourceforge.net/package.yml @@ -50,21 +50,19 @@ build: # all script steps share one shell. - mkdir -p "$SRCROOT/perl-xml-parser" - env -u PERL5LIB cpanm -l "$SRCROOT/perl-xml-parser" XML::Parser --notest --verbose - # Some shipped .la files under /opt still reference the - # +brewing build dirs of their dependencies (e.g. IM's - # libMagickCore-7.la → /opt/littlecms.com/.../+brewing/...la). - # libtool follows those during our link step and aborts because - # the +brewing paths don't exist post-install. Strip the - # +brewing suffix from every transitively-reachable .la file - # so libtool finds the real ones. - # TODO upstream this fix into each affected pantry recipe - # (imagemagick.org and friends should sed their own .la at - # install time, the way x.org/xdmcp already does). + # ImageMagick's libMagickCore-7.la (and friends) carry stale + # \`dependency_libs=\` paths — both \`+brewing\` build dirs and + # pinned versions of deps that have since been bumped (e.g. + # /opt/littlecms.com/v2.18.0/... while pantry now ships v2.19.1). + # libtool follows them during the link step and aborts. Rename + # the offending .la files so libtool falls back to the plain + # \`-L .../lib -llcms2 ...\` flags coming from pkg-config. + # TODO upstream: imagemagick.org and friends should sed/replace + # their own .la files at install time (the way x.org/xdmcp does + # for +brewing) so future consumers don't hit this. - run: | - for la in $(find /opt -name '*.la' 2>/dev/null); do - if [ -w "$la" ] && grep -q '+brewing' "$la" 2>/dev/null; then - sed -i.bak 's/+brewing//g' "$la" - fi + for la in {{deps.imagemagick.org.prefix}}/lib/libMagick*.la; do + [ -f "$la" ] && [ -w "$la" ] && mv "$la" "$la.disabled" || true done # Upstream ships configure.ac only — autogen.sh runs autopoint + # autoreconf with `intltoolize --automake --copy` as AUTOPOINT. From ee9994d5f83d5853617f4c2404cfe01f9f30f685 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 30 May 2026 20:25:06 +0200 Subject: [PATCH 12/12] =?UTF-8?q?fix(autotrace):=20switch=20test=20to=20--?= =?UTF-8?q?help=20with=20timeout=20=E2=80=94=20--version=20hangs=20on=20Ma?= =?UTF-8?q?gickCore=20plugin=20discovery?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build now succeeds (after the previous iterations); the only remaining failure is the test step. `autotrace --version` hangs for ~30s in CI as MagickCoreGenesis() walks ImageMagick coder modules and waits on a per-user cache dir that doesn't exist in either the darwin builder or the linux sandbox. `autotrace --help` parses argv before MagickCore init runs, so it returns immediately and still exercises the dynamic-linker resolution of every shared lib the binary needs. timeout(1) guards against future hangs. Co-Authored-By: Claude Opus 4.7 --- projects/autotrace.sourceforge.net/package.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/projects/autotrace.sourceforge.net/package.yml b/projects/autotrace.sourceforge.net/package.yml index f2362df857..2bc5380ee8 100644 --- a/projects/autotrace.sourceforge.net/package.yml +++ b/projects/autotrace.sourceforge.net/package.yml @@ -90,5 +90,13 @@ provides: - bin/autotrace test: - - autotrace --version 2>&1 | grep -i "{{version}}" - - autotrace --help 2>&1 | head -3 + # autotrace --version hangs ~30s in CI: it calls MagickCoreGenesis() + # at startup, which dlopens ImageMagick coder modules and spins on a + # missing per-user cache dir under both the darwin builder and linux + # sandbox. --help parses argv before MagickCore init runs, so it + # returns immediately and still exercises dynamic-linker resolution + # of every shared lib the binary needs. timeout(1) guards regressions. + - run: | + out=$(timeout 5 autotrace --help 2>&1 || true) + echo "$out" + echo "$out" | grep -iq autotrace