unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Make the pkgconfig file of Guile relocatable.
@ 2022-02-27 16:04 Zhu Zihao
  2022-02-28  7:03 ` Nala Ginrut
  0 siblings, 1 reply; 2+ messages in thread
From: Zhu Zihao @ 2022-02-27 16:04 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 1294 bytes --]


Currently, the guile-3.0.pc.in in 'meta' use the variable substitution
directly.

prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
datadir=@datadir@
pkgdatadir=@datadir@/guile
pkgincludedir=@includedir@/guile

sitedir=@sitedir@
extensiondir=@libdir@/guile/@GUILE_EFFECTIVE_VERSION@/extensions
siteccachedir=@libdir@/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache
libguileinterface=@LIBGUILE_INTERFACE@

sitedir, siteccachedir and extensiondir will be subsituted to the full
path of the install path of Guile.

But sometimes I want to install guile module in different
prefix(e.g. NixOS, Guix, flatpak). I have to adjust these variable
manually.

My idea is change the definition of sitedir, siteccachedir, extensiondir
use the variable substition of pkg-config instead of autotools.

For example

sitedir=${datadir}/guile/site/@GUILE_EFFECTIVE_VERSION@
siteccachedir=${libdir}/guile/@GUILE_EFFECTIVE_VERSION@/extensions

....

So I can use

pkg-config guile-3.0 --define-variable=libdir=$MY_PREFIX --variable=siteccachedir

to get the correct install directory.

Thoughts?
-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Make the pkgconfig file of Guile relocatable.
  2022-02-27 16:04 Make the pkgconfig file of Guile relocatable Zhu Zihao
@ 2022-02-28  7:03 ` Nala Ginrut
  0 siblings, 0 replies; 2+ messages in thread
From: Nala Ginrut @ 2022-02-28  7:03 UTC (permalink / raw)
  To: Zhu Zihao; +Cc: guile-devel

[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]

hi Zihao!

I think the substitution is OK.
But if you want to package for Guix, you need to go Guix way.
Guix package has made a similar approach, for example, you may check "guix
edit artanis" to see how it substitutes the dir for Artanis.

Best regards.



On Mon, Feb 28, 2022 at 12:27 AM Zhu Zihao <all_but_last@163.com> wrote:

>
> Currently, the guile-3.0.pc.in in 'meta' use the variable substitution
> directly.
>
> prefix=@prefix@
> exec_prefix=@exec_prefix@
> bindir=@bindir@
> libdir=@libdir@
> includedir=@includedir@
> datarootdir=@datarootdir@
> datadir=@datadir@
> pkgdatadir=@datadir@/guile
> pkgincludedir=@includedir@/guile
>
> sitedir=@sitedir@
> extensiondir=@libdir@/guile/@GUILE_EFFECTIVE_VERSION@/extensions
> siteccachedir=@libdir@/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache
> libguileinterface=@LIBGUILE_INTERFACE@
>
> sitedir, siteccachedir and extensiondir will be subsituted to the full
> path of the install path of Guile.
>
> But sometimes I want to install guile module in different
> prefix(e.g. NixOS, Guix, flatpak). I have to adjust these variable
> manually.
>
> My idea is change the definition of sitedir, siteccachedir, extensiondir
> use the variable substition of pkg-config instead of autotools.
>
> For example
>
> sitedir=${datadir}/guile/site/@GUILE_EFFECTIVE_VERSION@
> siteccachedir=${libdir}/guile/@GUILE_EFFECTIVE_VERSION@/extensions
>
> ....
>
> So I can use
>
> pkg-config guile-3.0 --define-variable=libdir=$MY_PREFIX
> --variable=siteccachedir
>
> to get the correct install directory.
>
> Thoughts?
> --
> Retrieve my PGP public key:
>
>   gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F
>
> Zihao
>

[-- Attachment #2: Type: text/html, Size: 2296 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-28  7:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-27 16:04 Make the pkgconfig file of Guile relocatable Zhu Zihao
2022-02-28  7:03 ` Nala Ginrut

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).