Gentoo Archives: gentoo-commits

From: Johannes Huber <johu@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/xdg-utils/files/, x11-misc/xdg-utils/
Date: Fri, 29 Apr 2016 09:18:02
Message-Id: 1461921461.f3b38d66963fc2bc0f0a2c278621d38d275b0082.johu@gentoo
1 commit: f3b38d66963fc2bc0f0a2c278621d38d275b0082
2 Author: Johannes Huber <johu <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 29 09:17:29 2016 +0000
4 Commit: Johannes Huber <johu <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 29 09:17:41 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3b38d66
7
8 x11-misc/xdg-utils: Add support for ktraderclient5
9
10 Revision bump adds upstream patch to support kdetraderclient5 from
11 kde-plasma/kde-cli-tools. Fixes default mime query, used for example by
12 google-chrome.
13
14 Gentoo-bug: 578848
15
16 Package-Manager: portage-2.2.28
17
18 .../files/xdg-utils-1.1.1-ktraderclient5.patch | 43 +++++++++++++
19 x11-misc/xdg-utils/xdg-utils-1.1.1-r1.ebuild | 72 ++++++++++++++++++++++
20 2 files changed, 115 insertions(+)
21
22 diff --git a/x11-misc/xdg-utils/files/xdg-utils-1.1.1-ktraderclient5.patch b/x11-misc/xdg-utils/files/xdg-utils-1.1.1-ktraderclient5.patch
23 new file mode 100644
24 index 0000000..eee4684
25 --- /dev/null
26 +++ b/x11-misc/xdg-utils/files/xdg-utils-1.1.1-ktraderclient5.patch
27 @@ -0,0 +1,43 @@
28 +From 31db8136bdf61e7f9cb866f9d47c99c63343558d Mon Sep 17 00:00:00 2001
29 +From: Massimiliano Torromeo <massimiliano.torromeo@×××××.com>
30 +Date: Fri, 15 Apr 2016 11:17:37 +0200
31 +Subject: xdg-mime: support for KDE Frameworks 5.6
32 +
33 +
34 +diff --git a/scripts/xdg-mime.in b/scripts/xdg-mime.in
35 +index 129850f..63b8a82 100644
36 +--- a/scripts/xdg-mime.in
37 ++++ b/scripts/xdg-mime.in
38 +@@ -428,13 +428,9 @@ defapp_kde()
39 + case "${KDE_SESSION_VERSION}" in
40 + 4)
41 + KTRADER=`which ktraderclient 2> /dev/null`
42 +- MIMETYPE="--mimetype"
43 +- SERVICETYPE="--servicetype"
44 + ;;
45 + 5)
46 + KTRADER=`which ktraderclient${KDE_SESSION_VERSION} 2> /dev/null`
47 +- MIMETYPE="--mimetype"
48 +- SERVICETYPE="--servicetype"
49 + ;;
50 + esac
51 + else
52 +@@ -442,8 +438,8 @@ defapp_kde()
53 + fi
54 + if [ -n "$KTRADER" ] ; then
55 + DEBUG 1 "Running KDE trader query \"$MIME\" mimetype and \"Application\" servicetype"
56 +- trader_result=`$KTRADER $MIMETYPE "$MIME" $SERVICETYPE Application 2>/dev/null \
57 +- | grep DesktopEntryPath | head -n 1 | cut -d ':' -f 2 | cut -d \' -f 2`
58 ++ trader_result=`$KTRADER --mimetype "$MIME" --servicetype Application 2>/dev/null \
59 ++ | grep -E "^DesktopEntryPath : |\.desktop$" | head -n1 | sed "s/^DesktopEntryPath : '\(.*\.desktop\)'\$/\1/"`
60 + if [ -n "$trader_result" ] ; then
61 + basename "$trader_result"
62 + exit_success
63 +@@ -954,4 +950,3 @@ esac
64 + update_mime_database $xdg_base_dir
65 +
66 + exit_success
67 +-
68 +--
69 +cgit v0.10.2
70 +
71
72 diff --git a/x11-misc/xdg-utils/xdg-utils-1.1.1-r1.ebuild b/x11-misc/xdg-utils/xdg-utils-1.1.1-r1.ebuild
73 new file mode 100644
74 index 0000000..75a0b97
75 --- /dev/null
76 +++ b/x11-misc/xdg-utils/xdg-utils-1.1.1-r1.ebuild
77 @@ -0,0 +1,72 @@
78 +# Copyright 1999-2016 Gentoo Foundation
79 +# Distributed under the terms of the GNU General Public License v2
80 +# $Id$
81 +
82 +EAPI=6
83 +inherit autotools
84 +
85 +MY_P=${P/_/-}
86 +
87 +DESCRIPTION="Portland utils for cross-platform/cross-toolkit/cross-desktop interoperability"
88 +HOMEPAGE="https://www.freedesktop.org/wiki/Software/xdg-utils/"
89 +#SRC_URI="https://dev.gentoo.org/~johu/distfiles/${P}.tar.xz"
90 +#SRC_URI="https://people.freedesktop.org/~rdieter/${PN}/${MY_P}.tar.gz
91 +# https://dev.gentoo.org/~ssuominen/${P}-patchset-1.tar.xz"
92 +SRC_URI="https://portland.freedesktop.org/download/${MY_P}.tar.gz"
93 +
94 +LICENSE="MIT"
95 +SLOT="0"
96 +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"
97 +IUSE="doc +perl"
98 +
99 +RDEPEND="dev-util/desktop-file-utils
100 + x11-misc/shared-mime-info
101 + x11-apps/xprop
102 + x11-apps/xset
103 + perl? ( dev-perl/File-MimeInfo )"
104 +DEPEND=">=app-text/xmlto-0.0.26-r1[text(+)]"
105 +
106 +DOCS=( README RELEASE_NOTES TODO ) # ChangeLog is bogus, see git instead
107 +
108 +PATCHES=( "${FILESDIR}/${P}-ktraderclient5.patch" )
109 +
110 +RESTRICT="test" # Disabled because of sandbox violation(s)
111 +
112 +#S=${WORKDIR}/${MY_P}
113 +
114 +src_prepare() {
115 + default
116 + # If you choose to do git snapshot instead of patchset, you need to remember
117 + # to run `autoconf` in ./ and `make scripts-clean` in ./scripts/ to refresh
118 + # all the files
119 + if [[ -d ${WORKDIR}/patch ]]; then
120 + EPATCH_SUFFIX=patch EPATCH_FORCE=yes epatch
121 + fi
122 + eautoreconf
123 + pushd scripts && make scripts-clean && popd
124 +}
125 +
126 +src_configure() {
127 + export ac_cv_path_XMLTO="$(type -P xmlto) --skip-validation" #502166
128 + default
129 +}
130 +
131 +src_install() {
132 + default
133 +
134 + newdoc scripts/xsl/README README.xsl
135 + use doc && dodoc -r scripts/html
136 +
137 + # Install default XDG_DATA_DIRS, bug #264647
138 + echo XDG_DATA_DIRS=\"${EPREFIX}/usr/local/share\" > 30xdg-data-local
139 + echo 'COLON_SEPARATED="XDG_DATA_DIRS XDG_CONFIG_DIRS"' >> 30xdg-data-local
140 + doenvd 30xdg-data-local
141 +
142 + echo XDG_DATA_DIRS=\"${EPREFIX}/usr/share\" > 90xdg-data-base
143 + echo XDG_CONFIG_DIRS=\"${EPREFIX}/etc/xdg\" >> 90xdg-data-base
144 + doenvd 90xdg-data-base
145 +}
146 +
147 +pkg_postinst() {
148 + [[ -x $(type -P gtk-update-icon-cache) ]] || elog "Install x11-libs/gtk+:2 for the gtk-update-icon-cache command."
149 +}