Skip to content

Commit

Permalink
fix macOS 15 build support
Browse files Browse the repository at this point in the history
  • Loading branch information
mcorino committed Dec 31, 2024
1 parent 754bb15 commit 8dece49
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion rakelib/lib/config/macosx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,26 @@ def do_link(pkg)
private

def wx_configure
if @wx_version <= '3.2.6' && WXRuby3.config.sysinfo.os.release >= '15'
wxw_ver = nil
if WXRuby3.config.sysinfo.os.release >= '15'
# try to detect wxWidgets version
verfile = File.join(ext_path, 'wxWidgets', 'include', 'wx', 'version.h')
if File.exist?(verfile)
v_major = v_minor = v_release = nil
File.foreach(verfile) do |line|
case line
when /\#define\s+wxMAJOR_VERSION\s+(\d+)/
v_major = $1.to_i
when /\#define\s+wxMINOR_VERSION\s+(\d+)/
v_minor = $1.to_i
when /\#define\s+wxRELEASE_NUMBER\s+(\d+)/
v_release = $1.to_i
end
end
wxw_ver = "#{v_major}.#{v_minor}.#{v_release}"
end
end
if WXRuby3.config.sysinfo.os.release >= '15' && (wxw_ver.nil? || wxw_ver <= '3.2.6')
# circumvent compilation problems on MacOS 15 or higher with older wxWidgets releases
bash("./configure " +
"--disable-optimise --disable-sys-libs --without-liblzma --without-regex " +
Expand Down

0 comments on commit 8dece49

Please sign in to comment.