summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6aa154fb69e4bea64f1bd3400bc560c24edbba2b (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
68
69
70
71
# Contributor: Sainnhe Park <sainnhe@gmail.com>
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=emacs-ng
pkgver=30.0.50
_fix_commit=0e134f2
pkgrel=11
pkgdesc="A new approach to Emacs - Including TypeScript, Threading, Async I/O, and WebRender"
arch=('x86_64')
url="https://emacs-ng.github.io/emacs-ng"
license=('GPL3')
provides=('emacs')
conflicts=('emacs')
depends=('jansson' 'ncurses' 'libgccjit' 'librsvg' 'libxcb' 'libxml2' 'gpm'
	 'dune' 'dbus' 'lcms2' 'hicolor-icon-theme' 'desktop-file-utils'
	 'alsa-lib' 'gnutls' 'zlib' 'tree-sitter' 'mailutils' 'sqlite'
	 'gtk3' 'libsm' 'xcb-util' 'libxcb' 'libwebp')
makedepends=('cargo' 'rustup' 'git' 'python' 'texlive-core')
source=("$pkgname-$pkgver_${_fix_commit}.tar.gz::https://github.com/emacs-ng/emacs-ng/archive/refs/tags/v0.0.${_fix_commit}.tar.gz")
sha256sums=('7b02d9a71ad2dd0288c7ef0deda62c5a68697c92486ba2ea3c8d8e4e1e78c006')

prepare() {
  cd ${pkgname}-0.0.${_fix_commit}
  rustup install "$(cat rust-toolchain)"
}

build() {
  cd ${pkgname}-0.0.${_fix_commit}
  RUSTUP_TOOLCHAIN=$(cat rust-toolchain)
  ./autogen.sh
  ./configure CFLAGS="-Wl,-rpath,shared -Wl,--disable-new-dtags" \
              --prefix=/usr \
	      --sysconfdir=/etc \
	      --libexecdir=/usr/lib \
	      --localstatedir=/var \
              --with-json \
	      --with-modules \
	      --with-compress-install \
	      --with-threads \
	      --with-included-regex \
	      --with-zlib \
	      --with-libsystemd \
	      --with-rsvg \
	      --without-imagemagick \
	      --with-gpm \
	      --without-xaw3d \
	      --with-dbus \
	      --without-pop \
	      --with-mailutils \
	      --with-gsettings \
	      --with-webrender \
	      --with-pgtk \
	      --disable-build-details 
        
  make V=1 PATH="$HOME/.rustup/toolchains/${RUSTUP_TOOLCHAIN}-$(uname -m)-unknown-linux-gnu/bin:$PATH" bootstrap
  make pdf
}

package() {
  cd ${pkgname}-0.0.${_fix_commit}
  make DESTDIR="$pkgdir" install
  make DESTDIR="$pkgdir" install-pdf
  
  # remove conflict with ctags package
  
  mv "$pkgdir"/usr/bin/{ctags,ctags.emacs}
  mv "$pkgdir"/usr/share/man/man1/{ctags.1.gz,ctags.emacs.1}
  
  # fix user/root permissions on usr/share files
  find "$pkgdir"/usr/share/emacs/$pkgver -exec chown root:root {} \;
}