apply patches from Daniel Janus debian-1.2.0-1 v1.2.0
authorKevin Rosenberg <kevin@rosenberg.net>
Fri, 14 Mar 2008 15:03:56 +0000 (09:03 -0600)
committerKevin Rosenberg <kevin@rosenberg.net>
Fri, 14 Mar 2008 15:03:56 +0000 (09:03 -0600)
debian/changelog
debian/control
debian/rules
main.lisp
tests.lisp

index eb2c5436c23df9382714a31de24022cbc9df5ef3..39546357466e8d704bb917ab4f1ea09742c063ad 100644 (file)
@@ -1,3 +1,9 @@
+cl-getopt (1.2.0-1) unstable; urgency=low
+
+  * New upstream
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Fri, 14 Mar 2008 09:00:57 -0600
+
 cl-getopt (1.1.0-3) unstable; urgency=low
 
   * debian/control: use build-depends, update standards-version
index f8f4eb3cd0a35ebb1680801a727efec2e0f9ae88..8708de9ecfafa16ad8d16452a90510e8447190d3 100644 (file)
@@ -3,7 +3,7 @@ Section: devel
 Priority: optional
 Maintainer: Kevin M. Rosenberg <kmr@debian.org>
 Build-Depends: debhelper (>= 4.0.0)
-Standards-Version: 3.7.2.2
+Standards-Version: 3.7.3.0
 
 Package: cl-getopt
 Architecture: all
index 2c459683aa18058ce37d08b98b06e520c4607e95..9ff92d18b7d49449489c45bbe028d20785317784 100755 (executable)
@@ -14,8 +14,6 @@ source-files  := $(wildcard *.lisp)
 configure: configure-stamp
 configure-stamp:
        dh_testdir
-       # Add here commands to configure the package.
-
        touch configure-stamp
 
 
@@ -23,14 +21,13 @@ build: build-stamp
 
 build-stamp: configure-stamp 
        dh_testdir
-       # Add here commands to compile the package.
        touch build-stamp
 
 clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp configure-stamp
-       # Add here commands to clean up after the build process.
+       # Clean up after the build process.
        rm -f debian/$(debpkg).postinst.* debian/$(debpkg).prerm.*
        dh_clean
 
@@ -38,43 +35,29 @@ install: build
        dh_testdir
        dh_testroot
        dh_clean -k
-       # Add here commands to install the package into debian/getopt.
+       # Install the package into debian/getopt.
        dh_installdirs $(clc-systems) $(clc-files) $(clc-tests)
        dh_install $(pkg).asd $(source-files) $(clc-files)
        dh_link $(clc-files)/$(pkg).asd $(clc-systems)/$(pkg).asd
 
-# Build architecture-independent files here.
+# Build architecture-independent files
 binary-indep: build install
-
-
-# Build architecture-dependent files here.
-binary-arch: build install
        dh_testdir
        dh_testroot
-#      dh_installdebconf       
        dh_installdocs
-#      dh_installmenu
-#      dh_installlogrotate
-#      dh_installemacsen
-#      dh_installpam
-#      dh_installmime
-#      dh_installinit
-#      dh_installcron
-#      dh_installman
-#      dh_installinfo
-#      dh_undocumented
        dh_installchangelogs
        dh_strip
        dh_compress
        dh_fixperms
-#      dh_makeshlibs
        dh_installdeb
-#      dh_perl
        dh_shlibdeps
        dh_gencontrol
        dh_md5sums
        dh_builddeb
 
+# Build architecture-dependent files
+binary-arch: build install
+
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure
 
index 311b73bf6960fb2aafb3aabc2a2471ec1b840e40..b64ade2e9660278079120c64aa0530e34e0ca97b 100644 (file)
--- a/main.lisp
+++ b/main.lisp
@@ -28,7 +28,7 @@
   (and (> (length arg) 2)
        (char= #\- (schar arg 0))
        (char= #\- (schar arg 1))
-       (char/= #\- (schar arg 3))))
+       (char/= #\- (schar arg 2))))
 
 (defun decompose-arg (arg option-type)
   "Returns base-name,argument"
@@ -120,11 +120,12 @@ opts is a list of option lists. The fields of the list are
                ((null argument)
                 (if (and (eq :required (second option-list)) (null (cdr pos)))
                     (push base-name errors)
-                    (if (or (is-short-option (second pos))
+                    (if (or (eq :none (second option-list))
+                            (is-short-option (second pos))
                             (is-long-option (second pos)))
                         (if (eq :required (second option-list))
                             (push base-name errors)
-                            (push (cons base-name (third option-list)) out-args))
+                            (push (cons base-name (third option-list)) out-opts))
                         (progn
                           (push (cons base-name (second pos)) out-opts)
                           (setq pos (cdr pos))))))))
index f8f657458420abcb2b47d83f5c6c3f2a11e7a082..7b1610bb39639721a1d716f93debfcdfefbbb010 100644 (file)
@@ -68,5 +68,9 @@
                (getopt '("--a=10") '(("along" :optional) ("aboot" :optional))))
       (test-mv '(("a") nil nil)
                (getopt '("a") '(("a" :none))))
+      (test-mv '(("a") (("foo") ("bar")) nil)
+               (getopt '("a" "--foo" "--bar") '(("foo" :none) ("bar" :none))))
+      (test-mv '(("a") (("foo") ("bar")) nil)
+               (getopt '("a" "--f" "--bar") '(("foo" :none) ("bar" :none))))
       ))
   t)