more upstream goodness, initial plasma5 support

This commit is contained in:
Rex Dieter 2014-09-22 14:48:52 -05:00
parent 9d089546cb
commit 0846cbbb74
3 changed files with 215 additions and 1 deletions

View File

@ -0,0 +1,98 @@
From e962f0387cc670c96165383a1f9a8ae5251bd1ec Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter@math.unl.edu>
Date: Mon, 22 Sep 2014 13:38:42 -0500
Subject: [PATCH 23/24] make release/distclean targets suck less
still more work to do
---
Makefile.in | 2 +-
scripts/Makefile.in | 19 +++++++++----------
tests/Makefile.in | 2 +-
3 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 37a025b..25dc59f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -10,7 +10,7 @@ distclean: clean $(SUBDIRS:%=%/__distclean__)
rm -f config.* Makefile
rm -rf autom4te.cache
-release: $(SUBDIRS:%=%/__release__) distclean
+release: $(SUBDIRS:%=%/__release__)
rm -f *~
help:
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index 9a772bc..d167393 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -27,30 +27,29 @@ SCRIPTS = \
# xdg-terminal
MANPAGES= $(SCRIPTS:%=man/%.1)
-WEBPAGES= $(SCRIPTS:%=%.html)
+WEBPAGES= $(SCRIPTS:%=html/%.html)
XMLFILES= $(SCRIPTS:%=desc/%.xml)
all: html man scripts
-html: index.html $(WEBPAGES)
+html: html/index.html $(WEBPAGES)
scripts: README $(SCRIPTS)
man: $(MANPAGES)
release: scripts html man
- rm -f xdg-*.in *~ HACKING generate-help-script.awk
- rm -rf desc/
- rm -rf xsl/
+ rm -f *~
+ #rm -rf desc/ xsl/
rm -f xdg-file-dialog xdg-su xdg-copy xdg-terminal
-distclean: clean
- rm -f Makefile
+distclean: clean
+ rm -f Makefile man/xdg-*.1 html/xdg-*.html
clean: scripts-clean
scripts-clean:
- rm -f $(SCRIPTS) README man/xdg-*.1 html/xdg-*.html
+ rm -f $(SCRIPTS) README
README: $(SCRIPTS)
echo > $@
@@ -103,12 +102,12 @@ xdg-terminal: xdg-terminal.in xdg-utils-common.in
man/%.1: desc/%.xml
(cd man;$(XMLTO) man ../$<)
-index.html: $(XMLFILES)
+html/index.html: $(XMLFILES)
(cat html/index.html.pre; \
xsltproc xsl/refentry2htmlindex.xsl $(XMLFILES); \
cat html/index.html.post ) > html/index.html
-%.html: desc/%.xml
+html/%.html: desc/%.xml
(cd html;$(XMLTO) html-nochunks ../$<)
%.txt: desc/%.xml
diff --git a/tests/Makefile.in b/tests/Makefile.in
index c57b0e0..a27504b 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -15,7 +15,7 @@ mandir = @mandir@
all:
release:
- rm -rf xdg-su tmp
+ rm -rf tmp
rm -f xdg-test.log *~
test:
--
1.9.3

View File

