On Thu, Nov 10, 2016 at 03:22:54PM +0000, Marius Bakke wrote: > Efraim Flashner <[email protected]> writes: > > > * gnu/packages/ncurses.scm (stfl): New variable. > > --- > > gnu/packages/ncurses.scm | 50 > > +++++++++++++++++++++++++++++++++++++++++++++++- > > 1 file changed, 49 insertions(+), 1 deletion(-) > > > > + ;; 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. >
It turns out it does work. Its also much shorter.
Even better, I figured out how to turn them into make-flags
#:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out"))
"DESTDIR=\"\"")
> > + ;; 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!
>
I thought the output referred to swig, but it seems not.
> > + (home-page "http://www.clifford.at/stfl/")
> > + (synopsis "Structured terminal forms library")
> > + (description "Stfl is a library which implements a curses-based widget
> > +set for text terminals.")
> > + (license lgpl3+)))
> > --
> > 2.10.2
--
Efraim Flashner <[email protected]> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
signature.asc
Description: PGP signature
