From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: [PATCH 1/2] gnu: Add stfl. Date: Thu, 10 Nov 2016 15:22:54 +0000 Message-ID: <87y40r9x69.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> References: <20161110082736.5825-1-efraim@flashner.co.il> <20161110082736.5825-2-efraim@flashner.co.il> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4rBr-0008A1-Mb for guix-devel@gnu.org; Thu, 10 Nov 2016 10:23:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4rBo-0008EN-8H for guix-devel@gnu.org; Thu, 10 Nov 2016 10:22:59 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:35773) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c4rBo-0008E9-42 for guix-devel@gnu.org; Thu, 10 Nov 2016 10:22:56 -0500 In-Reply-To: <20161110082736.5825-2-efraim@flashner.co.il> 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: Efraim Flashner , guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Efraim Flashner writes: > * gnu/packages/ncurses.scm (stfl): New variable. > --- > gnu/packages/ncurses.scm | 50 ++++++++++++++++++++++++++++++++++++++++++= +++++- > 1 file changed, 49 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm > index 9799167..468cd99 100644 > --- a/gnu/packages/ncurses.scm > +++ b/gnu/packages/ncurses.scm > @@ -3,6 +3,7 @@ > ;;; Copyright =C2=A9 2014 Mark H Weaver > ;;; Copyright =C2=A9 2015 Leo Famulari > ;;; Copyright =C2=A9 2016 ng0 > +;;; Copyright =C2=A9 2016 Efraim Flashner > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -26,7 +27,8 @@ > #:use-module (guix build-system gnu) > #:use-module (guix build-system perl) > #:use-module (gnu packages) > - #:use-module (gnu packages perl)) > + #:use-module (gnu packages perl) > + #:use-module (gnu packages swig)) >=20=20 > (define-public ncurses > (let ((patch-makefile-phase > @@ -207,3 +209,49 @@ curses widgets, such as dialog boxes.") > "@code{Curses} is the interface between Perl and the curses library > of your system.") > (license (package-license perl)))) > + > +(define-public stfl > + (package > + (name "stfl") > + (version "0.24") > + (source > + (origin > + (method url-fetch) > + (uri (string-append "http://www.clifford.at/stfl/stfl-" > + version ".tar.gz")) > + (sha256 > + (base32 > + "1460d5lc780p3q38l3wc9jfr2a7zlyrcra0li65aynj738cam9yl")))) > + (build-system gnu-build-system) > + (arguments > + '(#:tests? #f ; no test target > + #:phases > + (modify-phases %standard-phases > + ;; there is no configure script so we get to do it manually > + (replace 'configure > + (lambda* (#:key outputs #:allow-other-keys) > + (substitute* "Makefile" > + (("\\$\\(prefix\\)") (assoc-ref outputs "out"))) > + (setenv "DESTDIR" "") > + #t)) Would it work to simply (setenv "prefix" out), instead of substituting? Not sure which approach I prefer however, so feel free to disregard this. > + ;; in our ncurses, the headers are in /include > + (add-before 'build 'patch-ncursesw > + (lambda _ > + (substitute* '("stfl_internals.h") > + (("ncursesw/") "")) > + #t)) > + (add-after 'install 'install-missing-symlink > + (lambda* (#:key outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (lib (string-append out "/lib"))) > + ;; newsbeuter looks for libstfl.so.0 Perhaps just say "some programs" instead of newsbeuter, since they are mostly unrelated. > + (symlink "libstfl.so" > + (string-append lib "/libstfl.so.0")))))))) > + (inputs > + `(("ncurses" ,ncurses) > + ("swig" ,swig))) Swig should probably be a native-input. Other than that LGTM! > + (home-page "http://www.clifford.at/stfl/") > + (synopsis "Structured terminal forms library") > + (description "Stfl is a library which implements a curses-based widg= et > +set for text terminals.") > + (license lgpl3+))) > --=20 > 2.10.2 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCgAGBQJYJJDOAAoJEKKgbfKjOlT68+cH/1nOTP9vdZhi1g6LbTWHdgPJ W8vuRNgProb5KqGpgBs52ZoKHjbiynHHDXSm5HzolyxwTEe0jPhluw82hPCUICmA wcJeCr1zNVHycoLV8JhMJvXuPG1HlbpDSlS1tJmMd/w3oA/zdD8SJJZDgT2SCfwz iEogLFVxjoQaKFG8ZyQ+zbeSsmBznetDvhRUrKeuOcnJedzB8y36HFgCuhhRFrml Pz6eovKlzJTFcke2ynx6PCBeSUEj2+YBdR5W7/PbsU9fAQeX+Z26PW2rpec4Amuq RV1WqDk1bKCaVCwm185E0SAo922dDY4IDApUt2+x2cybgGFphkN5EoMCmO+9RxA= =4xcH -----END PGP SIGNATURE----- --=-=-=--