Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Apr 2021 23:10:29 GMT
From:      Adriaan de Groot <adridg@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 1ef5284b2340 - main - Handle os-release more smartly
Message-ID:  <202104222310.13MNATAg053036@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by adridg:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1ef5284b234036d33f1afbbfc4c1e4a67dafdf3f

commit 1ef5284b234036d33f1afbbfc4c1e4a67dafdf3f
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2021-04-22 22:14:37 +0000
Commit:     Adriaan de Groot <adridg@FreeBSD.org>
CommitDate: 2021-04-22 23:10:06 +0000

    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
---
 devel/qt5-core/Makefile                | 6 ++----
 sysutils/gnome-control-center/Makefile | 5 ++---
 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' \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104222310.13MNATAg053036>