Skip to content

Commit

Permalink
remove library paths from version output
Browse files Browse the repository at this point in the history
some backwards-incompatible changes here that I don't expect actually
break anything for anyone:

* Nokogiri::VersionInfo will no longer contain the following
  keys (previously these were set only when vendored libraries were
  being used):
  * `libxml/libxml2_path`
  * `libxml/libxslt_path`
* `nokogiri -v` will no longer emit these VersionInfo values
* these C macros will no longer be defined:
  * NOKOGIRI_LIBXML2_PATH
  * NOKOGIRI_LIBXSLT_PATH
* these global variables will no longer be defined:
  * NOKOGIRI_LIBXML2_PATH
  * NOKOGIRI_LIBXSLT_PATH

Fixes #1482
  • Loading branch information
flavorjones committed Jan 26, 2019
1 parent 78dc41f commit c96ac91
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion ext/nokogiri/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,6 @@ def install
end

# Defining a macro that expands to a C string; double quotes are significant.
$CPPFLAGS << ' ' << "-DNOKOGIRI_#{recipe.name.upcase}_PATH=\"#{recipe.path}\"".inspect
$CPPFLAGS << ' ' << "-DNOKOGIRI_#{recipe.name.upcase}_PATCHES=\"#{recipe.patch_files.map { |path| File.basename(path) }.join(' ')}\"".inspect

case libname
Expand Down
4 changes: 0 additions & 4 deletions ext/nokogiri/nokogiri.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,10 @@ void Init_nokogiri()

#ifdef NOKOGIRI_USE_PACKAGED_LIBRARIES
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_USE_PACKAGED_LIBRARIES"), Qtrue);
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATH"), NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXML2_PATH));
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATH"), NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXSLT_PATH));
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATCHES"), rb_str_split(NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXML2_PATCHES), " "));
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATCHES"), rb_str_split(NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXSLT_PATCHES), " "));
#else
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_USE_PACKAGED_LIBRARIES"), Qfalse);
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATH"), Qnil);
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATH"), Qnil);
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATCHES"), Qnil);
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATCHES"), Qnil);
#endif
Expand Down
2 changes: 0 additions & 2 deletions lib/nokogiri/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ def to_hash
hash_info['libxml']['binding'] = 'extension'
if libxml2_using_packaged?
hash_info['libxml']['source'] = "packaged"
hash_info['libxml']['libxml2_path'] = NOKOGIRI_LIBXML2_PATH
hash_info['libxml']['libxslt_path'] = NOKOGIRI_LIBXSLT_PATH
hash_info['libxml']['libxml2_patches'] = NOKOGIRI_LIBXML2_PATCHES
hash_info['libxml']['libxslt_patches'] = NOKOGIRI_LIBXSLT_PATCHES
else
Expand Down

0 comments on commit c96ac91

Please sign in to comment.