diff options
author | Jack Kamm | 2023-09-24 15:28:32 -0700 |
---|---|---|
committer | Jack Kamm | 2023-09-24 16:20:44 -0700 |
commit | 45154119d91d2f36409d28b2edad2799bf63e321 (patch) | |
tree | fc6f3a82614ec00777c2b05083b79312b872b352 | |
parent | e6ed7eea2fa5eca8619043d1dc8e7df402c87f9d (diff) | |
download | aur-45154119d91d2f36409d28b2edad2799bf63e321.tar.gz |
Adapt nativecomp build toggle from emacs-git
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 71 |
2 files changed, 58 insertions, 15 deletions
@@ -1,7 +1,7 @@ pkgbase = emacs-lucid pkgdesc = The extensible, customizable, self-documenting real-time display editor (Lucid toolkit version) pkgver = 29.1 - pkgrel = 2 + pkgrel = 3 url = http://www.gnu.org/software/emacs/emacs.html arch = x86_64 license = GPL3 @@ -3,12 +3,33 @@ # Contributor: megadriver <megadriver at gmx dot com> # Contributor: Juergen Hoetzel <juergen@archlinux.org> # Contributor: Renchi Raju <renchi@green.tam.uiuc.edu> -# Based on emacs from [extra] and emacs-bzr from the AUR +# Based on emacs from [extra] and emacs-bzr, emacs-git from the AUR +################################################################################ +# Assign "YES" to the variable you want enabled; empty or any other value +# for NO. +# ================================================= +# +################################################################################ +JIT= # Enable native just-in-time compilation with libgccjit available + # in core. + # + # To compile all site-lisp on demand (repos/AUR packages, + # ELPA, MELPA, whatever), add + # (setq native-comp-deferred-compilation t) + # to your .emacs file. + # + # And to keep the eln cache clean add + # (setq native-compile-prune-cache t) + # to delete old versions. + +################################################################################ + +################################################################################ pkgname=emacs-lucid pkgver=29.1 _pkgver_major=${pkgver/.*} -pkgrel=2 +pkgrel=3 pkgdesc="The extensible, customizable, self-documenting real-time display editor (Lucid toolkit version)" arch=('x86_64') url="http://www.gnu.org/software/emacs/emacs.html" @@ -75,22 +96,42 @@ source=(${_source_url_prefix}/emacs-$pkgver.tar.xz ${_source_url_prefix}/emacs-$pkgver.tar.xz.sig) b2sums=('5bec8fd7c63c04b93b2ad87c12c48373930c1b3c6984d139938ad1eb692af76417dc5494057225a04f77ce4797958056aa3522f50e3b0565ef5f060bb15f5402' 'SKIP') +################################################################################ + +################################################################################ +if [[ $JIT == "YES" ]]; then + depends+=( 'libgccjit' ); +fi +################################################################################ + +################################################################################ build() { cd "$srcdir"/emacs-$pkgver - ./configure \ - --sysconfdir=/etc \ - --prefix=/usr \ - --libexecdir=/usr/lib \ - --with-tree-sitter \ - --localstatedir=/var \ - --disable-build-details \ - --with-modules \ - --with-x-toolkit=lucid \ - --without-gconf \ - --without-gsettings \ - --program-transform-name='s/^ctags$/ctags.emacs/' + local _conf=( + --sysconfdir=/etc + --prefix=/usr + --libexecdir=/usr/lib + --with-tree-sitter + --localstatedir=/var + --disable-build-details + --with-modules + --with-x-toolkit=lucid + --without-gconf + --without-gsettings + --program-transform-name='s/^ctags$/ctags.emacs/' + ) + +################################################################################ + + if [[ $JIT == "YES" ]]; then + _conf+=( '--with-native-compilation=aot' ); + fi + +################################################################################ + + ./configure "${_conf[@]}" make } @@ -102,3 +143,5 @@ package() { # fix user/root permissions on usr/share files find "$pkgdir"/usr/share/emacs/$pkgver -exec chown root:root {} \; } + +################################################################################ |