Index: Mk/Features/pkgconfig.mk =================================================================== --- /dev/null +++ Mk/Features/pkgconfig.mk @@ -0,0 +1,15 @@ +# pkg-config Support +# +# Add an automatic dependency on pkgconf + +.if !defined(_FEATURE_PKGCONFIG_MK_INCLUDED) +_FEATURE_PKGCONFIG_MK_INCLUDED= yes + +_PKGCONFIG_DEPENDS= pkgconf:devel/pkgconf + +. if defined(BUILD_DEPENDS) || defined(LIB_DEPENDS) || defined(TEST_DEPENDS) +BUILD_DEPENDS+= ${_PKGCONFIG_DEPENDS} +CONFIGURE_ENV+= PKG_CONFIG=pkgconf +. endif + +.endif Index: Mk/Uses/cargo.mk =================================================================== --- Mk/Uses/cargo.mk +++ Mk/Uses/cargo.mk @@ -240,10 +240,6 @@ OPENSSL_INCLUDE_DIR=${OPENSSLINC} . endif -. if ${_CARGO_CRATES:Mpkg-config} -.include "${USESDIR}/pkgconfig.mk" -. endif - . for _index _crate _name _version in ${_CARGO_CRATES} # Split up semantic version and try to sanitize it by removing # pre-release identifier (-) or build metadata (+) Index: Mk/Uses/pkgconfig.mk =================================================================== --- Mk/Uses/pkgconfig.mk +++ /dev/null @@ -1,31 +0,0 @@ -# handle dependency on the pkgconf port -# -# Feature: pkgconfig -# Usage: USES=pkgconfig or USES=pkgconfig:ARGS -# Valid ARGS: build (default, implicit), run, both -# -# MAINTAINER: ports@FreeBSD.org - -.if !defined(_INCLUDE_USES_PKGCONFIG_MK) -_INCLUDE_USES_PKGCONFIG_MK= yes - -_PKGCONFIG_DEPENDS= pkgconf>=1.3.0_1:devel/pkgconf - -. if empty(pkgconfig_ARGS) -pkgconfig_ARGS= build -. endif - -. if ${pkgconfig_ARGS} == "build" -BUILD_DEPENDS+= ${_PKGCONFIG_DEPENDS} -CONFIGURE_ENV+= PKG_CONFIG=pkgconf -. elif ${pkgconfig_ARGS} == "run" -RUN_DEPENDS+= ${_PKGCONFIG_DEPENDS} -. elif ${pkgconfig_ARGS} == "both" -CONFIGURE_ENV+= PKG_CONFIG=pkgconf -BUILD_DEPENDS+= ${_PKGCONFIG_DEPENDS} -RUN_DEPENDS+= ${_PKGCONFIG_DEPENDS} -. else -IGNORE= USES=pkgconfig - invalid args: [${pkgconfig_ARGS}] specified -. endif - -.endif Index: Mk/Uses/qt-dist.mk =================================================================== --- Mk/Uses/qt-dist.mk +++ Mk/Uses/qt-dist.mk @@ -153,11 +153,6 @@ # have to declare a lot of unnecessary dependencies in USE_QT5. LDFLAGS+= -Wl,--as-needed -. if ${_QT_DIST} == "base" && ${PORTNAME} != "qmake" -# Qt configure requires pkg-config to detect dependencies. -.include "${USESDIR}/pkgconfig.mk" -. endif - # -nomake is only used by qtbase's configure script. # Other ports from other Qt modules will automatically build examples and # tests if the directories exist because of mkspecs/features/qt_parts.prf. Index: Mk/Uses/xorg-cat.mk =================================================================== --- Mk/Uses/xorg-cat.mk +++ Mk/Uses/xorg-cat.mk @@ -102,11 +102,6 @@ MASTER_SITES?= XORG/individual/${_XORG_CAT} . endif -# -## All xorg ports needs pkgconfig to build, but some ports look for pkgconfig -## and then continues the build. -.include "${USESDIR}/pkgconfig.mk" - # ## All xorg ports needs xorg-macros. . if ${PORTNAME} != xorg-macros Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk +++ Mk/bsd.port.mk @@ -1008,8 +1008,8 @@ # These need to be absolute since we don't know how deep in the ports # tree we are and thus can't go relative. They can, of course, be overridden # by individual Makefiles or local system make configuration. -_LIST_OF_WITH_FEATURES= debug lto ssp -_DEFAULT_WITH_FEATURES= ssp +_LIST_OF_WITH_FEATURES= debug lto pkgconfig ssp +_DEFAULT_WITH_FEATURES= ssp pkgconfig PORTSDIR?= /usr/ports LOCALBASE?= /usr/local LINUXBASE?= /compat/linux Index: devel/pkgconf/Makefile =================================================================== --- devel/pkgconf/Makefile +++ devel/pkgconf/Makefile @@ -28,6 +28,8 @@ OPTIONS_DEFINE= DOCS +WITHOUT_PKGCONFIG= yes + post-install: ${LN} -sf pkgconf ${STAGEDIR}${PREFIX}/bin/pkg-config