unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* help with setenv of perl-curses
@ 2016-06-15  1:23 ng0
  2016-06-15  9:19 ` Ricardo Wurmus
  0 siblings, 1 reply; 13+ messages in thread
From: ng0 @ 2016-06-15  1:23 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1790 bytes --]

This is what I have so far, after many tries.
There was a generation which had a let for the ncurses in the phase,
but I seem not to be able to get the CURSES_CFLAGS and CURSES_CFLAGS
to pass along right.

(define-public perl-curses
  (package
   (name "perl-curses")
   (version "1.34")
   (source
    (origin
     (method url-fetch)
     (uri (string-append
           "https://cpan.metacpan.org/authors/id/G/GI/GIRAFFED/Curses-"
           version
           ".tar.gz"))
     (sha256
      (base32
       "0arj9llgwim4lilgxc1r3dyqw40210yhzfghbypnbqkbjkal93l0"))))
   (build-system perl-build-system)
   (inputs `(("ncurses" ,ncurses)))
   (arguments
    `(#:phases
      (modify-phases %standard-phases
                     (add-before
                      'configure 'set-curses-ldflags
                      (lambda* (#:key inputs #:allow-other-keys)
                               (setenv "CURSES_LDFLAGS"
                                       (string-append "-L" (assoc-ref inputs "ncurses")
                                                      "/lib/ncurses.so" "-lncurses"))
                               (setenv "CURSES_CFLAGS"
                                       (string-append "-I" (assoc-ref inputs "ncurses")
                                                      "/include")))))))
   (home-page "https://search.cpan.org/dist/Curses")
   (synopsis
    "Terminal screen handling and optimization")
   (description
    "Curses is the interface between Perl and your system's curses library.")
   (license (package-license perl))))

;;export CURSES_LDFLAGS="-L/usr/lib/ncurses -lncurses"
;;export CURSES_CFLAGS="-I/usr/include/ncurses"

--
♥Ⓐ ng0
For non-prism friendly talk find me on
psyced.org / loupsycedyglgamf.onion

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: help with setenv of perl-curses
  2016-06-15  1:23 help with setenv of perl-curses ng0
@ 2016-06-15  9:19 ` Ricardo Wurmus
  2016-07-23 13:18   ` ng0
  0 siblings, 1 reply; 13+ messages in thread
From: Ricardo Wurmus @ 2016-06-15  9:19 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel


ng0 <ng0@we.make.ritual.n0.is> writes:

> This is what I have so far, after many tries.
> There was a generation which had a let for the ncurses in the phase,
> but I seem not to be able to get the CURSES_CFLAGS and CURSES_CFLAGS
> to pass along right.

What makes you think that?  Do you get an error?

> (define-public perl-curses
>   (package
>    (name "perl-curses")
>    (version "1.34")
>    (source
>     (origin
>      (method url-fetch)
>      (uri (string-append
>            "https://cpan.metacpan.org/authors/id/G/GI/GIRAFFED/Curses-"
>            version
>            ".tar.gz"))
>      (sha256
>       (base32
>        "0arj9llgwim4lilgxc1r3dyqw40210yhzfghbypnbqkbjkal93l0"))))
>    (build-system perl-build-system)
>    (inputs `(("ncurses" ,ncurses)))
>    (arguments
>     `(#:phases
>       (modify-phases %standard-phases
>                      (add-before
>                       'configure 'set-curses-ldflags
>                       (lambda* (#:key inputs #:allow-other-keys)
>                                (setenv "CURSES_LDFLAGS"
>                                        (string-append "-L" (assoc-ref inputs "ncurses")
>                                                       "/lib/ncurses.so" "-lncurses"))
>                                (setenv "CURSES_CFLAGS"
>                                        (string-append "-I" (assoc-ref inputs "ncurses")
>                                                       "/include")))))))

Looking at Makefile.PL you may need to set even more variables.  Code in
Makefile.PL tries to detect the type of curses library by looking at FHS
paths.  Try also setting CURSES_LIBTYPE to “ncurses”.

>    (home-page "https://search.cpan.org/dist/Curses")
>    (synopsis
>     "Terminal screen handling and optimization")
>    (description
>     "Curses is the interface between Perl and your system's curses library.")
>    (license (package-license perl))))
>
> ;;export CURSES_LDFLAGS="-L/usr/lib/ncurses -lncurses"
> ;;export CURSES_CFLAGS="-I/usr/include/ncurses"

~~ Ricardo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: help with setenv of perl-curses
  2016-06-15  9:19 ` Ricardo Wurmus
@ 2016-07-23 13:18   ` ng0
  2016-07-23 13:58     ` ng0
                       ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: ng0 @ 2016-07-23 13:18 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Possibly fixed with this patch. Things I have not addressed so
far and require input on: How to do this
"perl Makefile.PL PANELS MENUS FORMS" in the setup.
Successfully built does not mean functional in all cases, so I
will build the package I needed this for now and see if it
changed.

From 32d65d360b07d8643fffd21e64767e0219cd9b4c Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Sat, 23 Jul 2016 13:03:22 +0000
Subject: [PATCH] gnu: Add perl-curses.

* gnu/packages/perl.scm (perl-curses): New variable.
---
 gnu/packages/perl.scm | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index f42abee..552cee1 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -29,6 +29,7 @@
 (define-module (gnu packages perl)
   #:use-module (guix licenses)
   #:use-module (gnu packages)
+  #:use-module (gnu packages ncurses)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
@@ -1097,6 +1098,61 @@ contained in Appendix A of FIPS Publication 181, \"Standard for Automated
 Password Generator\".")
     (license (package-license perl))))
 
