guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: Add perl-curses.


From: Efraim Flashner
Subject: 01/01: gnu: Add perl-curses.
Date: Wed, 7 Sep 2016 06:06:38 +0000 (UTC)

efraim pushed a commit to branch master
in repository guix.

commit b393a44cd030637778386f79ad444c0116ede5a9
Author: ng0 <address@hidden>
Date:   Sat Jul 23 13:03:22 2016 +0000

    gnu: Add perl-curses.
    
    * gnu/packages/ncurses.scm (perl-curses): New variable.
    
    Signed-off-by: Efraim Flashner <address@hidden>
---
 gnu/packages/ncurses.scm |   48 +++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm
index 147033a..9799167 100644
--- a/gnu/packages/ncurses.scm
+++ b/gnu/packages/ncurses.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2014 Mark H Weaver <address@hidden>
 ;;; Copyright © 2015 Leo Famulari <address@hidden>
+;;; Copyright © 2016 ng0 <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,7 +23,10 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system perl)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages perl))
 
 (define-public ncurses
   (let ((patch-makefile-phase
@@ -161,3 +165,45 @@ curses widgets, such as dialog boxes.")
     (home-page "http://invisible-island.net/dialog/dialog.html";)
     ;; Includes the gpl3 file "config.sub" from Automake.
     (license (list lgpl2.1 gpl3))))
+
+(define-public perl-curses
+  (package
+    (name "perl-curses")
+    (version "1.36")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/G/GI/GIRAFFED/"
+                           "Curses-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0r6xd9wr0c25rr28zixhqipak575zqsfb7r7f2693i9il1dpj554"))))
+    (build-system perl-build-system)
+    (inputs
+     `(("ncurses" ,ncurses)))
+    (arguments
+     `(#:make-maker-flags (list "PANELS" "MENUS")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before
+           'configure 'set-curses-ldflags
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((ncurses (assoc-ref inputs "ncurses"))
+                    (include (string-append ncurses "/include"))
+                    (lib (string-append ncurses "/lib")))
+               (setenv "CURSES_LIBTYPE" "ncurses")
+               (setenv "CURSES_CFLAGS" (string-append "-I" include))
+               (setenv "CURSES_PANEL_CFLAGS" (string-append "-I" include))
+               (setenv "CURSES_MENU_CFLAGS" (string-append "-I" include))
+               (setenv "CURSES_FORM_CFLAGS" (string-append "-I" include))
+               (setenv "CURSES_LDFLAGS" (string-append "-L" lib " -lncurses"))
+               (setenv "CURSES_PANEL_LDFLAGS" (string-append "-L" lib " 
-lpanel"))
+               (setenv "CURSES_MENU_LDFLAGS" (string-append "-L" lib " 
-lmenu"))
+               (setenv "CURSES_FORM_LDFLAGS" (string-append "-L" lib " 
-lform"))
+               #t))))))
+    (home-page "http://search.cpan.org/dist/Curses";)
+    (synopsis "Terminal screen handling and optimization")
+    (description
+     "@code{Curses} is the interface between Perl and the curses library
+of your system.")
+    (license (package-license perl))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]