mirror of
https://github.com/jimeh/build-emacs-for-macos.git
synced 2026-02-19 13:06:38 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
2d1c5d47d9
|
|||
| 30a71c423e | |||
|
5c48445397
|
|||
|
bf7c4d5deb
|
|||
|
3ffeb4854c
|
|||
|
0a22d8393c
|
@@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||||
|
|
||||||
|
### [0.4.12](https://github.com/jimeh/build-emacs-for-macos/compare/0.4.11...0.4.12) (2021-05-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **shared-libraries:** stop aggressive dylib re-linking ([0a22d83](https://github.com/jimeh/build-emacs-for-macos/commit/0a22d8393c53305354c4c6d8e784e7d59caa039a)), closes [#12](https://github.com/jimeh/build-emacs-for-macos/issues/12)
|
||||||
|
* **svg:** enable SVG by default via librsvg ([bf7c4d5](https://github.com/jimeh/build-emacs-for-macos/commit/bf7c4d5debf32980dbbabc1ea99b58b266390011))
|
||||||
|
|
||||||
### [0.4.11](https://github.com/jimeh/build-emacs-for-macos/compare/0.4.10...0.4.11) (2021-05-08)
|
### [0.4.11](https://github.com/jimeh/build-emacs-for-macos/compare/0.4.10...0.4.11) (2021-05-08)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ class Build
|
|||||||
configure_flags << '--with-xwidgets'
|
configure_flags << '--with-xwidgets'
|
||||||
end
|
end
|
||||||
configure_flags << native_comp_configure_flag if options[:native_comp]
|
configure_flags << native_comp_configure_flag if options[:native_comp]
|
||||||
configure_flags << '--without-rsvg' unless options[:rsvg]
|
configure_flags << '--without-rsvg' if options[:rsvg] == false
|
||||||
|
|
||||||
run_cmd './configure', *configure_flags
|
run_cmd './configure', *configure_flags
|
||||||
|
|
||||||
@@ -617,7 +617,6 @@ class LibEmbedder < AbstractEmbedder
|
|||||||
FileUtils.cd(File.dirname(app)) do
|
FileUtils.cd(File.dirname(app)) do
|
||||||
copy_libs(binary)
|
copy_libs(binary)
|
||||||
copy_extra_libs(extra_libs, binary) if extra_libs.any?
|
copy_extra_libs(extra_libs, binary) if extra_libs.any?
|
||||||
self_ref_libs(binary)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -629,6 +628,11 @@ class LibEmbedder < AbstractEmbedder
|
|||||||
Pathname.new(File.dirname(exe))
|
Pathname.new(File.dirname(exe))
|
||||||
).to_s
|
).to_s
|
||||||
|
|
||||||
|
while_writable(exe) do
|
||||||
|
system('install_name_tool', '-add_rpath',
|
||||||
|
File.join('@executable_path', rel_path), exe)
|
||||||
|
end
|
||||||
|
|
||||||
`otool -L "#{exe}"`.split("\n")[1..-1].each do |line|
|
`otool -L "#{exe}"`.split("\n")[1..-1].each do |line|
|
||||||
match = line.match(%r{^\s+(.+/(lib[^/ ]+))\s})
|
match = line.match(%r{^\s+(.+/(lib[^/ ]+))\s})
|
||||||
next unless match && match[1].start_with?(lib_source)
|
next unless match && match[1].start_with?(lib_source)
|
||||||
@@ -673,31 +677,6 @@ class LibEmbedder < AbstractEmbedder
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self_ref_libs(exe)
|
|
||||||
rel_path = Pathname.new(lib_dir).relative_path_from(
|
|
||||||
Pathname.new(File.dirname(exe))
|
|
||||||
).to_s
|
|
||||||
lib_paths ||= Dir.glob("#{lib_dir}/*").select { |f| File.file?(f) }
|
|
||||||
libs = lib_paths.map { |f| File.basename(f) }
|
|
||||||
|
|
||||||
([exe] + lib_paths).each do |bin_path|
|
|
||||||
`otool -L "#{bin_path}"`.split("\n")[1..-1].each do |line|
|
|
||||||
match = line.match(%r{^\s+(.+/(lib[^/ ]+))\s})
|
|
||||||
next unless match
|
|
||||||
next if match[1].start_with?('@executable_path/')
|
|
||||||
next unless libs.include?(match[2])
|
|
||||||
|
|
||||||
while_writable(bin_path) do
|
|
||||||
system(
|
|
||||||
'install_name_tool', '-change', match[1],
|
|
||||||
File.join('@executable_path', rel_path, match[2].to_s),
|
|
||||||
bin_path
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def while_writable(file)
|
def while_writable(file)
|
||||||
mode = File.stat(file).mode
|
mode = File.stat(file).mode
|
||||||
File.chmod(0o775, file)
|
File.chmod(0o775, file)
|
||||||
@@ -840,7 +819,7 @@ if __FILE__ == $PROGRAM_NAME
|
|||||||
work_dir: File.expand_path(__dir__),
|
work_dir: File.expand_path(__dir__),
|
||||||
native_full_aot: false,
|
native_full_aot: false,
|
||||||
parallel: Etc.nprocessors,
|
parallel: Etc.nprocessors,
|
||||||
rsvg: false,
|
rsvg: true,
|
||||||
xwidgets: true
|
xwidgets: true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -857,18 +836,19 @@ if __FILE__ == $PROGRAM_NAME
|
|||||||
|
|
||||||
opts.on('-j', '--parallel COUNT',
|
opts.on('-j', '--parallel COUNT',
|
||||||
'Compile using COUNT parallel processes ' \
|
'Compile using COUNT parallel processes ' \
|
||||||
"(detected: #{cli_options[:parallel]})") do |v|
|
"(default: #{cli_options[:parallel]})") do |v|
|
||||||
cli_options[:parallel] = v
|
cli_options[:parallel] = v
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.on('--git-sha SHA', 'Override detected git SHA of specified ' \
|
opts.on('--git-sha SHA',
|
||||||
'branch allowing builds of old commits') do |v|
|
'Override detected git SHA of specified ' \
|
||||||
|
'branch allowing builds of old commits') do |v|
|
||||||
cli_options[:git_sha] = v
|
cli_options[:git_sha] = v
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.on('--[no-]xwidgets',
|
opts.on('--[no-]xwidgets',
|
||||||
'Enable/disable XWidgets ' \
|
'Enable/disable XWidgets if supported ' \
|
||||||
'(default: enabled if supported)') do |v|
|
'(default: enabled)') do |v|
|
||||||
cli_options[:xwidgets] = v
|
cli_options[:xwidgets] = v
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -884,9 +864,10 @@ if __FILE__ == $PROGRAM_NAME
|
|||||||
cli_options[:native_full_aot] = v
|
cli_options[:native_full_aot] = v
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.on('--rsvg', 'Enable SVG image support via librsvg, ' \
|
opts.on('--[no-]rsvg',
|
||||||
'can yield a unstable build (default: disabled)') do
|
'Enable/disable SVG image support via librsvg ' \
|
||||||
cli_options[:rsvg] = true
|
'(default: enabled)') do |v|
|
||||||
|
cli_options[:rsvg] = v
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.on('--no-titlebar', 'Apply no-titlebar patch (default: disabled)') do
|
opts.on('--no-titlebar', 'Apply no-titlebar patch (default: disabled)') do
|
||||||
|
|||||||
Reference in New Issue
Block a user