mirror of
https://github.com/jimeh/homebrew-emacs-builds.git
synced 2026-02-19 13:16:38 +00:00
feat(arm64): support arm64 builds
This commit is contained in:
27
templates/_helpers.tpl
Normal file
27
templates/_helpers.tpl
Normal file
@@ -0,0 +1,27 @@
|
||||
{{ define "sources" -}}
|
||||
{{ $arm64SHA := (.SHA256 "macOS-13" "arm64") -}}
|
||||
{{ $arm64URL := (.DownloadURL "macOS-13" "arm64") -}}
|
||||
{{ $x86_64SHA := (.SHA256 "macOS-11" "x86_64") -}}
|
||||
{{ $x86_64URL := (.DownloadURL "macOS-11" "x86_64") -}}
|
||||
{{ if (and (ne $arm64URL "") (ne $x86_64URL "")) }}
|
||||
on_arm do
|
||||
sha256 '{{ $arm64SHA }}'
|
||||
url '{{ $arm64URL }}'
|
||||
depends_on macos: '>= :ventura'
|
||||
end
|
||||
|
||||
on_intel do
|
||||
sha256 '{{ $x86_64SHA }}'
|
||||
url '{{ $x86_64URL }}'
|
||||
depends_on macos: '>= :big_sur' # macOS 11
|
||||
end
|
||||
{{- else if ne $arm64URL "" }}
|
||||
sha256 '{{ $arm64SHA }}'
|
||||
url '{{ $arm64URL }}'
|
||||
depends_on macos: '>= :ventura', arch: :arm64
|
||||
{{- else }}
|
||||
sha256 '{{ $x86_64SHA }}'
|
||||
url '{{ $x86_64URL }}'
|
||||
depends_on macos: '>= :big_sur'
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,15 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
cask 'emacs-app-good' do
|
||||
version '{{ .Version }}'
|
||||
|
||||
sha256 '{{ .SHA256 "macOS-11" "x86_64" }}'
|
||||
url '{{ .DownloadURL "macOS-11" "x86_64" }}'
|
||||
|
||||
name 'Emacs'
|
||||
desc 'GNU Emacs text editor (known good nightly build)'
|
||||
homepage 'https://github.com/jimeh/emacs-builds'
|
||||
|
||||
version '{{ .Version }}'
|
||||
{{ template "sources" . }}
|
||||
|
||||
livecheck do
|
||||
url 'https://github.com/jimeh/emacs-builds/issues/7'
|
||||
strategy :page_match do |page|
|
||||
@@ -21,6 +19,7 @@ cask 'emacs-app-good' do
|
||||
conflicts_with(
|
||||
cask: %w[
|
||||
emacs-app
|
||||
emacs-app-monthly
|
||||
emacs-app-nightly
|
||||
emacs-app-nightly-28
|
||||
emacs-app-nightly-29
|
||||
|
||||
62
templates/emacs-app-monthly.rb.tpl
Normal file
62
templates/emacs-app-monthly.rb.tpl
Normal file
@@ -0,0 +1,62 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
cask 'emacs-app-monthly' do
|
||||
name 'Emacs'
|
||||
desc 'GNU Emacs text editor (monthly build)'
|
||||
homepage 'https://github.com/jimeh/emacs-builds'
|
||||
|
||||
version '{{ .Version }}'
|
||||
{{ template "sources" . }}
|
||||
|
||||
livecheck do
|
||||
url 'https://github.com/jimeh/emacs-builds.git'
|
||||
strategy :git do |tags|
|
||||
tags.map do |tag|
|
||||
m = /^Emacs\.(\d{4}-\d{2}-01\.\w+\.master)$/.match(tag)
|
||||
next unless m
|
||||
|
||||
m[1]
|
||||
end.compact
|
||||
end
|
||||
end
|
||||
|
||||
conflicts_with(
|
||||
cask: %w[
|
||||
emacs-app
|
||||
emacs-app-good
|
||||
emacs-app-nightly-28
|
||||
emacs-app-nightly-29
|
||||
emacs-app-pretest
|
||||
emacs
|
||||
emacs-nightly
|
||||
emacs-pretest
|
||||
emacs-mac
|
||||
emacs-mac-spacemacs-icon
|
||||
],
|
||||
formula: %w[
|
||||
emacs
|
||||
emacs-mac
|
||||
]
|
||||
)
|
||||
|
||||
app 'Emacs.app'
|
||||
binary "#{appdir}/Emacs.app/Contents/MacOS/bin/ebrowse"
|
||||
binary "#{appdir}/Emacs.app/Contents/MacOS/bin/emacs"
|
||||
binary "#{appdir}/Emacs.app/Contents/MacOS/bin/emacsclient"
|
||||
binary "#{appdir}/Emacs.app/Contents/MacOS/bin/etags"
|
||||
binary "#{appdir}/Emacs.app/Contents/Resources/include/emacs-module.h",
|
||||
target: "#{HOMEBREW_PREFIX}/include/emacs-module.h"
|
||||
binary "#{appdir}/Emacs.app/Contents/Resources/site-lisp/subdirs.el",
|
||||
target: "#{HOMEBREW_PREFIX}/share/emacs/site-lisp/subdirs.el"
|
||||
|
||||
manpage "#{appdir}/Emacs.app/Contents/Resources/man/man1/ebrowse.1.gz"
|
||||
manpage "#{appdir}/Emacs.app/Contents/Resources/man/man1/emacs.1.gz"
|
||||
manpage "#{appdir}/Emacs.app/Contents/Resources/man/man1/emacsclient.1.gz"
|
||||
manpage "#{appdir}/Emacs.app/Contents/Resources/man/man1/etags.1.gz"
|
||||
|
||||
zap trash: [
|
||||
'~/Library/Caches/org.gnu.Emacs',
|
||||
'~/Library/Preferences/org.gnu.Emacs.plist',
|
||||
'~/Library/Saved Application State/org.gnu.Emacs.savedState'
|
||||
]
|
||||
end
|
||||
@@ -1,15 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
cask 'emacs-app-nightly-28' do
|
||||
version '{{ .Version }}'
|
||||
|
||||
sha256 '{{ .SHA256 "macOS-11" "x86_64" }}'
|
||||
url '{{ .DownloadURL "macOS-11" "x86_64" }}'
|
||||
|
||||
name 'Emacs'
|
||||
desc 'GNU Emacs text editor (nightly build of emacs-28 branch)'
|
||||
homepage 'https://github.com/jimeh/emacs-builds'
|
||||
|
||||
version '{{ .Version }}'
|
||||
{{ template "sources" . }}
|
||||
|
||||
livecheck do
|
||||
url 'https://github.com/jimeh/emacs-builds.git'
|
||||
strategy :git do |tags|
|
||||
@@ -26,6 +24,7 @@ cask 'emacs-app-nightly-28' do
|
||||
cask: %w[
|
||||
emacs-app
|
||||
emacs-app-good
|
||||
emacs-app-monthly
|
||||
emacs-app-nightly
|
||||
emacs-app-nightly-29
|
||||
emacs-app-pretest
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
cask 'emacs-app-nightly-29' do
|
||||
version '{{ .Version }}'
|
||||
|
||||
sha256 '{{ .SHA256 "macOS-11" "x86_64" }}'
|
||||
url '{{ .DownloadURL "macOS-11" "x86_64" }}'
|
||||
|
||||
name 'Emacs'
|
||||
desc 'GNU Emacs text editor (nightly build of emacs-29 branch)'
|
||||
homepage 'https://github.com/jimeh/emacs-builds'
|
||||
|
||||
version '{{ .Version }}'
|
||||
{{ template "sources" . }}
|
||||
|
||||
livecheck do
|
||||
url 'https://github.com/jimeh/emacs-builds.git'
|
||||
strategy :git do |tags|
|
||||
@@ -26,6 +24,7 @@ cask 'emacs-app-nightly-29' do
|
||||
cask: %w[
|
||||
emacs-app
|
||||
emacs-app-good
|
||||
emacs-app-monthly
|
||||
emacs-app-nightly
|
||||
emacs-app-nightly-28
|
||||
emacs-app-pretest
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
cask 'emacs-app-nightly' do
|
||||
version '{{ .Version }}'
|
||||
|
||||
sha256 '{{ .SHA256 "macOS-11" "x86_64" }}'
|
||||
url '{{ .DownloadURL "macOS-11" "x86_64" }}'
|
||||
|
||||
name 'Emacs'
|
||||
desc 'GNU Emacs text editor (nightly build)'
|
||||
homepage 'https://github.com/jimeh/emacs-builds'
|
||||
|
||||
version '{{ .Version }}'
|
||||
{{ template sources . }}
|
||||
|
||||
livecheck do
|
||||
url 'https://github.com/jimeh/emacs-builds.git'
|
||||
strategy :git do |tags|
|
||||
@@ -26,6 +24,7 @@ cask 'emacs-app-nightly' do
|
||||
cask: %w[
|
||||
emacs-app
|
||||
emacs-app-good
|
||||
emacs-app-monthly
|
||||
emacs-app-nightly-28
|
||||
emacs-app-nightly-29
|
||||
emacs-app-pretest
|
||||
@@ -41,8 +40,6 @@ cask 'emacs-app-nightly' do
|
||||
]
|
||||
)
|
||||
|
||||
depends_on macos: '>= :big_sur'
|
||||
|
||||
app 'Emacs.app'
|
||||
binary "#{appdir}/Emacs.app/Contents/MacOS/bin/ebrowse"
|
||||
binary "#{appdir}/Emacs.app/Contents/MacOS/bin/emacs"
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
cask 'emacs-app-pretest' do
|
||||
version '{{ .Version }}'
|
||||
|
||||
sha256 '{{ .SHA256 "macOS-11" "x86_64" }}'
|
||||
url '{{ .DownloadURL "macOS-11" "x86_64" }}'
|
||||
|
||||
name 'Emacs'
|
||||
desc 'GNU Emacs text editor (latest pretest)'
|
||||
homepage 'https://github.com/jimeh/emacs-builds'
|
||||
|
||||
version '{{ .Version }}'
|
||||
{{ template "sources" . }}
|
||||
|
||||
livecheck do
|
||||
url 'https://github.com/jimeh/emacs-builds.git'
|
||||
strategy :git do |tags|
|
||||
@@ -26,6 +24,7 @@ cask 'emacs-app-pretest' do
|
||||
cask: %w[
|
||||
emacs-app
|
||||
emacs-app-good
|
||||
emacs-app-monthly
|
||||
emacs-app-nightly
|
||||
emacs-app-nightly-28
|
||||
emacs-app-nightly-29
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
cask 'emacs-app' do
|
||||
version '{{ .Version }}'
|
||||
|
||||
sha256 '{{ .SHA256 "macOS-10-15" "x86_64" }}'
|
||||
url '{{ .DownloadURL "macOS-10-15" "x86_64" }}'
|
||||
|
||||
name 'Emacs'
|
||||
desc 'GNU Emacs text editor'
|
||||
homepage 'https://github.com/jimeh/emacs-builds'
|
||||
|
||||
version '{{ .Version }}'
|
||||
{{ template "sources" . }}
|
||||
|
||||
livecheck do
|
||||
url 'https://github.com/jimeh/emacs-builds.git'
|
||||
strategy :git do |tags|
|
||||
@@ -25,6 +23,7 @@ cask 'emacs-app' do
|
||||
conflicts_with(
|
||||
cask: %w[
|
||||
emacs-app-good
|
||||
emacs-app-monthly
|
||||
emacs-app-nightly
|
||||
emacs-app-nightly-28
|
||||
emacs-app-nightly-29
|
||||
|
||||
Reference in New Issue
Block a user