summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9b5e0d587902c86334f5830119f8672e771e8875 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Maintainer: pancho horrillo <pancho at pancho dot name>

# `Starting the Emacs 28 release cycle` announcement on emacs-devel:
# https://lists.gnu.org/archive/html/emacs-devel/2021-09/msg02290.html

pkgname=emacs28-git
pkgver=28.3.151685
pkgrel=1
pkgdesc='The extensible, customizable, self-documenting real-time display editor, emacs-28 release branch'
arch=(x86_64)
url=http://www.gnu.org/software/emacs/
license=(GPL3)
depends=(alsa-lib cairo giflib gnutls gtk3 harfbuzz jansson libjpeg-turbo libgccjit libsystemd libxml2 libxpm)
makedepends=(git xorgproto texlive-core)
provides=(emacs)
conflicts=(emacs emacs-nox emacs-git)
replaces=(emacs emacs-nox emacs-git)
source=($pkgname::git+https://git.savannah.gnu.org/git/emacs.git#branch=emacs-28)
b2sums=(SKIP)

pkgver() {
	cd "$srcdir/$pkgname"
	printf '%s.%s'                                                  \
	    "$(awk -F ', ' '/AC_INIT/ { print $2 }' configure.ac )"     \
	    "$(git rev-list --count HEAD)"
}

prepare() {
	cd "$srcdir/$pkgname"
	[[ -x configure ]] || ./autogen.sh git && ./autogen.sh autoconf
	mkdir -p "$srcdir/$pkgname"/build
}

build() {
	local _confflags=(
	    --prefix=/usr
	    --sysconfdir=/etc
	    --libexecdir=/usr/lib
	    --localstatedir=/var
	    --with-modules
	    --without-libotf
	    --without-m17n-flt
	    --without-gconf
	    --without-gsettings
	    --with-native-compilation
	    --with-x-toolkit=gtk3
	    --without-xaw3d
	    --without-gpm
	    --without-compress-install
	    --program-transform-name='s/^ctags$/ctags.emacs/'
	)
	cd "$srcdir/$pkgname"/build
	../configure "${_confflags[@]}"
	make NATIVE_FULL_AOT=1
	make html
	make pdf
}

_check() {
	cd "$srcdir/$pkgname"/build
	make check
}

package() {
	cd "$srcdir/$pkgname"/build
	make DESTDIR="$pkgdir"/ install{,-html,-pdf}
}