Top Level Namespace

Defined Under Namespace

Classes: Configuration, Mathematical

Constant Summary collapse

OS =
case RbConfig::CONFIG["host_os"]
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
  :windows
when /darwin|mac os/
  :macos
when /linux/
  :linux
when /solaris|bsd/
  :unix
else
  raise Error::WebDriverError, "unknown os: #{host_os.inspect}"
end
LIBDIR =
INCLUDEDIR =
SHARED_EXT =
OS == :macos ? "dylib" : "so"
SDKROOT =

Starting in Catalina, libxml2 was moved elsewhere

OS == :macos ? %x(/usr/bin/xcrun --show-sdk-path).chomp : ""
RPATH =
OS == :macos ? "-rpath @loader_path/../../ext/mathematical/lib".chomp : ""
LASEM_DIR =
File.expand_path(File.join(File.dirname(__FILE__), "lasem"))
LASEM_BUILD_DIR =
File.join(LASEM_DIR, "build")
LASEM_SRC_DIR =
File.expand_path(File.join(LASEM_DIR, "src"))
LASEM_LIB_DIR =
File.expand_path(File.join(File.dirname(__FILE__), "lib"))
MTEX2MML_DIR =
File.expand_path(File.join(File.dirname(__FILE__), "mtex2MML"))
MTEX2MML_BUILD_DIR =
File.join(MTEX2MML_DIR, "build")
MTEX2MML_SRC_DIR =
File.expand_path(File.join(MTEX2MML_DIR, "src"))
MTEX2MML_LIB_DIR =
File.expand_path(File.join(File.dirname(__FILE__), "lib"))
LIB_DIRS =
[MTEX2MML_LIB_DIR, LASEM_LIB_DIR]
HEADER_DIRS =
[MTEX2MML_SRC_DIR, LASEM_SRC_DIR]

Instance Method Summary collapse

Instance Method Details

#clean_dir(dir) ⇒ Object

TODO: we need to clear out the build dir that’s erroneously getting packaged this causes problems, as Linux installation is expecting OS X output



67
68
69
70
71
72
# File 'ext/mathematical/extconf.rb', line 67

def clean_dir(dir)
  if File.directory?(dir)
    FileUtils.rm_rf(dir)
  end
  FileUtils.mkdir_p(dir)
end

#using_system_lasem?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'ext/mathematical/extconf.rb', line 35

def using_system_lasem?
  arg_config("--use-system-lasem", !!ENV["MATHEMATICAL_USE_SYSTEM_LASEM"])
end

#using_system_mtex2mml?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'ext/mathematical/extconf.rb', line 39

def using_system_mtex2mml?
  arg_config("--use-system-mtex2MML", !!ENV["MATHEMATICAL_USE_SYSTEM_MTEX2MML"])
end