mirror of
https://github.com/jimeh/build-emacs-for-macos.git
synced 2026-02-19 13:06:38 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
b60ca528f8
|
|||
|
23b8236e0a
|
|||
|
56d0364099
|
|||
|
6af597b427
|
14
CHANGELOG.md
14
CHANGELOG.md
@@ -2,6 +2,20 @@
|
||||
|
||||
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.2](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.1...v0.6.2) (2021-06-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **native_comp:** patch Emacs.pdmp for customized native-lisp paths ([23b8236](https://github.com/jimeh/build-emacs-for-macos/commit/23b8236e0a66fb09810e8422bedf02f7192a53e4))
|
||||
|
||||
### [0.6.1](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.0...v0.6.1) (2021-06-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **cask:** add missing --force flag to cask update command ([6af597b](https://github.com/jimeh/build-emacs-for-macos/commit/6af597b4271341f9796c3d9c356de9918e0f6f85))
|
||||
|
||||
## [0.6.0](https://github.com/jimeh/build-emacs-for-macos/compare/v0.5.2...v0.6.0) (2021-06-28)
|
||||
|
||||
|
||||
|
||||
@@ -454,6 +454,13 @@ class Build
|
||||
parent = File.dirname(parent)
|
||||
end
|
||||
|
||||
eln_parts = eln_dir.match(
|
||||
%r{/(\d+\.\d+\.\d+)/native-lisp/(\d+\.\d+\.\d+-\w+)(?:/.+)?$}i
|
||||
)
|
||||
if eln_parts
|
||||
patch_dump_native_lisp_paths(app, eln_parts[1], eln_parts[2])
|
||||
end
|
||||
|
||||
# Find native-lisp directory again after it has been renamed.
|
||||
source = Dir['MacOS/libexec/emacs/**/eln-cache',
|
||||
'MacOS/lib/emacs/**/native-lisp'].first
|
||||
@@ -468,6 +475,29 @@ class Build
|
||||
end
|
||||
end
|
||||
|
||||
def patch_dump_native_lisp_paths(app, emacs_version, eln_version)
|
||||
sanitized_emacs_version = emacs_version.gsub('.', '-')
|
||||
sanitized_eln_version = eln_version.gsub('.', '-')
|
||||
|
||||
contents_dir = File.join(app, 'Contents')
|
||||
FileUtils.cd(contents_dir) do
|
||||
filename = Dir['MacOS/Emacs.pdmp', 'MacOS/libexec/Emacs.pdmp'].first
|
||||
err "no Emacs.pdmp file found in #{app}" unless filename
|
||||
info 'patching Emacs.pdmp to point at new native-lisp paths'
|
||||
|
||||
content = File.read(filename, mode: 'rb').gsub(
|
||||
"lib/emacs/#{emacs_version}/native-lisp/#{eln_version}/",
|
||||
"lib/emacs/#{sanitized_emacs_version}/" \
|
||||
"native-lisp/#{sanitized_eln_version}/"
|
||||
).gsub(
|
||||
"../native-lisp/#{eln_version}/",
|
||||
"../native-lisp/#{sanitized_eln_version}/"
|
||||
)
|
||||
|
||||
File.open(filename, 'w') { |f| f.write(content) }
|
||||
end
|
||||
end
|
||||
|
||||
def add_cli_helper(app)
|
||||
source = File.join(__dir__, 'helper', 'emacs-cli.bash')
|
||||
target = File.join(app, 'Contents', 'MacOS', 'bin', 'emacs')
|
||||
|
||||
@@ -97,6 +97,14 @@ func caskUpdateCmd() *cli2.Command {
|
||||
EnvVars: []string{"CASK_TEMPLATE_DIR"},
|
||||
Required: true,
|
||||
},
|
||||
&cli2.BoolFlag{
|
||||
Name: "force",
|
||||
Aliases: []string{"f"},
|
||||
Usage: "force update file even if livecheck has it marked " +
|
||||
"as not outdated (does not force update if formula " +
|
||||
"content is unchanged)",
|
||||
Value: false,
|
||||
},
|
||||
},
|
||||
Action: caskActionWrapper(caskUpdateAction),
|
||||
}
|
||||
@@ -112,6 +120,7 @@ func caskUpdateAction(
|
||||
GithubToken: cOpts.GithubToken,
|
||||
Ref: c.String("ref"),
|
||||
OutputDir: c.String("output"),
|
||||
Force: c.Bool("force"),
|
||||
TemplatesDir: c.String("templates-dir"),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user