On 22.01.2011 01:20, Allan McRae wrote:
And how can we do this portably and subject to the restrictions given... Well, it has been established that using objdump or elfutils has issues so lets just exclude them from the start. How else can we get information about a file? file... That tells you whether a binary is 32 or 64 bit, and is already required by makepkg.
file doesn't tell you the library soname so I don't know what ld will use for linking. So far readelf seems to be the best choice because I can also use it to generate the dependencies (right now it seems like we are too focused on the provides). Your example below can be achieved using readelf. Also file's output doesn't have to be the same on different platforms.
provides=(libfoo.so)
Results in
%PROVIDES% libfoo.so=6-32
Are you okay with that format Dan? -- Florian Pritz -- {flo,bluewind}@server-speed.net