From nobody Sun Apr 30 11:11:14 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 4Q8Nv70y7Nz46gHP; Sun, 30 Apr 2023 11:11:15 +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 4Q8Nv70PZRz4DMZ; Sun, 30 Apr 2023 11:11:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682853075; 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=hlXUc3mkongOZKoZgeoMmVXnxWpPxUeXJR88DgQEnm8=; b=HC5E5JqgWcV4O2m2ky9O3PxdmE67lGYVE80waEq0ou5zoigCMvtKt3+ivvXRbBD5QjZY1k N8Xn4/8m1I6LxN4LHuhLeBJ5+tDf0hzFTIaaALKbyixF/Ow0wimaBDUXo3NwjHMZW7OD4v uGluxgRcyrAP1lygEApaRTdf0tABwxWCmXg5PNFyipbiBEfRqz9DBMdrW/fAMdYAwcbJx6 qXSxyksYPvJS24oXxt2S+flhoWLyMnBWygzxoXdF2SNo6/BTnkFQUH9MNCUXL4jEVVSVqP NVUKhwvQkij8vu1LCAPZQO5u5Sb6xCgPZ7KQ3UuxADpwvd4glIMXRwIdGXpoVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682853075; 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=hlXUc3mkongOZKoZgeoMmVXnxWpPxUeXJR88DgQEnm8=; b=n1t4wPyjDOOH86H3ETh6K+r9TqM5gt9U1VBFSqvmzWW1MzZ7gGAn6YTGx6ykzCKl07b7pC J73m5c/e3rzJW8r/TdzsixH5veVtu3nY7RDyICAWnfctIbtlgOmCCBEuoQEhTE3+BMEfAQ Gs1//bxCNbZ4ScLn4jvQWpfzzOt7RILW1PnpCqk+Om7wkHoez6ltRkzrk5RfOv3dOovLKS pN27ybl160ThSMlDQyz2mNpgYjh3HdBpYc98tTQnH/3khxLXPLAGH0TAsCSZC6AP8FQOqz SWnYrfTbKk8vmTQBxdaOWQqfaKpOEjg+iaUJScSABON7GwivZTgLJMyle/Xscg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682853075; a=rsa-sha256; cv=none; b=SNQIPIIxZK4r1qmf3FzQ1S6gZJ+MP3o+333y/0V8SS6pS5le8J/6KDYOjg5h++jg7U4IOn DQC8iisv1AFiR4UZCvKtmFHLd24jzzEpnQPdSZ5KuEIljVGg8surLJoul3lrHKU1ubbOks Cua+WGBD2h0u2oFI2tYXG1+OaDpzsYLS1Pa/d98xTzMDmhC63wOXV1PqjaR89j529Helqo fFiyU+Kbes8QRxJXBsb7cNg8rJM+uEyh/11DpVvESnQB0PlTxyZDtILFslX58JBVz6IIp4 uFJPrPjLjPHVyoE3Bu6ik19wTOD9irXGIWEk81bSbnf4AyYfzsDjqAdUv689cA== 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 4Q8Nv65sRTzLwX; Sun, 30 Apr 2023 11:11:14 +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 33UBBESP000687; Sun, 30 Apr 2023 11:11:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33UBBE3h000686; Sun, 30 Apr 2023 11:11:14 GMT (envelope-from git) Date: Sun, 30 Apr 2023 11:11:14 GMT Message-Id: <202304301111.33UBBE3h000686@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Felix Palmen Subject: git: be67c1c353ca - main - Mk/Uses/magick.mk: Fix DEFAULT_VERSION handling 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: zirias X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be67c1c353cabc6b17698f85efa4e5dce70b8e31 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by zirias: URL: https://cgit.FreeBSD.org/ports/commit/?id=be67c1c353cabc6b17698f85efa4e5dce70b8e31 commit be67c1c353cabc6b17698f85efa4e5dce70b8e31 Author: Felix Palmen AuthorDate: 2023-04-03 10:27:51 +0000 Commit: Felix Palmen CommitDate: 2023-04-30 11:10:39 +0000 Mk/Uses/magick.mk: Fix DEFAULT_VERSION handling Handle fallback for version and flavor separately, also add several sanity checks. This fixes creating broken *_DEPENDS for ports using it without arguments when a -nox11 version is requested in DEFAULT_VERSIONS like e.g. this resulting from "imagemagick=7-nox11": libMagick++-7-nox11.so:graphics/ImageMagick7-nox11 Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D39424 --- CHANGES | 15 ++++++++++++ Mk/Uses/magick.mk | 57 ++++++++++++++++++++++++++++++++-------------- Mk/bsd.default-versions.mk | 6 ++++- 3 files changed, 60 insertions(+), 18 deletions(-) diff --git a/CHANGES b/CHANGES index 2c65d5dbbe11..6d6da021c969 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,21 @@ in the release notes and/or placed into UPDATING. All ports committers are allowed to commit to this file. +20230430: +AUTHOR: zirias@FreeBSD.org + + USES=magick has been updated based on flavorized ports. + + A new argument 'x11' is available to specifically depend on the flavor + with X11 support. Fallback to DEFAULT_VERSIONS now happens + independently for the version (currently 6 or 7) and the flavor + (currently x11 or nox11). + + Only use arguments for version or flavor if your port really requires + it. Also, there is no need to add options for selecting the -nox11 + flavor any more, as the user setting in DEFAULT_VERSIONS will be + honored. + 20230111: AUTHOR: vishwin@FreeBSD.org diff --git a/Mk/Uses/magick.mk b/Mk/Uses/magick.mk index 1b1531d3bfce..08802d7ccebd 100644 --- a/Mk/Uses/magick.mk +++ b/Mk/Uses/magick.mk @@ -2,29 +2,33 @@ # # Feature: magick # Usage: USES=magick:ARGS -# Valid ARGS: [version],[kinds],[flavor] +# Valid ARGS: [version],[flavor],[kinds] # # version The chooseable versions are , 6 and 7. -# USES=magick -- depend on ${IMAGEMAGICK_DEFAULT} (default) +# USES=magick -- depend on version from DEFAULT_VERSIONS # USES=magick:6 -- depend on ImageMagick6 # USES=magick:7 -- depend on ImageMagick7 # -# flavor The flavors are and nox11 -# USES=magick -- depend on the default flavor (default) +# flavor The flavors are , x11 and nox11 +# USES=magick -- depend on flavor from DEFAULT_VERSIONS +# USES=magick:x11 -- depend on the x11 flavor # USES=magick:nox11 -- depend on the nox11 flavor # # kinds The dependency kinds are , lib, build, run and test -# USES=magick -- add a LIB_DEPENDS (default) -# USES=magick:lib -- add a LIB_DEPENDS -# USES=magick:build -- add a BUILD_DEPENDS -# USES=magick:run -- add a RUN_DEPENDS -# USES=magick:test -- add a TEST_DEPENDS -# USES=build,run -- add a BUILD_- and RUN_DEPENDS +# USES=magick -- add a LIB_DEPENDS (default) +# USES=magick:lib -- add a LIB_DEPENDS +# USES=magick:build -- add a BUILD_DEPENDS +# USES=magick:run -- add a RUN_DEPENDS +# USES=magick:test -- add a TEST_DEPENDS +# USES=magick:build,run -- add a BUILD_- and RUN_DEPENDS # -# In short, on a default ports tree +# In short, on a default ports tree without custom DEFAULT_VERSIONS # USES=magick # is equivalent to -# USES=magick:7,lib +# USES=magick:7,x11,lib +# +# Make sure to only add arguments strictly needed, as [version] and [flavor] +# will override user configuration in DEFAULT_VERSIONS. # # MAINTAINER: tcberner@FreeBSD.org # @@ -47,21 +51,31 @@ IGNORE= Incorrect USES=magick:${magick_ARGS} - multiple versions defined . endfor # Fallback to the default version . if empty(_magick_version) -_magick_version= ${IMAGEMAGICK_DEFAULT} +_magick_version= ${IMAGEMAGICK_DEFAULT:C/-.*//} +. endif +. if !${_magick_versions:M${_magick_version}} +IGNORE= Invalid version of ImageMagick: "${_magick_version}" . endif #=== Flavor selection === -_magick_flavors= nox11 +_magick_flavors= x11 nox11 _magick_flavor= # . for _flavor in ${_magick_flavors:O:u} . if ${magick_ARGS:M${_flavor}} . if empty(_magick_flavor) -_magick_flavor= -${_flavor} +_magick_flavor= ${_flavor} . else IGNORE= Incorrect USES=magick:${magick_ARGS} - multiple flavors defined . endif . endif . endfor +# Fallback to the default flavor +. if empty(_magick_flavor) && ${IMAGEMAGICK_DEFAULT:M*-*} +_magick_flavor= ${IMAGEMAGICK_DEFAULT:C/.*-//} +. endif +. if !empty(_magick_flavor) && !${_magick_flavors:M${_magick_flavor}} +IGNORE= Invalid flavor of ImageMagick: "${_magick_flavor}" +. endif #=== Dependency selection === _magick_depends= lib build run test @@ -75,10 +89,19 @@ _magick_depend+= ${_depend} _magick_depend= lib . endif +#=== Check for invalid arguments === +_magick_unknown_args:= ${magick_ARGS:N${_magick_version}:N${_magick_flavor}} +. for _depend in ${_magick_depend} +_magick_unknown_args:= ${_magick_unknown_args:N${_depend}} +. endfor +. if !empty(_magick_unknown_args) +IGNORE= Invalid USES=magick - unsupported argument(s): ${_magick_unknown_args} +. endif + #=== Dependency setup === -_MAGICK_PORT= graphics/ImageMagick${_magick_version}${_magick_flavor} +_MAGICK_PORT= graphics/ImageMagick${_magick_version}${_magick_flavor:%=@%} _MAGICK_LIB= libMagick++-${_magick_version}.so -_MAGICK_PKG= ImageMagick${_magick_version}${_magick_flavor} +_MAGICK_PKG= ImageMagick${_magick_version}${_magick_flavor:Mnox11:%=-%} _MAGICK_BUILD_DEPENDS= ${_MAGICK_PKG}>=${_magick_version}:${_MAGICK_PORT} _MAGICK_LIB_DEPENDS= ${_MAGICK_LIB}:${_MAGICK_PORT} diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk index 918791917d77..184508438602 100644 --- a/Mk/bsd.default-versions.mk +++ b/Mk/bsd.default-versions.mk @@ -59,7 +59,11 @@ GHOSTSCRIPT_DEFAULT?= agpl GL_DEFAULT?= mesa-libs # Possible values: 1.18, 1.19, 1.20, 1.21-devel GO_DEFAULT?= 1.20 -# Possible values: 6, 6-nox11, 7, 7-nox11 +# Possible versions: 6, 7 +# Possible flavors: x11, nox11 +# (defaults to x11 when not specified) +# Format: version[-flavor] +# Examples: 6-nox11, 7 IMAGEMAGICK_DEFAULT?= 7 # Possible values: 7, 8, 11, 17, 18 JAVA_DEFAULT?= 8