Permalink
Browse files

Get VC 2010 to compile.

  • Loading branch information...
1 parent bdbafbb commit 3ae3f3fa19b50754b90263e483cecfb6653397a7 @cfis cfis committed Aug 14, 2011
View
@@ -126,14 +126,24 @@ def crash(str)
RUBY_VERSION =~ /(\d+.\d+)/
minor_version = $1
-paths = ["#{gem_spec.full_gem_path}/lib", "#{gem_spec.full_gem_path}/lib/#{minor_version}"]
+paths = ["#{gem_spec.full_gem_path}/lib",
+ "#{gem_spec.full_gem_path}/lib/#{minor_version}",
+ "#{gem_spec.full_gem_path}/ext/libxml"]
# No need to link xml_ruby on OS X
unless Config::CONFIG['host_os'].match(/darwin/)
# Hack to make sure ruby library is *after* xml_ruby library
$LIBS += " #{$LIBRUBYARG_STATIC}"
- unless find_library("xml_ruby", "Init_libxml_ruby", *paths) or
- find_library(":libxml_ruby.so", "Init_libxml_ruby", *paths)
+
+ libraries = ["xml_ruby", # Linux
+ ":libxml_ruby.so", # mingw
+ "libxml_ruby-#{Config::CONFIG["arch"]}"] # mswin
+
+ library = libraries.detect do |library|
+ find_library(library, "Init_libxml_ruby", *paths)
+ end
+
+ unless library
crash(<<-EOL)
Need libxml-ruby
Please install libxml-ruby or specify the path to the gem via:
View
@@ -30,13 +30,7 @@
#include "version.h"
-/*#if ((RUBY_LIBXML_VER_MAJ != RUBY_LIBXSLT_VER_MAJ) || (RUBY_LIBXML_VER_MIN != RUBY_LIBXSLT_VER_MIN))
-#error "Incompatible LibXML-Ruby headers - please install same major/micro version"
-#endif*/
-
-extern VALUE cLibXSLT;
extern VALUE cXSLT;
extern VALUE eXSLTError;
-extern VALUE cXMLDocument;
#endif
View
@@ -22,7 +22,8 @@ ruby_xslt_module_function_hash(VALUE namespace) {
/* Helper method for xsltRegisterExtModuleFunction callback */
static void
ruby_xslt_module_function_callback(xmlXPathParserContextPtr ctxt, int nargs) {
- VALUE callback, args[nargs];
+ VALUE callback;
+ VALUE* args = ALLOCA_N(VALUE, nargs);
const xmlChar *namespace, *name;
int i;
@@ -5,8 +5,6 @@
#ifndef __RUBY_LIBXSLT_STYLESHEET__
#define __RUBY_LIBXSLT_STYLESHEET__
-extern VALUE cXSLTStylesheet;
-
void ruby_init_xslt_stylesheet(void);
#endif
View
@@ -1,5 +1,5 @@
-#define RUBY_LIBXSLT_VERSION "1.0.4"
+#define RUBY_LIBXSLT_VERSION "1.0.6"
#define RUBY_LIBXSLT_VERNUM 1
#define RUBY_LIBXSLT_VER_MAJ 0
-#define RUBY_LIBXSLT_VER_MIN 4
+#define RUBY_LIBXSLT_VER_MIN 6
#define RUBY_LIBXSLT_VER_MIC 0
View
@@ -36,14 +36,14 @@ Gem::Specification.new do |spec|
spec.version = version
spec.author = "Charlie Savage"
spec.email = "libxml-devel@rubyforge.org"
- spec.add_dependency('libxml-ruby','>=2.1.1')
+ spec.add_dependency('libxml-ruby','>=2.2.0')
spec.platform = Gem::Platform::RUBY
spec.require_paths = ["lib", "ext/libxslt"]
spec.bindir = "bin"
spec.extensions = ["ext/libxslt/extconf.rb"]
spec.files = FILES.to_a
- spec.test_files = Dir.glob("test/tc_*.rb")
+ spec.test_files = Dir.glob("test/test_*.rb")
spec.required_ruby_version = '>= 1.8.6'
spec.date = DateTime.now
View
@@ -1,6 +1,6 @@
# encoding: UTF-8
-require 'test/unit'
require './test_helper'
+require 'test/unit'
class TestDeprecated < Test::Unit::TestCase
def setup()
View
@@ -1,5 +1,4 @@
# encoding: UTF-8
-
# To make testing/debugging easier, test within this source tree versus an installed gem
dir = File.dirname(__FILE__)

0 comments on commit 3ae3f3f

Please sign in to comment.