From c3f88d4f345c41220670558391e38af2278936a4 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 14 Apr 2020 18:22:16 +0200 Subject: gnu: txr: Declare test target. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/lisp.scm (txr)[arguments]: Use #:test-target instead of a trivial custom ‘check’ phase. --- gnu/packages/lisp.scm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'gnu/packages/lisp.scm') diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 709ea88ae0..b35fa3225a 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2016, 2017 Andy Patterson ;;; Copyright © 2017, 2019 Ricardo Wurmus ;;; Copyright © 2017, 2018, 2019 Efraim Flashner -;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2018 Benjamin Slade ;;; Copyright © 2018 Alex Vong ;;; Copyright © 2018, 2019 Pierre Neidhardt @@ -860,6 +860,7 @@ enough to play the original mainframe Zork all the way through.") (build-system gnu-build-system) (arguments '(#:configure-flags '("cc=gcc") + #:test-target "tests" #:phases (modify-phases %standard-phases (add-after 'configure 'fix-tests (lambda _ @@ -867,10 +868,7 @@ enough to play the original mainframe Zork all the way through.") (("/usr/bin") "/")) (substitute* "tests/017/realpath.expected" (("/usr/bin") "/")) - #t)) - (replace 'check - (lambda _ - (invoke "make" "tests")))))) + #t))))) (native-inputs `(("bison" ,bison) ("flex" ,flex))) -- cgit v1.2.3 From 92e52d25adbb684ae943be396ee27273d9475afc Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 14 Apr 2020 18:38:23 +0200 Subject: gnu: txr: Call ./configure manually instead of patching. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/lisp.scm (txr)[source]: Remove patch. [arguments]: Add ‘--prefix’ to #:configure-flags. Use a custom ‘configure’ phase. * gnu/packages/patches/txr-shell.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/lisp.scm | 29 ++++++++++++------ gnu/packages/patches/txr-shell.patch | 59 ------------------------------------ 3 files changed, 19 insertions(+), 70 deletions(-) delete mode 100644 gnu/packages/patches/txr-shell.patch (limited to 'gnu/packages/lisp.scm') diff --git a/gnu/local.mk b/gnu/local.mk index ac5fb0cfd1..65e51a3541 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1480,7 +1480,6 @@ dist_patch_DATA = \ %D%/packages/patches/ttfautohint-source-date-epoch.patch \ %D%/packages/patches/tomb-fix-errors-on-open.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ - %D%/packages/patches/txr-shell.patch \ %D%/packages/patches/u-boot-riscv64-fix-extlinux.patch \ %D%/packages/patches/ucx-tcp-iface-ioctl.patch \ %D%/packages/patches/udiskie-no-appindicator.patch \ diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index b35fa3225a..d7ad0a0db0 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -853,22 +853,31 @@ enough to play the original mainframe Zork all the way through.") (url "http://www.kylheku.com/git/txr/") (commit (string-append "txr-" version)))) (file-name (git-file-name name version)) - (patches (search-patches "txr-shell.patch")) (sha256 (base32 "0c9qsj4xwc24c9g02mr5n97m4d87d4n0pcc2c2n58l2vg5dnzba0")))) (build-system gnu-build-system) (arguments - '(#:configure-flags '("cc=gcc") + '(#:configure-flags + (list "cc=gcc" + (string-append "--prefix=" (assoc-ref %outputs "out"))) #:test-target "tests" - #:phases (modify-phases %standard-phases - (add-after 'configure 'fix-tests - (lambda _ - (substitute* "tests/017/realpath.tl" - (("/usr/bin") "/")) - (substitute* "tests/017/realpath.expected" - (("/usr/bin") "/")) - #t))))) + #:phases + (modify-phases %standard-phases + (replace 'configure + ;; ./configure is a hand-written script that can't handle standard + ;; autotools arguments like CONFIG_SHELL. + (lambda* (#:key configure-flags #:allow-other-keys) + (setenv "txr_shell" (which "bash")) + (apply invoke "./configure" configure-flags) + #t)) + (add-after 'configure 'fix-tests + (lambda _ + (substitute* "tests/017/realpath.tl" + (("/usr/bin") "/")) + (substitute* "tests/017/realpath.expected" + (("/usr/bin") "/")) + #t))))) (native-inputs `(("bison" ,bison) ("flex" ,flex))) diff --git a/gnu/packages/patches/txr-shell.patch b/gnu/packages/patches/txr-shell.patch deleted file mode 100644 index a4abb73eac..0000000000 --- a/gnu/packages/patches/txr-shell.patch +++ /dev/null @@ -1,59 +0,0 @@ -Use the current shell instead of trying to find another one and -failing to do so. - -diff --git a/configure b/configure -index f1adb919..7891b4dc 100755 ---- a/configure -+++ b/configure -@@ -26,28 +26,6 @@ - # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --# --# The #!/bin/sh might be some legacy piece of crap, --# not even up to 1990 POSIX.2 spec. So the first step --# is to look for a better shell in some known places --# and re-execute ourselves with that interpreter. --# -- --if test x$txr_shell = x ; then -- for shell in /bin/bash /usr/bin/bash /usr/xpg4/bin/sh ; do -- if test -x $shell ; then -- txr_shell=$shell -- break -- fi -- done -- if test x$txr_shell = x ; then -- echo "No known POSIX shell found: falling back on /bin/sh, which may not work" -- txr_shell=/bin/sh -- fi -- export txr_shell -- exec $txr_shell $0 ${@+"$@"} --fi -- - set -u - - # -@@ -190,13 +168,6 @@ while [ $# -gt 0 ] ; do - exit 1 - fi - -- eval "var_exists=\${$var+y}" -- -- if [ "$var_exists" != y ] ; then -- printf "$0: nonexistent option: '%s'\n" "$1" -- exit 1 -- fi -- - eval "$var='$val'" - - eval "var_given_exists=\${${var}_given+y}" -@@ -208,6 +179,8 @@ while [ $# -gt 0 ] ; do - shift - done - -+txr_shell=$CONFIG_SHELL -+ - # - # If --help was given (or --help= or help=) then - # print help and exit. The termination status is failed, to indicate -- cgit v1.2.3 From eaa668ddda04e877d186203175fa36db4d1121bf Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 14 Apr 2020 18:54:52 +0200 Subject: gnu: txr: Update to 235. * gnu/packages/lisp.scm (txr): Update to 235. [arguments]: Cosmetic shortening. --- gnu/packages/lisp.scm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'gnu/packages/lisp.scm') diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index d7ad0a0db0..27d38cd471 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -845,7 +845,7 @@ enough to play the original mainframe Zork all the way through.") (define-public txr (package (name "txr") - (version "234") + (version "235") (source (origin (method git-fetch) @@ -854,8 +854,7 @@ enough to play the original mainframe Zork all the way through.") (commit (string-append "txr-" version)))) (file-name (git-file-name name version)) (sha256 - (base32 - "0c9qsj4xwc24c9g02mr5n97m4d87d4n0pcc2c2n58l2vg5dnzba0")))) + (base32 "0kpqk2x0sz7sqxsrhasq0xnljjlnxwhh4xjx2nii0zy2jkv4vsbn")))) (build-system gnu-build-system) (arguments '(#:configure-flags @@ -873,9 +872,8 @@ enough to play the original mainframe Zork all the way through.") #t)) (add-after 'configure 'fix-tests (lambda _ - (substitute* "tests/017/realpath.tl" - (("/usr/bin") "/")) - (substitute* "tests/017/realpath.expected" + (substitute* (list "tests/017/realpath.tl" + "tests/017/realpath.expected") (("/usr/bin") "/")) #t))))) (native-inputs -- cgit v1.2.3