[kevin-HJRc7zDS/[email protected]: Re: How CLSQL finds and loads foreign libraries]

Kevin Rosenberg <kevin-HJRc7zDS/[email protected]>
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
Edi Weitz wrote:
>   #+#.(cl:if (cl:find-package :clc) :common-lisp '(cl:or))
>   (clsql:add-library-path #p"/debian/specific/folder/")

Yes, something like that could be added to Debian. Though, rather than
testing for the existence of the CLC package, I wonder if my original
patch which probes for the shared library file would be better. I
suppose either is okay and neither is ideal. 

Where did you thing about having such a statement. In the clsql.asd
file?

BTW, I like the name push-library-path better than add-library-path
because it gives the expectation that end user can order their pushes
to setup a priority of library probing.

> And users who are not Debian maintainers but who want to provide
> site-specific paths can solve the problem of having to load CLSQL
> before the package is available like this (in ASDF):
>   (defmethod perform :after ((o load-op) (c (eql (find-system :clsql))))
>     (funcall (find-symbol "ADD-LIBRARY-PATH" (find-package :clsql))
>              #p"/my/private/lib/path/"))

Wouldn't PERFORM :AFTER construct work as well as your proposal above
for Debian?

> This is untested but if it works and is OK for you we don't need to
> resort to non-Lisp external stuff like hard-coded file locations or
> environment variables.

Yes, that's okay. I suppose it depends if you consider it uglier to
have bundle Debian-specific file locations in the CLSQL distribution
.asd files or if it's better to hard-code a system pathname where
sites can add their paths. Personally, I favor the latter a bit, but
I can go either way here. At least on unix, there's a long history of
using ~/pkg.conf and /etc/pkg.conf files to set system-specific data for
libraries and applications. Windows, of course, prefers the registry.

-- 
Kevin Rosenberg
kevin-HJRc7zDS/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.