Description: Expect core framework installed below /usr/share
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2014-08-22

--- a/core/lib/compass/core.rb
+++ b/core/lib/compass/core.rb
@@ -6,7 +6,7 @@
       attr_accessor :module_deprecation_warning_issued
     end
     def base_directory(*subdirs)
-      File.expand_path(File.join(File.dirname(__FILE__), '..', "..", *subdirs))
+      File.expand_path(File.join('/usr/share/compass/frameworks/compass', *subdirs))
     end
     def lib_directory(*subdirs)
       File.expand_path(File.join(File.dirname(__FILE__), "..", *subdirs))
@@ -56,6 +56,10 @@
     rescue ArgumentError # If HOME is relative
       []
     end
+    if File.directory?('/usr/share/compass/frameworks')
+      @shared_extension_paths +=
+        [Dir.new('/usr/share/compass/frameworks')]
+    end
   end
   module_function :shared_extension_paths
 end
--- a/core/lib/compass/configuration/adapters.rb
+++ b/core/lib/compass/configuration/adapters.rb
@@ -80,6 +80,9 @@
       def sass_load_paths
         load_paths = []
         load_paths << sass_path if sass_path
+        if File.directory?('/usr/share/compass/frameworks')
+          Compass::Frameworks.discover Dir.new('/usr/share/compass/frameworks')
+        end
         Compass::Frameworks::ALL.each do |f|
           load_paths << f.stylesheets_directory if File.directory?(f.stylesheets_directory)
         end
--- a/core/lib/compass/frameworks.rb
+++ b/core/lib/compass/frameworks.rb
@@ -167,11 +167,13 @@
     end
 
     def discover_extensions!
+      if Compass.shared_extension_paths
       Compass.shared_extension_paths.each do |extensions_path|
         if File.directory?(extensions_path)
           Compass::Frameworks.discover(extensions_path)
         end
       end
+      end
       if File.directory?(configuration.extensions_path)
         Compass::Frameworks.discover(configuration.extensions_path)
       end
