[macports/macports-ports] fontconfig: use system uuid.h (#7086)

David Gilman davidgilman1 at gmail.com
Sun May 31 16:37:20 UTC 2020


(Breaking this off of GitHub as it seems the scope may change)

For some context:

Here's the fontconfig ticket where they give some background on where
libuuid comes from on MacOS X:
https://bugs.freedesktop.org/show_bug.cgi?id=105366

It looks like Debian installs libossp-uuid.so[0] and
/usr/include/ossp/uuid.h[1]. Their libuuid comes from what appears to
be yet another package called util-linux which gets installed in
libuuid.so[2] and /usr/include/uuid/uuid.h[3].

[0] https://packages.debian.org/sid/amd64/libossp-uuid16/filelist
[1] https://packages.debian.org/sid/amd64/libossp-uuid-dev/filelist
[2] https://packages.debian.org/sid/amd64/libuuid1/filelist
[3] https://packages.debian.org/sid/amd64/uuid-dev/filelist

On Fri, May 15, 2020 at 4:49 AM Ryan Schmidt <notifications at github.com> wrote:
> One could patch fontconfig: wherever it does #include <uuid/uuid.h> it could be changed to #include </usr/include/uuid/uuid.h>.

I did not try this, so correct me if my understanding is wrong, but
wouldn't you have to do this at both compile time (this patch) and
link time (make sure -l/usr/lib/libSystem.B.dylib comes before
-L/opt/local/lib)? Sounds possible but easy to screw up so I didn't
try it.

> (Surely using the port is in some way better than using the macOS version? Otherwise why would we have the port?)

Oh boy, you've opened the can of worms here. Taking a look at MacPorts
libuuid (SourceForge libuuid), it looks like it's on a fork of
util-linux that hasn't been changed in years and years. I don't think
libuuids are a hotspot of development but SourceForge libuuid hasn't
been touched in six years and at least in util-linux they're doing
minor fixes like this commit from March 2020[0] that improves
performance of uuid_unparse().

[0] https://github.com/karelzak/util-linux/commit/2f81213e269655728bc7971cbc09d5db20e2b855#diff-a48ff6450eac6f2f16369c5f64f9cb78

> I have long wanted to switch everything that's using ossp-uuid over to using the libuuid port, on the basis that libuuid is what Linux uses so it makes it easier to get Linux software working in MacPorts.

My proposal:
1 Delete MacPorts/SourceForge libuuid.
2 Add a subport of util-linux called libuuid that only compiles libuuid.
3 Revbump the universe that depends on libuuid to see how they work
with util-linux libuuid.
4 Revbump the universe that depends on ossp-uuid to see if they'll
work with util-linux libuuid. I suspect you'll see a lot of these go
away.
5 Install MacPorts ossp-uuid in ${prefix}/ossp/ and libossp-uuid.dylib.
6 The remaining ports on ossp-uuid get patched to handle the new name.

I think I can do 1-3 in a PR, 4 in its own PR, and 5-6 in its own PR
to make this not quite as intimidating.

-- 
David Gilman
:DG<


More information about the macports-dev mailing list