Ludovic Courtès <l...@gnu.org> writes:

> Hi Marius,
>
> mba...@fastmail.com (Marius Bakke) skribis:
>
>> commit 4b9a5bd990a4c734828571147f9fec01c7053fcc
>> Author: Marius Bakke <mba...@fastmail.com>
>> Date:   Tue Mar 21 07:02:36 2017 +0100
>>
>>     gnu: kodi: Wrap executable so it finds libcurl.
>>     
>>     * gnu/packages/kodi.scm (kodi)[arguments]: Add 'wrap' phase.
>
> [...]
>
>> +         (add-after 'install 'wrap
>> +           (lambda* (#:key inputs outputs #:allow-other-keys)
>> +             (let ((out (assoc-ref outputs "out"))
>> +                   (curl (string-append (assoc-ref inputs "curl") "/lib")))
>> +               (wrap-program (string-append out "/bin/kodi")
>> +                 `("LD_LIBRARY_PATH" suffix (,curl)))
>> +               #t))))))
>
> I think it would be nicer to add libcurl to the RUNPATH of kodi, by
> adding -Wl,-rpath=/…/curl/lib to the LDFLAGS for the ‘kodi’ executable,
> rather than clobbering LD_LIBRARY_PATH (that’s more “controlled” and
> less intrusive).
>
> Perhaps that’s more complicated to do though (finding the right makefile
> or makefile variable to pass, etc.)
>
> WDYT?

I agree, this was a lazy fix on my part to enable some expected
functionality (scraping, add-ons) because I could not figure out how to
pass LDFLAGS (the environment variable was not enough).

Will work on a proper fix; adding it to the 'kodi-test' executable
should also sort the failing web tests, methinks.

Attachment: signature.asc
Description: PGP signature

Reply via email to