+(define-public perl-curses
+  (package
+    (name "perl-curses")
+    (version "1.34")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://cpan.metacpan.org/authors/id/G/GI/GIRAFFED/Curses-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0arj9llgwim4lilgxc1r3dyqw40210yhzfghbypnbqkbjkal93l0"))))
+    (build-system perl-build-system)
+    (inputs `(("ncurses" ,ncurses)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before
+             'configure 'set-curses-ldflags
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "CURSES_LIBTYPE" "ncurses")
+             (setenv "CURSES_CFLAGS"
+                     (string-append "-I" (assoc-ref inputs "ncurses")
+                                    "/include"))
+             (setenv "CURSES_PANEL_CFLAGS"
+                     (string-append "-I" (assoc-ref inputs "ncurses")
+                                    "/include"))
+             (setenv "CURSES_MENU_CFLAGS"
+                     (string-append "-I" (assoc-ref inputs "ncurses")
+                                    "/include"))
+             (setenv "CURSES_FORM_CFLAGS"
+                     (string-append "-I" (assoc-ref inputs "ncurses")
+                                    "/include"))
+             (setenv "CURSES_LDFLAGS"
+                     (string-append "-L" (assoc-ref inputs "ncurses")
+                                    "/lib -lncurses"))
+             (setenv "CURSES_PANEL_LDFLAGS"
+                     (string-append "-L" (assoc-ref inputs "ncurses")
+                                    "/lib -lpanel"))
+             (setenv "CURSES_MENU_LDFLAGS"
+                     (string-append "-L" (assoc-ref inputs "ncurses")
+                                    "/lib -lmenu"))
+             (setenv "CURSES_FORM_LDFLAGS"
+                     (string-append "-L" (assoc-ref inputs "ncurses")
+                                    "/lib -lform")))))))
+    (home-page "https://search.cpan.org/dist/Curses")
+    (synopsis
+     "Terminal screen handling and optimization")
+    (description
+     "Curses is the interface between Perl and your system's curses library.")
+    (license (package-license perl))))
+
+
 (define-public perl-czplib
   (package
     (name "perl-czplib")
-- 
2.9.1


-- 
♥Ⓐ  ng0 – http://we.make.ritual.n0.is
For non-prism friendly talk find me on http://www.psyced.org
SecuShare – http://secushare.org

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: help with setenv of perl-curses
  2016-07-23 13:18   ` ng0
@ 2016-07-23 13:58     ` ng0
  2016-07-24  5:25     ` Efraim Flashner
  2016-07-25  8:18     ` help with setenv of perl-curses Vincent Legoll
  2 siblings, 0 replies; 13+ messages in thread
From: ng0 @ 2016-07-23 13:58 UTC (permalink / raw)
  To: guix-devel

Looks functional to me: it seems to recognize Curses and moves on
to different errors I solved in our Gentoo package, after these
are solved its about some different bugfixes I need to do/help
with.

./pre-inst-env guix package -i perl-net-psyc:
ng0@shadowwalker ~$ psycion
You need IO::Socket::SSL to use _encrypt. require() said: No such
file or directory
Consider putting your <UNI> into ~/.psyc/me
... at
/gnu/store/33x6fb2c6yji7gv5mir6l98z96xii6fr-perl-net-psyc-1.0-7bd93498/lib/perl5/site_perl/5.22.1/Net/PSYC/Storage.pm
line 28.
Neither you have a password in ~/.psyc/auth nor did you specify
it with -w.
Password:


-- 
♥Ⓐ  ng0 – http://we.make.ritual.n0.is
For non-prism friendly talk find me on http://www.psyced.org
SecuShare – http://secushare.org

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: help with setenv of perl-curses
  2016-07-23 13:18   ` ng0
  2016-07-23 13:58     ` ng0
@ 2016-07-24  5:25     ` Efraim Flashner
  2016-08-06 13:31       ` ng0
  2016-07-25  8:18     ` help with setenv of perl-curses Vincent Legoll
  2 siblings, 1 reply; 13+ messages in thread
From: Efraim Flashner @ 2016-07-24  5:25 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 966 bytes --]

On Sat, Jul 23, 2016 at 01:18:10PM +0000, ng0 wrote:
> Possibly fixed with this patch. Things I have not addressed so
> far and require input on: How to do this
> "perl Makefile.PL PANELS MENUS FORMS" in the setup.
> Successfully built does not mean functional in all cases, so I
> will build the package I needed this for now and see if it
> changed.

Sometimes using makeflags works for adding arguments to the `make'
command, other times I've gone and replaced the 'make phase with a
custom make phase. I haven't looked at the perl build system to see if
makeflags works.

> 
> -- 
> ♥Ⓐ  ng0 – http://we.make.ritual.n0.is
> For non-prism friendly talk find me on http://www.psyced.org
> SecuShare – http://secushare.org
> 

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: help with setenv of perl-curses
  2016-07-23 13:18   ` ng0
  2016-07-23 13:58     ` ng0
  2016-07-24  5:25     ` Efraim Flashner
@ 2016-07-25  8:18     ` Vincent Legoll
  2016-08-06 13:28       ` ng0
  2 siblings, 1 reply; 13+ messages in thread
From: Vincent Legoll @ 2016-07-25  8:18 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

Hello,

> +    (build-system perl-build-system)
> +    (inputs `(("ncurses" ,ncurses)))
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-before
> +             'configure 'set-curses-ldflags
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (setenv "CURSES_LIBTYPE" "ncurses")
> +             (setenv "CURSES_CFLAGS"
> +                     (string-append "-I" (assoc-ref inputs "ncurses")
> +                                    "/include"))
> +             (setenv "CURSES_LDFLAGS"
> +                     (string-append "-L" (assoc-ref inputs "ncurses")

Is this specific to perl-ncurses or would other ncurses-using packages also need
these definitions ?

-- 
Vincent Legoll

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: help with setenv of perl-curses
  2016-07-25  8:18     ` help with setenv of perl-curses Vincent Legoll
@ 2016-08-06 13:28       ` ng0
  0 siblings, 0 replies; 13+ messages in thread
From: ng0 @ 2016-08-06 13:28 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: guix-devel

Hi,

Vincent Legoll <vincent.legoll@gmail.com> writes:

> Hello,
>
>> +    (build-system perl-build-system)
>> +    (inputs `(("ncurses" ,ncurses)))
>> +    (arguments
>> +     `(#:phases
>> +       (modify-phases %standard-phases
>> +         (add-before
>> +             'configure 'set-curses-ldflags
>> +           (lambda* (#:key inputs #:allow-other-keys)
>> +             (setenv "CURSES_LIBTYPE" "ncurses")
>> +             (setenv "CURSES_CFLAGS"
>> +                     (string-append "-I" (assoc-ref inputs "ncurses")
>> +                                    "/include"))
>> +             (setenv "CURSES_LDFLAGS"
>> +                     (string-append "-L" (assoc-ref inputs "ncurses")
>
> Is this specific to perl-ncurses or would other ncurses-using packages also need
> these definitions ?

I don't know, read the README and/or INSTALL file of this package on
cpan.

> -- 
> Vincent Legoll


-- 
♥Ⓐ  ng0
Current Keys: https://we.make.ritual.n0.is/ng0.txt
For non-prism friendly talk find me on http://www.psyced.org

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: help with setenv of perl-curses
  2016-07-24  5:25     ` Efraim Flashner
@ 2016-08-06 13:31       ` ng0
  2016-08-19 13:23         ` [PATCH] gnu: Add perl-curses (need help) ng0
  0 siblings, 1 reply; 13+ messages in thread
From: ng0 @ 2016-08-06 13:31 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Hi,

Efraim Flashner <efraim@flashner.co.il> writes:

> On Sat, Jul 23, 2016 at 01:18:10PM +0000, ng0 wrote:
>> Possibly fixed with this patch. Things I have not addressed so
>> far and require input on: How to do this
>> "perl Makefile.PL PANELS MENUS FORMS" in the setup.
>> Successfully built does not mean functional in all cases, so I
>> will build the package I needed this for now and see if it
>> changed.
>
> Sometimes using makeflags works for adding arguments to the `make'
> command, other times I've gone and replaced the 'make phase with a
> custom make phase. I haven't looked at the perl build system to see if
> makeflags works.

Coming back to this, should I build this with all the options? I had no
time to work on this again, so if someone else wants to add these
functionalities, go ahead.

-- 
♥Ⓐ  ng0
Current Keys: https://we.make.ritual.n0.is/ng0.txt
For non-prism friendly talk find me on http://www.psyced.org

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] gnu: Add perl-curses (need help).
  2016-08-06 13:31       ` ng0
@ 2016-08-19 13:23         ` ng0
  2016-08-19 13:36           ` [PATCH][v2] gnu: Add perl-curses ng0
  0 siblings, 1 reply; 13+ messages in thread
From: ng0 @ 2016-08-19 13:23 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1290 bytes --]

Hi,

I don't understand why the attached patch fails with the following
output, the only explanation I have is that gcc or ncurses lacks
something the test which then runs gcc expects.

gcc -c
-I/gnu/store/xl19qrfzga52vrvp4ncccwjlnrjqwj95-ncurses-6.0/include
-I/gnu/store/xl19qrfzga52vrvp4ncccwjlnrjqwj95-ncurses-6.0/include
-I/gnu/store/xl19qrfzga52vrvp4ncccwjlnrjqwj95-ncurses-6.0/include
-I/gnu/store/xl19qrfzga52vrvp4ncccwjlnrjqwj95-ncurses-6.0/include
-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong
-I/gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2
-DVERSION=\"1.36\" -DXS_VERSION=\"1.36\" -fPIC
"-I/gnu/store/7nfjg3f2c4s0jpz3vqh3iqdn9j1c3prq-perl-5.22.1/lib/perl5/5.22.1/x86_64-linux/CORE"
Curses.c
Curses.c:199:8: error: unknown type name ‘FIELD’
static FIELD *
^
Curses.c: In function ‘c_sv2field’:
Curses.c:205:13: error: ‘FIELD’ undeclared (first use in this
function)
return (FIELD *)SvIV((SV*)SvRV(sv));
^
Curses.c:205:13: note: each undeclared
identifier is reported only once for each
function it appears in
Curses.c:205:20: error: expected expression
before ‘)’ token
return (FIELD *)SvIV((SV*)SvRV(sv));
^


etc... run the build yourself to see the full output.


[-- Attachment #2: 0001-gnu-Add-perl-net-psyc.patch --]
[-- Type: text/x-patch, Size: 5363 bytes --]

From 4c2f0cd473f0c5031ed2e7f0ddb26e546d554734 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Fri, 19 Aug 2016 13:15:01 +0000
Subject: [PATCH] gnu: Add perl-net-psyc.

* gnu/packages/psyc.scm (perl-net-psyc): New variable.
---
 gnu/local.mk          |  1 +
 gnu/packages/psyc.scm | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+)
 create mode 100644 gnu/packages/psyc.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 15538df..8ad9106 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -287,6 +287,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/pumpio.scm			\
   %D%/packages/pretty-print.scm			\
   %D%/packages/protobuf.scm			\
+  %D%/packages/psyc.scm				\
   %D%/packages/pv.scm				\
   %D%/packages/python.scm			\
   %D%/packages/qemu.scm				\
diff --git a/gnu/packages/psyc.scm b/gnu/packages/psyc.scm
new file mode 100644
index 0000000..a9a13e2
--- /dev/null
+++ b/gnu/packages/psyc.scm
@@ -0,0 +1,90 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages psyc)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system perl)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages perl))
+
+(define-public perl-net-psyc
+  (let ((revision "1")
+        (commit "6bb3e0f550fc60ea34f7e0e2cd3ba8ece1a27be5"))
+    (package
+      (name "perl-net-psyc")
+      (version (string-append "1.0-" revision "." (string-take commit 7)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "git://git.psyced.org/git/perlpsyc")
+                      (commit commit)))
+                (file-name (string-append name "-" version "-checkout"))
+                (sha256
+                 (base32
+                  "1xn7xdi9ngqdmknhihr4cmsa2azph226a0sj1zd75435r6sxwy3b"))))
+      (build-system perl-build-system)
+      (inputs
+       `(("perl-curses" ,perl-curses))) ; dependency for psycion binary
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (delete 'build)
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (doc (string-append out "/share/doc/perl-net-psyc"))
+                      (libpsyc (string-append out "/lib/psyc/ion"))
+                      (libperl (string-append out "/lib/perl5/site_perl/"
+                                              ,(package-version perl)))
+                      (bin (string-append out "/bin")))
+                 (copy-recursively "lib/perl5" libperl)
+                 (copy-recursively "lib/psycion" libpsyc)
+                 (copy-recursively "bin" bin)
+                 (install-file "cgi/psycpager" (string-append doc "/cgi"))
+                 (copy-recursively "contrib" (string-append doc "/contrib"))
+                 (copy-recursively "hooks" (string-append doc "/hooks"))
+                 (copy-recursively "sdj" (string-append doc "/sdj"))
+                 (install-file "README.txt" doc)
+                 (install-file "TODO.txt" doc)
+                 #t)))
+           (add-after 'install 'wrap-programs
+             (lambda* (#:key outputs #:allow-other-keys)
+               ;; Make sure all executables in "bin" find the Perl modules
+               ;; provided by this package at runtime.
+               (let* ((out  (assoc-ref outputs "out"))
+                      (bin  (string-append out "/bin/"))
+                      (path (string-append out "/lib/perl5/site_perl")))
+                 (for-each (lambda (file)
+                             (wrap-program file
+                               `("PERL5LIB" ":" prefix (,path))))
+                           (find-files bin "\\.*$"))
+                 #t))))))
+      (description
+       "@code{Net::PSYC} with support for TCP, UDP, Event.pm, @code{IO::Select} and
+Gtk2 event loops.  This package includes 12 applications and additional scripts:
+psycion, a @uref{http://about.psyc.eu,PSYC} chat client, remotor, a control console
+for @uref{https://torproject.org,tor} router, and many more.")
+      (synopsis "Perl implementation of PSYC protocol.")
+      (home-page "http://perlpsyc.pages.de")
+      ;;dual licensed: gpl2+ Artistic
+      (license (list license:gpl2 (package-license perl)
+                     ;; contrib/irssi-psyc.pl: Public-Domain
+                     license:public-domain)))))
-- 
2.9.3


