BinaryBuilder.jl icon indicating copy to clipboard operation
BinaryBuilder.jl copied to clipboard

Add auditor pass to make pkgconfig files more relocatable

Open giordano opened this issue 1 year ago • 2 comments

We can have

prefix=${pcfiledir}/../..

in pkgconfig files, instead of

prefix=<absolute path to ${prefix}>

to make pkgconfig files relocatable, see https://manpages.debian.org/stretch/pkg-config/pkg-config.1.en.html. We should have an audit pass to replace that.

giordano avatar Jul 28 '24 17:07 giordano

How can this be done on a global level? Where should I look trying to fix this?

albinahlback avatar Oct 23 '24 21:10 albinahlback

The auditor code is at https://github.com/JuliaPackaging/BinaryBuilder.jl/blob/49f57bf81242e44c01689a483399c2e2fd7249bf/src/Auditor.jl, but most auditor passes live in https://github.com/JuliaPackaging/BinaryBuilder.jl/tree/49f57bf81242e44c01689a483399c2e2fd7249bf/src/auditor. Basically you need to write a function which looks for the pkgconfig files and edits them on the fly.

A somewhat similar pass (in the sense that it looks for some files based on their name and does something with them) is the one which deletes the libtool files: https://github.com/JuliaPackaging/BinaryBuilder.jl/blob/49f57bf81242e44c01689a483399c2e2fd7249bf/src/Auditor.jl#L189-L210 PR which implemented this pass: #1105

giordano avatar Oct 23 '24 21:10 giordano