From nobody Tue Apr 4 11:06:21 2023 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 4PrQ1T2Trcz43PWQ; Tue, 4 Apr 2023 11:06:21 +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 4PrQ1T244kz4D1d; Tue, 4 Apr 2023 11:06:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680606381; 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=9IdfQL2TlPeUr4B2FD4RZjUY+CkiA79SCVOYXquZKdM=; b=qGeoqOdfqIRH6Pd/YzzWrZY690e5o9l+LBf3pizjX2KkjYDGnq1O5U0yy3r1t5cQ0aPbdn JkgY3yDA13B0GyK13eARh0gN4pSsxGJBv7IhtWp4G4fZpbNbh+bvjB9UFdmaO3pjsm+RlQ S47QIEgEJxtW2pAJ3kven5RANFFeyEz+c59E494IOlBH7PwXH/StciIIOcBZsE2nMx24Zb LHks6fH38NNuWZrj/sQyX6duh/+cm5Eb8ZKN6XXCVKW57Fr5F7DT8bX2XUaDOh6mRNDMpk 4O1rJqL4X/omUVthhqIOKwNeJXqH5s4CDdGuZfhtGW3wkheS1lZTfg1IKaKvpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680606381; 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=9IdfQL2TlPeUr4B2FD4RZjUY+CkiA79SCVOYXquZKdM=; b=hgqznsgGZ/hBJsscgtTH48uvmp0tuT8rgVJKonN8qGM64Hf3a+2TXOR+6CvNUx17Q5wWSa uSDDV3ExdrHydmouw7exCA6sNHHt7AlD91pzbGIqg0bf0XgZ03Yt236O9T3ST/olo920ug OaFieF10rKZ7BujTzMl3OT8isSSUBNbmemMIOmMBKaNYZhQmob2haTYSJ4vHbPSyP9F6Fu h+VFygMuqd4BxQG5ybMdm4+F1Te5lLDW9FW5NcfjiE9kTq+I8Vg8FGIASD2E8II5KXQfOT ZcnZ0BaF6MwH8pVfxu2I1tmRKWSeh1TW8mRNDJmLZpawHt6duUFytjRdjo9CAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680606381; a=rsa-sha256; cv=none; b=snANQykDF90xsDQhtEmLDQlvDotRQ/O4UKHaro108MgEkTw4fYxgULM1MuVipklSzotw7r 5munf5nCMeTDYLEK9A7wTwaROzvLiqQUwx82Duz2BpqO6LoZOVDDT0jPnAZW7PLgfIKwJm jQ+hpffJ6KaHLVvMzLhndi/rjC65ixFum3zJu+08RHCsg/68f/bzi7iSbOJSDgwMaXxGiq h9vPyAx9nGsGQslZNv5lg+wYk7ZQGm5rEWXh1MfDe29IwIHz2yvDYgLy5fuZ0s0Uq9ISKZ 4DMtA5HikZj6c4dniaton+u024Xg3Wgl49fegycmirwz1VrexNg99aGEIfMIOw== 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 4PrQ1T17CDzdV5; Tue, 4 Apr 2023 11:06:21 +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 334B6L8W070329; Tue, 4 Apr 2023 11:06:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 334B6Loc070328; Tue, 4 Apr 2023 11:06:21 GMT (envelope-from git) Date: Tue, 4 Apr 2023 11:06:21 GMT Message-Id: <202304041106.334B6Loc070328@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Nuno Teixeira Subject: git: 9a6c426e3647 - main - devel/root: Fix building on 12.3, 13.2 and restore post-patch step 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: eduardo X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a6c426e3647702ce67a08ce5668e2ad64a36d3d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by eduardo: URL: https://cgit.FreeBSD.org/ports/commit/?id=9a6c426e3647702ce67a08ce5668e2ad64a36d3d commit 9a6c426e3647702ce67a08ce5668e2ad64a36d3d Author: Erik Jensen AuthorDate: 2023-04-04 10:57:58 +0000 Commit: Nuno Teixeira CommitDate: 2023-04-04 11:06:07 +0000 devel/root: Fix building on 12.3, 13.2 and restore post-patch step ROOT version 6.28.02 fails to build on 123amd64: https://pkg-status.freebsd.org/beefy6/data/123amd64-default/d55ec1db8ffa/logs/root-6.28.02.log This patch fixes the (sed-related) issue. I submit here - again - the post-patch step, which ensures that ROOT can build on LLVM/Clang 10.0.1 (used on FreeBSD 12.3). Fix plist on 13.2 (RC) PR: 270625 --- devel/root/Makefile | 15 +++++++++++-- .../root/scripts/remove-modules-from-modulemap.awk | 9 ++++++++ .../root/scripts/remove-modules-from-modulemap.sh | 26 +++------------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/devel/root/Makefile b/devel/root/Makefile index 9d3b5d1a5ca4..b9e7ccbef2e4 100644 --- a/devel/root/Makefile +++ b/devel/root/Makefile @@ -76,10 +76,21 @@ PLIST_SUB+= NOT_INSTALLED_ON_AARCH64="" ONLY_INSTALLED_ON_AARCH64="@comment " AA # Some files only installed with LLVM/Clang 13 (used on FreeBSD 12.4 and 13.x) # TODO: Introduce USES+=llvm:min=14 instead when this can be deemed not too obtrusive on supported releases # -- the post-patch step further down can then be phased out as well -.if 1204000 <= ${OSVERSION} && ${OSVERSION} < 1400000 && ${OSVERSION} != 1301507 +.if 1204000 <= ${OSVERSION} && ${OSVERSION} < 1302000 && ${OSVERSION} != 1301507 PLIST_SUB+= ONLY_INSTALLED_WITH_LLVM_CLANG_13="" .else PLIST_SUB+= ONLY_INSTALLED_WITH_LLVM_CLANG_13="@comment " .endif -.include +.include + +# In LLVM/Clang 10.0.1 (used on FreeBSD 12.3), the cstdalign header is missing from the std modulemap, but it is declared included in ROOT's std modulemap - this has to be removed. +# See https://github.com/llvm/llvm-project/blob/main/libcxx/include/module.modulemap.in#L181 +# The same seems to be the case for the other headers defined in the variable "modules" below. +.if ${OSVERSION} < 1204000 +modules= cstdalign cuchar experimental/string_view ext/functional ext/numeric ext/type_traits.h bits_alloc_traits_h bits/allocator.h bits/basic_ios.h bits/cpp_type_traits.h bits/exception_defines.h bits/ios_base.h bits/locale_facets.h bits_stl_algobase_h bits_stl_iterator_h bits/stl_iterator_base_types.h bits/stl_map.h bits/stl_pair.h bits_stl_tree_h bits/uniform_int_dist.h +post-patch: + SCRIPTDIR=${SCRIPTDIR} MODULEMAP=${WRKSRC}/interpreter/cling/include/cling/std.modulemap ${SH} ${SCRIPTDIR}/remove-modules-from-modulemap.sh "${modules}" +.endif + +.include diff --git a/devel/root/scripts/remove-modules-from-modulemap.awk b/devel/root/scripts/remove-modules-from-modulemap.awk new file mode 100755 index 000000000000..adabed818d2f --- /dev/null +++ b/devel/root/scripts/remove-modules-from-modulemap.awk @@ -0,0 +1,9 @@ +BEGIN { + exclude = exclude; #trim left and right + gsub(/[[:blank:]]/, "|", exclude); + gsub(/\//, "\\/", exclude); + ex_regx = "module[[:blank:]]+\"(" exclude ")\".*{[[:blank:]]*$"; +} + +$0 ~ ex_regx, $0 ~ /^[[:blank:]]*}[[:blank:]]*$/ { next ; } +{print} diff --git a/devel/root/scripts/remove-modules-from-modulemap.sh b/devel/root/scripts/remove-modules-from-modulemap.sh index 64df1b9c2ba0..c118c7637bf0 100755 --- a/devel/root/scripts/remove-modules-from-modulemap.sh +++ b/devel/root/scripts/remove-modules-from-modulemap.sh @@ -1,27 +1,7 @@ #!/bin/sh # Script removes module definition blocks in LLVM/Clang .modulemap -# files in-place in the file path stored in the variable MODULEMAP +# files "in-place" in the file path stored in the variable MODULEMAP -sp='[[:space:]]' - -mdls="" ; i=0 -for m in "$@" ; do - i=$((i+1)) - mdls="$mdls($m)" - [ $i -ne $# ] && mdls="$mdls|" -done - -script="\ -/^$sp*(explicit)?$sp*module$sp*\"$mdls\"$sp*\{$sp*\$/ { - :l - N - s/}/}/ - tx - bl - :x - d -}\ -" - -sed -i '' -E "$script" "$MODULEMAP" +modules=$1 +tmp=${MODULEMAP}.tmp && awk -f ${SCRIPTDIR}/remove-modules-from-modulemap.awk -v exclude="${modules}" ${MODULEMAP} > ${tmp} && mv ${tmp} ${MODULEMAP} || rm ${tmp}