[-- Attachment #3: Type: text/plain, Size: 71 bytes --]



-- 
ng0
For non-prism friendly talk find me on http://www.psyced.org

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH][v2] gnu: Add perl-curses
  2016-08-19 13:23         ` [PATCH] gnu: Add perl-curses (need help) ng0
@ 2016-08-19 13:36           ` ng0
  2016-09-06 17:36             ` Efraim Flashner
  0 siblings, 1 reply; 13+ messages in thread
From: ng0 @ 2016-08-19 13:36 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 68 bytes --]

Okay, when I build this without "FORMS" it succeeds. Works for me.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-perl-curses.patch --]
[-- Type: text/x-patch, Size: 3397 bytes --]

From a72020974650298e89b82abda8e07f722f7cf32c Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Fri, 19 Aug 2016 13:13:42 +0000
Subject: [PATCH 1/2] gnu: Add perl-curses.

* gnu/packages/perl.scm (perl-curses): New variable.
---
 gnu/packages/perl.scm | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index aef92f4..170eacd 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -30,6 +30,7 @@
 (define-module (gnu packages perl)
   #:use-module (guix licenses)
   #:use-module (gnu packages)
+  #:use-module (gnu packages ncurses)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
@@ -1138,6 +1139,57 @@ contained in Appendix A of FIPS Publication 181, \"Standard for Automated
 Password Generator\".")
     (license (package-license perl))))
 
+(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") ; FORMS seems faulty.
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'set-curses-ldflags
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "CURSES_LIBTYPE" "ncurses")
+             (setenv "CURSES_CFLAGS"
+                     (string-append "-I" (assoc-ref inputs "ncurses")
+                                    "/include"))
+             (setenv "CURSES_PANEL_CFLAGS"
+                     (string-append "-I" (assoc-ref inputs "ncurses")
+                                    "/include"))
+             (setenv "CURSES_MENU_CFLAGS"
+                     (string-append "-I" (assoc-ref inputs "ncurses")
+                                    "/include"))
+             (setenv "CURSES_FORM_CFLAGS"
+                     (string-append "-I" (assoc-ref inputs "ncurses")
+                                    "/include"))
+             (setenv "CURSES_LDFLAGS"
+                     (string-append "-L" (assoc-ref inputs "ncurses")
+                                    "/lib -lncurses"))
+             (setenv "CURSES_PANEL_LDFLAGS"
+                     (string-append "-L" (assoc-ref inputs "ncurses")
+                                    "/lib -lpanel"))
+             (setenv "CURSES_MENU_LDFLAGS"
+                     (string-append "-L" (assoc-ref inputs "ncurses")
+                                    "/lib -lmenu"))
+             (setenv "CURSES_FORM_LDFLAGS"
+                     (string-append "-L" (assoc-ref inputs "ncurses")
+                                    "/lib -lform")))))))
+    (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))))
+
 (define-public perl-czplib
   (package
     (name "perl-czplib")
-- 
2.9.3


[-- Attachment #3: Type: text/plain, Size: 70 bytes --]


-- 
ng0
For non-prism friendly talk find me on http://www.psyced.org

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH][v2] gnu: Add perl-curses
  2016-08-19 13:36           ` [PATCH][v2] gnu: Add perl-curses ng0
