libzzip fails to build on Snow Leopard -> snowleopardfixes can help also

Ken Cunningham ken.cunningham.webuse at
Thu May 25 01:58:03 UTC 2017

The same few missing glibc functions keep popping up over and over on snowleopard (and earlier), so I built a library that replaces the most common ones.


And a portfile to install it is here:


The beauty of this approach is that rather than picking through the individual source files and generating patches for each required file all the time, you can just add something like this directly to the Portfile:

platform darwin 10 {
	depends_lib-append port:snowleopardfixes
	configure.ldflags-append "-lsnowleopardfixes"
	configure.cxxflags-append -include ${prefix}/include/snowleopardfixes.h
	configure.cflags-append -include ${prefix}/include/snowleopardfixes.h

and it "just works" to replace the missing functions. 

In the build below, I used the block above in the libzzip Portfile, and no patches to the source at all:

$ port -v installed libzzip
The following ports are currently installed:
  libzzip @0.13.62_1 platform='darwin 10' archs='x86_64' date='2016-08-11T10:12:43-0700'
  libzzip @0.13.66_0 (active) platform='darwin 10' archs='x86_64' date='2017-05-24T18:32:32-0700'

Of course platform darwin 10 could be a test for os.major <= 10 and cover all the older systems, but Leopard and Tiger have a few more things missing to be covered, so i'm thinking of separate replacement libraries for them.

It would be possible for all this to be included in a Portgroup, or even by default in the Macports source.


More information about the macports-users mailing list