rubys / nokogumbo

A Nokogiri interface to the Gumbo HTML5 parser.
Apache License 2.0
186 stars 114 forks source link

Test building on Gentoo #91

Closed stevecheckoway closed 6 years ago

stevecheckoway commented 6 years ago

This involves several fixes:

  1. Removing the linker flag that causes the error.
  2. Adding scripts to simplify and speed up testing, in particular both the --with-libxml2 and --without-libxml2 are tested in each build.
  3. Adding a script to create and run a Docker container based on stevecheckoway/gentoo-ruby which is based on the official Gentoo image but with ruby, libxml2, and bundler installed.
  4. A somewhat unrelated change to fix an issue when Nokogiri is built with system libraries. In this case, pkg-config needs to be available which is easiest to provide via the pkg-config gem. Unfortunately, bundler installs dependencies in alphabetical order and this needs to be installed before Nokogiri. To resolve this, scripts/fix-dep-order.gemspec (which comes alphabetically before nokogiri) declares a dependency on pkg-config thus building it first. This is a ridiculous work-around, but I couldn't find an alternative.