@ 2016-09-06 17:36             ` Efraim Flashner
  2016-09-06 21:39               ` ng0
  0 siblings, 1 reply; 13+ messages in thread
From: Efraim Flashner @ 2016-09-06 17:36 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 4178 bytes --]

On Fri, Aug 19, 2016 at 01:36:27PM +0000, ng0 wrote:
> Okay, when I build this without "FORMS" it succeeds. Works for me.
> 

> From a72020974650298e89b82abda8e07f722f7cf32c Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@we.make.ritual.n0.is>
> Date: Fri, 19 Aug 2016 13:13:42 +0000
> Subject: [PATCH 1/2] gnu: Add perl-curses.
> 
> * gnu/packages/perl.scm (perl-curses): New variable.
> ---
>  gnu/packages/perl.scm | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 52 insertions(+)
> 
> diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
> index aef92f4..170eacd 100644
> --- a/gnu/packages/perl.scm
> +++ b/gnu/packages/perl.scm
> @@ -30,6 +30,7 @@
>  (define-module (gnu packages perl)
>    #:use-module (guix licenses)
>    #:use-module (gnu packages)
> +  #:use-module (gnu packages ncurses)
>    #:use-module (guix packages)
>    #:use-module (guix download)
>    #:use-module (guix build-system gnu)
> @@ -1138,6 +1139,57 @@ contained in Appendix A of FIPS Publication 181, \"Standard for Automated
>  Password Generator\".")
>      (license (package-license perl))))
>  
> +(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") ; FORMS seems faulty.
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-before 'configure 'set-curses-ldflags
> +           (lambda* (#:key inputs #:allow-other-keys)

you'd do well with a (let ... here for all of your (assoc-ref inputs "ncurses").

> +             (setenv "CURSES_LIBTYPE" "ncurses")
> +             (setenv "CURSES_CFLAGS"
> +                     (string-append "-I" (assoc-ref inputs "ncurses")
> +                                    "/include"))
> +             (setenv "CURSES_PANEL_CFLAGS"
> +                     (string-append "-I" (assoc-ref inputs "ncurses")
> +                                    "/include"))
> +             (setenv "CURSES_MENU_CFLAGS"
> +                     (string-append "-I" (assoc-ref inputs "ncurses")
> +                                    "/include"))
> +             (setenv "CURSES_FORM_CFLAGS"
> +                     (string-append "-I" (assoc-ref inputs "ncurses")
> +                                    "/include"))
> +             (setenv "CURSES_LDFLAGS"
> +                     (string-append "-L" (assoc-ref inputs "ncurses")
> +                                    "/lib -lncurses"))
> +             (setenv "CURSES_PANEL_LDFLAGS"
> +                     (string-append "-L" (assoc-ref inputs "ncurses")
> +                                    "/lib -lpanel"))
> +             (setenv "CURSES_MENU_LDFLAGS"
> +                     (string-append "-L" (assoc-ref inputs "ncurses")
> +                                    "/lib -lmenu"))
> +             (setenv "CURSES_FORM_LDFLAGS"
> +                     (string-append "-L" (assoc-ref inputs "ncurses")
> +                                    "/lib -lform")))))))
> +    (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))))
> +
>  (define-public perl-czplib
>    (package
>      (name "perl-czplib")
> -- 
> 2.9.3
> 

I think this would go better in ncurses.scm than in perl. Can you send
an updated patch? Thanks.


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH][v2] gnu: Add perl-curses
  2016-09-06 17:36             ` Efraim Flashner
@ 2016-09-06 21:39               ` ng0
  2016-09-07  6:09                 ` Efraim Flashner
  0 siblings, 1 reply; 13+ messages in thread
From: ng0 @ 2016-09-06 21:39 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 735 bytes --]

Hi,

Efraim Flashner <efraim@flashner.co.il> writes:

> [ Unknown signature status ]
> On Fri, Aug 19, 2016 at 01:36:27PM +0000, ng0 wrote:
>> Okay, when I build this without "FORMS" it succeeds. Works for me.
>> 
>
>> From a72020974650298e89b82abda8e07f722f7cf32c Mon Sep 17 00:00:00 2001
>> From: ng0 <ng0@we.make.ritual.n0.is>
>> Date: Fri, 19 Aug 2016 13:13:42 +0000
>> Subject: [PATCH 1/2] gnu: Add perl-curses.
>> -- 
>> 2.9.3
>> 
>
> I think this would go better in ncurses.scm than in perl. Can you send
> an updated patch? Thanks.

…

Thanks for reviewing.

Okay, updated patch appended. I have worked on this without sending an
update for a while, I had something already fixed in my secushare
packaging repository.


[-- Attachment #2: 0001-gnu-Add-perl-curses.patch --]
[-- Type: text/x-patch, Size: 3262 bytes --]

From 618b04248f4db327a8fd72c5bd626a4f80c6ccf8 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Sat, 23 Jul 2016 13:03:22 +0000
Subject: [PATCH] gnu: Add perl-curses.

* gnu/packages/ncurses.scm (perl-curses): New variable.
---
 gnu/packages/ncurses.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 46 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm
index 147033a..1c46355 100644
--- a/gnu/packages/ncurses.scm
+++ b/gnu/packages/ncurses.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;;
 ;;; 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,44 @@ 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"))))))))
+    (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))))
-- 
2.10.0


[-- Attachment #3: Type: text/plain, Size: 70 bytes --]


-- 
ng0
For non-prism friendly talk find me on http://www.psyced.org

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH][v2] gnu: Add perl-curses
  2016-09-06 21:39               ` ng0
@ 2016-09-07  6:09                 ` Efraim Flashner
  0 siblings, 0 replies; 13+ messages in thread
From: Efraim Flashner @ 2016-09-07  6:09 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 4713 bytes --]

On Tue, Sep 06, 2016 at 09:39:11PM +0000, ng0 wrote:
> Hi,
> 
> Efraim Flashner <efraim@flashner.co.il> writes:
> 
> > [ Unknown signature status ]
> > On Fri, Aug 19, 2016 at 01:36:27PM +0000, ng0 wrote:
> >> Okay, when I build this without "FORMS" it succeeds. Works for me.
> >> 
> >
> >> From a72020974650298e89b82abda8e07f722f7cf32c Mon Sep 17 00:00:00 2001
> >> From: ng0 <ng0@we.make.ritual.n0.is>
> >> Date: Fri, 19 Aug 2016 13:13:42 +0000
> >> Subject: [PATCH 1/2] gnu: Add perl-curses.
> 
> …
> 
> >> -- 
> >> 2.9.3
> >> 
> >
> > I think this would go better in ncurses.scm than in perl. Can you send
> > an updated patch? Thanks.
> 
> …
> 
> Thanks for reviewing.
> 
> Okay, updated patch appended. I have worked on this without sending an
> update for a while, I had something already fixed in my secushare
> packaging repository.
> 

> From 618b04248f4db327a8fd72c5bd626a4f80c6ccf8 Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@we.make.ritual.n0.is>
> Date: Sat, 23 Jul 2016 13:03:22 +0000
> Subject: [PATCH] gnu: Add perl-curses.
> 
> * gnu/packages/ncurses.scm (perl-curses): New variable.
> ---
>  gnu/packages/ncurses.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 46 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm
> index 147033a..1c46355 100644
> --- a/gnu/packages/ncurses.scm
> +++ b/gnu/packages/ncurses.scm
> @@ -2,6 +2,7 @@
>  ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
>  ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
>  ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
> +;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
>  ;;;
>  ;;; 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,44 @@ 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"))))))))
> +    (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))))
> -- 
> 2.10.0
> 

I added a #t at the end of all the setenv-s and fixed the indentation on
'configure.

Patch pushed!


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-09-07  6:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-15  1:23 help with setenv of perl-curses ng0
2016-06-15  9:19 ` Ricardo Wurmus
2016-07-23 13:18   ` ng0
2016-07-23 13:58     ` ng0
2016-07-24  5:25     ` Efraim Flashner
2016-08-06 13:31       ` ng0
2016-08-19 13:23         ` [PATCH] gnu: Add perl-curses (need help) ng0
2016-08-19 13:36           ` [PATCH][v2] gnu: Add perl-curses ng0
2016-09-06 17:36             ` Efraim Flashner
2016-09-06 21:39               ` ng0
2016-09-07  6:09                 ` Efraim Flashner
2016-07-25  8:18     ` help with setenv of perl-curses Vincent Legoll
2016-08-06 13:28       ` ng0

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).