From nobody Thu Jul 06 20:44:38 2023 X-Original-To: dev-commits-ports-all@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 4QxpRq0cM6z4l5LY; Thu, 6 Jul 2023 20:44:39 +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 4QxpRq0Bfmz4DVl; Thu, 6 Jul 2023 20:44:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688676279; 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=AXpLbVa7PaCB0++Nq+fVFG9t11/k+KevjYcypA7xplY=; b=BAAptnWAlo/38OP4DEwnI2HglwIyb040O4p1tVqLqOJuszgcImQQX4PMHz5f4N9TRCZljc PNUOo2tIxpKRA0KLyGMwDbV6OxrvXmRFrt0koguMRb120OeBJwT9546Rq2mB0s7yAqmPor ZZSRIL8gCuo9nctJ2WbmifYrpR/DLAAPxHslMXHMgC6QlPQh+LqBC4OYbjA+EiZFCZMPZa 6cGfFPUtTg1ufXpJLAFIDHwQ+++n3jar4PWMseVRkip1SesbRczBH1ZVxNumJUXq/yawGn +bIFv07nZUzdAWqEjSJST6j0JC9UGzXcIJiGy8GVkxB2DK0pEHomf8fYmhqBag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688676279; 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=AXpLbVa7PaCB0++Nq+fVFG9t11/k+KevjYcypA7xplY=; b=I6iXJzLw1lt1bHyfmFyO1FkscXaENUkl7aajnIWZ+iPOZCG5hzGTLZpyz1CSRBIlgIotAT KGIwsqWCClm53LA2fZjzZ+A6XPRJ/17IYYbMNgcs19XNa5yenwDZcd9jCw1k9SoT2AVAkW sULXM/KpjnKGpCOX+DQnRTc6VWeJO8jspv7NlLMaIy+vHftRP7qb3xTRhp/anqzy8Ym7Z9 K7d+848uqplHCndtaQNg20h/bhbE+CwyIgRfhjyNLmMZ3j8JLIOR6toS2eGCdtDoWEuPVh zQx4iNsdGkEUXaGYXzh6cZxwYhQpuzD8ZSwiM8rDggPYwWmR5rUMLq0Wjc3LoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688676279; a=rsa-sha256; cv=none; b=Cxp8qZ6co/Hv9FGg55IUp+zulFgt/3k+K3pjq2xa2d0ZcrrYl3H/D1R1abWrRx1+2XpLti hf12aBCOnvpI+aYMPTPuhpAsY7ITNZBKLMi6fe3wra7mqXqjmFV94TPH39VWasRbkYTFvN bd7VMHlZMvPu7tF1uqhM7qtrjLg1TK3HvF/eUbIwFJyd25a1hrTZIxEzRo/JjalITOUUkQ LRAx2nLcg6VbDzG4OyjdKO4sgt4Ht1s1Zv5IBqP+vxDw0yAZ+eGGS2ECPZ2RKAI36I0c3G SUcgKN3SuWF6q0V4bqjS5AiHJrIz6KkZ+klJ0YlSx0/lDAYWuVNOzPJyHDYlIg== 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 4QxpRp6P5fz19SP; Thu, 6 Jul 2023 20:44:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 366Kic8W013206; Thu, 6 Jul 2023 20:44:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 366KicG8013205; Thu, 6 Jul 2023 20:44:38 GMT (envelope-from git) Date: Thu, 6 Jul 2023 20:44:38 GMT Message-Id: <202307062044.366KicG8013205@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Rene Ladan Subject: git: e665f400d5f7 - 2023Q3 - Mk/Uses: teach USES=ghostscript to support LIB_DEPENDS List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rene X-Git-Repository: ports X-Git-Refname: refs/heads/2023Q3 X-Git-Reftype: branch X-Git-Commit: e665f400d5f7923033ea5c364e4a3d01b5f87972 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch 2023Q3 has been updated by rene: URL: https://cgit.FreeBSD.org/ports/commit/?id=e665f400d5f7923033ea5c364e4a3d01b5f87972 commit e665f400d5f7923033ea5c364e4a3d01b5f87972 Author: Michael Osipov AuthorDate: 2023-07-06 19:56:55 +0000 Commit: Rene Ladan CommitDate: 2023-07-06 20:41:37 +0000 Mk/Uses: teach USES=ghostscript to support LIB_DEPENDS While here fix a logic bug in calculating dependencies. PR: 270989 (cherry picked from commit 8a465330a8998fd7e49cc5c5f99e37c943140a20) --- Mk/Uses/ghostscript.mk | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/Mk/Uses/ghostscript.mk b/Mk/Uses/ghostscript.mk index 8e5010986ccd..dd6ed4bab1ac 100644 --- a/Mk/Uses/ghostscript.mk +++ b/Mk/Uses/ghostscript.mk @@ -2,7 +2,7 @@ # # Feature: ghostscript # Usage: USES=ghostscript or USES=ghostscript:args -# Valid ARGS: , build, run, test, x11 +# Valid ARGS: , build, run, test, x11, lib # # version The chooseable versions are 9, agpl and 10. If no version is # specified version agpl is selected. 9 and agpl are synonymous. @@ -18,6 +18,8 @@ # it as RUN_DEPENDS. # test Indicates that Ghostscript is needed at test time and adds # it as TEST_DEPENDS. +# lib Indicates that Ghostscript is needed at link time and adds +# it as LIB_DEPENDS. # # If build and run are omitted, Ghostscript will be added as BUILD_DEPENDS and # RUN_DEPENDS. @@ -34,7 +36,7 @@ _GS_VERSION= 9 agpl 10 _GS_ARGS= ${ghostscript_ARGS} -. if ${_GS_ARGS:N9:N10:Nagpl:Nx11:Nbuild:Nrun:Ntest} +. if ${_GS_ARGS:N9:N10:Nagpl:Nx11:Nbuild:Nrun:Ntest:Nlib} IGNORE?= Unknown ghostscript argument ${_GS_ARGS} . endif @@ -47,6 +49,7 @@ IGNORE?= Invalid GHOSTSCRIPT_DEFAULT value: ${GHOSTSCRIPT_DEFAULT}, please selec .undef _GS_BUILD_DEP .undef _GS_RUN_DEP .undef _GS_TEST_DEP +.undef _GS_LIB_DEP . if ${_GS_ARGS:Mbuild} _GS_BUILD_DEP= yes . endif @@ -56,10 +59,13 @@ _GS_RUN_DEP= yes . if ${_GS_ARGS:Mtest} _GS_TEST_DEP= yes . endif +. if ${_GS_ARGS:Mlib} +_GS_LIB_DEP= yes +. endif -# The port does not specify a build, run, or test dependency, assume that +# The port does not specify a build, run, test, or lib dependency, assume that # a build and run dependency is required. -. if !defined(_GS_BUILD_DEP) && !defined(_GS_RUN_DEP) && !defined(_GS_TEST_DEP) +. if !defined(_GS_BUILD_DEP) && !defined(_GS_RUN_DEP) && !defined(_GS_TEST_DEP) && !defined(_GS_LIB_DEP) _GS_BUILD_DEP= yes _GS_RUN_DEP= yes . endif @@ -89,18 +95,27 @@ _GS_VERSION_MINOR= 9.56.1 . endif # dependencies +_GS_LIB= libgs.so _GS_PKGNAME= ghostscript${_GS_SELECTED}${_GS_FLAVORED:?:-base} _GS_X11_PKGNAME=ghostscript${_GS_SELECTED}-x11 _GS_PORT= print/ghostscript${_GS_SELECTED}${_GS_FLAVORED:?:-base} _GS_X11_PORT= print/ghostscript${_GS_SELECTED}${_GS_FLAVORED:?@:-}x11 -. for type in BUILD RUN TEST +. for type in BUILD RUN TEST LIB . if defined(_GS_${type}_DEP) -. if defined(_GS_FLAVORED) || !${_GS_ARGS:Mx11} +. if !defined(_GS_FLAVORED) || !${_GS_ARGS:Mx11} +. if ${type:MLIB} +${type}_DEPENDS+= ${_GS_LIB}:${_GS_PORT} +. else ${type}_DEPENDS+= ${_GS_PKGNAME}>=${_GS_VERSION_MINOR}:${_GS_PORT} +. endif . endif . if ${_GS_ARGS:Mx11} +. if ${type:MLIB} +${type}_DEPENDS+= ${_GS_LIB}:${_GS_X11_PORT} +. else ${type}_DEPENDS+= ${_GS_X11_PKGNAME}>=${_GS_VERSION_MINOR}:${_GS_X11_PORT} +. endif . endif . endif . endfor