diff -Nru trivial-features-0.6/debian/changelog trivial-features-20161107.git29ab1da/debian/changelog --- trivial-features-0.6/debian/changelog 2018-05-06 01:51:49.000000000 +0000 +++ trivial-features-20161107.git29ab1da/debian/changelog 2018-04-27 09:19:31.000000000 +0000 @@ -1,3 +1,33 @@ +trivial-features (20161107.git29ab1da-1) unstable; urgency=medium + + * New upstream snapshot. + * Mark as M-A foreign. + * Ship README.md and SPEC.md. + * Bump to debhelper compat level 11. + * Rewrite d/rules using dh. + * Bump to S-V 4.1.4. + * Add myself to Uploaders. + * Update package description. + * Add Recommends on cl-rt, cl-cffi, cl-alexandria (for the testsuite). + * Rewrite d/copyright using machine-readable format 1.0. + * Add an autopkgtest that runs the testsuite on sbcl, ecl and clisp. + + -- Sébastien Villemot Fri, 27 Apr 2018 11:19:31 +0200 + +trivial-features (0.6-2) unstable; urgency=medium + + * Team upload. + * Update Vcs-* fields for move to salsa. + * Remove ${shlibs:Depends}, this is an arch:all package. + * Set Maintainer to debian-common-lisp@l.d.o. + * Move to 3.0 (quilt) source format. + * Remove Build-Depends on dh-lisp. + * Remove obsolete README.Debian. + * Use secure URL for Homepage. + * Update d/watch using uscan git HEAD mode. + + -- Sébastien Villemot Fri, 13 Apr 2018 23:27:33 +0200 + trivial-features (0.6-1.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru trivial-features-0.6/debian/compat trivial-features-20161107.git29ab1da/debian/compat --- trivial-features-0.6/debian/compat 2018-05-06 01:51:49.000000000 +0000 +++ trivial-features-20161107.git29ab1da/debian/compat 2018-04-27 08:36:14.000000000 +0000 @@ -1 +1 @@ -7 +11 diff -Nru trivial-features-0.6/debian/control trivial-features-20161107.git29ab1da/debian/control --- trivial-features-0.6/debian/control 2018-05-06 01:51:49.000000000 +0000 +++ trivial-features-20161107.git29ab1da/debian/control 2018-04-27 08:42:44.000000000 +0000 @@ -1,18 +1,34 @@ Source: trivial-features Section: lisp Priority: optional -Maintainer: Debian Common Lisp Team -Uploaders: Peter Van Eynde -Build-Depends: debhelper (>= 7) -Build-Depends-Indep: dh-lisp -Standards-Version: 3.8.3 -Homepage: http://www.cliki.net/trivial-features -Vcs-Darcs: http://darcs.debian.org/darcs/pkg-common-lisp/trivial-features -Vcs-Browser: http://darcs.debian.org/cgi-bin/darcsweb.cgi?r=pkg-common-lisp/trivial-features;a=summary +Maintainer: Debian Common Lisp Team +Uploaders: Peter Van Eynde , + Sébastien Villemot +Build-Depends: debhelper (>= 11~) +Standards-Version: 4.1.4 +Homepage: https://www.cliki.net/trivial-features +Vcs-Git: https://salsa.debian.org/common-lisp-team/trivial-features.git +Vcs-Browser: https://salsa.debian.org/common-lisp-team/trivial-features Package: cl-trivial-features Architecture: all -Depends: ${misc:Depends}, ${shlibs:Depends} -Description: An abstraction layer for the *features* that implementations use +Multi-Arch: foreign +Depends: ${misc:Depends} +Recommends: cl-rt, cl-cffi, cl-alexandria +Description: abstraction layer for the *FEATURES* across Common Lisp implementations trivial-features ensures consistent *FEATURES* across multiple Common Lisp implementations. + . + For example, on MacOS X platforms, while most Lisps push `:DARWIN` to + `*FEATURES*`, CLISP and Allegro push `:MACOS` and `:MACOSX` instead, + respectively. Some Lisps might not push any feature suggesting MacOS + X at all. trivial-features will make sure all Lisps will have + `:DARWIN` in the `*FEATURES*` list when running on MacOS X. This + way, you can write + . + #+darwin foo #-darwin bar + . + instead of + . + #+(or darwin macos macosx) foo + #-(or darwin macos macosx) bar diff -Nru trivial-features-0.6/debian/copyright trivial-features-20161107.git29ab1da/debian/copyright --- trivial-features-0.6/debian/copyright 2018-05-06 01:51:49.000000000 +0000 +++ trivial-features-20161107.git29ab1da/debian/copyright 2018-04-27 08:45:05.000000000 +0000 @@ -1,30 +1,46 @@ -This package was debianized by Peter Van Eynde -in Nov 2009 - -The upstream darcs archive is at http://common-lisp.net/~loliveira/darcs/trivial-features - -Upstream Author: Luis Oliveira - -Copyright: - -Copyright (C) 2007, Luis Oliveira - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: trivial-features +Upstream-Contact: http://github.com/trivial-features/trivial-features +Source: https://www.cliki.net/trivial-features + +Files: * +Copyright: 2007-2009, Luis Oliveira +License: Expat + +Files: src/tf-mcl.lisp +Copyright: 2010, Chun Tian (binghe) +License: Expat + +Files: debian/* +Copyright: 2009 Peter Van Eynde + 2016 Andrey Rahmatullin + 2018 Sébastien Villemot +License: Expat + +License: Expat + The MIT License + . + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated + documentation files (the "Software"), to deal in the Software + without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to + whom the Software is furnished to do so, subject to the + following conditions: + . + The above copyright notice and this permission notice shall + be included in all copies or substantial portions of the + Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT + WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE AND NONINFRINGEMENT. IN NO EVENT + SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. diff -Nru trivial-features-0.6/debian/dirs trivial-features-20161107.git29ab1da/debian/dirs --- trivial-features-0.6/debian/dirs 2018-05-06 01:51:49.000000000 +0000 +++ trivial-features-20161107.git29ab1da/debian/dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -usr/share/common-lisp/source/trivial-features -usr/share/common-lisp/source/trivial-features/src -usr/share/common-lisp/source/trivial-features/tests diff -Nru trivial-features-0.6/debian/docs trivial-features-20161107.git29ab1da/debian/docs --- trivial-features-0.6/debian/docs 2018-05-06 01:51:49.000000000 +0000 +++ trivial-features-20161107.git29ab1da/debian/docs 2018-04-27 08:35:18.000000000 +0000 @@ -1 +1,2 @@ -README SPEC +README.md +SPEC.md diff -Nru trivial-features-0.6/debian/install trivial-features-20161107.git29ab1da/debian/install --- trivial-features-0.6/debian/install 2018-05-06 01:51:49.000000000 +0000 +++ trivial-features-20161107.git29ab1da/debian/install 2018-04-27 08:35:43.000000000 +0000 @@ -1,3 +1 @@ -*.asd usr/share/common-lisp/source/trivial-features/ -src/*.lisp usr/share/common-lisp/source/trivial-features/src/ -tests/*.lisp usr/share/common-lisp/source/trivial-features/tests/ +*.asd src/ tests/ usr/share/common-lisp/source/trivial-features/ diff -Nru trivial-features-0.6/debian/README.Debian trivial-features-20161107.git29ab1da/debian/README.Debian --- trivial-features-0.6/debian/README.Debian 2018-05-06 01:51:49.000000000 +0000 +++ trivial-features-20161107.git29ab1da/debian/README.Debian 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -The upstream repository is at http://common-lisp.net/~loliveira/darcs/trivial-features - diff -Nru trivial-features-0.6/debian/rules trivial-features-20161107.git29ab1da/debian/rules --- trivial-features-0.6/debian/rules 2018-05-06 01:51:49.000000000 +0000 +++ trivial-features-20161107.git29ab1da/debian/rules 2018-04-27 08:36:42.000000000 +0000 @@ -1,50 +1,3 @@ #!/usr/bin/make -f - -configure: configure-stamp -configure-stamp: - dh_testdir - # Add here commands to configure the package. - touch configure-stamp - -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. - dh_clean - -install: build - dh_testdir - dh_testroot - dh_prep - # Add here commands to install the package into debian/xmls. - dh_installdirs - dh_install - -# Build architecture-dependent files here. -binary-arch: - -# Build architecture-independent files here. -binary-indep: build install - dh_testdir - dh_testroot - dh_installdocs - dh_installchangelogs - dh_lisp - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure - +%: + dh $@ diff -Nru trivial-features-0.6/debian/source/format trivial-features-20161107.git29ab1da/debian/source/format --- trivial-features-0.6/debian/source/format 2018-05-06 01:51:49.000000000 +0000 +++ trivial-features-20161107.git29ab1da/debian/source/format 2018-04-13 21:24:12.000000000 +0000 @@ -1 +1 @@ -1.0 +3.0 (quilt) diff -Nru trivial-features-0.6/debian/tests/control trivial-features-20161107.git29ab1da/debian/tests/control --- trivial-features-0.6/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ trivial-features-20161107.git29ab1da/debian/tests/control 2018-04-27 08:47:20.000000000 +0000 @@ -0,0 +1,11 @@ +Test-Command: sbcl --script debian/tests/runtests.lisp +Depends: @, sbcl, cl-rt, cl-cffi, cl-alexandria +Restrictions: allow-stderr + +Test-Command: ecl -norc -shell debian/tests/runtests.lisp +Depends: @, ecl, cl-rt, cl-cffi, cl-alexandria +Restrictions: allow-stderr + +Test-Command: clisp -norc debian/tests/runtests.lisp +Depends: @, clisp, cl-rt, cl-cffi, cl-alexandria +Restrictions: allow-stderr diff -Nru trivial-features-0.6/debian/tests/runtests.lisp trivial-features-20161107.git29ab1da/debian/tests/runtests.lisp --- trivial-features-0.6/debian/tests/runtests.lisp 1970-01-01 00:00:00.000000000 +0000 +++ trivial-features-20161107.git29ab1da/debian/tests/runtests.lisp 2018-04-27 09:19:02.000000000 +0000 @@ -0,0 +1,9 @@ +(require "asdf") + +;; Store FASL in some temporary dir +(asdf:clear-output-translations) +(setq asdf:*user-cache* (uiop:getenv "AUTOPKGTEST_TMP")) +(asdf:initialize-output-translations) + +(or (asdf:test-system "trivial-features") + (error "Test failure(s) for trivial-features")) diff -Nru trivial-features-0.6/debian/watch trivial-features-20161107.git29ab1da/debian/watch --- trivial-features-0.6/debian/watch 2018-05-06 01:51:49.000000000 +0000 +++ trivial-features-20161107.git29ab1da/debian/watch 2018-04-13 21:27:08.000000000 +0000 @@ -1 +1,4 @@ -# upstream in darcs +version=4 +opts="mode=git, pgpmode=none, pretty=%cd.git%h" \ +https://github.com/trivial-features/trivial-features \ +HEAD debian uupdate diff -Nru trivial-features-0.6/README trivial-features-20161107.git29ab1da/README --- trivial-features-0.6/README 2009-11-09 12:49:14.000000000 +0000 +++ trivial-features-20161107.git29ab1da/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -trivial-features ensures consistent *FEATURES* across multiple Common -Lisp implementations. - -For example, on MacOS X platforms, while most Lisps push :DARWIN to -*FEATURES*, CLISP and Allegro push :MACOS and :MACOSX instead, -respectively. Some Lisps might not push any feature suggesting MacOS -X at all. trivial-features will make sure all Lisps will have :DARWIN -in the *FEATURES* list when running on MacOS X. This way, you can -write - - #+darwin foo #-darwin bar - -instead of - - #+(or darwin macos macosx) foo - #-(or darwin macos macosx) bar - -The included SPEC document describes the set of symbols that should or -should not be present in CL:*FEATURES* on certain circumstances. This -specification is implemented by the TRIVIAL-FEATURES system which -supports a handful of Lisps. - -The test suite is, in effect, an implementation using CFFI that is -checked against the various implementations in src/tf-*.lisp. - -trivial-features is MIT-licenced. diff -Nru trivial-features-0.6/README.md trivial-features-20161107.git29ab1da/README.md --- trivial-features-0.6/README.md 1970-01-01 00:00:00.000000000 +0000 +++ trivial-features-20161107.git29ab1da/README.md 2016-11-07 11:38:22.000000000 +0000 @@ -0,0 +1,32 @@ +[![Build Status](https://travis-ci.org/trivial-features/trivial-features.svg?branch=master)](https://travis-ci.org/trivial-features/trivial-features) + +trivial-features ensures consistent `*FEATURES*` across multiple +Common Lisp implementations. + +For example, on MacOS X platforms, while most Lisps push `:DARWIN` to +`*FEATURES*`, CLISP and Allegro push `:MACOS` and `:MACOSX` instead, +respectively. Some Lisps might not push any feature suggesting MacOS +X at all. trivial-features will make sure all Lisps will have +`:DARWIN` in the `*FEATURES*` list when running on MacOS X. This +way, you can write + + #+darwin foo #-darwin bar + +instead of + + #+(or darwin macos macosx) foo + #-(or darwin macos macosx) bar + +The included [SPEC.md][1] document describes the set of symbols that +should or should not be present in `CL:*FEATURES*` on certain +circumstances. This specification is implemented by the +TRIVIAL-FEATURES system which supports a handful of Lisps. + +The test suite is, in effect, an implementation using [CFFI][2] that +is checked against the various implementations in `src/tf-*.lisp`. + +trivial-features is MIT-licenced. + + +[1]: https://github.com/trivial-features/trivial-features/blob/master/SPEC.md +[2]: http://common-lisp.net/project/cffi diff -Nru trivial-features-0.6/release.lisp trivial-features-20161107.git29ab1da/release.lisp --- trivial-features-0.6/release.lisp 1970-01-01 00:00:00.000000000 +0000 +++ trivial-features-20161107.git29ab1da/release.lisp 2016-11-07 11:38:22.000000000 +0000 @@ -0,0 +1,247 @@ +#!/usr/bin/env clisp +;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- + +(defpackage :release-script (:use #:cl #:regexp)) +(in-package :release-script) + +;;;; Configuration ------------------------------------------------------------ + +(defparameter *project-name* "trivial-features") +(defparameter *asdf-file* (format nil "~A.asd" *project-name*)) + +(defparameter *host* "common-lisp.net") +(defparameter *release-dir* + (format nil "public_html/tarballs/~A/" *project-name*)) + +(defparameter *version-file* nil) +(defparameter *version-file-dir* nil) + +;;;; -------------------------------------------------------------------------- + +;;;; Utilities + +(defun ensure-list (x) + (if (listp x) x (list x))) + +(defmacro string-case (expression &body clauses) + `(let ((it ,expression)) ; yes, anaphoric, deal with it. + (cond + ,@(loop for clause in clauses collect + `((or ,@(loop for alternative in (ensure-list (first clause)) + collect (or (eq t alternative) + `(string= it ,alternative)))) + ,@(rest clause)))))) + +(defparameter *development-mode* t) + +(defun die (format-control &rest format-args) + (format *error-output* "~?" format-control format-args) + (if *development-mode* + (cerror "continue" "die") + (ext:quit 1))) + +(defun numeric-split (string) + (if (digit-char-p (char string 0)) + (multiple-value-bind (number next-position) + (parse-integer string :junk-allowed t) + (cons number (when (< next-position (length string)) + (numeric-split (subseq string next-position))))) + (let ((next-digit-position (position-if #'digit-char-p string))) + (if next-digit-position + (cons (subseq string 0 next-digit-position) + (numeric-split (subseq string next-digit-position))) + (list string))))) + +(defun natural-string-< (s1 s2) + (labels ((aux< (l1 l2) + (cond ((null l1) (not (null l2))) + ((null l2) nil) + (t (destructuring-bind (x . xs) l1 + (destructuring-bind (y . ys) l2 + (cond ((and (numberp x) (stringp y)) + t) + ((and (numberp y) (stringp x)) + nil) + ((and (numberp x) (numberp y)) + (or (< x y) (and (= x y) (aux< xs ys)))) + (t + (or (string-lessp x y) + (and (string-equal x y) + (aux< xs ys))))))))))) + (aux< (numeric-split s1) + (numeric-split s2)))) + +;;;; Running commands + +(defparameter *dry-run* nil) + +(defun cmd? (format-control &rest format-args) + (let ((cmd (format nil "~?" format-control format-args))) + (with-open-stream (s1 (ext:run-shell-command cmd :output :stream)) + (loop for line = (read-line s1 nil nil) + while line + collect line)))) + +;; XXX: quote arguments. +(defun cmd (format-control &rest format-args) + (when *development-mode* + (format *debug-io* "CMD: ~?~%" format-control format-args)) + (let ((ret (ext:run-shell-command (format nil "~?" format-control format-args)))) + (or (null ret) + (zerop ret)))) + +(defun cmd! (format-control &rest format-args) + (or (apply #'cmd format-control format-args) + (die "cmd '~?' failed." format-control format-args))) + +(defun maybe-cmd! (format-control &rest format-args) + (if *dry-run* + (format t "SUPPRESSING: ~?~%" format-control format-args) + (apply #'cmd! format-control format-args))) + +;;;; + +(defun find-current-version () + (subseq (reduce (lambda (x y) (if (natural-string-< x y) y x)) + (cmd? "git tag -l v\\*")) + 1)) + +(defun parse-version (string) + (mapcar (lambda (x) + (parse-integer x :junk-allowed t)) + (loop repeat 3 ; XXX: parameterize + for el in (regexp-split "\\." (find-current-version)) + collect el))) + +(defun check-for-unrecorded-changes (&optional force) + (unless (cmd "git diff --exit-code") + (write-line "Unrecorded changes.") + (if force + (write-line "Continuing anyway.") + (die "Aborting.~@ + Use -f or --force if you want to make a release anyway.")))) + +(defun new-version-number-candidates (current-version) + (let ((current-version (parse-version current-version))) + (labels ((alternatives (before after) + (when after + (cons (append before (list (1+ (first after))) + (mapcar (constantly 0) (rest after))) + (alternatives (append before (list (first after))) + (rest after)))))) + (loop for alt in (alternatives nil current-version) + collect (reduce (lambda (acc next) + (format nil "~a.~a" acc next)) + alt))))) + +(defun ask-user-for-version (current-version next-versions) + (format *query-io* "Current version is ~A. Which will be the next one?~%" + current-version) + (loop for i from 1 and version in next-versions + do (format *query-io* "~T~A) ~A~%" i version)) + (format *query-io* "? ") + (finish-output *query-io*) + (nth (1- (parse-integer (read-line) :junk-allowed t)) + next-versions)) + +(defun git-tag-tree (version) + (write-line "Tagging the tree...") + (maybe-cmd! "git tag \"v~A\"" version)) + +(defun add-version-to-system-file (version path-in path-out) + (with-open-file (in path-in :direction :input) + (with-open-file (out path-out :direction :output) + (loop for line = (read-line in nil nil) while line + do (write-line line out) + when (string= #1="(defsystem " line + :end2 (min (length #1#) (length line))) + do (format out " :version ~s~%" version))))) + +(defun create-dist (version distname) + (write-line "Creating distribution...") + (cmd! "mkdir \"~a\"" distname) + (cmd! "git archive master | tar xC \"~A\"" distname) + (format t "Updating ~A with new version: ~A~%" *asdf-file* version) + (let* ((asdf-file-path (format nil "~A/~A" distname *asdf-file*)) + (tmp-asdf-file-path (format nil "~a.tmp" asdf-file-path))) + (add-version-to-system-file version asdf-file-path tmp-asdf-file-path) + (cmd! "mv \"~a\" \"~a\"" tmp-asdf-file-path asdf-file-path))) + +(defun tar-and-sign (distname tarball) + (write-line "Creating and signing tarball...") + (cmd! "tar czf \"~a\" \"~a\"" tarball distname) + (cmd! "gpg -b -a \"~a\"" tarball)) + +(defparameter *remote-directory* (format nil "~A:~A" *host* *release-dir*)) + +(defun upload-tarball (tarball signature remote-directory) + (write-line "Copying tarball to web server...") + (maybe-cmd! "scp \"~A\" \"~A\" \"~A\"" tarball signature remote-directory) + (format t "Uploaded ~A and ~A.~%" tarball signature)) + +(defun update-remote-links (tarball signature host release-dir project-name) + (format t "Updating ~A_latest links...~%" project-name) + (maybe-cmd! "ssh \"~A\" ln -sf \"~A\" \"~A/~A_latest.tar.gz\"" + host tarball release-dir project-name) + (maybe-cmd! "ssh \"~A\" ln -sf \"~A\" \"~A/~A_latest.tar.gz.asc\"" + host signature release-dir project-name)) + +(defun upload-version-file (version version-file host version-file-dir) + (format t "Uploading ~A...~%" version-file) + (maybe-cmd! "echo -n \"~A\" > \"~A\"" version version-file) + (maybe-cmd! "scp \"~A\" \"~A\":\"~A\"" version-file host version-file-dir) + (maybe-cmd! "rm \"~A\"" version-file)) + +(defun maybe-clean-things-up (tarball signature) + (when (y-or-n-p "Clean local tarball and signature?") + (cmd! "rm \"~A\" \"~A\"" tarball signature))) + +(defun run (force version) + (check-for-unrecorded-changes force) + ;; figure out what version we'll be preparing. + (unless version + (let* ((current-version (find-current-version)) + (next-versions (new-version-number-candidates current-version))) + (setf version (or (ask-user-for-version current-version next-versions) + (die "invalid selection."))))) + (git-tag-tree version) + (let* ((distname (format nil "~A_~A" *project-name* version)) + (tarball (format nil "~A.tar.gz" distname)) + (signature (format nil "~A.asc" tarball))) + ;; package things up. + (create-dist version distname) + (tar-and-sign distname tarball) + ;; upload. + (upload-tarball tarball signature *remote-directory*) + (update-remote-links tarball signature *host* *release-dir* *project-name*) + (when *version-file* + (upload-version-file version *version-file* *host* *version-file-dir*)) + ;; clean up. + (maybe-clean-things-up tarball signature) + ;; documentation. + ;; (write-line "Building and uploading documentation...") + ;; (maybe-cmd! "make -C doc upload-docs") + ;; push tags and any outstanding changes. + (write-line "Pushing tags and changes...") + (maybe-cmd! "git push --tags origin master"))) + + +;;;; Do it to it + +(let ((force nil) + (version nil) + (args ext:*args*)) + (loop while args + do (string-case (pop args) + (("-h" "--help") + (write-line "No help, sorry. Read the source.") + (ext:quit 0)) + (("-f" "--force") + (setf force t)) + (("-v" "--version") + (setf version (pop args))) + (("-n" "--dry-run") + (setf *dry-run* t)) + (t + (die "Unrecognized argument '~a'" it)))) + (run force version)) diff -Nru trivial-features-0.6/release.sh trivial-features-20161107.git29ab1da/release.sh --- trivial-features-0.6/release.sh 2009-11-09 12:49:14.000000000 +0000 +++ trivial-features-20161107.git29ab1da/release.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,147 +0,0 @@ -#!/bin/bash - -### Configuration - -PROJECT_NAME='trivial-features' -ASDF_FILE="$PROJECT_NAME.asd" -HOST="common-lisp.net" -RELEASE_DIR="public_html/tarballs/trivial-features/" -VERSION_FILE="" -#VERSION_FILE="VERSION" -#VERSION_FILE_DIR="/project/$PROJECT_NAME/public_html" - -set -e - -### Process options - -FORCE=0 -VERSION="" - -while [ $# -gt 0 ]; do - case "$1" in - -h|--help) - echo "No help, sorry. Read the source." - exit 0 - ;; - -f|--force) - FORCE=1 - shift - ;; - -v|--version) - VERSION="$2" - shift 2 - ;; - *) - echo "Unrecognized argument '$1'" - exit 1 - ;; - esac -done - -### Check for unrecorded changes - -if darcs whatsnew; then - echo -n "Unrecorded changes. " - if [ "$FORCE" -ne 1 ]; then - echo "Aborting." - echo "Use -f or --force if you want to make a release anyway." - exit 1 - else - echo "Continuing anyway." - fi -fi - -### Determine new version number - -if [ -z "$VERSION" ]; then - CURRENT_VERSION=$(grep :version $ASDF_FILE | cut -d\" -f2) - - dots=$(echo "$CURRENT_VERSION" | tr -cd '.') - count=$(expr length "$dots" + 1) - declare -a versions - - for i in $(seq $count); do - new="" - for j in $(seq $(expr $i - 1)); do - p=$(echo "$CURRENT_VERSION" | cut -d. -f$j) - new="$new$p." - done - part=$(expr 1 + $(echo "$CURRENT_VERSION" | cut -d. -f$i)) - new="$new$part" - for j in $(seq $(expr $i + 1) $count); do new="$new.0"; done - versions[$i]=$new - done - - while true; do - echo "Current version is $CURRENT_VERSION. Which will be next one?" - for i in $(seq $count); do echo " $i) ${versions[$i]}"; done - echo -n "? " - read choice - - if ((choice > 0)) && ((choice <= ${#versions[@]})); then - VERSION=${versions[$choice]} - break - fi - done -fi - -### Do it - -TARBALL_NAME="${PROJECT_NAME}_${VERSION}" -TARBALL="$TARBALL_NAME.tar.gz" -SIGNATURE="$TARBALL.asc" - -echo "Updating $ASDF_FILE with new version: $VERSION" -sed -e "s/:version \"$CURRENT_VERSION\"/:version \"$VERSION\"/" \ - "$ASDF_FILE" > "$ASDF_FILE.tmp" -mv "$ASDF_FILE.tmp" "$ASDF_FILE" - -darcs record -m "update $ASDF_FILE for version $VERSION" - -echo "Tagging the tree..." -darcs tag "$VERSION" - -echo "Creating distribution..." -darcs dist -d "$TARBALL_NAME" - -echo "Signing tarball..." -gpg -b -a "$TARBALL" - -echo "Copying tarball to web server..." -scp "$TARBALL" "$SIGNATURE" "$HOST:$RELEASE_DIR" -echo "Uploaded $TARBALL and $SIGNATURE." - -echo "Updating ${PROJECT_NAME}_latest links..." -ssh $HOST ln -sf "$TARBALL" "$RELEASE_DIR/${PROJECT_NAME}_latest.tar.gz" -ssh $HOST ln -sf "$SIGNATURE" "$RELEASE_DIR/${PROJECT_NAME}_latest.tar.gz.asc" - -if [ "$VERSION_FILE" ]; then - echo "Uploading $VERSION_FILE..." - echo -n "$VERSION" > "$VERSION_FILE" - scp "$VERSION_FILE" "$HOST":"$VERSION_FILE_DIR" - rm "$VERSION_FILE" -fi - -while true; do - echo -n "Clean local tarball and signature? [y] " - read -n 1 response - case "$response" in - y|'') - echo - rm "$TARBALL" "$SIGNATURE" - break - ;; - n) - break - ;; - *) - echo "Invalid response '$response'. Try again." - ;; - esac -done - -#echo "Building and uploading documentation..." -#make -C doc upload-docs - -echo "Pushing changes..." -darcs push diff -Nru trivial-features-0.6/SPEC trivial-features-20161107.git29ab1da/SPEC --- trivial-features-0.6/SPEC 2009-11-09 12:49:14.000000000 +0000 +++ trivial-features-20161107.git29ab1da/SPEC 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ --*- Text -*- - -This is a first ***draft*** of a description of what symbols should be -present in CL:*FEATURES* for various platforms. A possible future -direction of this documentation might be a CDR document, if it turns -out to be a good idea. (Making the language of this document much -more precise will be necessary then.) - -We will start by limiting ourselves to OS, CPU and endianness features -on Windows and POSIX platforms. - -There are various possible implementation strategies ranging from null -implementations (when the host Lisp already pushes the wanted feature) -to using FFI (e.g. calling uname() to grab system information. - - -============= -Specification - -* ENDIANNESS - -Either :LITTLE-ENDIAN or :BIG-ENDIAN should present in *FEATURES*. -For the time being, we will not concern ourselves with other -orderings, switchable endianness, etc. - - -* OPERATING SYSTEM - -On Windows, :WINDOWS should be present in *FEATURES*. - -On POSIX systems, the "sysname" information from uname(3) should be -used to push the appropriate symbol to *FEATURES* by upcasing that -string (or downcasing for the "modern" lisps) and interning it in the -keyword package. - -Examples: - - :DARWIN - :LINUX - :NETBSD - :OPENBSD - :FREEBSD - -For convenience, :UNIX should be pushed when running on -POSIX/UNIX-like operating system (that doesn't include Windows) and -:BSD should be present when running on BSD-based systems (that -includes Darwin) - -[add :MACH too?] - - -* CPU - -These features should be mutually exclusive: - - :X86 - :X86-64 - :PPC - :PPC64 - :MIPS - :ALPHA - :SPARC - :SPARC64 - :HPPA - :HPPA64 - -[add more ...] - -[note: it's debatable whether :X86 shouldn't also be exported on -x86-64, and :PPC on ppc64. SBCL doesn't. Other ways -to handle, for example, the x86/x86-64 case would be to export -something like :PC386 in both cases or have an additional :X86-32. Or -finally, have just :X86, :PPC, etc, and add :32-BIT-CPU and -:64-BIT-CPU features.] - - -======================= -Unreferenced References - - "CLHS: Variable *FEATURES*" - - - "Maintaining Portable Lisp Programs", by Christophe Rhodes - diff -Nru trivial-features-0.6/SPEC.md trivial-features-20161107.git29ab1da/SPEC.md --- trivial-features-0.6/SPEC.md 1970-01-01 00:00:00.000000000 +0000 +++ trivial-features-20161107.git29ab1da/SPEC.md 2016-11-07 11:38:22.000000000 +0000 @@ -0,0 +1,86 @@ +TRIVIAL-FEATURES +================ + +This is a first *draft* of a description of what symbols should be +present in `CL:*FEATURES*` for various platforms. A possible future +direction of this documentation might be a CDR document, if it turns +out to be a good idea. (Making the language of this document much +more precise will be necessary then.) + +We will start by limiting ourselves to OS, CPU and endianness features +on Windows and POSIX platforms. + +There are various possible implementation strategies ranging from null +implementations (when the host Lisp already pushes the wanted feature) +to using FFI (e.g. calling uname() to grab system information. + + +Specification +------------- + +### ENDIANNESS + +Either `:LITTLE-ENDIAN` or `:BIG-ENDIAN` should present in +`\*FEATURES\*`. For the time being, we will not concern ourselves +with other orderings, switchable endianness, etc. + + +### OPERATING SYSTEM + +On Windows, `:WINDOWS` should be present in `*FEATURES*`. + +On POSIX systems, the "sysname" information from uname(3) should be +used to push the appropriate symbol to `*FEATURES*` by upcasing that +string (or downcasing for the "modern" lisps) and interning it in the +keyword package. + +Examples: + + - `:DARWIN` + - `:LINUX` + - `:NETBSD` + - `:OPENBSD` + - `:FREEBSD` + +For convenience, `:UNIX` should be pushed when running on +POSIX/UNIX-like operating system (that doesn't include Windows) and +`:BSD` should be present when running on BSD-based systems (that +includes Darwin) + +[add `:MACH` too?] + + +### CPU + +These features should be mutually exclusive: + + - `:X86` + - `:X86-64` + - `:PPC` + - `:PPC64` + - `:MIPS` + - `:ALPHA` + - `:SPARC` + - `:SPARC64` + - `:HPPA` + - `:HPPA64` + +[add more ...] + +[note: it's debatable whether `:X86` shouldn't also be exported on +x86-64, and `:PPC` on ppc64. SBCL doesn't. Other ways +to handle, for example, the x86/x86-64 case would be to export +something like `:PC386` in both cases or have an additional `:X86-32`. Or +finally, have just `:X86`, `:PPC`, etc, and add `:32-BIT-CPU` and +`:64-BIT-CPU` features.] + + +Unreferenced References +----------------------- + + * [CLHS: Variable \*FEATURES\*][1] + * [Maintaining Portable Lisp Programs][2], by Christophe Rhodes + + +[1]: http://www.lispworks.com/documentation/HyperSpec/Body/v_featur.htm +[2]: http://www-jcsu.jesus.cam.ac.uk/~csr21/papers/features.pdf diff -Nru trivial-features-0.6/src/tf-abcl.lisp trivial-features-20161107.git29ab1da/src/tf-abcl.lisp --- trivial-features-0.6/src/tf-abcl.lisp 2009-11-09 12:49:14.000000000 +0000 +++ trivial-features-20161107.git29ab1da/src/tf-abcl.lisp 2016-11-07 11:38:22.000000000 +0000 @@ -28,7 +28,14 @@ ;;;; Endianness -;;; TODO +(pushnew (let ((order (jcall "toString" + (jstatic "nativeOrder" "java.nio.ByteOrder")))) + (cond ((string-equal order "LITTLE_ENDIAN") + :little-endian) + ((string-equal order "BIG_ENDIAN") + :big-endian) + (t (error "Byte order ~A unknown" order)))) + *features*) ;;;; OS diff -Nru trivial-features-0.6/src/tf-clasp.lisp trivial-features-20161107.git29ab1da/src/tf-clasp.lisp --- trivial-features-0.6/src/tf-clasp.lisp 1970-01-01 00:00:00.000000000 +0000 +++ trivial-features-20161107.git29ab1da/src/tf-clasp.lisp 2016-11-07 11:38:22.000000000 +0000 @@ -0,0 +1,36 @@ +;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- +;;; +;;; tf-clasp.lisp --- CLASP implementation of trivial-features. +;;; +;;; Permission is hereby granted, free of charge, to any person +;;; obtaining a copy of this software and associated documentation +;;; files (the "Software"), to deal in the Software without +;;; restriction, including without limitation the rights to use, copy, +;;; modify, merge, publish, distribute, sublicense, and/or sell copies +;;; of the Software, and to permit persons to whom the Software is +;;; furnished to do so, subject to the following conditions: +;;; +;;; The above copyright notice and this permission notice shall be +;;; included in all copies or substantial portions of the Software. +;;; +;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +;;; DEALINGS IN THE SOFTWARE. + +(in-package :cl-user) + +;;;; Endianness +;;; - Set by CLASP directly. Sets :LITTLE-ENDIAN or :BIG-ENDIAN + +;;;; OS +;;; - Set by CLASP directly. Already pushes :DARWIN, :LINUX, :UNIX, :BSD + +;;;; CPU +;;; - Set by CLASP directly. Already pushes :X86-64 (currently the only +;;; supported platform) - More will be added directly in CLASP as soon as +;;; porting is done. diff -Nru trivial-features-0.6/src/tf-clisp.lisp trivial-features-20161107.git29ab1da/src/tf-clisp.lisp --- trivial-features-0.6/src/tf-clisp.lisp 2009-11-09 12:49:14.000000000 +0000 +++ trivial-features-20161107.git29ab1da/src/tf-clisp.lisp 2016-11-07 11:38:22.000000000 +0000 @@ -53,11 +53,20 @@ ;;;; CPU ;;; FIXME: not complete -(pushnew (intern - (symbol-name - (cond - ((string= (machine-type) "X86_64") '#:x86-64) - ((member :pc386 *features*) '#:x86) - ((string= (machine-type) "POWER MACINTOSH") '#:ppc))) - '#:keyword) - *features*) +(let ((cpu (cond + ((or (member :pc386 *features*) + (member (machine-type) '("x86" "x86_64") + :test #'string-equal)) + (if (member :word-size=64 *features*) + '#:x86-64 + '#:x86)) + ((string= (machine-type) "POWER MACINTOSH") + '#:ppc) + ((or (member (machine-type) '("SPARC" "SPARC64") + :test #'string-equal)) + (if (member :word-size=64 *features*) + '#:sparc64 + '#:sparc))))) + (when cpu + (pushnew (intern (symbol-name cpu) '#:keyword) + *features*))) diff -Nru trivial-features-0.6/src/tf-ecl.lisp trivial-features-20161107.git29ab1da/src/tf-ecl.lisp --- trivial-features-0.6/src/tf-ecl.lisp 2009-11-09 12:49:14.000000000 +0000 +++ trivial-features-20161107.git29ab1da/src/tf-ecl.lisp 2016-11-07 11:38:22.000000000 +0000 @@ -51,3 +51,5 @@ #+powerpc7450 (pushnew :ppc *features*) #+x86_64 (pushnew :x86-64 *features*) #+(or i386 i486 i586 i686) (pushnew :x86 *features*) +#+(or armv5l armv6l armv7l) (pushnew :arm *features*) +#+mipsel (pushnew :mips *features*) diff -Nru trivial-features-0.6/src/tf-mcl.lisp trivial-features-20161107.git29ab1da/src/tf-mcl.lisp --- trivial-features-0.6/src/tf-mcl.lisp 1970-01-01 00:00:00.000000000 +0000 +++ trivial-features-20161107.git29ab1da/src/tf-mcl.lisp 2016-11-07 11:38:22.000000000 +0000 @@ -0,0 +1,41 @@ +;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- +;;; +;;; tf-mcl.lisp --- Digitool MCL trivial-features implementation. +;;; +;;; Copyright (C) 2010, Chun Tian (binghe) +;;; +;;; Permission is hereby granted, free of charge, to any person +;;; obtaining a copy of this software and associated documentation +;;; files (the "Software"), to deal in the Software without +;;; restriction, including without limitation the rights to use, copy, +;;; modify, merge, publish, distribute, sublicense, and/or sell copies +;;; of the Software, and to permit persons to whom the Software is +;;; furnished to do so, subject to the following conditions: +;;; +;;; The above copyright notice and this permission notice shall be +;;; included in all copies or substantial portions of the Software. +;;; +;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +;;; DEALINGS IN THE SOFTWARE. + +(in-package :cl-user) + +;;;; Endianness + +(pushnew :big-endian *features*) + +;;;; OS + +;;; MCL already pushes :UNIX and :DARWIN. + +(pushnew :bsd *features*) + +;;;; CPU + +#+ppc-target (pushnew :ppc *features*) diff -Nru trivial-features-0.6/src/tf-mkcl.lisp trivial-features-20161107.git29ab1da/src/tf-mkcl.lisp --- trivial-features-0.6/src/tf-mkcl.lisp 1970-01-01 00:00:00.000000000 +0000 +++ trivial-features-20161107.git29ab1da/src/tf-mkcl.lisp 2016-11-07 11:38:22.000000000 +0000 @@ -0,0 +1,49 @@ +;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- +;;; +;;; tf-mkcl.lisp --- MKCL implementation of trivial-features. +;;; +;;; Copyright (C) 2007-2009, Luis Oliveira +;;; +;;; Permission is hereby granted, free of charge, to any person +;;; obtaining a copy of this software and associated documentation +;;; files (the "Software"), to deal in the Software without +;;; restriction, including without limitation the rights to use, copy, +;;; modify, merge, publish, distribute, sublicense, and/or sell copies +;;; of the Software, and to permit persons to whom the Software is +;;; furnished to do so, subject to the following conditions: +;;; +;;; The above copyright notice and this permission notice shall be +;;; included in all copies or substantial portions of the Software. +;;; +;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +;;; DEALINGS IN THE SOFTWARE. + +(in-package :cl-user) + +;;;; Endianness + +#-(or :little-endian :big-endian) +(pushnew (let ((ptr (ffi:allocate-foreign-object :unsigned-short))) + (unwind-protect + (progn + (setf (ffi:deref-pointer ptr :unsigned-short) #xfeff) + (ecase (ffi:deref-pointer ptr :unsigned-byte) + (#xfe (intern "BIG-ENDIAN" "KEYWORD")) + (#xff (intern "LITTLE-ENDIAN" "KEYWORD")))) + (ffi:free-foreign-object ptr))) + *features*) + +;;;; OS + +;;; MKCL conforms to SPEC + +;;;; CPU + +;;; MKCL conforms to SPEC + diff -Nru trivial-features-0.6/src/tf-mocl.lisp trivial-features-20161107.git29ab1da/src/tf-mocl.lisp --- trivial-features-0.6/src/tf-mocl.lisp 1970-01-01 00:00:00.000000000 +0000 +++ trivial-features-20161107.git29ab1da/src/tf-mocl.lisp 2016-11-07 11:38:22.000000000 +0000 @@ -0,0 +1,40 @@ +;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- +;;; +;;; tf-mocl.lisp --- MOCL trivial-features implementation. +;;; +;;; Copyright (C) 2007, Luis Oliveira +;;; +;;; Permission is hereby granted, free of charge, to any person +;;; obtaining a copy of this software and associated documentation +;;; files (the "Software"), to deal in the Software without +;;; restriction, including without limitation the rights to use, copy, +;;; modify, merge, publish, distribute, sublicense, and/or sell copies +;;; of the Software, and to permit persons to whom the Software is +;;; furnished to do so, subject to the following conditions: +;;; +;;; The above copyright notice and this permission notice shall be +;;; included in all copies or substantial portions of the Software. +;;; +;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +;;; DEALINGS IN THE SOFTWARE. + +(in-package :cl-user) + +;;;; Endianness + +;;; MOCL already pushes :LITTLE-ENDIAN. + +;;;; OS + +;;; MOCL already pushes :IOS, :DARWIN, :BSD, and :UNIX for iOS, +;;; and :ANDROID, :LINUX, and :UNIX for Android. + +;;;; CPU + +;;; MOCL already pushes :ARM. diff -Nru trivial-features-0.6/tests/package.lisp trivial-features-20161107.git29ab1da/tests/package.lisp --- trivial-features-0.6/tests/package.lisp 2009-11-09 12:49:14.000000000 +0000 +++ trivial-features-20161107.git29ab1da/tests/package.lisp 2016-11-07 11:38:22.000000000 +0000 @@ -30,4 +30,5 @@ (:use :common-lisp :regression-test :alexandria - :cffi)) + :cffi) + (:export #:run)) diff -Nru trivial-features-0.6/tests/tests.lisp trivial-features-20161107.git29ab1da/tests/tests.lisp --- trivial-features-0.6/tests/tests.lisp 2009-11-09 12:49:14.000000000 +0000 +++ trivial-features-20161107.git29ab1da/tests/tests.lisp 2016-11-07 11:38:22.000000000 +0000 @@ -26,6 +26,11 @@ (in-package :trivial-features-tests) +(defun run () + (let ((*package* (find-package :trivial-features-tests))) + (do-tests) + (null (regression-test:pending-tests)))) + ;;;; Support Code #-windows @@ -36,7 +41,7 @@ ;; Get system identification. (defun uname () - (with-foreign-object (buf 'utsname) + (with-foreign-object (buf '(:struct utsname)) (when (= (%uname buf) -1) (error "uname() returned -1")) (macrolet ((utsname-slot (name) @@ -104,3 +109,22 @@ (:ia64 nil) ; add this feature later! (t t)) t) + +#-windows +(deftest cpu.2 + (let ((machine (nth-value 1 (uname)))) + (cond ((member machine '("x86" "x86_64") :test #'string=) + (ecase (foreign-type-size :pointer) + (4 (featurep :x86)) + (8 (featurep :x86-64)))) + (t + (format *debug-io* + "~&; NOTE: unhandled machine type, ~a, in CPU.2 test.~%" + machine) + t))) + t) + +;; regression test: sometimes, silly logic leads to pushing nil to +;; *features*. +(deftest nil.1 (featurep nil) nil) +(deftest nil.2 (featurep :nil) nil) diff -Nru trivial-features-0.6/.travis.yml trivial-features-20161107.git29ab1da/.travis.yml --- trivial-features-0.6/.travis.yml 1970-01-01 00:00:00.000000000 +0000 +++ trivial-features-20161107.git29ab1da/.travis.yml 2016-11-07 11:38:22.000000000 +0000 @@ -0,0 +1,30 @@ +language: lisp + +env: + matrix: + # - LISP=abcl + # - LISP=allegro + - LISP=sbcl + - LISP=sbcl32 + - LISP=ccl + - LISP=ccl32 + - LISP=clisp + - LISP=clisp32 + # - LISP=cmucl + - LISP=ecl + +matrix: + allow_failures: + - env: LISP=ecl + +install: + - curl -L https://github.com/luismbo/cl-travis/raw/master/install.sh | sh + - if [ "${LISP:(-2)}" = "32" ]; then + sudo apt-get install libc6-dev-i386; + fi + +script: + - cl -e '(ql:quickload :cffi-grovel) + (ql:quickload :trivial-features-tests) + (unless (trivial-features-tests:run) + (uiop:quit 1))' diff -Nru trivial-features-0.6/trivial-features.asd trivial-features-20161107.git29ab1da/trivial-features.asd --- trivial-features-0.6/trivial-features.asd 2009-11-09 12:49:14.000000000 +0000 +++ trivial-features-20161107.git29ab1da/trivial-features.asd 2016-11-07 11:38:22.000000000 +0000 @@ -24,13 +24,12 @@ ;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ;;; DEALINGS IN THE SOFTWARE. -#-(or sbcl clisp allegro openmcl lispworks ecl cmu scl cormanlisp abcl xcl) +#-(or sbcl clisp allegro openmcl mcl mkcl lispworks ecl cmu scl cormanlisp abcl xcl mocl clasp) (error "Sorry, your Lisp is not supported. Patches welcome.") (defsystem trivial-features :description "Ensures consistent *FEATURES* across multiple CLs." :author "Luis Oliveira " - :version "0.6" :licence "MIT" :components ((:module src @@ -43,14 +42,16 @@ #+ecl (:file "tf-ecl") #+lispworks (:file "tf-lispworks") #+openmcl (:file "tf-openmcl") + #+mcl (:file "tf-mcl") + #+mkcl (:file "tf-mkcl") #+sbcl (:file "tf-sbcl") #+scl (:file "tf-scl") #+abcl (:file "tf-abcl") #+xcl (:file "tf-xcl") + #+mocl (:file "tf-mocl") + #+clasp (:file "tf-clasp") )))) (defmethod perform ((o test-op) (c (eql (find-system 'trivial-features)))) (operate 'load-op 'trivial-features-tests) (operate 'test-op 'trivial-features-tests)) - -;; vim: ft=lisp et diff -Nru trivial-features-0.6/trivial-features-tests.asd trivial-features-20161107.git29ab1da/trivial-features-tests.asd --- trivial-features-0.6/trivial-features-tests.asd 2009-11-09 12:49:14.000000000 +0000 +++ trivial-features-20161107.git29ab1da/trivial-features-tests.asd 2016-11-07 11:38:22.000000000 +0000 @@ -25,24 +25,26 @@ ;;; DEALINGS IN THE SOFTWARE. (eval-when (:load-toplevel :execute) - (oos 'load-op 'cffi-grovel) + ;; We need to load trivial-features this way before the the + ;; defsystem form is read for the corner case when someone loads + ;; trivial-features-tests before trivial-features since the system + ;; definition's got a #+windows reader conditional that is supplied + ;; by trivial-features. (oos 'load-op 'trivial-features)) (defsystem trivial-features-tests :description "Unit tests for TRIVIAL-FEATURES." + :defsystem-depends-on (cffi-grovel) :depends-on (trivial-features rt cffi alexandria) :components ((:module tests :serial t :components ((:file "package") - #-windows (cffi-grovel:grovel-file "utsname") + #-windows (:cffi-grovel-file "utsname") #+windows (:file "sysinfo") (:file "tests"))))) -(defmethod perform - ((o test-op) (c (eql (find-system 'trivial-features-tests)))) +(defmethod perform ((o test-op) (c (eql (find-system 'trivial-features-tests)))) (let ((*package* (find-package 'trivial-features-tests))) (funcall (find-symbol (symbol-name '#:do-tests))))) - -;; vim: ft=lisp et