aboutsummaryrefslogtreecommitdiff
path: root/devel/kf5-kcoreaddons
diff options
context:
space:
mode:
authorAdriaan de Groot <adridg@FreeBSD.org>2019-05-20 19:40:28 +0000
committerAdriaan de Groot <adridg@FreeBSD.org>2019-05-20 19:40:28 +0000
commit524dae949f5307cd407c503f1217e2add66118e8 (patch)
tree5b17a768672947a77daee05f0447a4befaed643c /devel/kf5-kcoreaddons
parentade7919150a1f75b7155f56b5333b34776351526 (diff)
downloadports-524dae949f5307cd407c503f1217e2add66118e8.tar.gz
ports-524dae949f5307cd407c503f1217e2add66118e8.zip
Fix looking for os-release in the face of unusual LOCALBASE
- Use a post-patch inspired by https://reviews.freebsd.org/D19866 - While the previous patch might have been upstreamable, since we need to patch *anyway* I've given that up. Submitted by: pkubaj
Notes
Notes: svn path=/head/; revision=502159
Diffstat (limited to 'devel/kf5-kcoreaddons')
-rw-r--r--devel/kf5-kcoreaddons/Makefile6
-rw-r--r--devel/kf5-kcoreaddons/files/patch-src_lib_util_kosrelease.cpp27
2 files changed, 5 insertions, 28 deletions
diff --git a/devel/kf5-kcoreaddons/Makefile b/devel/kf5-kcoreaddons/Makefile
index 7fd86e02c7e4..8abd8c5828e6 100644
--- a/devel/kf5-kcoreaddons/Makefile
+++ b/devel/kf5-kcoreaddons/Makefile
@@ -2,7 +2,7 @@
PORTNAME= kcoreaddons
DISTVERSION= ${KDE_FRAMEWORKS_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel kde kde-frameworks
MAINTAINER= kde@FreeBSD.org
@@ -30,4 +30,8 @@ FAM_DESC= Filesystem alteration notifications using fam (broken: hangs on NFS)
FAM_USES= fam
FAM_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_FAM
+post-patch:
+ ${REINPLACE_CMD} -e '/QStringLiteral/s|/etc/os-release|${LOCALBASE}/etc/os-release|g' \
+ ${WRKSRC}/src/lib/util/kosrelease.cpp
+
.include <bsd.port.mk>
diff --git a/devel/kf5-kcoreaddons/files/patch-src_lib_util_kosrelease.cpp b/devel/kf5-kcoreaddons/files/patch-src_lib_util_kosrelease.cpp
deleted file mode 100644
index 3e22e64e378f..000000000000
--- a/devel/kf5-kcoreaddons/files/patch-src_lib_util_kosrelease.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
---- 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