188 lines
4.7 KiB
Bash
188 lines
4.7 KiB
Bash
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
|
# Maintainer: Juergen Hoetzel <juergen@archlinux.org>
|
|
# Maintainer: Frederik Schwan <freswa at archlinux dot org>
|
|
# Contributor: Jaroslav Lichtblau <svetlemodry@archlinux.org>
|
|
# Contributor: Renchi Raju <renchi@green.tam.uiuc.edu>
|
|
|
|
pkgbase=emacs
|
|
pkgname=(emacs emacs-nativecomp emacs-nox emacs-wayland)
|
|
pkgver=29.4
|
|
pkgrel=3.1
|
|
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
|
|
url='https://www.gnu.org/software/emacs/emacs.html'
|
|
license=('GPL3')
|
|
depends=(
|
|
gmp
|
|
gnutls
|
|
jansson
|
|
lcms2
|
|
libacl.so
|
|
libasound.so
|
|
libdbus-1.so
|
|
libfontconfig.so
|
|
libfreetype.so
|
|
libgdk-3.so
|
|
libgdk_pixbuf-2.0.so
|
|
libgif.so
|
|
libgio-2.0.so
|
|
libglib-2.0.so
|
|
libgobject-2.0.so
|
|
libgpm.so
|
|
libgtk-3.so
|
|
libharfbuzz.so
|
|
libice
|
|
libjpeg.so
|
|
libncursesw.so
|
|
libotf
|
|
libpango-1.0.so
|
|
libpng
|
|
librsvg-2.so
|
|
libsm
|
|
sqlite libsqlite3.so
|
|
libsystemd.so
|
|
libtiff.so
|
|
libtree-sitter.so
|
|
libwebp.so
|
|
libwebpdemux.so
|
|
libxfixes
|
|
libxml2.so
|
|
m17n-lib
|
|
zlib
|
|
)
|
|
makedepends=(libgccjit)
|
|
source=(https://ftp.gnu.org/gnu/emacs/${pkgname}-${pkgver}.tar.xz{,.sig})
|
|
b2sums=('825fd2665b6427dbc3cb618b40df2f71fa6b08883bdd07be6d8acf0039df2aeebd294e679e98f4c64a9dd9bdad93589fc7c176cf3860d4fb823fce23f7f2b3cd'
|
|
'SKIP')
|
|
validpgpkeys=('17E90D521672C04631B1183EE78DAE0F3115E06B' # Eli Zaretskii <eliz@gnu.org>
|
|
'CEA1DE21AB108493CC9C65742E82323B8F4353EE') # Stefan Kangas <stefankangas@gmail.com>
|
|
|
|
case "${CARCH}" in
|
|
powerpc) options=(!lto) ;;
|
|
esac
|
|
|
|
prepare() {
|
|
cp --reflink=auto -ar ${pkgname}-${pkgver} ${pkgbase}-${pkgver}-nativecomp
|
|
cp --reflink=auto -ar ${pkgname}-${pkgver} ${pkgbase}-${pkgver}-nox
|
|
cp --reflink=auto -ar ${pkgname}-${pkgver} ${pkgbase}-${pkgver}-wayland
|
|
}
|
|
|
|
build() {
|
|
local _confflags="--sysconfdir=/etc \
|
|
--prefix=/usr \
|
|
--libexecdir=/usr/lib \
|
|
--with-tree-sitter \
|
|
--localstatedir=/var \
|
|
--with-cairo \
|
|
--disable-build-details \
|
|
--with-harfbuzz \
|
|
--with-libsystemd \
|
|
--with-modules"
|
|
|
|
export ac_cv_lib_gif_EGifPutExtensionLast=yes
|
|
|
|
cd ${pkgname}-${pkgver}
|
|
./configure $_confflags \
|
|
--with-x-toolkit=gtk3
|
|
make
|
|
|
|
cd ../${pkgbase}-${pkgver}-nativecomp
|
|
./configure \
|
|
--with-x-toolkit=gtk3 \
|
|
--with-native-compilation=aot \
|
|
$_confflags
|
|
make bootstrap
|
|
|
|
cd ../${pkgbase}-${pkgver}-nox
|
|
./configure \
|
|
--without-x \
|
|
--without-sound \
|
|
$_confflags
|
|
make
|
|
|
|
cd ../${pkgbase}-${pkgver}-wayland
|
|
./configure \
|
|
--with-pgtk \
|
|
--with-native-compilation=aot \
|
|
$_confflags
|
|
make bootstrap
|
|
}
|
|
|
|
package_emacs() {
|
|
pkgdesc='The extensible, customizable, self-documenting real-time display editor'
|
|
|
|
cd ${pkgname}-${pkgver}
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
# 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 {} \;
|
|
}
|
|
|
|
package_emacs-nativecomp() {
|
|
pkgdesc='The extensible, customizable, self-documenting real-time display editor with native compilation enabled'
|
|
depends+=(libgccjit)
|
|
provides=(emacs)
|
|
conflicts=(emacs)
|
|
|
|
cd ${pkgbase}-${pkgver}-nativecomp
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
# 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 {} \;
|
|
}
|
|
|
|
package_emacs-nox() {
|
|
pkgdesc='The extensible, customizable, self-documenting real-time display editor without X11 support'
|
|
depends=(
|
|
gmp
|
|
gnutls
|
|
hicolor-icon-theme
|
|
jansson
|
|
lcms2
|
|
libacl.so
|
|
libdbus-1.so
|
|
libgpm.so
|
|
libncursesw.so
|
|
libsystemd.so
|
|
libtree-sitter.so
|
|
libxml2.so
|
|
zlib
|
|
)
|
|
provides=(emacs)
|
|
conflicts=(emacs)
|
|
|
|
cd ${pkgbase}-${pkgver}-nox
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
# 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 {} \;
|
|
}
|
|
|
|
package_emacs-wayland() {
|
|
pkgdesc='The extensible, customizable, self-documenting real-time display editor with native compilation and PGTK enabled'
|
|
depends+=(libgccjit)
|
|
provides=(emacs)
|
|
conflicts=(emacs)
|
|
|
|
cd ${pkgbase}-${pkgver}-wayland
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
# 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 {} \;
|
|
}
|