From aeddf0d7330971a5f0713afd20dd9e353096b8d6 Mon Sep 17 00:00:00 2001 From: Felix Palmen Date: Wed, 20 Oct 2021 18:09:41 +0200 Subject: [PATCH] Mk/Uses/shared-mime-info.mk: add build argument Add optional argument to USES=shared-mime-info for ports requiring it at build time. --- Mk/Uses/shared-mime-info.mk | 14 +++++++++++--- graphics/gdk-pixbuf2/Makefile | 2 +- security/kpkpass/Makefile | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Mk/Uses/shared-mime-info.mk b/Mk/Uses/shared-mime-info.mk index 49b552e419e8..d04d1da42ce2 100644 --- a/Mk/Uses/shared-mime-info.mk +++ b/Mk/Uses/shared-mime-info.mk @@ -2,17 +2,25 @@ # # Feature: shared-mime-info # Usage: USES=shared-mime-info -# Valid ARGS: does not require args +# Valid ARGS: build # # MAINTAINER: gnome@FreeBSD.org +# +# Arguments: +# +# build Specifies that shared-mime-info is also required at +# build time. .if !defined(_INCLUDE_USES_SHARED_MIME_INFO_MK) _INCLUDE_USES_SHARED_MIME_INFO_MK= yes -.if !empty(shared-mime-info_ARGS) -IGNORE= USES=shared-mime-info does not require args +.if !empty(shared-mime-info_ARGS:Nbuild) +IGNORE= USES=shared-mime-info only supports the optional argument build .endif RUN_DEPENDS+= update-mime-database:misc/shared-mime-info +.if ${shared-mime-info_ARGS:Mbuild} +BUILD_DEPENDS+= update-mime-database:misc/shared-mime-info +.endif .endif diff --git a/graphics/gdk-pixbuf2/Makefile b/graphics/gdk-pixbuf2/Makefile index 00840aabaa7e..00e91e378591 100644 --- a/graphics/gdk-pixbuf2/Makefile +++ b/graphics/gdk-pixbuf2/Makefile @@ -16,7 +16,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= docbook-xsl>0:textproc/docbook-xsl USES= cpe gettext gnome localbase:ldflags meson pkgconfig \ - python:3.4+,build shared-mime-info tar:xz + python:3.4+,build shared-mime-info:build tar:xz CPE_VENDOR= gnome USE_GNOME= glib20 introspection:build libxslt:build USE_LDCONFIG= yes diff --git a/security/kpkpass/Makefile b/security/kpkpass/Makefile index b603030d299e..e3a132e088f8 100644 --- a/security/kpkpass/Makefile +++ b/security/kpkpass/Makefile @@ -6,7 +6,7 @@ MAINTAINER= kde@FreeBSD.org COMMENT= Library to deal with Apple Wallet pass files USES= cmake compiler:c++11-lang gettext kde:5 qt:5 \ - shared-mime-info tar:xz + shared-mime-info:build tar:xz USE_KDE= archive ecm USE_QT= core gui testlib \ buildtools_build qmake_build -- 2.32.0