diff --git a/debian/patches/Fix-Rakefile-requires-a-default-task.patch b/debian/patches/Fix-Rakefile-requires-a-default-task.patch deleted file mode 100644 index 41b4fb3..0000000 --- a/debian/patches/Fix-Rakefile-requires-a-default-task.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Sophie Brun -Date: Thu, 10 Mar 2022 15:50:18 +0100 -Subject: Fix Rakefile: requires a default task - ---- - Rakefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Rakefile b/Rakefile -index 460fbcb..d7a78e2 100755 ---- a/Rakefile -+++ b/Rakefile -@@ -85,7 +85,7 @@ CLOBBER.include( "pkg" ) - # sh "ruby -w -W2 -Ilib test/TS_All.rb -v" - #end - --task :gem => ["ext/fox16_c/extconf.rb", "fxruby:configure", :build] -+task :default => ["ext/fox16_c/extconf.rb", "fxruby:configure", :build] - - desc "Install gem" - task :install => :compile do diff --git a/debian/patches/Fix-version-in-Rakefile.patch b/debian/patches/Fix-version-in-Rakefile.patch deleted file mode 100644 index b9e8315..0000000 --- a/debian/patches/Fix-version-in-Rakefile.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Sophie Brun -Date: Fri, 11 Mar 2022 09:13:48 +0100 -Subject: Fix version in Rakefile - ---- - Rakefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Rakefile b/Rakefile -index d7a78e2..96ab09d 100755 ---- a/Rakefile -+++ b/Rakefile -@@ -89,7 +89,7 @@ task :default => ["ext/fox16_c/extconf.rb", "fxruby:configure", :build] - - desc "Install gem" - task :install => :compile do -- system "gem install fxruby-#{PKG_VERSION}.gem" -+ system "gem install fxruby-#{DEB_VERSION_UPSTREAM}.gem" - end - - # The "docs" task created by Hoe assumes that we want to run RDoc diff --git a/debian/patches/dont-run-test.patch b/debian/patches/dont-run-test.patch index d08409e..2ce20ec 100644 --- a/debian/patches/dont-run-test.patch +++ b/debian/patches/dont-run-test.patch @@ -10,7 +10,7 @@ 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile -index edcc5f3..460fbcb 100755 +index 76cb249..d2e95e1 100755 --- a/Rakefile +++ b/Rakefile @@ -81,9 +81,9 @@ CLEAN.include( ".config", "ext/fox16_c/Makefile", "ext/fox16_c/*.o", "ext/fox16_ @@ -24,5 +24,5 @@ +# sh "ruby -w -W2 -Ilib test/TS_All.rb -v" +#end - task :gem => ["ext/fox16_c/extconf.rb", "fxruby:configure", :build] + task :default => ["ext/fox16_c/extconf.rb", "fxruby:configure"] diff --git a/debian/patches/installation-with-rakefile.patch b/debian/patches/installation-with-rakefile.patch index 3539127..71dd8da 100644 --- a/debian/patches/installation-with-rakefile.patch +++ b/debian/patches/installation-with-rakefile.patch @@ -6,21 +6,151 @@ dh_auto_install doesn't work because any task for install are defined in Rakefile. Add task :install to use dh_ruby correctly in build. --- - Rakefile | 12 ++++++++++++ - 1 file changed, 12 insertions(+) + Rakefile | 138 ++++++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 74 insertions(+), 64 deletions(-) diff --git a/Rakefile b/Rakefile -index 624f813..edcc5f3 100755 +index 624f813..76cb249 100755 --- a/Rakefile +++ b/Rakefile -@@ -87,6 +87,18 @@ end +@@ -7,67 +7,67 @@ require 'bundler/gem_helper' + require './lib/fox16/version.rb' - task :gem => ["ext/fox16_c/extconf.rb", "fxruby:configure", :build] +-class FoxGemHelper < Bundler::GemHelper +- attr_accessor :cross_platforms +- +- def install +- super +- +- task "release:guard_clean" => ["release:update_history"] +- +- task "release:update_history" do +- update_history +- end +- +- task "release:rubygem_push" => ["gem:windows"] +- end +- +- def hfile +- "History.md" +- end +- +- def headline +- '([^\w]*)(\d+\.\d+\.\d+(?:\.\w+)?)([^\w]+)([2Y][0Y][0-9Y][0-9Y]-[0-1M][0-9M]-[0-3D][0-9D])([^\w]*|$)' +- end +- +- def reldate +- Time.now.strftime("%Y-%m-%d") +- end +- +- def update_history +- hin = File.read(hfile) +- hout = hin.sub(/#{headline}/) do +- raise "#{hfile} isn't up-to-date for version #{version}" unless $2==version.to_s +- $1 + $2 + $3 + reldate + $5 +- end +- if hout != hin +- Bundler.ui.confirm "Updating #{hfile} for release." +- File.write(hfile, hout) +- Rake::FileUtilsExt.sh "git", "commit", hfile, "-m", "Update release date in #{hfile}" +- end +- end +- +- def tag_version +- Bundler.ui.confirm "Tag release with annotation:" +- m = File.read(hfile).match(/(?#{headline}.*?)#{headline}/m) || raise("Unable to find release notes in #{hfile}") +- Bundler.ui.info(m[:annotation].gsub(/^/, " ")) +- IO.popen(["git", "tag", "--file=-", version_tag], "w") do |fd| +- fd.write m[:annotation] +- end +- yield if block_given? +- rescue +- Bundler.ui.error "Untagging #{version_tag} due to error." +- sh_with_code "git tag -d #{version_tag}" +- raise +- end +- +- def rubygem_push(path) +- cross_platforms.each do |ruby_platform| +- super(path.gsub(/\.gem\z/, "-#{ruby_platform}.gem")) +- end +- super(path) +- end +-end ++#class FoxGemHelper < Bundler::GemHelper ++# attr_accessor :cross_platforms ++# ++# def install ++# super ++# ++# task "release:guard_clean" => ["release:update_history"] ++# ++# task "release:update_history" do ++# update_history ++# end ++# ++# task "release:rubygem_push" => ["gem:windows"] ++# end ++# ++# def hfile ++# "History.md" ++# end ++# ++# def headline ++# '([^\w]*)(\d+\.\d+\.\d+(?:\.\w+)?)([^\w]+)([2Y][0Y][0-9Y][0-9Y]-[0-1M][0-9M]-[0-3D][0-9D])([^\w]*|$)' ++# end ++# ++# def reldate ++# Time.now.strftime("%Y-%m-%d") ++# end ++# ++# def update_history ++# hin = File.read(hfile) ++# hout = hin.sub(/#{headline}/) do ++# raise "#{hfile} isn't up-to-date for version #{version}" unless $2==version.to_s ++# $1 + $2 + $3 + reldate + $5 ++# end ++# if hout != hin ++# Bundler.ui.confirm "Updating #{hfile} for release." ++# File.write(hfile, hout) ++# Rake::FileUtilsExt.sh "git", "commit", hfile, "-m", "Update release date in #{hfile}" ++# end ++# end ++ ++# def tag_version ++# Bundler.ui.confirm "Tag release with annotation:" ++# m = File.read(hfile).match(/(?#{headline}.*?)#{headline}/m) || raise("Unable to find release notes in #{hfile}") ++# Bundler.ui.info(m[:annotation].gsub(/^/, " ")) ++# IO.popen(["git", "tag", "--file=-", version_tag], "w") do |fd| ++# fd.write m[:annotation] ++# end ++# yield if block_given? ++# rescue ++# Bundler.ui.error "Untagging #{version_tag} due to error." ++# sh_with_code "git tag -d #{version_tag}" ++# raise ++# end ++# ++# def rubygem_push(path) ++# cross_platforms.each do |ruby_platform| ++# super(path.gsub(/\.gem\z/, "-#{ruby_platform}.gem")) ++# end ++# super(path) ++# end ++#end + + # Some constants we'll need + LIBFXSCINTILLA_VERSION = ENV['LIBFXSCINTILLA_VERSION'] || '2.28.0' +@@ -85,7 +85,17 @@ task :test => [:compile] do + sh "ruby -w -W2 -Ilib test/TS_All.rb -v" + end + +-task :gem => ["ext/fox16_c/extconf.rb", "fxruby:configure", :build] ++task :default => ["ext/fox16_c/extconf.rb", "fxruby:configure"] ++ +desc "Install gem" -+task :install => :compile do -+ system "gem install fxruby-#{PKG_VERSION}.gem" -+end ++task :install => :compile + +# The "docs" task created by Hoe assumes that we want to run RDoc +# over everything under the "lib" and "ext" subdirectories. @@ -28,7 +158,17 @@ +# rdoc_target = Rake::Task['docs'].prerequisites.first +# rdoc_files = Rake::Task[rdoc_target].prerequisites +# rdoc_files.reject! {|x| x == "ext/fox16_c" } -+ + gem_spec = Bundler.load_gemspec('fxruby.gemspec') +@@ -139,8 +149,8 @@ ext_task = Rake::ExtensionTask.new("fox16_c", gem_spec) do |ext| + end + end +- FoxGemHelper.install_tasks +- Bundler::GemHelper.instance.cross_platforms = ext.cross_platform ++ #FoxGemHelper.install_tasks ++ #Bundler::GemHelper.instance.cross_platforms = ext.cross_platform + end + + namespace :gem do diff --git a/debian/patches/series b/debian/patches/series index b4b2062..6aa77ed 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,6 +4,4 @@ drop-failing-test.patch installation-with-rakefile.patch dont-run-test.patch -Fix-Rakefile-requires-a-default-task.patch do-not-use-git-ls.patch -Fix-version-in-Rakefile.patch