File: fix-metaconfig.dpatch

package info (click to toggle)
libsetup-ruby 3.4.1-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny, squeeze
  • size: 284 kB
  • ctags: 231
  • sloc: ruby: 1,373; makefile: 43; sh: 21
file content (31 lines) | stat: -rw-r--r-- 958 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /bin/sh /usr/share/dpatch/dpatch-run
## plop.dpatch by Lucas Nussbaum <lucas@lucas-nussbaum.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: fix add_bool_config in metaconfig.
## DP: From upstream's SVN commit 2634
## DP: required for librmagick-ruby 2.2.0

@DPATCH@
diff -urNad trunk~/setup.rb trunk/setup.rb
--- trunk~/setup.rb	2005-11-20 12:54:27.000000000 +0100
+++ trunk/setup.rb	2008-02-13 23:48:53.000000000 +0100
@@ -296,13 +296,14 @@
     ALIASES.each do |ali, name|
       @table[ali] = @table[name]
     end
-    @items.freeze
-    @table.freeze
-    @options_re = /\A--(#{@table.keys.join('|')})(?:=(.*))?\z/
+  end
+
+  def options_re
+    /\A--(#{@table.keys.join('|')})(?:=(.*))?\z/
   end
 
   def parse_opt(opt)
-    m = @options_re.match(opt) or setup_rb_error "config: unknown option #{opt}"
+    m = options_re().match(opt) or setup_rb_error "config: unknown option #{opt}"
     m.to_a[1,2]
   end