summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-08 23:10:21 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-08 23:10:21 +0000
commitce7acc70c9afb381440446a9254395163ae773d7 (patch)
tree525d8716da5fee9d6be92a4d4c188c5732db41c7
parentabefa433c8e2199520e5a763e415e7ed4d60f551 (diff)
downloadpackages-ce7acc70c9afb381440446a9254395163ae773d7.tar.gz
packages-ce7acc70c9afb381440446a9254395163ae773d7.tar.bz2
packages-ce7acc70c9afb381440446a9254395163ae773d7.tar.xz
packages-ce7acc70c9afb381440446a9254395163ae773d7.zip
system/emacs: bump to 26.1
-rw-r--r--system/emacs/APKBUILD140
-rw-r--r--system/emacs/gamedir.patch11
2 files changed, 151 insertions, 0 deletions
diff --git a/system/emacs/APKBUILD b/system/emacs/APKBUILD
new file mode 100644
index 000000000..0092c9070
--- /dev/null
+++ b/system/emacs/APKBUILD
@@ -0,0 +1,140 @@
+# Contributor: Timo Teräs <timo.teras@iki.fi>
+# Maintainer: Horst Burkhardt <horst@adelielinux.org>
+pkgname=emacs
+pkgver=26.1
+pkgrel=0
+pkgdesc="The extensible, customizable, self-documenting real-time display editor"
+arch="all"
+depends="emacs-nox"
+options="!check !dbg"
+url="https://www.gnu.org/software/emacs/emacs.html"
+license="GPL-3.0"
+makedepends="autoconf automake linux-headers paxmark
+ librsvg-dev giflib-dev libxpm-dev gtk+2.0-dev gconf-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"
+subpackages="$pkgname-doc $pkgname-nox $pkgname-x11 $pkgname-gtk2"
+source="ftp://ftp.gnu.org/gnu/emacs/emacs-$pkgver.tar.xz
+ gamedir.patch"
+
+prepare() {
+ cd "$builddir/$1"
+ default_prepare || return 1
+ ./autogen.sh || return 1
+}
+
+builddir="$srcdir/emacs-$pkgver"
+_build_variant() {
+ cd "$builddir/$1"
+ shift
+ CFLAGS=-fno-pie \
+ LDFLAGS=-no-pie \
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var \
+ --without-makeinfo \
+ --with-gameuser=:games \
+ "${@}"
+ make
+}
+
+_build_x11() {
+ _build_variant x11 \
+ --with-x-toolkit=athena \
+ --without-toolkit-scroll-bars \
+ --without-dbus \
+ --with-xft \
+ --with-jpeg=yes \
+ --with-tiff=yes
+}
+
+_build_gtk2() {
+ _build_variant gtk2 \
+ --with-x-toolkit=gtk2 \
+ --with-xft \
+ --with-jpeg=yes \
+ --with-tiff=no
+}
+
+_build_nox() {
+ _build_variant nox \
+ --without-sound \
+ --without-x \
+ --without-file-notification
+}
+
+build() {
+ cd "$builddir"
+ mkdir -p nox
+ mv * nox || true
+ cp -a nox gtk2
+ cp -a nox x11
+ _build_x11
+ _build_nox
+ _build_gtk2
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+doc() {
+ mkdir -p "$subpkgdir"
+ cd "$builddir/gtk2"
+ 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 \
+ "$subpkgdir"/usr/lib \
+ "$subpkgdir"/usr/share/appdata \
+ "$subpkgdir"/usr/share/applications \
+ "$subpkgdir"/usr/share/emacs \
+ "$subpkgdir"/usr/share/icons \
+ "$subpkgdir"/var
+}
+
+_subpackage() {
+ cd "$builddir/$1"
+ make DESTDIR="$subpkgdir" install
+
+ # remove conflict with ctags package
+ mv "$subpkgdir"/usr/bin/ctags "$subpkgdir"/usr/bin/ctags.emacs
+ rm -rf "$subpkgdir"/usr/share/info \
+ "$subpkgdir"/usr/share/man
+
+ # fix user/root permissions on usr/share files
+ find "$subpkgdir"/usr/share/emacs/ -exec chown root:root {} \;
+ find "$subpkgdir"/usr/lib -perm -g+s,g+x ! -type d -exec chmod g-s {} \;
+ # fix perms on /var/games
+ chmod 775 "$subpkgdir"/var/games
+ chmod 775 "$subpkgdir"/var/games/emacs
+ chmod 664 "$subpkgdir"/var/games/emacs/*
+ chown -R root:games "$subpkgdir"/var/games
+}
+
+nox() {
+ pkgdesc="$pkgdesc - without X11"
+ depends="!emacs-x11 !emacs-gtk2"
+ _subpackage nox
+}
+
+x11() {
+ pkgdesc="$pkgdesc - with X11"
+ depends="!emacs-nox !emacs-gtk2 hicolor-icon-theme desktop-file-utils"
+ _subpackage x11
+}
+
+gtk2() {
+ pkgdesc="$pkgdesc - with GTK2"
+ depends="!emacs-nox !emacs-x11 hicolor-icon-theme desktop-file-utils"
+ _subpackage gtk2
+}
+
+sha512sums="537c2cfdd281151b360002419dde6280c313e07a937ed96405c67f754b3401ec5541091a3c0aa6690929bc33dd79e8e0d8844e7a6b014b7798c63cb15de210c2 emacs-26.1.tar.xz
+8898f309aeaf274366849bd5c56c8e2a1be94dfee2f01b20f1700bf26203f49b9600237e5090fc3d8eaad3ea246f803ffd493d0c04cb3512084a4e3bf58f8f5e gamedir.patch"
diff --git a/system/emacs/gamedir.patch b/system/emacs/gamedir.patch
new file mode 100644
index 000000000..c1bcbadd6
--- /dev/null
+++ b/system/emacs/gamedir.patch
@@ -0,0 +1,11 @@
+diff -urw emacs-25.1/lib-src/Makefile.in emacs-25.1-gamedir/lib-src/Makefile.in
+--- emacs-25.1/lib-src/Makefile.in 2016-06-29 09:49:18.000000000 +0000
++++ emacs-25.1-gamedir/lib-src/Makefile.in 2016-10-24 15:37:46.718699816 +0000
+@@ -414,7 +414,6 @@
+
+ update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(NTLIB) $(config_h)
+ $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} \
+- -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \
+ $< $(NTLIB) $(LOADLIBES) -o $@
+
+ emacsclient.res: ../nt/emacsclient.rc $(NTINC)/../icons/emacs.ico