Codebase list ruby-fxruby / c7ddc9c
Improve the patch installation-with-rakefile Sophie Brun 2 years ago
5 changed file(s) with 151 addition(s) and 55 deletion(s). Raw diff Collapse all Expand all
+0
-21
debian/patches/Fix-Rakefile-requires-a-default-task.patch less more
0 From: Sophie Brun <[email protected]>
1 Date: Thu, 10 Mar 2022 15:50:18 +0100
2 Subject: Fix Rakefile: requires a default task
3
4 ---
5 Rakefile | 2 +-
6 1 file changed, 1 insertion(+), 1 deletion(-)
7
8 diff --git a/Rakefile b/Rakefile
9 index 460fbcb..d7a78e2 100755
10 --- a/Rakefile
11 +++ b/Rakefile
12 @@ -85,7 +85,7 @@ CLOBBER.include( "pkg" )
13 # sh "ruby -w -W2 -Ilib test/TS_All.rb -v"
14 #end
15
16 -task :gem => ["ext/fox16_c/extconf.rb", "fxruby:configure", :build]
17 +task :default => ["ext/fox16_c/extconf.rb", "fxruby:configure", :build]
18
19 desc "Install gem"
20 task :install => :compile do
+0
-21
debian/patches/Fix-version-in-Rakefile.patch less more
0 From: Sophie Brun <[email protected]>
1 Date: Fri, 11 Mar 2022 09:13:48 +0100
2 Subject: Fix version in Rakefile
3
4 ---
5 Rakefile | 2 +-
6 1 file changed, 1 insertion(+), 1 deletion(-)
7
8 diff --git a/Rakefile b/Rakefile
9 index d7a78e2..96ab09d 100755
10 --- a/Rakefile
11 +++ b/Rakefile
12 @@ -89,7 +89,7 @@ task :default => ["ext/fox16_c/extconf.rb", "fxruby:configure", :build]
13
14 desc "Install gem"
15 task :install => :compile do
16 - system "gem install fxruby-#{PKG_VERSION}.gem"
17 + system "gem install fxruby-#{DEB_VERSION_UPSTREAM}.gem"
18 end
19
20 # The "docs" task created by Hoe assumes that we want to run RDoc
99 1 file changed, 3 insertions(+), 3 deletions(-)
1010
1111 diff --git a/Rakefile b/Rakefile
12 index edcc5f3..460fbcb 100755
12 index 76cb249..d2e95e1 100755
1313 --- a/Rakefile
1414 +++ b/Rakefile
1515 @@ -81,9 +81,9 @@ CLEAN.include( ".config", "ext/fox16_c/Makefile", "ext/fox16_c/*.o", "ext/fox16_
2323 +# sh "ruby -w -W2 -Ilib test/TS_All.rb -v"
2424 +#end
2525
26 task :gem => ["ext/fox16_c/extconf.rb", "fxruby:configure", :build]
26 task :default => ["ext/fox16_c/extconf.rb", "fxruby:configure"]
2727
55 dh_auto_install doesn't work because any task for install are defined in
66 Rakefile. Add task :install to use dh_ruby correctly in build.
77 ---
8 Rakefile | 12 ++++++++++++
9 1 file changed, 12 insertions(+)
8 Rakefile | 138 ++++++++++++++++++++++++++++++++++-----------------------------
9 1 file changed, 74 insertions(+), 64 deletions(-)
1010
1111 diff --git a/Rakefile b/Rakefile
12 index 624f813..edcc5f3 100755
12 index 624f813..76cb249 100755
1313 --- a/Rakefile
1414 +++ b/Rakefile
15 @@ -87,6 +87,18 @@ end
15 @@ -7,67 +7,67 @@ require 'bundler/gem_helper'
16 require './lib/fox16/version.rb'
1617
17 task :gem => ["ext/fox16_c/extconf.rb", "fxruby:configure", :build]
1818
19 -class FoxGemHelper < Bundler::GemHelper
20 - attr_accessor :cross_platforms
21 -
22 - def install
23 - super
24 -
25 - task "release:guard_clean" => ["release:update_history"]
26 -
27 - task "release:update_history" do
28 - update_history
29 - end
30 -
31 - task "release:rubygem_push" => ["gem:windows"]
32 - end
33 -
34 - def hfile
35 - "History.md"
36 - end
37 -
38 - def headline
39 - '([^\w]*)(\d+\.\d+\.\d+(?:\.\w+)?)([^\w]+)([2Y][0Y][0-9Y][0-9Y]-[0-1M][0-9M]-[0-3D][0-9D])([^\w]*|$)'
40 - end
41 -
42 - def reldate
43 - Time.now.strftime("%Y-%m-%d")
44 - end
45 -
46 - def update_history
47 - hin = File.read(hfile)
48 - hout = hin.sub(/#{headline}/) do
49 - raise "#{hfile} isn't up-to-date for version #{version}" unless $2==version.to_s
50 - $1 + $2 + $3 + reldate + $5
51 - end
52 - if hout != hin
53 - Bundler.ui.confirm "Updating #{hfile} for release."
54 - File.write(hfile, hout)
55 - Rake::FileUtilsExt.sh "git", "commit", hfile, "-m", "Update release date in #{hfile}"
56 - end
57 - end
58 -
59 - def tag_version
60 - Bundler.ui.confirm "Tag release with annotation:"
61 - m = File.read(hfile).match(/(?<annotation>#{headline}.*?)#{headline}/m) || raise("Unable to find release notes in #{hfile}")
62 - Bundler.ui.info(m[:annotation].gsub(/^/, " "))
63 - IO.popen(["git", "tag", "--file=-", version_tag], "w") do |fd|
64 - fd.write m[:annotation]
65 - end
66 - yield if block_given?
67 - rescue
68 - Bundler.ui.error "Untagging #{version_tag} due to error."
69 - sh_with_code "git tag -d #{version_tag}"
70 - raise
71 - end
72 -
73 - def rubygem_push(path)
74 - cross_platforms.each do |ruby_platform|
75 - super(path.gsub(/\.gem\z/, "-#{ruby_platform}.gem"))
76 - end
77 - super(path)
78 - end
79 -end
80 +#class FoxGemHelper < Bundler::GemHelper
81 +# attr_accessor :cross_platforms
82 +#
83 +# def install
84 +# super
85 +#
86 +# task "release:guard_clean" => ["release:update_history"]
87 +#
88 +# task "release:update_history" do
89 +# update_history
90 +# end
91 +#
92 +# task "release:rubygem_push" => ["gem:windows"]
93 +# end
94 +#
95 +# def hfile
96 +# "History.md"
97 +# end
98 +#
99 +# def headline
100 +# '([^\w]*)(\d+\.\d+\.\d+(?:\.\w+)?)([^\w]+)([2Y][0Y][0-9Y][0-9Y]-[0-1M][0-9M]-[0-3D][0-9D])([^\w]*|$)'
101 +# end
102 +#
103 +# def reldate
104 +# Time.now.strftime("%Y-%m-%d")
105 +# end
106 +#
107 +# def update_history
108 +# hin = File.read(hfile)
109 +# hout = hin.sub(/#{headline}/) do
110 +# raise "#{hfile} isn't up-to-date for version #{version}" unless $2==version.to_s
111 +# $1 + $2 + $3 + reldate + $5
112 +# end
113 +# if hout != hin
114 +# Bundler.ui.confirm "Updating #{hfile} for release."
115 +# File.write(hfile, hout)
116 +# Rake::FileUtilsExt.sh "git", "commit", hfile, "-m", "Update release date in #{hfile}"
117 +# end
118 +# end
119 +
120 +# def tag_version
121 +# Bundler.ui.confirm "Tag release with annotation:"
122 +# m = File.read(hfile).match(/(?<annotation>#{headline}.*?)#{headline}/m) || raise("Unable to find release notes in #{hfile}")
123 +# Bundler.ui.info(m[:annotation].gsub(/^/, " "))
124 +# IO.popen(["git", "tag", "--file=-", version_tag], "w") do |fd|
125 +# fd.write m[:annotation]
126 +# end
127 +# yield if block_given?
128 +# rescue
129 +# Bundler.ui.error "Untagging #{version_tag} due to error."
130 +# sh_with_code "git tag -d #{version_tag}"
131 +# raise
132 +# end
133 +#
134 +# def rubygem_push(path)
135 +# cross_platforms.each do |ruby_platform|
136 +# super(path.gsub(/\.gem\z/, "-#{ruby_platform}.gem"))
137 +# end
138 +# super(path)
139 +# end
140 +#end
141
142 # Some constants we'll need
143 LIBFXSCINTILLA_VERSION = ENV['LIBFXSCINTILLA_VERSION'] || '2.28.0'
144 @@ -85,7 +85,17 @@ task :test => [:compile] do
145 sh "ruby -w -W2 -Ilib test/TS_All.rb -v"
146 end
147
148 -task :gem => ["ext/fox16_c/extconf.rb", "fxruby:configure", :build]
149 +task :default => ["ext/fox16_c/extconf.rb", "fxruby:configure"]
150 +
19151 +desc "Install gem"
20 +task :install => :compile do
21 + system "gem install fxruby-#{PKG_VERSION}.gem"
22 +end
152 +task :install => :compile
23153 +
24154 +# The "docs" task created by Hoe assumes that we want to run RDoc
25155 +# over everything under the "lib" and "ext" subdirectories.
27157 +# rdoc_target = Rake::Task['docs'].prerequisites.first
28158 +# rdoc_files = Rake::Task[rdoc_target].prerequisites
29159 +# rdoc_files.reject! {|x| x == "ext/fox16_c" }
30 +
160
31161
32162 gem_spec = Bundler.load_gemspec('fxruby.gemspec')
163 @@ -139,8 +149,8 @@ ext_task = Rake::ExtensionTask.new("fox16_c", gem_spec) do |ext|
164 end
165 end
33166
167 - FoxGemHelper.install_tasks
168 - Bundler::GemHelper.instance.cross_platforms = ext.cross_platform
169 + #FoxGemHelper.install_tasks
170 + #Bundler::GemHelper.instance.cross_platforms = ext.cross_platform
171 end
172
173 namespace :gem do
33 drop-failing-test.patch
44 installation-with-rakefile.patch
55 dont-run-test.patch
6 Fix-Rakefile-requires-a-default-task.patch
76 do-not-use-git-ls.patch
8 Fix-version-in-Rakefile.patch