Add reverting patch to breaking KDE install change
authorAndre Heinecke <aheinecke@intevation.de>
Tue, 12 Jul 2016 15:15:00 +0000 (17:15 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Tue, 12 Jul 2016 15:15:00 +0000 (17:15 +0200)
* patches/extra-cmake-modules/
0001-Use-BIN_INSTALL_DIR-data-for-DATAROOTDIR-on-Windows.patch:
Reverse Apply this patch.
* Makefile.am (EXTRA_DIST): Update accordingly.

--
Just switching to /bin/data from /share would be very traumatic
for gpg4win. Let's hope we can revert / solve this upstream. Otherwise
this patch is likely to be around for a long time.

Makefile.am
patches/extra-cmake-modules/0001-Use-BIN_INSTALL_DIR-data-for-DATAROOTDIR-on-Windows.patch [new file with mode: 0755]

index 80928dc..478577c 100644 (file)
@@ -54,7 +54,8 @@ EXTRA_DIST = autogen.sh README.GIT ONEWS \
         patches/libgpg-error-1.21/0001-Add-FD_ISSET-replacement-for-Windows.patch \
         patches/gpgex-1.0.4/0001-Prefer-kleowrapped-gpgwrapped-binaries.patch \
         patches/gpgol-1.4.0/0001-Fix-UI-Server-startup.patch \
-        patches/gpgol-1.4.0/0002-Ignore-sent-S-MIME-Mails-if-S-MIME-is-disabled.patch
+        patches/gpgol-1.4.0/0002-Ignore-sent-S-MIME-Mails-if-S-MIME-is-disabled.patch \
+        patches/extra-cmake-modules/0001-Use-BIN_INSTALL_DIR-data-for-DATAROOTDIR-on-Windows.patch
 
 copy-news:
        cp NEWS doc/website/NEWS.last
diff --git a/patches/extra-cmake-modules/0001-Use-BIN_INSTALL_DIR-data-for-DATAROOTDIR-on-Windows.patch b/patches/extra-cmake-modules/0001-Use-BIN_INSTALL_DIR-data-for-DATAROOTDIR-on-Windows.patch
new file mode 100755 (executable)
index 0000000..c712aff
--- /dev/null
@@ -0,0 +1,51 @@
+#! /bin/sh
+patch -p1 -l -R -f $* < $0
+exit $?
+
+From 2503481e4537b88d76b4a596f519cb3311e1ca2a Mon Sep 17 00:00:00 2001
+From: Hannah von Reth <vonreth@kde.org>
+Date: Tue, 14 Jun 2016 16:42:08 +0200
+Subject: [PATCH 1/4] Use "${BIN_INSTALL_DIR}/data" for DATAROOTDIR on Windows.
+
+Summary:
+Instead of using "share" use "${BIN_INSTALL_DIR}/data" on Windows,
+this is the location provided by QStandardPaths for GenericDataLocation
+on Windows.
+
+Reviewers: dfaure
+
+Reviewed By: dfaure
+
+Subscribers: kfunk
+
+Differential Revision: https://phabricator.kde.org/D1873
+---
+ kde-modules/KDEInstallDirs.cmake | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/kde-modules/KDEInstallDirs.cmake b/kde-modules/KDEInstallDirs.cmake
+index d9c3b78..f518a4a 100644
+--- a/kde-modules/KDEInstallDirs.cmake
++++ b/kde-modules/KDEInstallDirs.cmake
+@@ -489,10 +489,15 @@ _define_absolute(SHAREDSTATEDIR "com"
+
+
+
+-
+-_define_absolute(DATAROOTDIR "share"
+-    "read-only architecture-independent data root"
+-    SHARE_INSTALL_PREFIX)
++if (WIN32)
++    _define_relative(DATAROOTDIR BINDIR "data"
++        "read-only architecture-independent data root"
++        SHARE_INSTALL_PREFIX)
++else()
++    _define_absolute(DATAROOTDIR "share"
++        "read-only architecture-independent data root"
++        SHARE_INSTALL_PREFIX)
++endif()
+
+ _define_relative(DATADIR DATAROOTDIR ""
+     "read-only architecture-independent data"
+--
+2.1.4