mirror of
https://github.com/jimeh/build-emacs-for-macos.git
synced 2026-02-19 13:06:38 +00:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
d2548191f1
|
|||
|
8ed16b27c0
|
|||
|
14f7aa13d9
|
|||
| 59ebbdaa2b | |||
|
d98c14dde5
|
|||
|
590b0ac21a
|
|||
|
8c84ef128f
|
|||
|
8b447b6237
|
|||
|
c3d19694e7
|
|||
|
cff89684c6
|
|||
|
48a512fbce
|
|||
|
a3530c02e8
|
|||
|
138ac74ba5
|
|||
|
0ba971ef61
|
|||
|
1ae8771b2c
|
|||
|
1f2868d4b3
|
|||
|
bfa5bcf79b
|
|||
| 02d85f899f | |||
|
aeb3a75e5c
|
|||
|
|
e0fd2b16eb
|
2
Brewfile
2
Brewfile
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
brew 'autoconf'
|
brew 'autoconf'
|
||||||
brew 'coreutils'
|
brew 'coreutils'
|
||||||
brew 'curl'
|
|
||||||
brew 'dbus'
|
brew 'dbus'
|
||||||
brew 'expat'
|
brew 'expat'
|
||||||
brew 'gcc'
|
brew 'gcc'
|
||||||
@@ -25,4 +24,5 @@ brew 'nettle'
|
|||||||
brew 'pkg-config'
|
brew 'pkg-config'
|
||||||
brew 'sqlite'
|
brew 'sqlite'
|
||||||
brew 'texinfo'
|
brew 'texinfo'
|
||||||
|
brew 'tree-sitter'
|
||||||
brew 'zlib'
|
brew 'zlib'
|
||||||
|
|||||||
41
CHANGELOG.md
41
CHANGELOG.md
@@ -2,6 +2,47 @@
|
|||||||
|
|
||||||
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.6.41](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.40...v0.6.41) (2023-01-16)
|
||||||
|
|
||||||
|
### [0.6.40](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.39...v0.6.40) (2023-01-08)
|
||||||
|
|
||||||
|
### [0.6.39](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.38...v0.6.39) (2022-12-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **deprecate:** posix-spawn patch is no longer supported ([c3d1969](https://github.com/jimeh/build-emacs-for-macos/commit/c3d19694e7e4d33d462c9917683c2d63f69002f5))
|
||||||
|
* **version:** correctly handle Emacs 30.x builds ([8b447b6](https://github.com/jimeh/build-emacs-for-macos/commit/8b447b6237fbbd94c4e72af8ee79969c7cfc9363))
|
||||||
|
|
||||||
|
### [0.6.38](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.37...v0.6.38) (2022-12-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **patch:** add round-undecorated-frame from emacs-plus for 29.x ([48a512f](https://github.com/jimeh/build-emacs-for-macos/commit/48a512fbce79759caa987e2880585bd0bc937977))
|
||||||
|
* **patch:** add support for experimental poll patch from emacs-plus for 29.x ([a3530c0](https://github.com/jimeh/build-emacs-for-macos/commit/a3530c02e8260106f87d464e5cb398dcb2819460))
|
||||||
|
|
||||||
|
### [0.6.37](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.36...v0.6.37) (2022-12-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **tree-sitter:** support new --with-tree-sitter configure flag ([0ba971e](https://github.com/jimeh/build-emacs-for-macos/commit/0ba971ef61a195c91e87aa381d5d3b044461b4f6))
|
||||||
|
|
||||||
|
### [0.6.36](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.35...v0.6.36) (2022-10-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **native-comp:** support new configure flag format ([1f2868d](https://github.com/jimeh/build-emacs-for-macos/commit/1f2868d4b3784e906665e9f3b6b9bba8fd72292f)), closes [#76](https://github.com/jimeh/build-emacs-for-macos/issues/76)
|
||||||
|
|
||||||
|
### [0.6.35](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.34...v0.6.35) (2022-08-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **native-comp:** compatibility with libgccjit 12 homebrew formula ([e0fd2b1](https://github.com/jimeh/build-emacs-for-macos/commit/e0fd2b16eb91ac5a98ed4ec31f4773ab22cbd470))
|
||||||
|
|
||||||
### [0.6.34](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.33...v0.6.34) (2022-07-27)
|
### [0.6.34](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.33...v0.6.34) (2022-07-27)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -250,14 +250,40 @@ class Build
|
|||||||
@supports_xwidgets ||= !!configure_help.match(/\s+--with-xwidgets\s+/)
|
@supports_xwidgets ||= !!configure_help.match(/\s+--with-xwidgets\s+/)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def supports_tree_sitter?
|
||||||
|
@supports_tree_sitter ||= !!configure_help.match(
|
||||||
|
/\s+--with-tree-sitter(\s|=).+/
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def supports_native_comp?
|
def supports_native_comp?
|
||||||
@supports_native_comp ||= !native_comp_configure_flag.nil?
|
@supports_native_comp ||= !native_comp_configure_flag.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def native_comp_configure_match
|
||||||
|
@native_comp_configure_match ||= configure_help.match(
|
||||||
|
/\s+?(--with-native(?:comp|-compilation))(.+)?\s+?/
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def native_comp_configure_flag
|
def native_comp_configure_flag
|
||||||
@native_comp_configure_flag ||= configure_help.match(
|
return @native_comp_configure_flag if @native_comp_configure_flag
|
||||||
/\s+(--with-native(?:comp|-compilation))\s+/
|
|
||||||
)&.[](1)
|
return unless native_comp_configure_match&.[](1)
|
||||||
|
|
||||||
|
@native_comp_configure_flag = [
|
||||||
|
native_comp_configure_match[1],
|
||||||
|
native_comp_configure_flag_arg
|
||||||
|
].compact.join('=')
|
||||||
|
end
|
||||||
|
|
||||||
|
def native_comp_configure_flag_arg
|
||||||
|
return @native_comp_configure_flag_arg if @native_comp_configure_flag_arg
|
||||||
|
|
||||||
|
return if native_comp_configure_match&.[](2) != '[=TYPE]'
|
||||||
|
|
||||||
|
@native_comp_configure_flag_arg = \
|
||||||
|
(options[:native_full_aot] ? 'aot' : 'yes')
|
||||||
end
|
end
|
||||||
|
|
||||||
def detect_native_comp
|
def detect_native_comp
|
||||||
@@ -365,11 +391,14 @@ class Build
|
|||||||
if options[:xwidgets] && supports_xwidgets?
|
if options[:xwidgets] && supports_xwidgets?
|
||||||
configure_flags << '--with-xwidgets'
|
configure_flags << '--with-xwidgets'
|
||||||
end
|
end
|
||||||
|
if options[:tree_sitter] && supports_tree_sitter?
|
||||||
|
configure_flags << '--with-tree-sitter'
|
||||||
|
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' if options[:rsvg] == false
|
configure_flags << '--without-rsvg' if options[:rsvg] == false
|
||||||
configure_flags << '--without-dbus' if options[:dbus] == false
|
configure_flags << '--without-dbus' if options[:dbus] == false
|
||||||
|
|
||||||
run_cmd './configure', *configure_flags
|
run_cmd './configure', *configure_flags.compact
|
||||||
|
|
||||||
# Disable aligned_alloc on Mojave and below. See issue:
|
# Disable aligned_alloc on Mojave and below. See issue:
|
||||||
# https://github.com/daviderestivo/homebrew-emacs-head/issues/15
|
# https://github.com/daviderestivo/homebrew-emacs-head/issues/15
|
||||||
@@ -386,8 +415,12 @@ class Build
|
|||||||
make_flags << "BYTE_COMPILE_EXTRA_FLAGS=--eval '(setq comp-speed 2)'"
|
make_flags << "BYTE_COMPILE_EXTRA_FLAGS=--eval '(setq comp-speed 2)'"
|
||||||
|
|
||||||
if options[:native_full_aot]
|
if options[:native_full_aot]
|
||||||
info 'Using NATIVE_FULL_AOT=1'
|
info 'Using native compile full AOT'
|
||||||
make_flags << 'NATIVE_FULL_AOT=1'
|
# We do not need to supply the full AOT make arg if
|
||||||
|
# --with-native-compilation=aot configure flag is supported.
|
||||||
|
unless native_comp_configure_flag_arg
|
||||||
|
make_flags << 'NATIVE_FULL_AOT=1'
|
||||||
|
end
|
||||||
ENV.delete('NATIVE_FAST_BOOT')
|
ENV.delete('NATIVE_FAST_BOOT')
|
||||||
else
|
else
|
||||||
ENV.delete('NATIVE_FULL_AOT')
|
ENV.delete('NATIVE_FULL_AOT')
|
||||||
@@ -395,7 +428,7 @@ class Build
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
run_cmd 'make', *make_flags
|
run_cmd 'make', *make_flags.compact
|
||||||
run_cmd 'make', 'install'
|
run_cmd 'make', 'install'
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -625,8 +658,10 @@ class Build
|
|||||||
'emacs-27'
|
'emacs-27'
|
||||||
when /^emacs-28.*/
|
when /^emacs-28.*/
|
||||||
'emacs-28'
|
'emacs-28'
|
||||||
else
|
when /^emacs-29.*/
|
||||||
'emacs-29'
|
'emacs-29'
|
||||||
|
else
|
||||||
|
'emacs-30'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -634,14 +669,14 @@ class Build
|
|||||||
def patches(opts = {})
|
def patches(opts = {})
|
||||||
p = []
|
p = []
|
||||||
|
|
||||||
if %w[emacs-26 emacs-27 emacs-28 emacs-29].include?(effective_version)
|
if %w[emacs-26 emacs-27 emacs-28 emacs-29 emacs-30].include?(effective_version)
|
||||||
p << {
|
p << {
|
||||||
url: 'https://github.com/d12frosted/homebrew-emacs-plus/raw/master/' \
|
url: 'https://github.com/d12frosted/homebrew-emacs-plus/raw/master/' \
|
||||||
"patches/#{effective_version}/fix-window-role.patch"
|
"patches/#{effective_version}/fix-window-role.patch"
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
if %w[emacs-27 emacs-28 emacs-29].include?(effective_version)
|
if %w[emacs-27 emacs-28 emacs-29 emacs-30].include?(effective_version)
|
||||||
p << {
|
p << {
|
||||||
url: 'https://github.com/d12frosted/homebrew-emacs-plus/raw/master/' \
|
url: 'https://github.com/d12frosted/homebrew-emacs-plus/raw/master/' \
|
||||||
"patches/#{effective_version}/system-appearance.patch"
|
"patches/#{effective_version}/system-appearance.patch"
|
||||||
@@ -662,11 +697,15 @@ class Build
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if %w[emacs-28 emacs-29].include?(effective_version)
|
if %w[emacs-29 emacs-30].include?(effective_version)
|
||||||
if options[:posix_spawn]
|
p << {
|
||||||
|
url: 'https://github.com/d12frosted/homebrew-emacs-plus/raw/master/' \
|
||||||
|
"patches/#{effective_version}/round-undecorated-frame.patch"
|
||||||
|
}
|
||||||
|
if options[:poll]
|
||||||
p << {
|
p << {
|
||||||
url: 'https://github.com/d12frosted/homebrew-emacs-plus/raw/master/' \
|
url: 'https://github.com/d12frosted/homebrew-emacs-plus/raw/master/' \
|
||||||
"patches/#{effective_version}/posix-spawn.patch"
|
"patches/#{effective_version}/poll.patch"
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -675,8 +714,19 @@ class Build
|
|||||||
p << {
|
p << {
|
||||||
replace: [
|
replace: [
|
||||||
'configure.ac',
|
'configure.ac',
|
||||||
'grep libgccjit.so\$))"',
|
'grep libgccjit.so\$',
|
||||||
'grep -E \'libgccjit\.(so|dylib)$\'))"'
|
'grep -E \'libgccjit\.(so|dylib)$\''
|
||||||
|
],
|
||||||
|
allow_failure: true
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
if %w[emacs-28 emacs-29].include?(effective_version)
|
||||||
|
p << {
|
||||||
|
replace: [
|
||||||
|
'configure.ac',
|
||||||
|
'grep -E \'libgccjit\.(so|dylib)$\'',
|
||||||
|
'grep -E \'libgccjit\.(so|dylib)$\' | tail -1'
|
||||||
],
|
],
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
}
|
}
|
||||||
@@ -1208,6 +1258,7 @@ if __FILE__ == $PROGRAM_NAME
|
|||||||
rsvg: true,
|
rsvg: true,
|
||||||
dbus: true,
|
dbus: true,
|
||||||
xwidgets: true,
|
xwidgets: true,
|
||||||
|
tree_sitter: true,
|
||||||
github_auth: true,
|
github_auth: true,
|
||||||
dist_include: ['COPYING'],
|
dist_include: ['COPYING'],
|
||||||
archive: true,
|
archive: true,
|
||||||
@@ -1243,6 +1294,12 @@ if __FILE__ == $PROGRAM_NAME
|
|||||||
cli_options[:xwidgets] = v
|
cli_options[:xwidgets] = v
|
||||||
end
|
end
|
||||||
|
|
||||||
|
opts.on('--[no-]tree-sitter',
|
||||||
|
'Enable/disable tree-sitter if supported' \
|
||||||
|
'(default: enabled)') do |v|
|
||||||
|
cli_options[:tree_sitter] = v
|
||||||
|
end
|
||||||
|
|
||||||
opts.on('--[no-]native-comp',
|
opts.on('--[no-]native-comp',
|
||||||
'Enable/disable native-comp ' \
|
'Enable/disable native-comp ' \
|
||||||
'(default: enabled if supported)') do |v|
|
'(default: enabled if supported)') do |v|
|
||||||
@@ -1282,8 +1339,8 @@ if __FILE__ == $PROGRAM_NAME
|
|||||||
cli_options[:no_titlebar] = true
|
cli_options[:no_titlebar] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.on('--posix-spawn', 'Apply posix-spawn patch (default: disabled)') do
|
opts.on('--posix-spawn', 'Apply posix-spawn patch (deprecated)') do
|
||||||
cli_options[:posix_spawn] = true
|
warn '==> WARN: posix-spawn patch is deprecated as has no effect.'
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.on('--no-frame-refocus',
|
opts.on('--no-frame-refocus',
|
||||||
@@ -1291,6 +1348,13 @@ if __FILE__ == $PROGRAM_NAME
|
|||||||
cli_options[:no_frame_refocus] = true
|
cli_options[:no_frame_refocus] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
opts.on('--[no-]poll',
|
||||||
|
'Enable/disable experimental use of poll() instead of select() ' \
|
||||||
|
'to support > 1024 file descriptors ' \
|
||||||
|
'(default: disabled)') do |v|
|
||||||
|
cli_options[:poll] = v
|
||||||
|
end
|
||||||
|
|
||||||
opts.on('--[no-]github-auth',
|
opts.on('--[no-]github-auth',
|
||||||
'Make authenticated GitHub API requests if GITHUB_TOKEN ' \
|
'Make authenticated GitHub API requests if GITHUB_TOKEN ' \
|
||||||
'environment variable is set.' \
|
'environment variable is set.' \
|
||||||
|
|||||||
Reference in New Issue
Block a user