maelvls / homebrew-amc

🍺 Homebrew formula for auto-multiple-choice 📖
https://www.auto-multiple-choice.net/download-macosx.en
34 stars 10 forks source link

Fix cairo issue #83

Open rcqls opened 1 year ago

rcqls commented 1 year ago

fix cairo issue due to pkg-config issue when determining GCC_PDF.

maelvls commented 1 year ago

Hey. Thanks for the workaround! I’ll investigate later to see why GCC_PDF is empty.

rcqls commented 1 year ago

Hey. Thanks for the workaround! I’ll investigate later to see why GCC_PDF is empty.

$GCC_PDF was empty because pkg-config --cflags --libs cairo was failing because depending on libpthread-stubs.

When adding in your original formula: system "pkg-config", "--cflags", "cairo" (before adding libpthread-stubs dependency)

The error message was clear (explaining why $GCC_PDF was empty).

pkg-config
--cflags
cairo

Package pthread-stubs was not found in the pkg-config search path.
Perhaps you should add the directory containing `pthread-stubs.pc'
to the PKG_CONFIG_PATH environment variable
Package 'pthread-stubs', required by 'xcb', not found
rcqls commented 1 year ago

Oups I made a mistake: it was libpthread-stubs and not libpthread_stubs. Also it seems that it is only required in the build step.

maelvls commented 1 year ago

Thanks. I’ll try it out on my Mac and approve the change.