libcxx on older systems (eg 10.6) test and fixes format

Ken Cunningham ken.cunningham.webuse at gmail.com
Sat Aug 13 07:59:08 PDT 2016


Hello,

I've been submitting portfile fixes for the above system as I come across them.

I've submitted fixes for qt4-mac, aria2, and lilypond so far.

But each has a slightly different test format, and there are different opinions about how to do it, so I'd like to standardize that test now.

I propose for a specific snowleopard with libcxx fix, use this:

# Snow Leopard with cxx_stdlib=libc++ fix
platform darwin { 
	if {{${MINOR} == 6} && {${configure.cxx_stdlib} eq "libc++"}} { 

			#do stuff like configure.ldflags-append    "-lc++" 

	} 
} 


and for 10.9 or lower with libcxx, use this:

# Mountain Lion or older with cxx_stdlib=libc++ fix
platform darwin { 
	if {{${MINOR} <= 9} && {${configure.cxx_stdlib} eq "libc++"}} { 

			#do stuff like configure.ldflags-append    "-lc++" 

	} 
} 


To change from one to the other requires changing only two characters in the MINOR test, and it seems suitably specific, concise, and clear.

Feedback or thoughts?

Ken


More information about the macports-dev mailing list