dev-util/lttng-modules: rev bump to force rebuild due to eclass fix
[gentoo.git] / dev-util / desktop-file-utils / desktop-file-utils-0.23.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit elisp-common eutils
6
7 DESCRIPTION="Command line utilities to work with desktop menu entries"
8 HOMEPAGE="https://freedesktop.org/wiki/Software/desktop-file-utils"
9 SRC_URI="https://www.freedesktop.org/software/${PN}/releases/${P}.tar.xz"
10
11 LICENSE="GPL-2+"
12 SLOT="0"
13 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
14 IUSE="emacs"
15
16 RDEPEND=">=dev-libs/glib-2.12:2
17         emacs? ( virtual/emacs )"
18 DEPEND="${RDEPEND}
19         app-arch/xz-utils
20         virtual/pkgconfig"
21
22 SITEFILE=50${PN}-gentoo.el
23
24 DOCS=( AUTHORS ChangeLog HACKING NEWS README )
25
26 src_prepare() {
27         default
28         sed -i -e '/SUBDIRS =/s:misc::' Makefile.in || die
29 }
30
31 src_configure() {
32         econf "$(use_with emacs lispdir "${SITELISP}"/${PN})"
33 }
34
35 src_compile() {
36         default
37         use emacs && elisp-compile misc/desktop-entry-mode.el
38 }
39
40 src_install() {
41         default
42         if use emacs; then
43                 elisp-install ${PN} misc/*.el misc/*.elc || die
44                 elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die
45         fi
46 }
47
48 pkg_postinst() {
49         use emacs && elisp-site-regen
50 }
51
52 pkg_postrm() {
53         use emacs && elisp-site-regen
54 }