kwilczynski / ruby-magic

Simple interface to libmagic for Ruby Programming Language
Apache License 2.0
27 stars 8 forks source link

simplify the mkmf workaround introduced in be78a8c #37

Closed flavorjones closed 2 years ago

flavorjones commented 2 years ago

32 worked around a backwards-incompatible change in Ruby 3.1's MakeMakefile.pkg_config by monkeypatching that (rather long and complicated) method.

This greatly simplifies the workaround by using xpopen to run the pkg-config command directly. This approach is what I'm using in the rebuild of sqlite3-ruby's precompiled native gems at https://github.com/sparklemotion/sqlite3-ruby/pull/320

There should be no change in build/installation experience, it's just deleting a lot of unnecessary code.

kwilczynski commented 2 years ago

Hi @flavorjones,

Thank you for this! Much appreciated.

To add, I love how your changes are coming along in the https://github.com/sparklemotion/sqlite3-ruby/pull/320 Pull Request, very impressive!