aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Urankar <mikael@FreeBSD.org>2021-04-22 22:14:37 +0000
committerAdriaan de Groot <adridg@FreeBSD.org>2021-04-22 23:10:06 +0000
commit1ef5284b234036d33f1afbbfc4c1e4a67dafdf3f (patch)
tree8a18023dfef157f1e4deecba51219d3169c76b4b
parentc4254019d8e8aa636db96bcea5702e0a39880048 (diff)
downloadports-1ef5284b234036d33f1afbbfc4c1e4a67dafdf3f.tar.gz
ports-1ef5284b234036d33f1afbbfc4c1e4a67dafdf3f.zip
Handle os-release more smartly
The Qt ports, and GNOME control center, can read /etc/os-release, and have patches to read /usr/local/etc/os-release -- however, the two files update differently, and /etc/os-release is preferred. Tighten up the .if to select when to depend on the extra port for /usr/local/etc/os-release (basically: pre 11.4 and 12.1) - Bumps PORTREVISION because dependencies may change. - Note that I used the --author command-line option to set that mikael@ wrote this patch. PR: 251073
-rw-r--r--devel/qt5-core/Makefile6
-rw-r--r--sysutils/gnome-control-center/Makefile5
2 files changed, 4 insertions, 7 deletions
diff --git a/devel/qt5-core/Makefile b/devel/qt5-core/Makefile
index f12f3fdf7b27..5c6214cf3ade 100644
--- a/devel/qt5-core/Makefile
+++ b/devel/qt5-core/Makefile
@@ -1,6 +1,6 @@
PORTNAME= core
DISTVERSION= ${QT5_VERSION}
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= devel
PKGNAMEPREFIX= qt5-
@@ -39,9 +39,7 @@ QT_CONFIG= glib icu
MORE_WRKSRCS= src/tools/bootstrap src/corelib src/tools/qlalr
.include <bsd.port.pre.mk>
-# FreeBSD base gained /etc/os-release in r354922, which
-# corresponds to __FreeBSD_version 1300060
-.if ${OSVERSION} < 1300060
+.if !exists(/etc/rc.d/os-release)
RUN_DEPENDS+= etc_os-release>0:sysutils/etc_os-release
post-patch:
${REINPLACE_CMD} -e '/readEtcFile/s|/etc/os-release|${LOCALBASE}/etc/os-release|g' \
diff --git a/sysutils/gnome-control-center/Makefile b/sysutils/gnome-control-center/Makefile
index 39ce0ca9eb54..93aea90e1bec 100644
--- a/sysutils/gnome-control-center/Makefile
+++ b/sysutils/gnome-control-center/Makefile
@@ -2,6 +2,7 @@
PORTNAME= gnome-control-center
PORTVERSION= 3.38.3
+PORTREVISION= 1
CATEGORIES= sysutils gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome
@@ -72,9 +73,7 @@ LDFLAGS+= -fuse-ld=lld
.endif
.include <bsd.port.pre.mk>
-# FreeBSD base gained /etc/os-release in r354922, which
-# corresponds to __FreeBSD_version 1300060
-.if ${OSVERSION} < 1300060
+.if !exists(/etc/rc.d/os-release)
RUN_DEPENDS+= etc_os-release>0:sysutils/etc_os-release
post-patch:
@${REINPLACE_CMD} -e 's|/etc/os-release|${LOCALBASE}/etc/os-release|g' \