aboutsummaryrefslogtreecommitdiffstats
path: root/community/emacs/APKBUILD
diff options
context:
space:
mode:
authoromni <omni+alpine@hack.org>2021-03-24 01:44:08 +0000
committeromni <omni+alpine@hack.org>2021-03-24 02:22:07 +0000
commit36e4d99d0e9910e16ffed41f9b4a8d6739bd641a (patch)
tree89d1b2ee0e31f29fefee556096e28d526943f12e /community/emacs/APKBUILD
parente54ee3e9e2bd52708e782c3cdd418ac3c3428a02 (diff)
downloadaports-36e4d99d0e9910e16ffed41f9b4a8d6739bd641a.tar.gz
aports-36e4d99d0e9910e16ffed41f9b4a8d6739bd641a.tar.bz2
aports-36e4d99d0e9910e16ffed41f9b4a8d6739bd641a.tar.xz
community/emacs: build emacs-nox for all archs
please linter
Diffstat (limited to 'community/emacs/APKBUILD')
-rw-r--r--community/emacs/APKBUILD58
1 files changed, 39 insertions, 19 deletions
diff --git a/community/emacs/APKBUILD b/community/emacs/APKBUILD
index a8aee90091..13212bd30d 100644
--- a/community/emacs/APKBUILD
+++ b/community/emacs/APKBUILD
@@ -4,20 +4,31 @@ pkgname=emacs
pkgver=27.1
pkgrel=2
pkgdesc="The extensible, customizable, self-documenting real-time display editor"
-# s390x, mips, mips64: librsvg
-arch="all !s390x !mips !mips64"
+arch="all"
depends="emacs-nox"
url="https://www.gnu.org/software/emacs/emacs.html"
license="GPL-3.0-or-later"
-makedepends="autoconf automake linux-headers gawk
- librsvg-dev giflib-dev libxpm-dev gtk+2.0-dev gtk+3.0-dev alsa-lib-dev
- glib-dev fontconfig-dev libpng-dev
- libxml2-dev pango-dev tiff-dev libjpeg-turbo-dev ncurses-dev
- ncurses-libs gnutls-dev libxaw-dev gmp-dev harfbuzz-dev jansson-dev"
-subpackages="$pkgname-doc $pkgname-nox $pkgname-x11 $pkgname-gtk2 $pkgname-gtk3"
+makedepends="autoconf automake linux-headers gawk ncurses-dev
+ ncurses-libs gnutls-dev gmp-dev jansson-dev harfbuzz-dev"
+subpackages="$pkgname-doc $pkgname-nox"
source="https://ftp.gnu.org/gnu/emacs/emacs-$pkgver.tar.xz
no-git-repo.patch"
+case $CARCH in
+ mips64|s390x)
+ # limited by librsvg (rust)
+ _docdir="nox"
+ ;;
+ *)
+ makedepends="$makedepends glib-dev fontconfig-dev libpng-dev
+ librsvg-dev giflib-dev libxpm-dev gtk+2.0-dev gtk+3.0-dev
+ alsa-lib-dev libxml2-dev pango-dev tiff-dev libjpeg-turbo-dev
+ libxaw-dev"
+ subpackages="$subpackages $pkgname-x11 $pkgname-gtk2 $pkgname-gtk3"
+ _docdir="gtk2"
+ ;;
+esac
+
prepare() {
cd "$builddir/$1"
default_prepare
@@ -80,14 +91,23 @@ _build_nox() {
build() {
mkdir -p nox
- mv * nox || true
- cp -a nox gtk2
- cp -a nox gtk3
- cp -a nox x11
- _build_x11
- _build_nox
- _build_gtk2
- _build_gtk3
+ mv ./* nox || true
+
+ case "$CARCH" in
+ mips64|s390x)
+ # limited by librsvg (rust)
+ _build_nox
+ ;;
+ *)
+ cp -a nox x11
+ cp -a nox gtk2
+ cp -a nox gtk3
+ _build_nox
+ _build_x11
+ _build_gtk2
+ _build_gtk3
+ ;;
+ esac
}
package() {
@@ -97,18 +117,18 @@ package() {
doc() {
depends=""
mkdir -p "$subpkgdir"
- cd "$builddir/gtk2"
+ cd "$builddir"/"$_docdir"
make DESTDIR="$subpkgdir" install
# remove conflict with ctags package
mv "$subpkgdir"/usr/share/man/man1/ctags.1.gz "$subpkgdir"/usr/share/man/man1/ctags.emacs.1.gz
# only keep info and man directories, all other is in the specific package
- rm -rf "$subpkgdir"/usr/bin \
+ rm -rf "${subpkgdir:?}"/usr/bin \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/share/appdata \
"$subpkgdir"/usr/share/applications \
"$subpkgdir"/usr/share/emacs \
"$subpkgdir"/usr/share/icons \
- "$subpkgdir"/var \
+ "${subpkgdir:?}"/var \
"$subpkgdir"/usr/lib/systemd
}