From mboxrd@z Thu Jan 1 00:00:00 1970 From: doncatnip Subject: [PATCH] gnu: awesome: Update to 3.5.9. Date: Fri, 2 Sep 2016 00:59:53 +0200 Message-ID: <20160902005953.4d5caf74@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/iPmJxM5Rs42kU0/tv3Ijrl=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfZ5l-0003b2-KP for guix-devel@gnu.org; Thu, 01 Sep 2016 17:00:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfZ5f-0003qt-LA for guix-devel@gnu.org; Thu, 01 Sep 2016 17:00:08 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:34516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfZ5f-0003q0-A4 for guix-devel@gnu.org; Thu, 01 Sep 2016 17:00:03 -0400 Received: by mail-wm0-x241.google.com with SMTP id v143so231554wmv.1 for ; Thu, 01 Sep 2016 14:00:03 -0700 (PDT) Received: from localhost (pD9EACE86.dip0.t-ipconnect.de. [217.234.206.134]) by smtp.gmail.com with ESMTPSA id a21sm224885wma.10.2016.09.01.13.59.55 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Sep 2016 13:59:57 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: "guix-devel@gnu.org" --MP_/iPmJxM5Rs42kU0/tv3Ijrl= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hey Guix ! Let's try this again. --MP_/iPmJxM5Rs42kU0/tv3Ijrl= Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-gnu-lua-Remove-conflicting-flag-pass-MYCFLAGS.patch >From 99ac37565b7a4826c9ca3c9f0545825924effc3d Mon Sep 17 00:00:00 2001 From: doncatnip Date: Thu, 1 Sep 2016 23:08:28 +0200 Subject: [PATCH 1/3] gnu: lua: Remove conflicting flag, pass MYCFLAGS * gnu/packages/lua.scm (lua)[arguments]: Use MYCFLAGS instead of CFLAGS and remove conflicting -DLUA_USE_POSIX since -DLUA_USE_LINUX is passed implicitly for build target "linux". --- gnu/packages/lua.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 8bd67c5..9f19cc9 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -51,7 +51,7 @@ (srfi srfi-1)) #:test-target "test" #:make-flags - '("CFLAGS=-fPIC -DLUA_DL_DLOPEN -DLUA_USE_POSIX" + '("MYCFLAGS=-fPIC -DLUA_DL_DLOPEN" "linux") #:phases (modify-phases %standard-phases -- 2.9.3 --MP_/iPmJxM5Rs42kU0/tv3Ijrl= Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0002-gnu-lua-Add-lua-lgi.patch =46rom 57a998f52e2d77e758ff339d03f26556b3b9c63f Mon Sep 17 00:00:00 2001 From: doncatnip Date: Thu, 1 Sep 2016 23:53:32 +0200 Subject: [PATCH 2/3] gnu: lua: Add lua-lgi. * gnu/packages/lua.scm (lua-lgi): New variable. --- gnu/packages/lua.scm | 77 ++++++++++++++++++++++++++++++++++++++++++++++++= +++- 1 file changed, 76 insertions(+), 1 deletion(-) diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 9f19cc9..cdc28b0 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -5,6 +5,7 @@ ;;; Copyright =C2=A9 2014 Andreas Enge ;;; Copyright =C2=A9 2016 Efraim Flashner ;;; Copyright =C2=A9 2016 Ricardo Wurmus +;;; Copyright =C2=A9 2016 doncatnip ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,7 +30,12 @@ #:use-module (gnu packages) #:use-module (gnu packages readline) #:use-module (gnu packages tls) - #:use-module (gnu packages xml)) + #:use-module (gnu packages xml) + #:use-module (gnu packages glib) + #:use-module (gnu packages libffi) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages xorg) + #:use-module (gnu packages gtk)) =20 (define-public lua (package @@ -259,3 +265,72 @@ directory structure and file attributes.") communication. It takes an already established TCP connection and creates= a secure session between the peers.") (license (package-license lua-5.1)))) + +(define-public lua-lgi + (package + (name "lua-lgi") + (version "0.9.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/pavouk/lgi/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1fmgdl5y4ph3yc6ycg865s3vai1rjkyda61cgqxk6zd13hmznw0c")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (add-before 'build 'set-env + (lambda* (#:key inputs #:allow-other-keys) + ; we need to load cairo dynamically + (let* ((cairo (string-append + (assoc-ref inputs "cairo") "/lib" ))) + (setenv "LD_LIBRARY_PATH" cairo )))) + (add-before 'build 'set-lua-version + (lambda _ + ; lua version and therefore install directories are hardcoded + ; FIXME: This breaks when we update lua to >=3D5.3 + (substitute* "./lgi/Makefile" + (("LUA_VERSION=3D5.1") "LUA_VERSION=3D5.2")))) + (add-before 'check 'skip-test-gtk + (lambda _ + ; FIXME: Skip GTK tests: + ; gtk3 - can't get it to run with the xorg-server config bel= ow + ; and some non-gtk tests will also fail + ; gtk2 - lots of functions aren't implemented + ; We choose gtk2 as the lesser evil and simply skip the test. + ; as of 01/09/2016 awesome is the only package dependent on lg= i but + ; it doesn't need or interact with gtk using lgi. + (substitute* "./tests/test.lua" + (("'gtk.lua',") "-- 'gtk.lua',")))) + (add-before 'check 'start-xserver-instance + (lambda* (#:key inputs #:allow-other-keys) + ;; There must be a running X server during tests. + (system (format #f "~a/bin/Xvfb :1 &" + (assoc-ref inputs "xorg-server"))) + (setenv "DISPLAY" ":1")))) + #:make-flags (list "CC=3Dgcc" + (string-append "PREFIX=3D" (assoc-ref %outputs "out"))))) + (inputs + `(("gobject-introspection" ,gobject-introspection) + ("glib" ,glib) + ("pango", pango) + ("gtk", gtk+-2) + ("lua" ,lua) + ("cairo" ,cairo) + ("libffi" ,libffi) + ("xorg-server", xorg-server))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (home-page "https://github.com/pavouk/lgi/") + (synopsis "Lua bridge to GObject based libraries") + (description + "LGI is gobject-introspection based dynamic Lua binding to GObject +based libraries. It allows using GObject-based libraries directly from Lu= a. +Notable examples are GTK+, GStreamer and Webkit.") + (license license:expat))) --=20 2.9.3 --MP_/iPmJxM5Rs42kU0/tv3Ijrl= Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0003-gnu-awesome-Update-to-3.5.9.patch =46rom 60b06fd4bf04fc9b172cd2d557be9237ffc6fd46 Mon Sep 17 00:00:00 2001 From: doncatnip Date: Fri, 2 Sep 2016 00:41:22 +0200 Subject: [PATCH 3/3] gnu: awesome: Update to 3.5.9. * gnu/packages/wm.scm (awesome): Update to 3.5.9. (awesome)[inputs]: Add gobject-introspection, lua-lgi, cairo. Use latest available lua. (awesome)[arguments]: Set lua search paths. Add cairo to LD_LIBRARY_PATH. Wrap binary in respect to those paths plus GI_TYPELIB_PATH. --- gnu/packages/wm.scm | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 2cc9f44..ee67c6d 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -9,6 +9,7 @@ ;;; Copyright =C2=A9 2016 Al McElrath ;;; Copyright =C2=A9 2016 Carlo Zancanaro ;;; Copyright =C2=A9 2016 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2016 doncatnip ;;; ;;; This file is part of GNU Guix. ;;; @@ -382,7 +383,7 @@ experience.") (define-public awesome (package (name "awesome") - (version "3.4.15") + (version "3.5.9") (source (origin (method url-fetch) (uri (string-append @@ -390,7 +391,7 @@ experience.") version ".tar.xz")) (sha256 (base32 - "1m910lr7wkw2dgzmirfvz7dasfswhhccdf65l21iiciv24c3w1bb")) + "0kynair1ykr74b39a4gcm2y24viial64337cf26nhlc7azjbby67")) (modules '((guix build utils) (srfi srfi-19))) (snippet @@ -413,7 +414,9 @@ experience.") ("libxml2" ,libxml2) ;for XML_CATALOG_FILES ("pkg-config" ,pkg-config) ("xmlto" ,xmlto))) - (inputs `(("cairo" ,cairo) + (inputs `(("gobject-introspection" ,gobject-introspection) + ("lua-lgi",lua-lgi) + ("cairo" ,cairo) ("dbus" ,dbus) ("gdk-pixbuf" ,gdk-pixbuf) ("glib" ,glib) @@ -422,7 +425,7 @@ experience.") ("libxcb" ,libxcb) ("libxcursor" ,libxcursor) ("libxdg-basedir" ,libxdg-basedir) - ("lua" ,lua-5.1) + ("lua" ,lua) ("pango" ,pango) ("startup-notification" ,startup-notification) ("xcb-util" ,xcb-util) @@ -445,11 +448,35 @@ experience.") (("/xmlto") (string-append "/xmlto --skip-validation"))) #t)) + (add-before 'configure 'set-lua-paths + (lambda* (#:key inputs #:allow-other-keys) + ; needs to load cairo dynamically + (let* ((cairo (string-append + (assoc-ref inputs "cairo") "/lib" )) + (lua-lgi (assoc-ref inputs "lua-lgi") )) + (setenv "LD_LIBRARY_PATH" cairo ) + (setenv "LUA_PATH" (string-append + lua-lgi "/share/lua/5.2/?.lua")) + (setenv "LUA_CPATH" (string-append + lua-lgi "/lib/lua/5.2/?.so"))))) (replace 'check (lambda _ ;; There aren't any tests, so just make sure the bin= ary ;; gets built and can be run successfully. - (zero? (system* "../build/awesome" "-v"))))))) + (zero? (system* "../build/awesome" "-v")))) + (add-after 'install 'wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((awesome (assoc-ref outputs "out")) + (cairo (string-append + (assoc-ref inputs "cairo") "/lib" )) + (lua-lgi (assoc-ref inputs "lua-lgi") )) + (wrap-program (string-append awesome "/bin/awesome= ") + `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYP= ELIB_PATH"))) + `("LD_LIBRARY_PATH" suffix (, cairo)) + `("LUA_PATH" suffix (,(string-append + lua-lgi "/share/lua/5.2/?.lua"))) + `("LUA_CPATH" suffix (,(string-append + lua-lgi "/lib/lua/5.2/?.so")))))))))) (synopsis "Highly configurable window manager") (description "awesome is a window manager for X. It manages windows in different --=20 2.9.3 --MP_/iPmJxM5Rs42kU0/tv3Ijrl=--