diff --git a/.github/workflows/emacs.yml b/.github/workflows/emacs.yml index 1c2a6bb..7883452 100644 --- a/.github/workflows/emacs.yml +++ b/.github/workflows/emacs.yml @@ -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 @@ -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 }} \ No newline at end of file diff --git a/Casks/emacs-mac-spacemacs-icon.rb b/Casks/emacs-mac-spacemacs-icon.rb index 22ca917..d0f2334 100644 --- a/Casks/emacs-mac-spacemacs-icon.rb +++ b/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' diff --git a/Casks/emacs-mac.rb b/Casks/emacs-mac.rb index 006fbab..d1363b3 100644 --- a/Casks/emacs-mac.rb +++ b/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' diff --git a/build-scripts/fetch-emacs-mac-port.sh b/build-scripts/fetch-emacs-mac-port.sh index 26b5b29..e4a57f0 100755 --- a/build-scripts/fetch-emacs-mac-port.sh +++ b/build-scripts/fetch-emacs-mac-port.sh @@ -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 @@ -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 diff --git a/build-scripts/prepare_homebrew.sh b/build-scripts/prepare_homebrew.sh index c8daf44..d83d03a 100755 --- a/build-scripts/prepare_homebrew.sh +++ b/build-scripts/prepare_homebrew.sh @@ -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 diff --git a/patches/bundle-signature-hack-9.0.diff b/patches/bundle-signature-hack-9.0.diff new file mode 100644 index 0000000..77588c8 --- /dev/null +++ b/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