From nobody Mon Apr 25 22:33:38 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 065E41A9986E; Mon, 25 Apr 2022 22:33:40 +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 4KnKYH411Fz3JXf; Mon, 25 Apr 2022 22:33:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650926019; 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=B6P0rymHf2HqfYaRO1mR2vVsjpSVaXPxcgs3TLgZdOg=; b=h8rVx6H1c/3vD0vg+dhVS4fFY0NmshiTX02soOMl6i9NZTtq2iGFqI7LCZYtPuHIOYmxgj wjhS1Bqd2m4EaEhAkqoEQnQFGAkK4rlBqXZeE1jTQmP76QsBfAVFkdA/v/ACvLCXQt85QL sGo+ngkiPV4osf/kQ/UBgttsSoqgmdrMsjISxGc1XxGHTaHp0ZxNLC2hqpYSEQT72ZLYtb M6wF9SVYpTQgi7JgU9hdxLkV1RE+FrWg9F05GV3Vuc+wBrTnQA6kJ9tGyT+yhevU00qBMs Py/rOqX1Wf6o71Obzoran3JLhRrSBhQED6aoIOaM4evO/H3eACyEhwTDOFNoHg== 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 3ED3B23599; Mon, 25 Apr 2022 22:33:39 +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 23PMXc9W094256; Mon, 25 Apr 2022 22:33:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23PMXcwO094255; Mon, 25 Apr 2022 22:33:38 GMT (envelope-from git) Date: Mon, 25 Apr 2022 22:33:38 GMT Message-Id: <202204252233.23PMXcwO094255@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Brooks Davis Subject: git: 4d8688269cc2 - main - devel/llvm: allow versions other than LLVM_DEFAULT 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: brooks X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4d8688269cc20726878ca25974f9afd0dc7a35bd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650926019; 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=B6P0rymHf2HqfYaRO1mR2vVsjpSVaXPxcgs3TLgZdOg=; b=tLur5Zjj0nPmEn9fff7bG9b6yEAIb11ftB48zO5Q+Whx7fNWtD7f1nvJRnteHuvevMCW3J 3yRgaJZ33noKO3rbVnfQzGGfcsxeKCk6gMwlVdoACjXNZ6P5wphCz3pJc9lq7SH2HCeKXO 885+UHXWZZ4oWTc8YCD2cuFFEVzmnVAkzDKvZaU4hIDeENV5uICRqP4wHNX6MR6MmlJBE7 c9DEYxrtyhGZ3GNH2aMNyXwSHYxr7F8rAm0ILbMrPbWQWDxeX4opdrvpvnhkIDeJ9xv0li nw7HSWBpgPeuruqGZa4UiqL4vr5FgAQgYRoEGJxzqclRr9pUHRV8JoZI0HZj5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650926019; a=rsa-sha256; cv=none; b=pVqR4kQIo4xkl5ELvaob6XIaaLbjaXDDD6Dtc8YAFckwxip9y6nwO/pfNq1yjuS2RFlkEX YlOKm/siBbUFKSTUAKlzns+uwC/tfpgb5cVvrWIaEbdxeSEmTW0heVoj52ud0rCGuqi8ys /ezHJZz6U3a/r7Sq2fqFXFQW0OQ85kJo16vXpihTuy3oQ/oLoVjXoKp9G2thr9VbEvepIs fIgoc+gnkzsuEOLTguP81K3mQWzZ57Kqwz93X6hGdlCbvimXSjiaCH42GarWpsKQZ2IZ9n vT4KJOorQ9AP5Wr/XEHDgrECn9mr0ixpgvfdG/LrNFqOOfUN6Z9H29Zx/NJ9xQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/ports/commit/?id=4d8688269cc20726878ca25974f9afd0dc7a35bd commit 4d8688269cc20726878ca25974f9afd0dc7a35bd Author: Brooks Davis AuthorDate: 2022-04-25 22:33:26 +0000 Commit: Brooks Davis CommitDate: 2022-04-25 22:33:26 +0000 devel/llvm: allow versions other than LLVM_DEFAULT Allow the LLVM port to depend on and link to to be something other than LLVM_DEFAULT. This port can now be build with LLVM_SUFFIX set to other values including non-numeric values such as -devel, -cheri, or -morello. To accomodate this, change how the version is set so we use the major version rather than the suffix. This requires a PORTEPOCH bump. --- devel/llvm/Makefile | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/devel/llvm/Makefile b/devel/llvm/Makefile index 24fb37c53762..1cf704252f68 100644 --- a/devel/llvm/Makefile +++ b/devel/llvm/Makefile @@ -1,6 +1,7 @@ PORTNAME= llvm -PORTVERSION= ${LLVM_DEFAULT} +PORTVERSION= ${LLVM_MAJOR} PORTREVISION= 0 +PORTEPOCH= 1 CATEGORIES= devel lang MASTER_SITES= # not applicable DISTFILES= # not applicable @@ -14,7 +15,7 @@ COMMENT= Meta-port for the default version of the LLVM Toolchain LICENSE= BSD2CLAUSE LICENSE_FILE= ${.CURDIR}/../../COPYRIGHT -RUN_DEPENDS= bugpoint${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} +RUN_DEPENDS= bugpoint${LLVM_SUFFIX}:devel/llvm${LLVM_SUFFIX} OPTIONS_DEFINE= CLANG EXTRAS LIT LLD LLDB OPTIONS_DEFAULT= CLANG EXTRAS LIT LLD LLDB @@ -33,7 +34,28 @@ NO_BUILD= yes PLIST_FILES= ${COMMANDS:S|^|bin/|} .include -.include "${.CURDIR}/../llvm${LLVM_DEFAULT}/Makefile.COMMANDS" + +LLVM_SUFFIX?= ${LLVM_DEFAULT} + +.if ${LLVM_SUFFIX:M[789]0} +# Pre-LLVM 10 releases have a suffix +LLVM_MAJOR=${LLVM_SUFFIX:C/0$//} +.elif ${LLVM_SUFFIX:M[1-9][0-9]} +# LLVM 10 and later have a suffix +LLVM_MAJOR=${LLVM_SUFFIX} +.elif exists(${.CURDIR}/../llvm${LLVM_SUFFIX}/Makefile.snapshot) +# Try to get the version from the snapshot file for named +# suffixes. +.include "${.CURDIR}/../llvm${LLVM_SUFFIX}/Makefile.snapshot" +.else +.error Don't know how to get version for ${LLVM_SUFFIX} +.endif + +.if ${LLVM_SUFFIX} == "-cheri" || ${LLVM_SUFFIX} == "-morello" +OPTIONS_EXCLUDE= LLDB +.endif + +.include "${.CURDIR}/../llvm${LLVM_SUFFIX}/Makefile.COMMANDS" COMMANDS= ${LLVM_COMMANDS} .if ${PORT_OPTIONS:MCLANG} @@ -54,7 +76,7 @@ COMMANDS+= ${LLDB_COMMANDS} do-install: .for c in ${COMMANDS} - ${LN} -s ${c}${LLVM_DEFAULT} ${STAGEDIR}${PREFIX}/bin/${c} + ${LN} -s ${c}${LLVM_SUFFIX} ${STAGEDIR}${PREFIX}/bin/${c} .endfor .include