Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emacs/emacs-common-gentoo/
Date: Tue, 25 Jun 2019 07:46:41
Message-Id: 1561448087.70cf69320ed242a312348dfb1fddc3c8d0542b12.ulm@gentoo
1 commit: 70cf69320ed242a312348dfb1fddc3c8d0542b12
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 25 07:34:47 2019 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 25 07:34:47 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70cf6932
7
8 app-emacs/emacs-common-gentoo: Depend on acct-group/gamestat.
9
10 Package-Manager: Portage-2.3.67, Repoman-2.3.16
11 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
12
13 .../emacs-common-gentoo-1.6-r2.ebuild | 104 +++++++++++++++++++++
14 1 file changed, 104 insertions(+)
15
16 diff --git a/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.6-r2.ebuild b/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.6-r2.ebuild
17 new file mode 100644
18 index 00000000000..e7d0b643728
19 --- /dev/null
20 +++ b/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.6-r2.ebuild
21 @@ -0,0 +1,104 @@
22 +# Copyright 1999-2019 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=7
26 +
27 +inherit elisp-common desktop xdg-utils gnome2-utils readme.gentoo-r1
28 +
29 +DESCRIPTION="Common files needed by all GNU Emacs versions"
30 +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Emacs"
31 +SRC_URI="https://dev.gentoo.org/~ulm/emacs/${P}.tar.xz"
32 +
33 +LICENSE="GPL-3+"
34 +SLOT="0"
35 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
36 +IUSE="games X"
37 +
38 +RDEPEND="games? ( acct-group/gamestat )"
39 +DEPEND="${RDEPEND}"
40 +PDEPEND="virtual/emacs"
41 +
42 +src_install() {
43 + insinto "${SITELISP}"
44 + doins subdirs.el
45 + newins site-gentoo.el{,.orig}
46 +
47 + keepdir /etc/emacs
48 + insinto /etc/emacs
49 + doins site-start.el
50 +
51 + if use games; then
52 + keepdir /var/games/emacs
53 + fowners 0:gamestat /var/games/emacs
54 + fperms g+w /var/games/emacs
55 + fi
56 +
57 + if use X; then
58 + local i
59 + domenu emacs.desktop emacsclient.desktop || die
60 +
61 + pushd icons || die
62 + newicon sink.png emacs-sink.png
63 + newicon emacs25_48.png emacs.png
64 + for i in 16 24 32 48 128; do
65 + [[ ${i} -le 48 ]] && newicon -s ${i} emacs22_${i}.png emacs22.png
66 + newicon -s ${i} emacs23_${i}.png emacs23.png
67 + newicon -s ${i} emacs25_${i}.png emacs.png
68 + done
69 + doicon -s scalable emacs23.svg
70 + newicon -s scalable emacs25.svg emacs.svg
71 + popd
72 +
73 + gnome2_icon_savelist
74 + fi
75 +
76 + DOC_CONTENTS="All site initialisation for Gentoo-installed packages is
77 + added to ${SITELISP}/site-gentoo.el. In order for this site
78 + initialisation to be loaded for all users automatically, a default
79 + site startup file /etc/emacs/site-start.el is installed. You are
80 + responsible for maintenance of this file.
81 + \n\nAlternatively, individual users can add the following command:
82 + \n\n(require 'site-gentoo)
83 + \n\nto their ~/.emacs initialisation files, or, for greater
84 + flexibility, users may load single package-specific initialisation
85 + files from the ${SITELISP}/site-gentoo.d/ directory."
86 + readme.gentoo_create_doc
87 +}
88 +
89 +pkg_preinst() {
90 + # make sure that site-gentoo.el exists since site-start.el requires it
91 + if [[ ! -f ${ED}${SITELISP}/site-gentoo.el ]]; then #554518
92 + mv "${ED}${SITELISP}"/site-gentoo.el{.orig,} || die
93 + fi
94 + if [[ -d ${EROOT}${SITELISP} ]]; then
95 + elisp-site-regen
96 + cp "${EROOT}${SITELISP}/site-gentoo.el" "${ED}${SITELISP}/" || die
97 + fi
98 +
99 + if use games; then
100 + local f
101 + for f in /var/games/emacs/{snake,tetris}-scores; do
102 + if [[ -e ${EROOT}${f} ]]; then
103 + cp "${EROOT}${f}" "${ED}${f}" || die
104 + fi
105 + touch "${ED}${f}" || die
106 + chgrp gamestat "${ED}${f}" || die
107 + chmod g+w "${ED}${f}" || die
108 + done
109 + fi
110 +}
111 +
112 +pkg_postinst() {
113 + if use X; then
114 + xdg_desktop_database_update
115 + gnome2_icon_cache_update
116 + fi
117 + readme.gentoo_print_elog
118 +}
119 +
120 +pkg_postrm() {
121 + if use X; then
122 + xdg_desktop_database_update
123 + gnome2_icon_cache_update
124 + fi
125 +}