33require "net/http"
44require "tmpdir"
55
6- version = "9.12.4544 "
6+ version = "9.13.4784 "
77
88arch = RbConfig ::CONFIG [ "host_cpu" ]
99arm = arch . match? ( /arm|aarch64/i )
1010
1111if RbConfig ::CONFIG [ "host_os" ] . match? ( /darwin/i )
1212 if arm
13- filename = "or-tools_arm64_macOS-15.3.1_cpp_v #{ version } .tar.gz"
14- checksum = "02f89e54bd8d86e6e069f843aeed10a444ff329052e5a7fd732c5e4ec4f845fb "
13+ filename = "or-tools_arm64_macOS-15.5_cpp_v #{ version } .tar.gz"
14+ checksum = "9d1911f038031623e761ffb3cd31f60a533c0910c334bf6543d7b0ae6b75e077 "
1515 else
16- filename = "or-tools_x86_64_macOS-15.3.1_cpp_v #{ version } .tar.gz"
17- checksum = "515af60e73e7fa620bab7f4a7d60b9069075d814453d91906aa39993d714f28d "
16+ filename = "or-tools_x86_64_macOS-15.5_cpp_v #{ version } .tar.gz"
17+ checksum = "f6034aa739a03d50dd09f148bc7979f846ab0c753fd1df8d72a639b8037a55dc "
1818 end
1919else
2020 # try /etc/os-release with fallback to /usr/lib/os-release
2929
3030 if os == "ubuntu" && os_version == "24.04" && !arm
3131 filename = "or-tools_amd64_ubuntu-24.04_cpp_v#{ version } .tar.gz"
32- checksum = "71128e095024707bf9835faf4558cbe34acb79345e899bd532f3008a493a8970 "
32+ checksum = "9ad206beb4087b188f57af41295e655d33e7fe35f618828d2c64453d157349f8 "
3333 elsif os == "ubuntu" && os_version == "22.04" && !arm
3434 filename = "or-tools_amd64_ubuntu-22.04_cpp_v#{ version } .tar.gz"
35- checksum = "cb42ea7d7799a01fea7cdaafacbdfc67180d85f39532c6d2a8c4cfb419bd07ed "
35+ checksum = "873571435955b4102ea86f4851017e96872ed82a85f4260d00bfe58afa2fd245 "
3636 elsif os == "ubuntu" && os_version == "20.04" && !arm
3737 filename = "or-tools_amd64_ubuntu-20.04_cpp_v#{ version } .tar.gz"
38- checksum = "ea51589fe80bd9cd4fb6203bd1e956b311cdb1d21bbd14f7b6dad75c81d3583c "
38+ checksum = "8a58434f10c43d772698ecb2dd629e8570e9fda6dcca9d3412bdd9476198cef0 "
3939 elsif os == "debian" && os_version == "11" && !arm
4040 filename = "or-tools_amd64_debian-11_cpp_v#{ version } .tar.gz"
41- checksum = "dcee63b726569bd99c134e0e920173f955feae5856c3370a0bed03fdc995af50 "
41+ checksum = "28a6e2165949e25087776362205e4cc9c8bf079543349eb90dfdcc355d335470 "
4242 elsif os == "debian" && os_version == "12" && !arm
4343 filename = "or-tools_amd64_debian-12_cpp_v#{ version } .tar.gz"
44- checksum = "911143f50fe013fbd50d0dce460512106596adfc0f2ad9a2bc8afd218531bde4 "
44+ checksum = "145acb8cb21c9a68174ebd5a3d028ebb5e7266f1f782eca91f15afe53a223305 "
4545 elsif os == "arch" && !arm
4646 filename = "or-tools_amd64_archlinux_cpp_v#{ version } .tar.gz"
47- checksum = "18c1d929e2144e9d9602659ea2fa790bd2a150f72c32c38a97f571839816d132 "
47+ checksum = "396ab7ea1369914d148f6c2942325bfc5b73b3bc65fd8bba301a21e61d33b770 "
4848 else
4949 platform =
5050 if Gem . win_platform?
@@ -127,14 +127,6 @@ def download_file(url, download_path, redirects = 0)
127127 tar_args = Gem . win_platform? ? [ "--force-local" ] : [ ]
128128 system "tar" , "zxf" , download_path , "-C" , extract_path , "--strip-components=1" , *tar_args
129129
130- # licenses
131- license_files = Dir . glob ( "**/*{LICENSE,LICENCE,NOTICE,COPYING,license,licence,notice,copying}*" , base : extract_path )
132- raise "License not found" unless license_files . any?
133- license_files . each do |file |
134- FileUtils . mkdir_p ( File . join ( path , File . dirname ( file ) ) )
135- FileUtils . mv ( File . join ( extract_path , file ) , File . join ( path , file ) )
136- end
137-
138130 # include
139131 FileUtils . mv ( File . join ( extract_path , "include" ) , File . join ( path , "include" ) )
140132
@@ -144,6 +136,14 @@ def download_file(url, download_path, redirects = 0)
144136 next if file . include? ( "libprotoc." )
145137 FileUtils . mv ( File . join ( extract_path , file ) , File . join ( path , file ) )
146138 end
139+
140+ # licenses
141+ license_files = Dir . glob ( "**/*{LICENSE,LICENCE,NOTICE,COPYING,license,licence,notice,copying}*" , base : extract_path )
142+ raise "License not found" unless license_files . any?
143+ license_files . each do |file |
144+ FileUtils . mkdir_p ( File . join ( path , File . dirname ( file ) ) )
145+ FileUtils . mv ( File . join ( extract_path , file ) , File . join ( path , file ) )
146+ end
147147end
148148
149149# export
0 commit comments