@ -0,0 +1,111 @@
From 18645a50fe25064b42ba421e231869c6063705f7 Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter@math.unl.edu>
Date: Mon, 22 Sep 2014 14:31:20 -0500
Subject: [PATCH 24/24] Initial support for Plasma5
... largely thanks to Karol Herbst
---
ChangeLog | 4 ++++
RELEASE_NOTES | 2 +-
scripts/xdg-mime.in | 20 ++++++++++++--------
scripts/xdg-open.in | 19 +++++++++++--------
4 files changed, 28 insertions(+), 17 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f90ba4e..077fb52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
=== xdg-utils 1.1.x ===
+
+2014-09-22 Rex Dieter <rdieter@fedoraproject.org>
+ * Initial support for Plasma5 (largely thanks to Karol Herbst)
+
2014-09-19 Rex Dieter <rdieter@fedoraproject.org>
* XFCE .desktop file created for browser selection is broken (BR56092)
* Unnecessary filtering file:// for pcmanfm (BR63153)
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index 484b2b9..eee8ac5 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -2,7 +2,7 @@ Release notes for xdg-utils 1.1.0
=================================
This release includes:
-* better support for GNOME3, KDE4, LXDE, MATE, XFCE
+* better support for GNOME3, KDE4, Plasma5, LXDE, MATE, XFCE
* initial support for generic methods (non toolkit-specific, experimental)
* xdg-settings utility, a script to get various settings from the desktop
environment
diff --git a/scripts/xdg-mime.in b/scripts/xdg-mime.in
index 474dc5d..b324be9 100644
--- a/scripts/xdg-mime.in
+++ b/scripts/xdg-mime.in
@@ -36,11 +36,7 @@ update_mime_database()
detectDE
if [ x"$DE" = x"kde" ] ; then
DEBUG 1 "Running kbuildsycoca"
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- eval 'kbuildsycoca4'$xdg_redirect_output
- else
- eval 'kbuildsycoca'$xdg_redirect_output
- fi
+ eval 'kbuildsycoca${KDE_SESSION_VERSION}'$xdg_redirect_output
fi
fi
for x in `echo "$PATH:/opt/gnome/bin" | sed 's/:/ /g'`; do
@@ -54,9 +50,17 @@ update_mime_database()
info_kde()
{
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- DEBUG 1 "Running kmimetypefinder \"$1\""
- kmimetypefinder "$1" 2>/dev/null | head -n 1
+ if [ -n "${KDE_SESSION_VERSION}" ]; then
+ case "${KDE_SESSION_VERSION}" in
+ 4)
+ DEBUG 1 "Running kmimetypefinder \"$1\""
+ kmimetypefinder "$1" 2>/dev/null | head -n 1
+ ;;
+ 5)
+ DEBUG 1 "Running kmimetypefinder${KDE_SESSION_VERSION} \"$1\""
+ kmimetypefinder${KDE_SESSION_VERSION} "$1" 2>/dev/null | head -n 1
+ ;;
+ esac
else
DEBUG 1 "Running kfile \"$1\""
kfile "$1" 2> /dev/null | head -n 1 | cut -d "(" -f 2 | cut -d ")" -f 1
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
index cc2fc9c..0145be3 100644
--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -81,15 +81,18 @@ open_darwin()
open_kde()
{
- if kde-open -v 2>/dev/null 1>&2; then
- kde-open "$1"
+ if [ -n "${KDE_SESSION_VERSION}" ]; then
+ case "${KDE_SESSION_VERSION}" in
+ 4)
+ kde-open "$1"
+ ;;
+ 5)
+ kde-open${KDE_SESSION_VERSION} "$1"
+ ;;
+ esac
else
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- kfmclient openURL "$1"
- else
- kfmclient exec "$1"
- kfmclient_fix_exit_code $?
- fi
+ kfmclient exec "$1"
+ kfmclient_fix_exit_code $?
fi
if [ $? -eq 0 ]; then
--
1.9.3

View File

@ -4,7 +4,7 @@
Summary: Basic desktop integration functions
Name: xdg-utils
Version: 1.1.0
Release: 0.26.%{pre}%{?dist}
Release: 0.27.%{pre}%{?dist}
URL: http://portland.freedesktop.org/
%if 0%{?pre:1}
@ -39,6 +39,8 @@ Patch119: 0019-xdg-settings-convert-multi-group-desktop-file-to-XFC.patch
Patch120: 0020-xdg-email-reset-the-IFS-before-interpreting-a-shell-.patch
Patch121: 0021-xdg-open-fixes-63153-keeping-the-path-as-URL.patch
Patch122: 0022-update-Changelog-for-recent-contributed-patches.patch
Patch123: 0023-make-release-distclean-targets-suck-less.patch
Patch124: 0024-Initial-support-for-Plasma5.patch
BuildRequires: gawk
BuildRequires: xmlto text-www-browser
@ -109,6 +111,9 @@ make install DESTDIR=%{buildroot}
%changelog
* Mon Sep 22 2014 Rex Dieter <rdieter@fedoraproject.org> 1.1.0-0.27.rc2
- more upstream goodness, initial plasma5 support
* Sat Sep 20 2014 Rex Dieter <rdieter@fedoraproject.org> 1.1.0-0.26.rc2
- pull in latest upstream fixes