From 7c97a0631e1fc26d1df42b5a1982c084aef9211e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= Date: Tue, 8 Jan 2019 13:49:17 +0100 Subject: [PATCH] gnu: Add lua5.2-expat. * gnu/packages/lua.scm (lua5.2-expat): New variable. (make-lua-expat): New procedure. (lua5.1-expat, lua5.2-expat): Call it. --- gnu/packages/lua.scm | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index bab166e3e8..4c0286a0d6 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2016, 2017 Efraim Flashner ;;; Copyright © 2016 Ricardo Wurmus ;;; Copyright © 2016 doncatnip -;;; Copyright © 2016, 2017 Clément Lassieur +;;; Copyright © 2016, 2017, 2019 Clément Lassieur ;;; Copyright © 2016 José Miguel Sánchez García ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Fis Trivial @@ -148,9 +148,9 @@ (define-public luajit language.") (license license:x11))) -(define-public lua5.1-expat +(define (make-lua-expat name lua) (package - (name "lua5.1-expat") + (name name) (version "1.3.0") (source (origin (method url-fetch) @@ -162,10 +162,11 @@ (define-public lua5.1-expat (build-system gnu-build-system) (arguments `(#:make-flags - (let ((out (assoc-ref %outputs "out"))) + (let ((out (assoc-ref %outputs "out")) + (lua-version ,(version-major+minor (package-version lua)))) (list "CC=gcc" - (string-append "LUA_LDIR=" out "/share/lua/$(LUA_V)") - (string-append "LUA_CDIR=" out "/lib/lua/$(LUA_V)"))) + (string-append "LUA_LDIR=" out "/share/lua/" lua-version) + (string-append "LUA_CDIR=" out "/lib/lua/" lua-version))) #:phases (modify-phases %standard-phases (delete 'configure) @@ -176,13 +177,19 @@ (define-public lua5.1-expat (invoke "lua" "tests/test.lua") (invoke "lua" "tests/test-lom.lua")))))) (inputs - `(("lua" ,lua-5.1) + `(("lua" ,lua) ("expat" ,expat))) (home-page "http://matthewwild.co.uk/projects/luaexpat/") (synopsis "SAX XML parser based on the Expat library") (description "LuaExpat is a SAX XML parser based on the Expat library.") (license (package-license lua-5.1)))) +(define-public lua5.1-expat + (make-lua-expat "lua5.1-expat" lua-5.1)) + +(define-public lua5.2-expat + (make-lua-expat "lua5.2-expat" lua-5.2)) + (define-public lua5.1-socket (package (name "lua5.1-socket")