mirror of
https://github.com/jimeh/build-emacs-for-macos.git
synced 2026-02-19 13:06:38 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
5602475542
|
|||
|
67b8c5f397
|
|||
|
4dad5812fa
|
|||
|
65bdff0b6d
|
|||
|
a956dc1b42
|
19
CHANGELOG.md
19
CHANGELOG.md
@@ -2,6 +2,25 @@
|
||||
|
||||
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.18](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.17...v0.6.18) (2021-10-23)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **docs:** embed C source files and set source-directory accordingly ([67b8c5f](https://github.com/jimeh/build-emacs-for-macos/commit/67b8c5f3974e178e31519846d46af82d9770ad6e))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **patches:** correctly use emacs 28.x and 29.x patches ([4dad581](https://github.com/jimeh/build-emacs-for-macos/commit/4dad5812fa2b67adc7262a778829013995a904bc))
|
||||
|
||||
### [0.6.17](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.16...v0.6.17) (2021-10-10)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **release:** tweak GitHub release description ([a956dc1](https://github.com/jimeh/build-emacs-for-macos/commit/a956dc1b42b2648e2663f5b48c72d7428fe75f19))
|
||||
|
||||
### [0.6.16](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.15...v0.6.16) (2021-10-10)
|
||||
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ class Build
|
||||
handle_native_lisp(app)
|
||||
add_cli_helper(app)
|
||||
|
||||
CSourcesEmbedder.new(app, @source_dir).embed
|
||||
LibEmbedder.new(app, brew_dir, extra_libs, options[:relink_eln]).embed
|
||||
GccLibEmbedder.new(app, gcc_info).embed if options[:native_comp]
|
||||
|
||||
@@ -640,8 +641,10 @@ class Build
|
||||
'emacs-26'
|
||||
when /^emacs-27.*/
|
||||
'emacs-27'
|
||||
else
|
||||
when /^emacs-28.*/
|
||||
'emacs-28'
|
||||
else
|
||||
'emacs-29'
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -649,14 +652,14 @@ class Build
|
||||
def patches(opts = {})
|
||||
p = []
|
||||
|
||||
if %w[emacs-26 emacs-27 emacs-28].include?(effective_version)
|
||||
if %w[emacs-26 emacs-27 emacs-28 emacs-29].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].include?(effective_version)
|
||||
if %w[emacs-27 emacs-28 emacs-29].include?(effective_version)
|
||||
p << {
|
||||
url: 'https://github.com/d12frosted/homebrew-emacs-plus/raw/master/' \
|
||||
"patches/#{effective_version}/system-appearance.patch"
|
||||
@@ -756,6 +759,38 @@ class AbstractEmbedder
|
||||
def lib_dir
|
||||
File.join(invocation_dir, 'lib')
|
||||
end
|
||||
|
||||
def resources_dir
|
||||
File.join(app, 'Contents', 'Resources')
|
||||
end
|
||||
end
|
||||
|
||||
class CSourcesEmbedder < AbstractEmbedder
|
||||
attr_reader :source_dir
|
||||
def initialize(app, source_dir)
|
||||
super(app)
|
||||
|
||||
@source_dir = source_dir
|
||||
end
|
||||
|
||||
def embed
|
||||
info 'Embedding C source files into Emacs.app for documentation purposes'
|
||||
|
||||
FileUtils.cp_r(
|
||||
File.join(source_dir, 'src'),
|
||||
File.join(resources_dir, 'src')
|
||||
)
|
||||
|
||||
File.open(subdirs_el_file, 'a') do |f|
|
||||
f.puts("(setq source-directory (expand-file-name \"..\"))\n")
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def subdirs_el_file
|
||||
@subdirs_el_file ||= File.join(resources_dir, 'lisp', 'subdirs.el')
|
||||
end
|
||||
end
|
||||
|
||||
class LibEmbedder < AbstractEmbedder
|
||||
|
||||
@@ -22,11 +22,9 @@ var bodyTpl = template.Must(template.New("body").Funcs(tplFuncs).Parse(`
|
||||
{{ with .SourceURL -}}
|
||||
- Source: {{ . }}
|
||||
{{- end }}
|
||||
{{- if and .CommitSHA .CommitURL }}
|
||||
- Commit: [{{ $t }}{{ .CommitSHA }}{{ $t }}]
|
||||
{{- if .CommitURL }}({{ .CommitURL }}){{ end }}
|
||||
{{- else if and .CommitSHA }}
|
||||
- Commit: {{ $t }}{{ .CommitSHA }}{{ $t }}
|
||||
{{- if .CommitURL }}
|
||||
- Commit: {{ .CommitURL }}
|
||||
{{- if .CommitSHA }} ({{ $t }}{{ .CommitSHA }}{{ $t }}){{ end }}
|
||||
{{- end }}
|
||||
{{- with .TarballURL }}
|
||||
- Tarball: {{ . }}
|
||||
|
||||
Reference in New Issue
Block a user