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 | |
|---|---|---|---|
|
6d21d1bef4
|
|||
|
99aa76b398
|
|||
|
b60ca528f8
|
|||
|
23b8236e0a
|
|||
|
56d0364099
|
|||
|
6af597b427
|
21
CHANGELOG.md
21
CHANGELOG.md
@@ -2,6 +2,27 @@
|
|||||||
|
|
||||||
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.3](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.2...v0.6.3) (2021-06-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **patches:** correctly set ref when loading a build plan YAML ([99aa76b](https://github.com/jimeh/build-emacs-for-macos/commit/99aa76b3985195c310a20bafa19a8c7a4c8558fd))
|
||||||
|
|
||||||
|
### [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)
|
## [0.6.0](https://github.com/jimeh/build-emacs-for-macos/compare/v0.5.2...v0.6.0) (2021-06-28)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -117,9 +117,10 @@ class Build
|
|||||||
def load_plan(filename)
|
def load_plan(filename)
|
||||||
plan = YAML.safe_load(File.read(filename), [:Time])
|
plan = YAML.safe_load(File.read(filename), [:Time])
|
||||||
|
|
||||||
|
@ref = plan.dig('source', 'ref')
|
||||||
@meta = {
|
@meta = {
|
||||||
sha: plan.dig('source', 'commit', 'sha'),
|
sha: plan.dig('source', 'commit', 'sha'),
|
||||||
ref: plan.dig('source', 'ref'),
|
ref: @ref,
|
||||||
date: plan.dig('source', 'commit', 'date')
|
date: plan.dig('source', 'commit', 'date')
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -454,6 +455,13 @@ class Build
|
|||||||
parent = File.dirname(parent)
|
parent = File.dirname(parent)
|
||||||
end
|
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.
|
# Find native-lisp directory again after it has been renamed.
|
||||||
source = Dir['MacOS/libexec/emacs/**/eln-cache',
|
source = Dir['MacOS/libexec/emacs/**/eln-cache',
|
||||||
'MacOS/lib/emacs/**/native-lisp'].first
|
'MacOS/lib/emacs/**/native-lisp'].first
|
||||||
@@ -468,6 +476,29 @@ class Build
|
|||||||
end
|
end
|
||||||
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)
|
def add_cli_helper(app)
|
||||||
source = File.join(__dir__, 'helper', 'emacs-cli.bash')
|
source = File.join(__dir__, 'helper', 'emacs-cli.bash')
|
||||||
target = File.join(app, 'Contents', 'MacOS', 'bin', 'emacs')
|
target = File.join(app, 'Contents', 'MacOS', 'bin', 'emacs')
|
||||||
|
|||||||
@@ -97,6 +97,14 @@ func caskUpdateCmd() *cli2.Command {
|
|||||||
EnvVars: []string{"CASK_TEMPLATE_DIR"},
|
EnvVars: []string{"CASK_TEMPLATE_DIR"},
|
||||||
Required: true,
|
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),
|
Action: caskActionWrapper(caskUpdateAction),
|
||||||
}
|
}
|
||||||
@@ -112,6 +120,7 @@ func caskUpdateAction(
|
|||||||
GithubToken: cOpts.GithubToken,
|
GithubToken: cOpts.GithubToken,
|
||||||
Ref: c.String("ref"),
|
Ref: c.String("ref"),
|
||||||
OutputDir: c.String("output"),
|
OutputDir: c.String("output"),
|
||||||
|
Force: c.Bool("force"),
|
||||||
TemplatesDir: c.String("templates-dir"),
|
TemplatesDir: c.String("templates-dir"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user