@@ -153,6 +153,9 @@ def getFullVersion():
153153def getDeptargetTuple ():
154154 return tuple ([int (n ) for n in DEPTARGET .split ('.' )[0 :2 ]])
155155
156+ def getBuildTuple ():
157+ return tuple ([int (n ) for n in platform .mac_ver ()[0 ].split ('.' )[0 :2 ]])
158+
156159def getTargetCompilers ():
157160 target_cc_map = {
158161 '10.4' : ('gcc-4.0' , 'g++-4.0' ),
@@ -192,6 +195,13 @@ def getTargetCompilers():
192195def internalTk ():
193196 return getDeptargetTuple () >= (10 , 6 )
194197
198+ # Do we use 8.6.8 when building our own copy
199+ # of Tcl/Tk or a modern version.
200+ # We use the old version when buildin on
201+ # old versions of macOS due to build issues.
202+ def useOldTk ():
203+ return getBuildTuple () < (10 , 15 )
204+
195205
196206def tweak_tcl_build (basedir , archList ):
197207 with open ("Makefile" , "r" ) as fp :
@@ -245,11 +255,26 @@ def library_recipes():
245255 ])
246256
247257 if internalTk ():
258+ if useOldTk ():
259+ tcl_tk_ver = '8.6.8'
260+ tcl_checksum = '81656d3367af032e0ae6157eff134f89'
261+
262+ tk_checksum = '5e0faecba458ee1386078fb228d008ba'
263+ tk_patches = ['tk868_on_10_8_10_9.patch' ]
264+
265+ else :
266+ tcl_tk_ver = '8.6.10'
267+ tcl_checksum = '97c55573f8520bcab74e21bfd8d0aadc'
268+
269+ tk_checksum = '602a47ad9ecac7bf655ada729d140a94'
270+ tk_patches = [ ]
271+
272+
248273 result .extend ([
249274 dict (
250- name = "Tcl 8.6.8" ,
251- url = "ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tcl8.6.8 -src.tar.gz" ,
252- checksum = '81656d3367af032e0ae6157eff134f89' ,
275+ name = "Tcl %s" % ( tcl_tk_ver ,) ,
276+ url = "ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tcl%s -src.tar.gz" % ( tcl_tk_ver ,) ,
277+ checksum = tcl_checksum ,
253278 buildDir = "unix" ,
254279 configure_pre = [
255280 '--enable-shared' ,
@@ -264,12 +289,10 @@ def library_recipes():
264289 },
265290 ),
266291 dict (
267- name = "Tk 8.6.8" ,
268- url = "ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tk8.6.8-src.tar.gz" ,
269- checksum = '5e0faecba458ee1386078fb228d008ba' ,
270- patches = [
271- "tk868_on_10_8_10_9.patch" ,
272- ],
292+ name = "Tk %s" % (tcl_tk_ver ,),
293+ url = "ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tk%s-src.tar.gz" % (tcl_tk_ver ,),
294+ checksum = tk_checksum ,
295+ patches = tk_patches ,
273296 buildDir = "unix" ,
274297 configure_pre = [
275298 '--enable-aqua' ,
0 commit comments