Merge branch 'nim' of http://github.com/anthonyryan1/gentoo
[gentoo.git] / x11-misc / xdg-utils / xdg-utils-1.1.1-r1.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=6
6 inherit autotools
7
8 MY_P=${P/_/-}
9
10 DESCRIPTION="Portland utils for cross-platform/cross-toolkit/cross-desktop interoperability"
11 HOMEPAGE="https://www.freedesktop.org/wiki/Software/xdg-utils/"
12 #SRC_URI="https://dev.gentoo.org/~johu/distfiles/${P}.tar.xz"
13 #SRC_URI="https://people.freedesktop.org/~rdieter/${PN}/${MY_P}.tar.gz
14 #       https://dev.gentoo.org/~ssuominen/${P}-patchset-1.tar.xz"
15 SRC_URI="https://portland.freedesktop.org/download/${MY_P}.tar.gz"
16
17 LICENSE="MIT"
18 SLOT="0"
19 KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
20 IUSE="doc +perl"
21
22 RDEPEND="dev-util/desktop-file-utils
23         x11-misc/shared-mime-info
24         x11-apps/xprop
25         x11-apps/xset
26         perl? ( dev-perl/File-MimeInfo )"
27 DEPEND=">=app-text/xmlto-0.0.26-r1[text(+)]"
28
29 DOCS=( README RELEASE_NOTES TODO ) # ChangeLog is bogus, see git instead
30
31 PATCHES=( "${FILESDIR}/${P}-ktraderclient5.patch" )
32
33 RESTRICT="test" # Disabled because of sandbox violation(s)
34
35 #S=${WORKDIR}/${MY_P}
36
37 src_prepare() {
38         default
39         # If you choose to do git snapshot instead of patchset, you need to remember
40         # to run `autoconf` in ./ and `make scripts-clean` in ./scripts/ to refresh
41         # all the files
42         if [[ -d ${WORKDIR}/patch ]]; then
43                 EPATCH_SUFFIX=patch EPATCH_FORCE=yes epatch
44         fi
45         eautoreconf
46         pushd scripts && make scripts-clean && popd
47 }
48
49 src_configure() {
50         export ac_cv_path_XMLTO="$(type -P xmlto) --skip-validation" #502166
51         default
52 }
53
54 src_install() {
55         default
56
57         newdoc scripts/xsl/README README.xsl
58         use doc && dodoc -r scripts/html
59
60         # Install default XDG_DATA_DIRS, bug #264647
61         echo XDG_DATA_DIRS=\"${EPREFIX}/usr/local/share\" > 30xdg-data-local
62         echo 'COLON_SEPARATED="XDG_DATA_DIRS XDG_CONFIG_DIRS"' >> 30xdg-data-local
63         doenvd 30xdg-data-local
64
65         echo XDG_DATA_DIRS=\"${EPREFIX}/usr/share\" > 90xdg-data-base
66         echo XDG_CONFIG_DIRS=\"${EPREFIX}/etc/xdg\" >> 90xdg-data-base
67         doenvd 90xdg-data-base
68 }
69
70 pkg_postinst() {
71         [[ -x $(type -P gtk-update-icon-cache) ]] || elog "Install x11-libs/gtk+:2 for the gtk-update-icon-cache command."
72 }