From 2f7295d7b290ae875fe56cbc72253c2684ab0ce8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mat=C3=ADas=20Fonzo?= Date: Mon, 30 Mar 2020 20:39:32 -0300 Subject: [PATCH] recipes: x-apps/emacs: Added version 26.3. Thanks to nuclearkev! MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Matías Fonzo --- recipes/05-x-apps.order | 1 + recipes/x-apps/emacs/post-install | 7 ++++ recipes/{tools => x-apps}/emacs/recipe | 63 +++++++++++++++++++++++++--------- sources/SOURCELIST.txt | 1 + sources/emacs-26.3.tar.gz.sha256 | 1 + 5 files changed, 57 insertions(+), 16 deletions(-) create mode 100644 recipes/x-apps/emacs/post-install rename recipes/{tools => x-apps}/emacs/recipe (55%) create mode 100644 sources/emacs-26.3.tar.gz.sha256 diff --git a/recipes/05-x-apps.order b/recipes/05-x-apps.order index 0244f4ed..e284010e 100644 --- a/recipes/05-x-apps.order +++ b/recipes/05-x-apps.order @@ -31,3 +31,4 @@ x-apps/claws-mail: gnupg/gpgme libs/libetpan x-apps/tint2: x-apps/connman-gtk: networking/connman x-apps/spacefm: +x-apps/emacs: diff --git a/recipes/x-apps/emacs/post-install b/recipes/x-apps/emacs/post-install new file mode 100644 index 00000000..d0c23236 --- /dev/null +++ b/recipes/x-apps/emacs/post-install @@ -0,0 +1,7 @@ + +echo "Updating desktop database: update-desktop-database -q usr/share/applications" +update-desktop-database -q usr/share/applications + +echo "Updating ICON cache: gtk-update-icon-cache -q -f -i usr/share/icons/hicolor" +gtk-update-icon-cache -q -f -i usr/share/icons/hicolor + diff --git a/recipes/tools/emacs/recipe b/recipes/x-apps/emacs/recipe similarity index 55% rename from recipes/tools/emacs/recipe rename to recipes/x-apps/emacs/recipe index 64ca09e4..f380ffdb 100644 --- a/recipes/tools/emacs/recipe +++ b/recipes/x-apps/emacs/recipe @@ -1,6 +1,7 @@ # Build recipe for emacs. # -# Copyright (C) 2020 Kevin "The Nuclear" Bloom, +# Copyright (C) 2020 Kevin "The Nuclear" Bloom, . +# Copyright (c) 2020 Matias Fonzo, . # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,22 +14,22 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# -# Based on recipes written by Mateus P. Rodrigues, -# and Matias Fonzo, . program=emacs version=26.3 release=1 -tarname=${program}-${version}.tar.xz +# Set 'outdir' for a nice and well-organized output directory +outdir="${outdir}/${arch}/x-apps" + +tarname=${program}-${version}.tar.gz # srcdir=${program}-${version} # Not needed in major releases # Remote source(s) fetch=http://ftp.gnu.org/gnu/emacs/$tarname description=" -emacs - The Emacs text editor. +The Emacs text editor. GNU Emacs is an extensible, customizable text editor and more. At its core is an interpreter for Emacs Lisp, a dialect of the @@ -51,32 +52,62 @@ build() cd "$srcdir" + # Set sane permissions + chmod -R u+w,go-w,a+rX-s . + ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \ $configure_args \ --libdir=/usr/lib${libSuffix} \ --infodir=$infodir \ --mandir=$mandir \ --docdir=$docdir \ + --program-prefix= \ + --program-suffix= \ + --with-modules \ --with-x \ + --with-x-toolkit=gtk3 \ + --without-libsystemd \ + --without-gconf \ + --without-gsettings \ + --without-compress-install \ --build="$(cc -dumpmachine)" make -j${jobs} V=1 - make -j${jobs} DESTDIR="$destdir" install + make -j${jobs} DESTDIR="$destdir" install-strip + + # A world without systemd is a healthy world... + rm -rf "${destdir}/usr/lib${libSuffix}/systemd" + rmdir "${destdir}/usr/lib${libSuffix}" 2> /dev/null || true + + # Re-create directory for games + mkdir -p "${destdir}/var/games/emacs" + chown :games "${destdir}/var/games/emacs" - # Delete index file for the package if test -d "${destdir}/$infodir" then + # Delete index file for the package rm -f "${destdir}/${infodir}/dir" + + # Compress info documents + lzip -9 "${destdir}/${infodir}"/* || true + fi + + # Compress and link man pages (if needed) + if test -d "${destdir}/$mandir" + then + ( + cd "${destdir}/$mandir" + find . -type f -exec lzip -9 '{}' + + find . -type l | while read -r file + do + ln -sf "$(readlink -- "$file").lz" "${file}.lz" + rm -- "$file" + done + ) fi # Copy documentation mkdir -p "${destdir}${docsdir}" - - for file in $docs - do - if test -e $file - then - cp -p $file "${destdir}${docsdir}" - fi - done + cp -p $docs "${destdir}${docsdir}" } + diff --git a/sources/SOURCELIST.txt b/sources/SOURCELIST.txt index f2b42994..4d410071 100644 --- a/sources/SOURCELIST.txt +++ b/sources/SOURCELIST.txt @@ -548,3 +548,4 @@ http://deb.debian.org/debian/pool/main/p/pmount/pmount_0.9.23.orig.tar.bz2 http://dbus.freedesktop.org/releases/dbus-python/dbus-python-1.2.16.tar.gz http://www.lua.org/ftp/lua-5.3.5.tar.gz http://luarocks.github.io/luarocks/releases/luarocks-3.3.1.tar.gz +http://ftp.gnu.org/gnu/emacs/emacs-26.3.tar.gz diff --git a/sources/emacs-26.3.tar.gz.sha256 b/sources/emacs-26.3.tar.gz.sha256 new file mode 100644 index 00000000..041d624e --- /dev/null +++ b/sources/emacs-26.3.tar.gz.sha256 @@ -0,0 +1 @@ +09c747e048137c99ed35747b012910b704e0974dde4db6696fde7054ce387591 emacs-26.3.tar.gz -- 2.11.4.GIT