Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 704412
Collapse All | Expand All

(-)/usr/portage/app-editors/emacs/emacs-26.3-r1.ebuild (-2 / +5 lines)
Lines 1-4 Link Here
1
# Copyright 1999-2019 Gentoo Authors
1
# Copyright 1999-2020 Gentoo Authors
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
3
4
EAPI=7
4
EAPI=7
Lines 282-289 Link Here
282
282
283
	if use systemd; then
283
	if use systemd; then
284
		insinto /usr/lib/systemd/user
284
		insinto /usr/lib/systemd/user
285
		# Modify ExecStart so that /etc/profile.env is sourced prior
286
		# starting emacs to make the user environment available to the
287
		# emacs daemon process. See bug #704412.
285
		sed -e "/^##/d" \
288
		sed -e "/^##/d" \
286
			-e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \
289
			-e "s:^ExecStart=.*:ExecStart=/bin/sh -c \"source ${EPREFIX}/etc/profile.env; exec ${EPREFIX}/usr/bin/${EMACS_SUFFIX} --fg-daemon\":" \
287
			-e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \
290
			-e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \
288
			etc/emacs.service | newins - ${EMACS_SUFFIX}.service
291
			etc/emacs.service | newins - ${EMACS_SUFFIX}.service
289
		assert
292
		assert

Return to bug 704412