Skip to content

Commit

Permalink
Auto detect libraptor2.so.0 (for Ubuntu compatibility)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwbutler committed Sep 1, 2014
1 parent 060f217 commit 24ee02b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -14,5 +14,4 @@ matrix:
- rvm: rbx-2
before_install:
- sudo apt-get install libraptor2-0
- sudo ln -s /usr/lib/libraptor2.so.0 /usr/lib/libraptor2.so
cache: bundler
2 changes: 1 addition & 1 deletion lib/rdf/raptor.rb
Expand Up @@ -79,7 +79,7 @@ module RDF
# @author [Arto Bendiken](http://github.com/bendiken)
# @author [John Fieber](http://github.com/jfieber)
module Raptor
LIBRAPTOR = ENV['RDF_RAPTOR_LIBPATH'] || 'libraptor2' unless const_defined?(:LIBRAPTOR)
LIBRAPTOR = ENV['RDF_RAPTOR_LIBPATH'] || ['libraptor2', 'libraptor2.so.0'] unless const_defined?(:LIBRAPTOR)

This comment has been minimized.

Copy link
@artob

artob Sep 2, 2014

Member

In principle, we ought to try for libraptor2.so.0 before trying libraptor2.so, as the former is the actual current ABI version that we're programming for.

If and when libraptor2.so.1 is eventually released, our code will continue to work 100% so long as we ask for libraptor2.so.0 (and both are installed), falling back to libraptor2.so (which would then likely be a symlink to libraptor2.so.1) if it's unavailable. In the latter case, we may still work 90%+ if the ABI changes are not too significant; but in terms of ordering, we certainly want the 100% compatibility over the 90%+ case, by default.

This comment has been minimized.

Copy link
@dwbutler

dwbutler Sep 2, 2014

Author Member

I agree that's a better way. I'll probably push that out in the next version.

RAPPER = ENV['RDF_RAPTOR_BINPATH'] || 'rapper' unless const_defined?(:RAPPER)

require 'rdf/raptor/version'
Expand Down

0 comments on commit 24ee02b

Please sign in to comment.