Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

Add flags to control how nokogumbo is built #86

Merged
merged 1 commit into from
Aug 22, 2018

Conversation

stevecheckoway
Copy link
Collaborator

There are three configurations

  1. --with-libxml2 forces nokogumbo to be built with the libxml2 headers;
  2. --without-libxml2 forces nokogumbo to be built without the libxml2
    headers; and
  3. (default) try hard to build with headers, but allow that process to
    fail and build without the headers.

By default, Nokogiri packages libxml2 as part of the binary. Current
versions of Nokogiri delete the libxml2 headers as part of the install.
This first checks to see if they haven't been deleted and if not, it
uses them. If they have been deleted, it downloads, configures, and then
installs the headers (in the ext/nokogiri/.../libxml2 directory) of
the corresponding version.

However, if Nokogiri hasn't packaged libxml2, then it used the system
libraries. In this case, use pkg-config to locates the library/headers.

Hopefully, Nokogiri will start including the headers again at which
point the download_headers function can be removed.

There are three configurations
1. --with-libxml2 forces nokogumbo to be built with the libxml2 headers;
2. --without-libxml2 forces nokogumbo to be built without the libxml2
   headers; and
3. (default) try hard to build with headers, but allow that process to
   fail and build without the headers.

By default, Nokogiri packages libxml2 as part of the binary. Current
versions of Nokogiri delete the libxml2 headers as part of the install.
This first checks to see if they haven't been deleted and if not, it
uses them. If they have been deleted, it downloads, configures, and then
installs the headers (in the `ext/nokogiri/.../libxml2` directory) of
the corresponding version.

However, if Nokogiri hasn't packaged libxml2, then it used the system
libraries. In this case, use `pkg-config` to locates the library/headers.

Hopefully, Nokogiri will start including the headers again at which
point the `download_headers` function can be removed.
@stevecheckoway stevecheckoway self-assigned this Aug 22, 2018
@stevecheckoway stevecheckoway merged commit cdcf8f6 into rubys:master Aug 22, 2018
@stevecheckoway stevecheckoway deleted the extconf branch August 22, 2018 22:51
@Lee1984 Lee1984 mentioned this pull request Aug 28, 2019
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant