[DRE-commits] [ruby-psych] 13/18: Build java extension

Miguel Landaeta nomadium at moszumanska.debian.org
Wed Mar 15 21:43:41 UTC 2017


This is an automated email from the git hooks/post-receive script.

nomadium pushed a commit to branch master
in repository ruby-psych.

commit d726ab8239c3b2bddf477e23e1156fbc437495d0
Author: Miguel Landaeta <nomadium at debian.org>
Date:   Wed Mar 15 20:30:49 2017 +0000

    Build java extension
---
 debian/control                                     |  5 +++++
 .../01-Remove-snakeyaml-hardcoded-versions.patch   | 26 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 debian/rules                                       | 13 +++++++++++
 4 files changed, 45 insertions(+)

diff --git a/debian/control b/debian/control
index c9d4c04..9937256 100644
--- a/debian/control
+++ b/debian/control
@@ -5,8 +5,11 @@ Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.al
 Uploaders: Andrew Lee (李健秋) <andrew.lee at collabora.co.uk>,
            Miguel Landaeta <nomadium at debian.org>
 Build-Depends: debhelper (>= 10~),
+               default-jdk,
                gem2deb,
+               jruby (>= 9.1.6.0~),
                libyaml-dev,
+               libyaml-snake-java,
                rake
 Standards-Version: 3.9.8
 Vcs-Git: https://anonscm.debian.org/git/pkg-ruby-extras/ruby-psych.git
@@ -21,6 +24,8 @@ XB-Ruby-Versions: ${ruby:Versions}
 Depends: ruby | ruby-interpreter,
          ${misc:Depends},
          ${shlibs:Depends}
+Recommends: libyaml-snake-java,
+            ruby-jar-dependencies
 Description: libyaml wrapper for Ruby
  ruby-psych is a YAML parser and emitter. Psych leverages libyaml for its
  YAML parsing and emitting capabilities. In addition to wrapping
diff --git a/debian/patches/01-Remove-snakeyaml-hardcoded-versions.patch b/debian/patches/01-Remove-snakeyaml-hardcoded-versions.patch
new file mode 100644
index 0000000..a26b006
--- /dev/null
+++ b/debian/patches/01-Remove-snakeyaml-hardcoded-versions.patch
@@ -0,0 +1,26 @@
+Description: Remove snakeyaml hardcoded version strings
+Author: Miguel Landaeta <nomadium at debian.org>
+Forwarded: no
+Last-Update: 2017-03-15
+
+--- ruby-psych-2.2.4.orig/lib/psych/versions.rb
++++ ruby-psych-2.2.4/lib/psych/versions.rb
+@@ -4,6 +4,6 @@ module Psych
+   VERSION = '2.2.4'
+ 
+   if RUBY_ENGINE == 'jruby'
+-    DEFAULT_SNAKEYAML_VERSION = '1.18'.freeze
++    DEFAULT_SNAKEYAML_VERSION = '1.x'.freeze
+   end
+ end
+--- ruby-psych-2.2.4.orig/psych.gemspec
++++ ruby-psych-2.2.4/psych.gemspec
+@@ -32,7 +32,7 @@ DESCRIPTION
+   if RUBY_ENGINE == 'jruby'
+     s.platform = 'java'
+     s.files.concat ["ext/java/PsychEmitter.java", "ext/java/PsychLibrary.java", "ext/java/PsychParser.java", "ext/java/PsychToRuby.java", "ext/java/PsychYamlTree.java", "lib/psych_jars.rb", "lib/psych.jar"]
+-    s.requirements = "jar org.yaml:snakeyaml, 1.18"
++    s.requirements = "jar org.yaml:snakeyaml, 1.x"
+     s.add_dependency 'jar-dependencies', '>= 0.1.7'
+     s.add_development_dependency 'ruby-maven'
+   else
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..43c82fc
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01-Remove-snakeyaml-hardcoded-versions.patch 
diff --git a/debian/rules b/debian/rules
index 3454d59..e748f1e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,3 +4,16 @@ export GEM2DEB_TEST_RUNNER = --check-dependencies
 
 %:
 	dh $@ --buildsystem=ruby --with ruby
+
+override_dh_auto_build:
+	dh_auto_build
+	jruby -S rake compile
+
+override_dh_auto_install:
+	dh_auto_install
+	-rm -r ./debian/ruby-psych/usr/bin
+
+override_dh_auto_clean:
+	dh_auto_clean
+	jruby -S rake clean
+	-rm -r ./pkg/ ./lib/psych.jar

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-psych.git



More information about the Pkg-ruby-extras-commits mailing list