Package: migemo
Severity: wishlist
Tags: patch
Hi,
The dpatch patch management system has been deprecated for some time. The
Lintian currently flags use of dpatch packages as an error. The new 3.0
packaging format is an improved version which, among other things, contains
patch management built-in. For more information, see:
http://wiki.debian.org/Projects/DebSrc3.0
I had some free time; see attached patch to migrate to new package
format. Note that all files in debian/patches/* are canocalized to
*.patch.
Let me know if there is anything that needs adjusting or if it is ok
to upload this version in a NMU in case you are working on other
issues needing attention.
Thanks,
Jari
>From cd1464f862bc55decb6a1c6e8cd8363b72f2f23a Mon Sep 17 00:00:00 2001
From: Jari Aalto <[email protected]>
Date: Tue, 24 Apr 2012 22:32:32 +0300
Subject: [PATCH] format-3.0
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Signed-off-by: Jari Aalto <[email protected]>
---
debian/changelog | 17 ++
debian/compat | 2 +-
debian/control | 10 +-
debian/copyright | 11 +-
debian/patches/00list | 4 -
...1_debian-patch.dpatch => 05-debian-patch.patch} | 8 +-
...-UTF-8-hack.dpatch => 10-more-UTF-8-hack.patch} | 8 +-
...each-to-prevent-File-objects-from-leakin.patch} | 8 +-
...mo.el_utf-8.dpatch => 20-migemo.el-utf-8.patch} | 8 +-
debian/patches/series | 5 +
debian/rules | 31 +--
debian/source/format | 1 +
migemo.rb | 235 --------------------
13 files changed, 58 insertions(+), 290 deletions(-)
delete mode 100644 debian/patches/00list
rename debian/patches/{01_debian-patch.dpatch => 05-debian-patch.patch} (99%)
rename debian/patches/{02_more-UTF-8-hack.dpatch => 10-more-UTF-8-hack.patch} (87%)
rename debian/patches/{03_use-File.foreach-to-prevent-File-objects-from-leakin.dpatch => 15-use-File.foreach-to-prevent-File-objects-from-leakin.patch} (60%)
rename debian/patches/{04_migemo.el_utf-8.dpatch => 20-migemo.el-utf-8.patch} (73%)
create mode 100644 debian/patches/series
create mode 100644 debian/source/format
delete mode 100644 migemo.rb
diff --git a/debian/changelog b/debian/changelog
index 6d58eb9..561f6e3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,20 @@
+migemo (0.40-10.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Remove deprecated dpatch and upgrade to packaging format "3.0 quilt".
+ * Update to Standards-Version to 3.9.3 and debhelper to 9.
+ * Add build-arch and build-indep targets; use dh_prep in rules file.
+ * Patches: all patches were renumbered to make room for new 02 where
+ in-line changes to original sources were moved.
+ * Fix debian-rules-ignores-make-clean-error (Lintian).
+ * Fix description-possibly-contains-homepage (Lintian).
+ * Fix copyright-refers-to-symlink-license (Lintian).
+ * Fix copyright-without-copyright-notice (Lintian).
+ * Fix old-fsf-address-in-copyright-file (Lintian).
+ * Fix build-depends-on-essential-package-without-using-version (Lintian).
+
+ -- Jari Aalto <[email protected]> Tue, 24 Apr 2012 22:03:27 +0300
+
migemo (0.40-10) unstable; urgency=low
* Apply a patch.
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/debian/control b/debian/control
index b7365cd..37c2867 100644
--- a/debian/control
+++ b/debian/control
@@ -2,16 +2,16 @@ Source: migemo
Section: utils
Priority: optional
Maintainer: Kenshi Muto <[email protected]>
-Build-Depends: debhelper (>= 5.0.0), dpatch
-Build-Depends-Indep: ruby, ruby1.8-dev, libromkan-ruby, libbsearch-ruby, skkdic, coreutils, emacs23 | emacsen
-Standards-Version: 3.8.0
+Build-Depends: debhelper (>= 9)
+Build-Depends-Indep: ruby, ruby1.8-dev, libromkan-ruby, libbsearch-ruby, skkdic, coreutils (>= 8.12), emacs23 | emacsen
+Standards-Version: 3.9.3
+Homepage: http://migemo.namazu.org
Package: migemo
Architecture: all
-Depends: emacs23 | emacsen, apel, ruby, libromkan-ruby, libbsearch-ruby
+Depends: ${misc:Depends}, emacs23 | emacsen, apel, ruby, libromkan-ruby, libbsearch-ruby
Conflicts: migemo-perl
Description: Japanese incremental search with Romaji on Emacsen
migemo is a tool that supports Japanese incremental search with Romaji.
It release you from heavy tasks of Kana Kanji conversion in order to
search. This is Emacsen interface, that is wrapper for isearch.
- http://migemo.namazu.org/
diff --git a/debian/copyright b/debian/copyright
index 427b10b..28ebf81 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -3,7 +3,9 @@ Fri, 23 Mar 2001 16:44:41 +0900.
It was downloaded from http://migemo.namazu.org/
-Upstream Author: Satoru Takabayashi <[email protected]>
+Upstream Author:
+
+ Copyright (C) 2001 Satoru Takabayashi <[email protected]>
Copyright:
@@ -16,11 +18,6 @@ Copyright:
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this package; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA.
-
On Debian GNU/Linux systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL'.
+Public License can be found in `/usr/share/common-licenses/GPL-2'.
diff --git a/debian/patches/00list b/debian/patches/00list
deleted file mode 100644
index 2c82324..0000000
--- a/debian/patches/00list
+++ /dev/null
@@ -1,4 +0,0 @@
-01_debian-patch
-02_more-UTF-8-hack
-03_use-File.foreach-to-prevent-File-objects-from-leakin.dpatch
-04_migemo.el_utf-8
diff --git a/debian/patches/01_debian-patch.dpatch b/debian/patches/05-debian-patch.patch
similarity index 99%
rename from debian/patches/01_debian-patch.dpatch
rename to debian/patches/05-debian-patch.patch
index 6849854..9f0a2e1 100644
--- a/debian/patches/01_debian-patch.dpatch
+++ b/debian/patches/05-debian-patch.patch
@@ -1,10 +1,6 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01_debian-patch.dpatch by Kenshi Muto <[email protected]>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: New patch generated from migemo 0.40-9 diff.gz
+From: Kenshi Muto <[email protected]>
+Subject: New patch generated from migemo 0.40-9 diff.gz
-@DPATCH@
diff -urNad migemo-0.40~/Makefile.am migemo-0.40/Makefile.am
--- migemo-0.40~/Makefile.am 2009-09-13 13:07:00.000000000 +0900
+++ migemo-0.40/Makefile.am 2009-09-13 13:09:53.999459840 +0900
diff --git a/debian/patches/02_more-UTF-8-hack.dpatch b/debian/patches/10-more-UTF-8-hack.patch
similarity index 87%
rename from debian/patches/02_more-UTF-8-hack.dpatch
rename to debian/patches/10-more-UTF-8-hack.patch
index aa46524..1510fee 100644
--- a/debian/patches/02_more-UTF-8-hack.dpatch
+++ b/debian/patches/10-more-UTF-8-hack.patch
@@ -1,10 +1,6 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02_more-UTF-8-hack.dpatch by Nobuhiro IMAI <[email protected]>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: prevent a case $LANG is not set, move a $LANG check outside of the loop
+From: Nobuhiro IMAI <[email protected]>
+Subject: prevent a case $LANG is not set, move a $LANG check outside of the loop
-@DPATCH@
diff -urNad migemo-0.40~/migemo migemo-0.40/migemo
--- migemo-0.40~/migemo 2009-09-13 13:12:29.535460524 +0900
+++ migemo-0.40/migemo 2009-09-13 13:13:29.479010195 +0900
diff --git a/debian/patches/03_use-File.foreach-to-prevent-File-objects-from-leakin.dpatch b/debian/patches/15-use-File.foreach-to-prevent-File-objects-from-leakin.patch
similarity index 60%
rename from debian/patches/03_use-File.foreach-to-prevent-File-objects-from-leakin.dpatch
rename to debian/patches/15-use-File.foreach-to-prevent-File-objects-from-leakin.patch
index 78ddec7..a2f6111 100644
--- a/debian/patches/03_use-File.foreach-to-prevent-File-objects-from-leakin.dpatch
+++ b/debian/patches/15-use-File.foreach-to-prevent-File-objects-from-leakin.patch
@@ -1,10 +1,6 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 03_use-File.foreach-to-prevent-File-objects-from-leakin.dpatch by Nobuhiro IMAI <[email protected]>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: use File.foreach to prevent File objects from leaking
+From: Nobuhiro IMAI <[email protected]>
+Subject: use File.foreach to prevent File objects from leaking
-@DPATCH@
diff -urNad migemo-0.40~/migemo-grep migemo-0.40/migemo-grep
--- migemo-0.40~/migemo-grep 2009-09-13 13:14:59.643459645 +0900
+++ migemo-0.40/migemo-grep 2009-09-13 13:15:12.634963333 +0900
diff --git a/debian/patches/04_migemo.el_utf-8.dpatch b/debian/patches/20-migemo.el-utf-8.patch
similarity index 73%
rename from debian/patches/04_migemo.el_utf-8.dpatch
rename to debian/patches/20-migemo.el-utf-8.patch
index 25ab1d8..423b14b 100644
--- a/debian/patches/04_migemo.el_utf-8.dpatch
+++ b/debian/patches/20-migemo.el-utf-8.patch
@@ -1,10 +1,6 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 04_migemo.el_utf-8.dpatch by Kenshi Muto <[email protected]>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: work with LANG=ja_JP.UTF-8
+From: Kenshi Muto <[email protected]>
+Subject: work with LANG=ja_JP.UTF-8
-@DPATCH@
diff -urNad migemo-0.40~/migemo.el.in migemo-0.40/migemo.el.in
--- migemo-0.40~/migemo.el.in 2009-09-17 22:38:53.885898923 +0900
+++ migemo-0.40/migemo.el.in 2009-09-17 22:39:17.945924537 +0900
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9cade73
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,5 @@
+02-new-file-migemo.rb.patch
+05-debian-patch.patch
+10-more-UTF-8-hack.patch
+15-use-File.foreach-to-prevent-File-objects-from-leakin.patch
+20-migemo.el-utf-8.patch
diff --git a/debian/rules b/debian/rules
index 0e30a53..e4b6523 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,7 +16,6 @@ RUBY=ruby
RUBYPATH=/usr/bin/$(RUBY)
RUBYLIBDIR=$(shell $(RUBY) -rrbconfig -e 'puts Config::CONFIG["rubylibdir"]')
-include /usr/share/dpatch/dpatch.make
configure: configure-stamp
configure-stamp:
@@ -28,8 +27,12 @@ configure-stamp:
ln -s /usr/share/skk/SKK-JISYO.L SKK-JISYO.L
touch configure-stamp
+
+build-arch: build
+build-indep: build
+
build: configure-stamp build-stamp
-build-stamp: patch-stamp
+build-stamp:
dh_testdir
# Add here commands to compile the package.
# $(MAKE) -f Makefile.am
@@ -38,27 +41,27 @@ build-stamp: patch-stamp
# $(MAKE) migemo-dict.cache frequent-chars
touch build-stamp
-clean: unpatch
+clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
- -$(MAKE) clean RUBY=$(RUBYPATH)
- -rm -rf $(CURDIR)/debian/migemo
- -rm -f SKK-JISYO.L
- -rm -f migemo.el
- -rm -f config.status config.cache config.log Makefile tmp.*
- -rm -f tests/Makefile
- -rm -f migemo-dict.idx
- -rm -f migemo-dict.cache migemo-dict.cache.idx
- -rm -f config.guess config.sub
+ $(MAKE) clean RUBY=$(RUBYPATH)
+ rm -rf $(CURDIR)/debian/migemo
+ rm -f SKK-JISYO.L
+ rm -f migemo.el
+ rm -f config.status config.cache config.log Makefile tmp.*
+ rm -f tests/Makefile
+ rm -f migemo-dict.idx
+ rm -f migemo-dict.cache migemo-dict.cache.idx
+ rm -f config.guess config.sub
dh_clean
install: DH_OPTIONS=
install: build
dh_testdir
dh_testroot
- dh_clean -k
+ dh_prep
dh_installdirs
# Add here commands to install the package into debian/migemo.
@@ -105,4 +108,4 @@ binary-arch: DH_OPTIONS=-a
binary-arch: build install
binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/migemo.rb b/migemo.rb
deleted file mode 100644
index 9d67e4d..0000000
--- a/migemo.rb
+++ /dev/null
@@ -1,235 +0,0 @@
-#
-# Ruby/Migemo - a library for Japanese incremental search.
-#
-# Copyright (C) 2001 Satoru Takabayashi <[email protected]>
-# All rights reserved.
-# This is free software with ABSOLUTELY NO WARRANTY.
-#
-# You can redistribute it and/or modify it under the terms of
-# the GNU General Public License version 2.
-#
-# NOTE: Ruby/Migemo can work only with EUC_JP encoding. ($KCODE="e")
-#
-
-require 'migemo-dict'
-require 'migemo-regex'
-require 'romkan'
-require 'jcode'
-include MigemoRegex
-
-class String
- # Hiragana to Katakana
- def to_katakana
- self.gsub(/¤¦¡«/, '\\1¥ô').tr('¤¡-¤ó', '¥¡-¥ó')
- end
-
- def quotemeta
- self.gsub(/([^ \w])/, '\\\\\\1')
- end
-
- def first
- /^(\\.|.)/ =~ self
- $1
- end
-
- def last
- /(\\.|.)$/ =~ self
- $1
- end
-
- def rest
- /^(\\.|.)(.*)/ =~ self
- $2
- end
-
- HANZEN_TAB = {
- " " => "¡¡", "!" => "¡ª", '"' => "¡É", "#" => "¡ô",
- "\$" => "¡ð", "%" => "¡ó", "&" => "¡õ", "'" => "¡Ç",
- "(" => "¡Ê", ")" => "¡Ë", "*" => "¡ö", "+" => "¡Ü",
- "," => "¡¤", "-" => "¡Ý", "." => "¡¥", "/" => "¡¿",
- "0" => "£°", "1" => "£±", "2" => "£²", "3" => "£³",
- "4" => "£´", "5" => "£µ", "6" => "£¶", "7" => "£·",
- "8" => "£¸", "9" => "£¹", ":" => "¡§", ";" => "¡¨",
- "<" => "¡ã", "=" => "¡á", ">" => "¡ä", "?" => "¡©",
- '@' => "¡÷", "A" => "£Á", "B" => "£Â", "C" => "£Ã",
- "D" => "£Ä", "E" => "£Å", "F" => "£Æ", "G" => "£Ç",
- "H" => "£È", "I" => "£É", "J" => "£Ê", "K" => "£Ë",
- "L" => "£Ì", "M" => "£Í", "N" => "£Î", "O" => "£Ï",
- "P" => "£Ð", "Q" => "£Ñ", "R" => "£Ò", "S" => "£Ó",
- "T" => "£Ô", "U" => "£Õ", "V" => "£Ö", "W" => "£×",
- "X" => "£Ø", "Y" => "£Ù", "Z" => "£Ú", "[" => "¡Î",
- "\\" => "¡À", "]" => "¡Ï", "^" => "¡°", "_" => "¡²",
- "`" => "¡Æ", "a" => "£á", "b" => "£â", "c" => "£ã",
- "d" => "£ä", "e" => "£å", "f" => "£æ", "g" => "£ç",
- "h" => "£è", "i" => "£é", "j" => "£ê", "k" => "£ë",
- "l" => "£ì", "m" => "£í", "n" => "£î", "o" => "£ï",
- "p" => "£ð", "q" => "£ñ", "r" => "£ò", "s" => "£ó",
- "t" => "£ô", "u" => "£õ", "v" => "£ö", "w" => "£÷",
- "x" => "£ø", "y" => "£ù", "z" => "£ú", "{" => "¡Ð",
- "|" => "¡Ã", "}" => "¡Ñ", "~" => "¡±"} #'
-
- HANZEN_RE = Regexp.new(HANZEN_TAB.keys.sort.map {|x| x.quotemeta}.join('|'))
-
- def to_fullwidth
- self.gsub(HANZEN_RE) {|s| HANZEN_TAB[s]}
- end
-end
-
-class Migemo
- VERSION = '0.40'
- def initialize (dict, pattern)
- @type = "ruby"
- @pattern = pattern
- @insertion = ""
- @optimization = 3
- @static_dict = dict
- @dict_cache = nil
- @user_dict = nil
- @regex_dict = nil
- @with_paren = false
- end
- attr_accessor :optimization
- attr_accessor :type
- attr_accessor :insertion
- attr_accessor :dict_cache
- attr_accessor :user_dict
- attr_accessor :regex_dict
- attr_accessor :with_paren
-
- private
- # `do' => (¤É)
- # `d' => (¤Ã ¤À ¤Â ¤Å ¤Ç ¤É)
- # `sh' => (¤·¤ã ¤· ¤·¤å ¤·¤§ ¤·¤ç)
- # `don' => (¤É¤ó ¤É¤Ê ¤É¤Ë ¤É¤Ì ¤É¤Í ¤É¤Î ¤É¤Ã) # special case 1
- # `nodd' => (¤Î¤Ã) # special case 2
- # `doc' => (¤É¤Ã ¤É¤Á) # special case 3
- # `dox' => (¤É¤Ã ¤É¤ã ¤É¤å ¤É¤ç) # special case 4
- # `essy' => (¤¨¤Ã¤·¤ã ¤¨¤Ã¤·¤å ¤¨¤Ã¤·¤ç) # special case 5
- # `ny' => (¤Ë¤ã ¤Ë¤å ¤Ë¤ç) # special case 6
- def expand_kanas
- kana = @pattern.downcase.to_kana
- /^(.*)(.)$/ =~ kana ;
- head = $1;
- last = $2;
-
- cand = Array.new;
- return [] if last == nil
- if last.consonant?
- if /^(.*)(.)$/ =~ head && $2.consonant?
- head2 = $1;
- beforelast = $2;
- if last == $beforelast # special case 2
- cand.push head2 + "¤Ã"
- elsif /^(.*)(.)$/ =~ head2 && beforelast == $2 && last.consonant?
- # special case 5
- cand += (beforelast + last).expand_consonant.map do |x|
- $1 + "¤Ã" + x.to_kana
- end
- else
- cand += (beforelast + last).expand_consonant.map do |x|
- head2 + x.to_kana
- end
- end
- elsif /^(.*?)(n?)ny$/ =~ @pattern && $2 == "" # special case 6
- head2 = $1
- cand += "ny".expand_consonant.map do |x|
- head2 + x.to_kana
- end
- else
- deriv = last.expand_consonant
- deriv.push "xtsu";
- if last == "c" # special case 3
- deriv.push "chi";
- elsif last == "x" # special case 4
- deriv.push "xya", "xyu", "xyo", "xwa"
- end
- cand += deriv.map do |x| head + x.to_kana end
- end
- elsif last == "¤ó" # speacial case 1
- cand.push kana;
- cand += ("n".expand_consonant + ["¤Ã"]).map do |x|
- head + x.to_kana
- end
- else
- cand.push kana
- end
- return cand.sort
- end
-
- # `¤á¤·' => (ÈÓ ÈÓ¹ç »óé¢ »ó¼É ÈÓݤ Ìܲ¼ ÈÓγ ¾¤»È ÈÓ²°)
- def expand_words (dict, pattern)
- raise if pattern == nil
- words = Array.new
- dict.lookup(pattern) do |item|
- words += item.values
- end
- return words
- end
-
- def lookup_cache
- @dict_cache.lookup(@pattern)
- end
-
- def lookup0
- compiler = RegexCompiler.new
- compiler.push(@pattern)
- compiler.push(@pattern.to_fullwidth)
- expand_kanas.each do |x|
- compiler.push(x)
- compiler.push(x.to_katakana)
- expand_words(@static_dict, x).each do |x| compiler.push(x) end
- end
- expand_words(@static_dict, @pattern).each do |x| compiler.push(x) end
- compiler.uniq
- compiler.optimize(@optimization) if @optimization
- compiler.regex
- end
-
- def lookup_user_dict
- compiler = RegexCompiler.new
- expand_kanas.each do |x|
- expand_words(@user_dict, x).each do |x| compiler.push(x) end
- end
- expand_words(@user_dict, @pattern).each do |x| compiler.push(x) end
- compiler.uniq
- compiler.optimize(@optimization) if @optimization
- compiler.regex
- end
-
- def lookup_regex_dict
- regexes = []
- @regex_dict.lookup(@pattern) do |item|
- regexes += item.values
- end
- regexes
- end
-
- public
- def lookup
- if @pattern == ""
- return RegexAlternation.new
- end
- result = if @dict_cache
- lookup_cache || lookup0
- else
- lookup0
- end
- if @user_dict
- lookup_user_dict.each{|x| result.push(x) }
- end
- result
- end
-
- def regex_tree
- lookup
- end
-
- def regex
- regex = lookup
- renderer = RegexRendererFactory.new(regex, @type, @insertion)
- renderer.with_paren = @with_paren
- string = renderer.render
- string = renderer.join_regexes(string, lookup_regex_dict) if @regex_dict
- string
- end
-end
--
1.7.10