Skip to content

Commit

Permalink
28.1-mac-9.0 binary side (#290)
Browse files Browse the repository at this point in the history
* bump version and cleanup for build scripts

* fix on bundle structure for signing

* add 28.1-mac-9.0 cask
  • Loading branch information
railwaycat committed Apr 9, 2022
1 parent 89fc33a commit 92765cb
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 54 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/emacs.yml
Expand Up @@ -21,10 +21,10 @@ jobs:
- name: build and pack
run: |
pushd build-scripts
./fetch-emacs-mac-port.sh "27.2-mac-8.3"
./build-emacs.sh emacs-source "27.2"
./fetch-emacs-mac-port.sh "28.1-mac-9.0"
./build-emacs.sh emacs-source "28.1"
pushd emacs-source; ../copylib.rb $(brew --prefix); popd
./make-zipball.sh emacs-source/tmproot "27.2-mac-8.3"
./make-zipball.sh emacs-source/tmproot "28.1-mac-9.0"
ls -d $PWD/emacs-source/tmproot/*.zip
popd
Expand All @@ -34,7 +34,7 @@ jobs:
name: ${{ matrix.os }}-${{ env.REL_DATE }}
draft: true
files: |
build-scripts/emacs-source/tmproot/emacs-27.2-mac-8.3-${{ env.OS_VER }}.zip
build-scripts/emacs-source/tmproot/emacs-27.2-mac-8.3-${{ env.OS_VER }}-spacemacs-icon.zip
build-scripts/emacs-source/tmproot/emacs-28.1-mac-9.0-${{ env.OS_VER }}.zip
build-scripts/emacs-source/tmproot/emacs-28.1-mac-9.0-${{ env.OS_VER }}-spacemacs-icon.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 15 additions & 13 deletions Casks/emacs-mac-spacemacs-icon.rb
@@ -1,25 +1,27 @@
cask 'emacs-mac-spacemacs-icon' do
version 'emacs-27.2-mac-8.3.1'
version 'emacs-28.1-mac-9.0'

if Hardware::CPU.intel?
if MacOS.version <= :high_sierra
odie "Because of the limitation of build system, there is no cask support for High Sierra(10.13) and earlier, please build from Homebrew formula."
elsif MacOS.version <= :mojave
sha256 '30fb8ad8114fc61942ea7c1222029c9a81484ca8e9d134ea8623e772e03ed350'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-27.2-mac-8.3/emacs-27.2-mac-8.3-10.14.6-spacemacs-icon.zip'
if MacOS.version <= :mojave
odie "Because of the limitation of build system, there is no cask support for mojave(10.14) and earlier, please build from Homebrew formula."
elsif MacOS.version <= :catalina
sha256 '8eb1c1eb7a740322edacd4197ed1cff9264c1527a09ea30250409128d32a33e2'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-27.2-mac-8.3/emacs-27.2-mac-8.3-10.15.7-spacemacs-icon.zip'
sha256 '832e1b9384730cc5ff2ce018a979aec82699a7a13c9bd18f84649a39644d50ac'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-28.1-mac-9.0/emacs-28.1-mac-9.0-10.15.7-spacemacs-icon.zip'
else
# for macOS version is or newer than Big Sur
# elsif MacOS.version <= :big_sur # reserved for later
sha256 '5ba1e2e8c230f1d98c9f855bc055593b62d54f4b84d49814f313ce28fddfe08d'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-27.2-mac-8.3/emacs-27.2-mac-8.3-11.6.1-spacemacs-icon.zip'
sha256 '2f412038d391ed663d3731c792ca586ae439d3442ed71f5a2719c3d635c1cbc2'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-28.1-mac-9.0/emacs-28.1-mac-9.0-11.6.5-spacemacs-icon.zip'
end
else
# Arm Macs should be running macOS >= Big Sur(11), let's add the version check in the future when necessary.
sha256 'bcacdeb6abdba2789f2b3d921185578b56203e95619cbb4b1a396c0ccadcd727'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-27.2-mac-8.3.1/emacs-27.2-mac-8.3.1-arm64-11.6.1-spacemacs-icon.zip'
if MacOS.version <= :big_sur
sha256 '00811da1b69f7edef017c3c28db8decf3e19ed4039829aa6239aeaefbb0ee106'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-28.1-mac-9.0/emacs-28.1-mac-9.0-arm64-11.6.5-spacemacs-icon.zip'
else
# for macOS version is or newer than Big Sur
# elsif MacOS.version <= :monterey # reserved for later
sha256 '89e28630ceb651824cb4df5a661e1c015fe511a0569ba1006f8af5868c9577a6'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-28.1-mac-9.0/emacs-28.1-mac-9.0-arm64-12.3.1-spacemacs-icon.zip'
end

appcast 'https://github.com/railwaycat/homebrew-emacsmacport/releases.atom'
Expand Down
28 changes: 15 additions & 13 deletions Casks/emacs-mac.rb
@@ -1,25 +1,27 @@
cask 'emacs-mac' do
version 'emacs-27.2-mac-8.3.1'
version 'emacs-28.1-mac-9.0'

if Hardware::CPU.intel?
if MacOS.version <= :high_sierra
odie "Because of the limitation of build system, there is no cask support for High Sierra(10.13) and earlier, please build from Homebrew formula."
elsif MacOS.version <= :mojave
sha256 '6cca77eab9d1f2e2533eda8ba139e3581dca3af6c24c906912c8f8aefb939d87'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-27.2-mac-8.3/emacs-27.2-mac-8.3-10.14.6.zip'
if MacOS.version <= :mojave
odie "Because of the limitation of build system, there is no cask support for Mojave(10.14) and earlier, please build from Homebrew formula."
elsif MacOS.version <= :catalina
sha256 'ec393d8d69ae80dec8500312c0eb5dccfe6c0b1e08d4dc4b0094b98b2568b275'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-27.2-mac-8.3/emacs-27.2-mac-8.3-10.15.7.zip'
sha256 'ae8cc8649d038c6ce8d27e92631a19c8f168c1b6d78c15837577468a7681395a'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-28.1-mac-9.0/emacs-28.1-mac-9.0-10.15.7.zip'
else
# for macOS version is or newer than Big Sur
# elsif MacOS.version <= :big_sur # reserved for later
sha256 'be3d78cfb715ee8ca811374cf65838e0e59d0840477d2d304889dabb7206cbd0'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-27.2-mac-8.3/emacs-27.2-mac-8.3-11.6.1.zip'
sha256 'a3763e2b039fb8535e02a73a56a197ff5993c16fab8c75e3ff41ebea23e41073'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-28.1-mac-9.0/emacs-28.1-mac-9.0-11.6.5.zip'
end
else
# Arm Macs should be running macOS >= Big Sur(11), let's add the version check in the future when necessary.
sha256 'bf8f32cfb0bdd5e6ef9c5816fd123f151631f916c9c4a1025f8af7569bc70147'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-27.2-mac-8.3.1/emacs-27.2-mac-8.3.1-arm64-11.6.1.zip'
if MacOS.version <= :big_sur
sha256 '7250d73194b82ea185041913b999304980c39218d14f4f98b056beed9ef4fdcf'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-28.1-mac-9.0/emacs-28.1-mac-9.0-arm64-11.6.5.zip'
else
# for macOS version is or newer than Big Sur
# elsif MacOS.version <= :monterey # reserved for later
sha256 'c6fb1575bd27adabbf85234bc223ff98300391ea23dab73da4a240947416d72b'
url 'https://github.com/railwaycat/homebrew-emacsmacport/releases/download/emacs-28.1-mac-9.0/emacs-28.1-mac-9.0-arm64-12.3.1.zip'
end

appcast 'https://github.com/railwaycat/homebrew-emacsmacport/releases.atom'
Expand Down
16 changes: 9 additions & 7 deletions build-scripts/fetch-emacs-mac-port.sh
Expand Up @@ -2,6 +2,7 @@

set -e

echo "fetch tarball"
if [ "$1" = "head" ]; then
git clone --depth=1 --branch=work https://bitbucket.org/mituharu/emacs-mac.git emacs-source
else
Expand All @@ -10,13 +11,14 @@ else
tar xf emacs-$1.tar.gz -C ./emacs-source --strip-components=1
fi

# apply patch: emacs-mac-title-bar-7.4.patch
patch -d emacs-source -p1 < ../patches/emacs-mac-title-bar-7.4.patch
echo "apply patch: --with-natural-title-bar"
patch -d emacs-source -p1 < ../patches/emacs-mac-title-bar-9.0.patch

# apply patch: multi-tty-27.diff
echo "apply patch: multi-tty-27"
patch -d emacs-source -p1 < ../patches/multi-tty-27.diff

# Emacs 27 will need this patch for mac builds, later version should be fixed
if [ "$(uname -p)" = "arm" ]; then
patch -d emacs-source -p1 < ../patches/mac-arm-fix.diff
fi
echo "apply patch: bundle structure signature hack"
# this is a hack to let pdump be installed under Contents/MacOS and libexec
# under Contents/MacOS/libexec. To avoid an error on bundle structure when
# signing.
patch -d emacs-source -p1 < ../patches/bundle-signature-hack-9.0.diff
21 changes: 5 additions & 16 deletions build-scripts/prepare_homebrew.sh
Expand Up @@ -6,22 +6,11 @@ export HOMEBREW_NO_AUTO_UPDATE=1

OS_VER=$(sw_vers -productVersion)

if [ $OS_VER != "10.13.6" ]; then
# for version newer than 10.13, we can afford the upgrade time for homebrew
# packages. Build with the latest version/.
brew update
# remove all installed formula and reinstall from Brewfile, prevent waste time
# on upgrade all
# brew remove --force $(brew list --formula)
brew bundle --file $(pwd)/build-scripts/Brewfile
else
# for 10.13, homebrew upgrade package takes a ridiculous time way more than
# the time limitation of CI, we have to skip it and use the shipping version
# of CI VM.
# brew bundle will fail on 10.13
brew install texinfo
brew install jansson
fi
brew update
# remove all installed formula and reinstall from Brewfile, prevent waste time
# on upgrade all
# brew remove --force $(brew list --formula)
brew bundle --file $(pwd)/build-scripts/Brewfile

# output the version of gnutls
brew info gnutls
33 changes: 33 additions & 0 deletions patches/bundle-signature-hack-9.0.diff
@@ -0,0 +1,33 @@
diff --git a/configure.ac b/configure.ac
index efb0bee993..93634efbe7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1911,7 +1911,7 @@ if test "${with_mac}" != no; then
fi

mac_appbindir=${mac_appdir}/Emacs.app/Contents/MacOS
- mac_applibexecdir=${mac_appdir}/Emacs.app/Contents/MacOS/libexec/${configuration}
+ mac_applibexecdir=${mac_appdir}/Emacs.app/Contents/MacOS/libexec
mac_applibdir=${mac_appdir}/Emacs.app/Contents/Frameworks
mac_appresdir=${mac_appdir}/Emacs.app/Contents/Resources

diff --git a/mac/Makefile.in b/mac/Makefile.in
index e1663c1a8f..b4dd9c5090 100644
--- a/mac/Makefile.in
+++ b/mac/Makefile.in
@@ -32,11 +32,11 @@ configuration=@configuration@
mac_self_contained=@mac_self_contained@

ifeq ($(DUMPING),pdumper)
-ifeq (${mac_self_contained},no)
+# ifeq (${mac_self_contained},no)
bundle_pdmp := Emacs.app/Contents/MacOS/Emacs.pdmp
-else
-bundle_pdmp := Emacs.app/Contents/MacOS/libexec/${configuration}/Emacs.pdmp
-endif
+# else
+# bundle_pdmp := Emacs.app/Contents/MacOS/libexec/${configuration}/Emacs.pdmp
+# endif
else
bundle_pdmp :=
endif

0 comments on commit 92765cb

Please sign in to comment.