From nobody Thu Jun 30 19:14:18 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EF1228A1436; Thu, 30 Jun 2022 19:14:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LYp0p6DHVz4jN3; Thu, 30 Jun 2022 19:14:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656616458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vbo0UOM5e2F7qTEcVxjM16egsNzJltQrAJ0SJhUxxYY=; b=SgpllGg5vKXlXdALYxQmTk2Sdnig/y6jBFikwo3LB9mpaixWLxDZFgBOPXAQqS1TSpVAf1 YVF2vpedl/s5WSv8UI+RlfD2zMSypBHnm0ZUCIxXex1xrlocL/Do75xDc30LIPDLhwRWP2 e8Zfkv6iKdLyp2CneyJtWGhUN78BLQjr8yxu/3M1QOssgsTw1konpfmD6UwQADOiPxsYZM 2edhOOFHl8PVWCP+m2Ci0/tUXww3OrSJaIEuMr9k5Lm3KXuM3gt+3avMpdRQnwgwe0zlwt cJYla33kAUIUaTjMHb+cRhYM+WAWIwKG+jW08AC2MNfqT+0Mgys5yWzlH9Ingg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B59524887; Thu, 30 Jun 2022 19:14:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25UJEIPb058606; Thu, 30 Jun 2022 19:14:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25UJEIAI058605; Thu, 30 Jun 2022 19:14:18 GMT (envelope-from git) Date: Thu, 30 Jun 2022 19:14:18 GMT Message-Id: <202206301914.25UJEIAI058605@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Tobias C. Berner" Subject: git: 882f16714d90 - main - framework: add new variable PKGCONFIG_BASE List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tcberner X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 882f16714d909f1413b2c4bda44436726a0ff819 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656616458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vbo0UOM5e2F7qTEcVxjM16egsNzJltQrAJ0SJhUxxYY=; b=DdYw0270teRrdhpYtkrsHyV/Z7T+1tHme0cx7aWj/QqFz2KEAd5gr7fmYMM98NBxlqZJ60 79Nri59X4lssvEUOBADU8JXvjzQjujMCyNTGMqCtU4ofW1nNZje74x/7khzcFktSF1i883 M7+DrUPnLQ1TJssIlH62w/OiTWn9DDpDG8YEArTmecPCUJTalS/I7boFhhR9+9si4p/QdI jP0nYfII1tMQA4E/EQddk3QFJXFWo2RWLjb/vYQSSATl0Frro2fbCw7tND+FlLul+nLH9v ubP35OwO2IKNbUOPrkrTeazs4c4Mb3qr7wCgI6SM0aoZyhd2iuS3718cNvaLxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656616458; a=rsa-sha256; cv=none; b=rjAAfRhUPHW9SrrScLr54dLn1zzA/PO9KO1/hJfEyl8u+ovcfBHsUP4fWNIjG7AWWGqMdw 03662bmoUIN4GEvwtCV+oDlBhZhe9eDyJIlWPz1VLho2Os10FmagABcxqdyG/Y1JhTnqB5 cU/bm4r1xw5OXHt4XIjfMb9UbKkNjEtW7eCFmP8/6jIPvjujQDHv7bDlJBaw8FGNlrw3F2 bQAcz2Tr99TPBBXle3YJR6dp4x9ZVZo05W3HwR4YBSiMBvZnMjpIr6x1WIkdYhnheb8YQO 10nOJJSc+gZmvuqfMOKvEOxBXbHc6+EWk5YQ5c7hbbFfxGH6JaG4osQOmkIr+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tcberner: URL: https://cgit.FreeBSD.org/ports/commit/?id=882f16714d909f1413b2c4bda44436726a0ff819 commit 882f16714d909f1413b2c4bda44436726a0ff819 Author: Tobias C. Berner AuthorDate: 2022-06-15 15:56:50 +0000 Commit: Tobias C. Berner CommitDate: 2022-06-30 19:14:10 +0000 framework: add new variable PKGCONFIG_BASE The base system started to provide certain pkgconfig files for components it provides. This new variable allows ports to prefer base components explicitly using for example PKGCONFIG_BASE=foo This will create a symlink of /usr/libdata/pkgconfig/foo.pc to ${WKRDIR}/.pkgconfig and adding said path to pkgconfigs search path. This allows us to switch easily between base and port implementation of different components (say openssl) by simply defining the appropriate variable in (say ssl.mk). Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D35494 --- Mk/bsd.port.mk | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 89ed04917318..bcffecf2ab93 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1050,7 +1050,8 @@ PORTS_FEATURES+= FLAVORS MINIMAL_PKG_VERSION= 1.17.2 _PORTS_DIRECTORIES+= ${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${EXTRACT_WRKDIR} \ - ${STAGEDIR}${PREFIX} ${WRKDIR}/pkg ${BINARY_LINKDIR} + ${STAGEDIR}${PREFIX} ${WRKDIR}/pkg ${BINARY_LINKDIR} \ + ${PKGCONFIG_LINKDIR} # Ensure .CURDIR contains an absolute path without a trailing slash. Failed # builds can occur when PORTSDIR is a symbolic link, or with something like @@ -1681,6 +1682,13 @@ MAKE_ENV+= PATH=${PATH} CONFIGURE_ENV+= PATH=${PATH} . endif +PKGCONFIG_LINKDIR= ${WRKDIR}/.pkgconfig +PKGCONFIG_BASEDIR= /usr/libdata/pkgconfig +. if !${MAKE_ENV:MPKG_CONFIG_LIBDIR=*} && !${CONFIGURE_ENV:MPKG_CONFIG_LIBDIR=*} +MAKE_ENV+= PKG_CONFIG_LIBDIR=${PKGCONFIG_LINKDIR}:${LOCALBASE}/libdata/pkgconfig:${PKGCONFIG_BASEDIR} +CONFIGURE_ENV+= PKG_CONFIG_LIBDIR=${PKGCONFIG_LINKDIR}:${LOCALBASE}/libdata/pkgconfig:${PKGCONFIG_BASEDIR} +. endif + . if !defined(IGNORE_MASTER_SITE_GITHUB) && defined(USE_GITHUB) && empty(USE_GITHUB:Mnodefault) . if defined(WRKSRC) DEV_WARNING+= "You are using USE_GITHUB and WRKSRC is set which is wrong. Set GH_PROJECT correctly or set WRKSRC_SUBDIR and remove WRKSRC entirely." @@ -5147,6 +5155,20 @@ create-binary-alias: ${BINARY_LINKDIR} . endif . endif +. if !empty(PKGCONFIG_BASE) +. if !target(create-base-pkgconfig) +create-base-pkgconfig: ${PKGCONFIG_LINKDIR} +. for pcfile in ${PKGCONFIG_BASE:S/$/.pc/} + @if `test -f ${PKGCONFIG_BASEDIR}/${pcfile}`; then \ + ${RLN} ${PKGCONFIG_BASEDIR}/${pcfile} ${PKGCONFIG_LINKDIR}/${pcfile}; \ + else \ + ${ECHO_MSG} "===> Missing \"${pcfile}\" to create a link at \"${PKGCONFIG_LINKDIR}/${pcfile}\" "; \ + ${FALSE}; \ + fi +. endfor +. endif +. endif + . if !empty(BINARY_WRAPPERS) . if !target(create-binary-wrappers) create-binary-wrappers: ${BINARY_LINKDIR} @@ -5256,7 +5278,7 @@ _PATCH_SEQ= 050:ask-license 100:patch-message 150:patch-depends \ ${_OPTIONS_patch} ${_USES_patch} _CONFIGURE_DEP= patch _CONFIGURE_SEQ= 150:build-depends 151:lib-depends 160:create-binary-alias \ - 161:create-binary-wrappers \ + 161:create-binary-wrappers 170:create-base-pkgconfig \ 200:configure-message 210:apply-slist \ 300:pre-configure 450:pre-configure-script \ 490:run-autotools-fixup 500:do-configure 700:post-configure \