tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PREFIX and LOCALBASE



Hauke Fath <hf%spg.tu-darmstadt.de@localhost> writes:

> the pkgsrc guide states in 17.2
>
> "PREFIX always points to the location where the current pkg will be 
> installed. When referring to a pkg's own installation path, use 
> “${PREFIX}”.
>
> LOCALBASE is where all non-X11 pkgs are installed. If you need to 
> construct a -I or -L argument to the compiler to find includes and 
> libraries installed by another non-X11 pkg, use “${LOCALBASE}”. The 
> name LOCALBASE stems from FreeBSD, which installed all packages in 
> /usr/local. As pkgsrc leaves /usr/local for the system administrator, 
> this variable is a misnomer."
>
> pkglint. OTOH, states
>
> [hf@Hochstuhl] /<3>editors/xemacs > pkglint | grep LOCALBASE
> WARN: Makefile:56: The LOCALBASE variable should not be used by 
> packages.
> WARN: Makefile:58: The LOCALBASE variable should not be used by 
> packages.
> [hf@Hochstuhl] /<3>editors/xemacs > 
>
> When should I expect PREFIX to be different from LOCALBASE?

I think we used to put X11 packages built by pkgsrc in /usr/Xsomething
rather than in /usr/pkg.

So I think this is vestigial from that.   We do need to fix either the
docs or pkglint.

Or, the warning is really about using LOCALBASE, when it should be using
a mk fragment or bl3 file from the package it depends on, instead of
making assumptions.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index