@@ -211,6 +211,18 @@ def local_have_library(lib, func = nil, headers = nil)
211
211
have_library ( lib , func , headers ) || have_library ( "lib#{ lib } " , func , headers )
212
212
end
213
213
214
+ def gnome_source
215
+ # As of 2022-02-20, some mirrors have expired SSL certificates. I'm able to retrieve from my home,
216
+ # but whatever host is resolved on the github actions workers see an expired cert.
217
+ #
218
+ # See https://github.com/sparklemotion/nokogiri/runs/5266206403?check_suite_focus=true
219
+ if ENV [ "NOKOGIRI_USE_CANONICAL_GNOME_SOURCE" ]
220
+ "https://download.gnome.org"
221
+ else
222
+ "https://mirror.csclub.uwaterloo.ca/gnome" # old reliable
223
+ end
224
+ end
225
+
214
226
LOCAL_PACKAGE_RESPONSE = Object . new
215
227
def LOCAL_PACKAGE_RESPONSE . %( package )
216
228
package ? "yes: #{ package } " : "no"
@@ -512,6 +524,7 @@ def recipe.port_path
512
524
513
525
EOM
514
526
527
+ pp ( recipe . files )
515
528
chdir_for_build { recipe . cook }
516
529
FileUtils . touch ( checkpoint )
517
530
end
@@ -772,7 +785,7 @@ def compile
772
785
else
773
786
minor_version = Gem ::Version . new ( recipe . version ) . segments . take ( 2 ) . join ( "." )
774
787
recipe . files = [ {
775
- url : "https://download.gnome.org /sources/libxml2/#{ minor_version } /#{ recipe . name } -#{ recipe . version } .tar.xz" ,
788
+ url : "#{ gnome_source } /sources/libxml2/#{ minor_version } /#{ recipe . name } -#{ recipe . version } .tar.xz" ,
776
789
sha256 : dependencies [ "libxml2" ] [ "sha256" ] ,
777
790
} ]
778
791
recipe . patch_files = Dir [ File . join ( PACKAGE_ROOT_DIR , "patches" , "libxml2" , "*.patch" ) ] . sort
@@ -821,7 +834,7 @@ def compile
821
834
else
822
835
minor_version = Gem ::Version . new ( recipe . version ) . segments . take ( 2 ) . join ( "." )
823
836
recipe . files = [ {
824
- url : "https://download.gnome.org /sources/libxslt/#{ minor_version } /#{ recipe . name } -#{ recipe . version } .tar.xz" ,
837
+ url : "#{ gnome_source } /sources/libxslt/#{ minor_version } /#{ recipe . name } -#{ recipe . version } .tar.xz" ,
825
838
sha256 : dependencies [ "libxslt" ] [ "sha256" ] ,
826
839
} ]
827
840
recipe . patch_files = Dir [ File . join ( PACKAGE_ROOT_DIR , "patches" , "libxslt" , "*.patch" ) ] . sort
0 commit comments