From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1112564-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 050B7138334
	for <garchives@archives.gentoo.org>; Sun, 22 Sep 2019 16:16:31 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id DA651E08CD;
	Sun, 22 Sep 2019 16:16:29 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id C2508E08CD
	for <gentoo-commits@lists.gentoo.org>; Sun, 22 Sep 2019 16:16:29 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 74B7134B491
	for <gentoo-commits@lists.gentoo.org>; Sun, 22 Sep 2019 16:16:28 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 606E77F7
	for <gentoo-commits@lists.gentoo.org>; Sun, 22 Sep 2019 16:16:26 +0000 (UTC)
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" <ulm@gentoo.org>
Message-ID: <1569168975.4340eb85c2d4859037b858bb58e2f77d7f79d9f7.ulm@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/emacs/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-editors/emacs/emacs-26.3-r1.ebuild app-editors/emacs/emacs-26.3.ebuild
X-VCS-Directories: app-editors/emacs/
X-VCS-Committer: ulm
X-VCS-Committer-Name: Ulrich Müller
X-VCS-Revision: 4340eb85c2d4859037b858bb58e2f77d7f79d9f7
X-VCS-Branch: master
Date: Sun, 22 Sep 2019 16:16:26 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 782dee98-2b19-4162-aa06-e8c01a8ecd39
X-Archives-Hash: d091cdc72ece51215451b8ac2b60266b

commit:     4340eb85c2d4859037b858bb58e2f77d7f79d9f7
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 22 16:13:52 2019 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Sep 22 16:16:15 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4340eb85

app-editors/emacs: Install systemd unit file.

Closes: https://bugs.gentoo.org/694542
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 app-editors/emacs/{emacs-26.3.ebuild => emacs-26.3-r1.ebuild} | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/app-editors/emacs/emacs-26.3.ebuild b/app-editors/emacs/emacs-26.3-r1.ebuild
similarity index 97%
rename from app-editors/emacs/emacs-26.3.ebuild
rename to app-editors/emacs/emacs-26.3-r1.ebuild
index 0e312adbbbb..40ca9d58019 100644
--- a/app-editors/emacs/emacs-26.3.ebuild
+++ b/app-editors/emacs/emacs-26.3-r1.ebuild
@@ -281,6 +281,15 @@ src_install () {
 	# remove COPYING file (except for etc/COPYING used by describe-copying)
 	rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING
 
+	if use systemd; then
+		insinto /usr/lib/systemd/user
+		sed -e "/^##/d" \
+			-e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \
+			-e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \
+			etc/emacs.service | newins - ${EMACS_SUFFIX}.service
+		assert
+	fi
+
 	if use gzip-el; then
 		# compress .el files when a corresponding .elc exists
 		find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \