aboutsummaryrefslogtreecommitdiff
path: root/devel/kf5-kcoreaddons
diff options
context:
space:
mode:
authorAdriaan de Groot <adridg@FreeBSD.org>2019-05-20 12:52:42 +0000
committerAdriaan de Groot <adridg@FreeBSD.org>2019-05-20 12:52:42 +0000
commitbd34c204a618ae67eab88d589b17bf2bde843cc1 (patch)
treeaa4fa99fee6a18e39bf32bf5184d05bb725c68b8 /devel/kf5-kcoreaddons
parent2646ecd05e12da52b637945055c581bb9e970c6b (diff)
downloadports-bd34c204a618ae67eab88d589b17bf2bde843cc1.tar.gz
ports-bd34c204a618ae67eab88d589b17bf2bde843cc1.zip
Make KOSRelease class find our os-release
- After much hemming and hawing we ended up with /usr/local/etc/os-release, which isn't one of the standard paths (according to freedesktop.org) so in spite of us **having** it, not all software that looks for it will find it. Patch in the correct path.
Notes
Notes: svn path=/head/; revision=502101
Diffstat (limited to 'devel/kf5-kcoreaddons')
-rw-r--r--devel/kf5-kcoreaddons/Makefile1
-rw-r--r--devel/kf5-kcoreaddons/files/patch-src_lib_util_kosrelease.cpp27
2 files changed, 28 insertions, 0 deletions
diff --git a/devel/kf5-kcoreaddons/Makefile b/devel/kf5-kcoreaddons/Makefile
index c445186685cb..7fd86e02c7e4 100644
--- a/devel/kf5-kcoreaddons/Makefile
+++ b/devel/kf5-kcoreaddons/Makefile
@@ -2,6 +2,7 @@
PORTNAME= kcoreaddons
DISTVERSION= ${KDE_FRAMEWORKS_VERSION}
+PORTREVISION= 1
CATEGORIES= devel kde kde-frameworks
MAINTAINER= kde@FreeBSD.org
diff --git a/devel/kf5-kcoreaddons/files/patch-src_lib_util_kosrelease.cpp b/devel/kf5-kcoreaddons/files/patch-src_lib_util_kosrelease.cpp
new file mode 100644
index 000000000000..3e22e64e378f
--- /dev/null
+++ b/devel/kf5-kcoreaddons/files/patch-src_lib_util_kosrelease.cpp
@@ -0,0 +1,27 @@
+--- src/lib/util/kosrelease.cpp.orig 2019-05-08 08:27:20 UTC
++++ src/lib/util/kosrelease.cpp
+@@ -76,13 +76,18 @@ static QStringList splitEntry(const QString &line)
+
+ static QString defaultFilePath()
+ {
+- if (QFile::exists(QStringLiteral("/etc/os-release"))) {
+- return QStringLiteral("/etc/os-release");
+- } else if (QFile::exists(QStringLiteral("/usr/lib/os-release"))) {
+- return QStringLiteral("/usr/lib/os-release");
+- } else {
+- return QString();
++ for (const auto& path : {
++#ifdef Q_OS_FREEBSD
++ QStringLiteral("/usr/local/etc/os-release"),
++#endif
++ QStringLiteral("/etc/os-release"),
++ QStringLiteral("/usr/lib/os-release")
++ }) {
++ if (QFile::exists(path)) {
++ return path;
++ }
+ }
++ return QString();
+ }
+
+ class Q_DECL_HIDDEN KOSRelease::Private