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.

<https://github.com/kencu/snowleopardfixes>.

And a portfile to install it is here:

<https://github.com/kencu/SnowLeopardPorts/tree/master/sysutils/snowleopardfixes>


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.

Ken

Reply via email to