mirror of
https://github.com/jimeh/build-emacs-for-macos.git
synced 2026-02-19 13:06:38 +00:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
d2548191f1
|
|||
|
8ed16b27c0
|
|||
|
14f7aa13d9
|
|||
| 59ebbdaa2b | |||
|
d98c14dde5
|
|||
|
590b0ac21a
|
|||
|
8c84ef128f
|
|||
|
8b447b6237
|
|||
|
c3d19694e7
|
|||
|
cff89684c6
|
|||
|
48a512fbce
|
|||
|
a3530c02e8
|
|||
|
138ac74ba5
|
|||
|
0ba971ef61
|
|||
|
1ae8771b2c
|
|||
|
1f2868d4b3
|
2
Brewfile
2
Brewfile
@@ -2,7 +2,6 @@
|
||||
|
||||
brew 'autoconf'
|
||||
brew 'coreutils'
|
||||
brew 'curl'
|
||||
brew 'dbus'
|
||||
brew 'expat'
|
||||
brew 'gcc'
|
||||
@@ -25,4 +24,5 @@ brew 'nettle'
|
||||
brew 'pkg-config'
|
||||
brew 'sqlite'
|
||||
brew 'texinfo'
|
||||
brew 'tree-sitter'
|
||||
brew 'zlib'
|
||||
|
||||
34
CHANGELOG.md
34
CHANGELOG.md
@@ -2,6 +2,40 @@
|
||||
|
||||
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)
|
||||
|
||||
|
||||
|
||||
@@ -250,14 +250,40 @@ class Build
|
||||
@supports_xwidgets ||= !!configure_help.match(/\s+--with-xwidgets\s+/)
|
||||
end
|
||||
|
||||
def supports_tree_sitter?
|
||||
@supports_tree_sitter ||= !!configure_help.match(
|
||||
/\s+--with-tree-sitter(\s|=).+/
|
||||
)
|
||||
end
|
||||
|
||||
def supports_native_comp?
|
||||
@supports_native_comp ||= !native_comp_configure_flag.nil?
|
||||
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
|
||||
@native_comp_configure_flag ||= configure_help.match(
|
||||
/\s+(--with-native(?:comp|-compilation))\s+/
|
||||
)&.[](1)
|
||||
return @native_comp_configure_flag if @native_comp_configure_flag
|
||||
|
||||
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
|
||||
|
||||
def detect_native_comp
|
||||
@@ -365,11 +391,14 @@ class Build
|
||||
if options[:xwidgets] && supports_xwidgets?
|
||||
configure_flags << '--with-xwidgets'
|
||||
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 << '--without-rsvg' if options[:rsvg] == 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:
|
||||
# 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)'"
|
||||
|
||||
if options[:native_full_aot]
|
||||
info 'Using NATIVE_FULL_AOT=1'
|
||||
make_flags << 'NATIVE_FULL_AOT=1'
|
||||
info 'Using native compile full AOT'
|
||||
# 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')
|
||||
else
|
||||
ENV.delete('NATIVE_FULL_AOT')
|
||||
@@ -395,7 +428,7 @@ class Build
|
||||
end
|
||||
end
|
||||
|
||||
run_cmd 'make', *make_flags
|
||||
run_cmd 'make', *make_flags.compact
|
||||
run_cmd 'make', 'install'
|
||||
end
|
||||
|
||||
@@ -625,8 +658,10 @@ class Build
|
||||
'emacs-27'
|
||||
when /^emacs-28.*/
|
||||
'emacs-28'
|
||||
else
|
||||
when /^emacs-29.*/
|
||||
'emacs-29'
|
||||
else
|
||||
'emacs-30'
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -634,14 +669,14 @@ class Build
|
||||
def patches(opts = {})
|
||||
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 << {
|
||||
url: 'https://github.com/d12frosted/homebrew-emacs-plus/raw/master/' \
|
||||
"patches/#{effective_version}/fix-window-role.patch"
|
||||
}
|
||||
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 << {
|
||||
url: 'https://github.com/d12frosted/homebrew-emacs-plus/raw/master/' \
|
||||
"patches/#{effective_version}/system-appearance.patch"
|
||||
@@ -662,11 +697,15 @@ class Build
|
||||
end
|
||||
end
|
||||
|
||||
if %w[emacs-28 emacs-29].include?(effective_version)
|
||||
if options[:posix_spawn]
|
||||
if %w[emacs-29 emacs-30].include?(effective_version)
|
||||
p << {
|
||||
url: 'https://github.com/d12frosted/homebrew-emacs-plus/raw/master/' \
|
||||
"patches/#{effective_version}/round-undecorated-frame.patch"
|
||||
}
|
||||
if options[:poll]
|
||||
p << {
|
||||
url: 'https://github.com/d12frosted/homebrew-emacs-plus/raw/master/' \
|
||||
"patches/#{effective_version}/posix-spawn.patch"
|
||||
"patches/#{effective_version}/poll.patch"
|
||||
}
|
||||
end
|
||||
end
|
||||
@@ -1219,6 +1258,7 @@ if __FILE__ == $PROGRAM_NAME
|
||||
rsvg: true,
|
||||
dbus: true,
|
||||
xwidgets: true,
|
||||
tree_sitter: true,
|
||||
github_auth: true,
|
||||
dist_include: ['COPYING'],
|
||||
archive: true,
|
||||
@@ -1254,6 +1294,12 @@ if __FILE__ == $PROGRAM_NAME
|
||||
cli_options[:xwidgets] = v
|
||||
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',
|
||||
'Enable/disable native-comp ' \
|
||||
'(default: enabled if supported)') do |v|
|
||||
@@ -1293,8 +1339,8 @@ if __FILE__ == $PROGRAM_NAME
|
||||
cli_options[:no_titlebar] = true
|
||||
end
|
||||
|
||||
opts.on('--posix-spawn', 'Apply posix-spawn patch (default: disabled)') do
|
||||
cli_options[:posix_spawn] = true
|
||||
opts.on('--posix-spawn', 'Apply posix-spawn patch (deprecated)') do
|
||||
warn '==> WARN: posix-spawn patch is deprecated as has no effect.'
|
||||
end
|
||||
|
||||
opts.on('--no-frame-refocus',
|
||||
@@ -1302,6 +1348,13 @@ if __FILE__ == $PROGRAM_NAME
|
||||
cli_options[:no_frame_refocus] = true
|
||||
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',
|
||||
'Make authenticated GitHub API requests if GITHUB_TOKEN ' \
|
||||
'environment variable is set.' \
|
||||
|
||||
Reference in New Issue
Block a user