unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: ng0 <ng0@we.make.ritual.n0.is>
Cc: guix-devel@gnu.org
Subject: Re: help with setenv of perl-curses
Date: Wed, 15 Jun 2016 11:19:21 +0200	[thread overview]
Message-ID: <idjshwex10m.fsf@bimsb-sys02.mdc-berlin.net> (raw)
In-Reply-To: <20160615012316.GA21204@khazad-dum>


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

  reply	other threads:[~2016-06-15  9:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15  1:23 help with setenv of perl-curses ng0
2016-06-15  9:19 ` Ricardo Wurmus [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=idjshwex10m.fsf@bimsb-sys02.mdc-berlin.net \
    --to=ricardo.wurmus@mdc-berlin.de \
    --cc=guix-devel@gnu.org \
    --cc=ng0@we.make.ritual.n0.is \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).