[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help with setenv of perl-curses
From: |
Ricardo Wurmus |
Subject: |
Re: help with setenv of perl-curses |
Date: |
Wed, 15 Jun 2016 11:19:21 +0200 |
User-agent: |
mu4e 0.9.16; emacs 24.5.1 |
ng0 <address@hidden> 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