aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2012-07-26 13:40:22 +0800
committerbapt <bapt@FreeBSD.org>2012-07-26 13:40:22 +0800
commit8a3f534c898f1045896626964b7f3e3e406f946b (patch)
tree73bea5baa559b61c5e812c50ac96fad638950c75 /Mk
parentccde37a9b75ee6a15ed85af7d0f2e60c16c42192 (diff)
downloadfreebsd-ports-gnome-8a3f534c898f1045896626964b7f3e3e406f946b.tar.gz
freebsd-ports-gnome-8a3f534c898f1045896626964b7f3e3e406f946b.tar.zst
freebsd-ports-gnome-8a3f534c898f1045896626964b7f3e3e406f946b.zip
new devel/pkgconf added to replace devel/pkg-config. new version of pkg-config
are no more self hosting so we are stuck with 0.25 version while pkgconf provide the same set of features as 0.27 and a compatible frontend. A symlink to pkg-config has been added for convenience and compatibility This also introduces a new macro to use pkgconf in your ports: USE_PKGCONFIG it can take the following arguments: - yes (meaning build only dep) - build (meaning build only dep) - run (meaning run only dep) - both (meaning run and build dep) From now USE_GNOME= pkgconfig is deprecated in favour of USE_PKGCONFIG The old gnome macro has been modified to use pkgconf but still the sameway: run and build dep to avoid large breakage. While here fix some ports relying on pkg-config but not specifying it, fix some ports broken because testing wrong .pc files, and fix ports using pkg-config --version to determine pkg-config version instead of pkg-config --modversion pkg-config like recommanded by pkg-config With Hat: portmgr Exp-runs by: bapt (pointhat-west), beat (pointyhat)
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.gnome.mk6
-rw-r--r--Mk/bsd.port.mk21
2 files changed, 24 insertions, 3 deletions
diff --git a/Mk/bsd.gnome.mk b/Mk/bsd.gnome.mk
index b9691150069e..3ea508bb274f 100644
--- a/Mk/bsd.gnome.mk
+++ b/Mk/bsd.gnome.mk
@@ -446,9 +446,9 @@ gtksourceview2_LIB_DEPENDS= gtksourceview-2.0.0:${PORTSDIR}/x11-toolkits/gtksour
gtksourceview2_DETECT= ${LOCALBASE}/libdata/pkgconfig/gtksourceview-2.0.pc
gtksourceview2_USE_GNOME_IMPL=gtk20 libxml2
-pkgconfig_DETECT= ${LOCALBASE}/bin/pkg-config
-pkgconfig_BUILD_DEPENDS= pkg-config:${PORTSDIR}/devel/pkg-config
-pkgconfig_RUN_DEPENDS= pkg-config:${PORTSDIR}/devel/pkg-config
+pkgconfig_DETECT= ${LOCALBASE}/bin/pkgconf
+pkgconfig_BUILD_DEPENDS= pkgconf:${PORTSDIR}/devel/pkgconf
+pkgconfig_RUN_DEPENDS= pkgconf:${PORTSDIR}/devel/pkgconf
libgsf_LIB_DEPENDS= gsf-1.114:${PORTSDIR}/devel/libgsf
libgsf_DETECT= ${LOCALBASE}/libdata/pkgconfig/libgsf-1.pc
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index c065cf2608b7..afc2f22cfe55 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -530,6 +530,10 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
#
# USE_NCURSES - If set, this port relies on the ncurses package.
#
+# USE_PKGCONFIG - Implies that the port uses pkg-config in one way or another:
+# 'build', 'run', 'both', implying build,
+# runtime, and both build/run dependencies
+#
# Conflict checking. Use if your port cannot be installed at the same time as
# another package.
#
@@ -1639,6 +1643,23 @@ EXTRACT_DEPENDS+= unmakeself:${PORTSDIR}/archivers/unmakeself
BUILD_DEPENDS+= gmake:${PORTSDIR}/devel/gmake
CONFIGURE_ENV+= MAKE=${GMAKE}
.endif
+.if defined(USE_PKGCONFIG)
+.if ${USE_PKGCONFIG:L} == yes
+USE_PKGCONFIG= build
+.endif
+.if ${USE_PKGCONFIG:L} == run
+RUN_DEPENDS+= pkgconf:${PORTSDIR}/devel/pkgconf
+.endif
+.if ${USE_PKGCONFIG:L} == build
+BUILD_DEPENDS+= pkgconf:${PORTSDIR}/devel/pkgconf
+CONFIGURE_ENV+= PKG_CONFIG=pkgconf
+.endif
+.if ${USE_PKGCONFIG:L} == both
+RUN_DEPENDS+= pkgconf:${PORTSDIR}/devel/pkgconf
+BUILD_DEPENDS+= pkgconf:${PORTSDIR}/devel/pkgconf
+CONFIGURE_ENV+= PKG_CONFIG=pkgconf
+.endif
+.endif
.if defined(USE_GCC) || defined(USE_FORTRAN)
.include "${PORTSDIR}/Mk/bsd.gcc.mk"