FreeBSD Bugzilla – Attachment 241285 Details for
Bug 270625
devel/root: Fix building on 123amd64 and restore post-patch step
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix building on 123amd64 and restore post-patch step
devel_root01.diff (text/plain), 2.76 KB, created by
Erik Jensen
on 2023-04-03 13:22:40 UTC
(
hide
)
Description:
Patch to fix building on 123amd64 and restore post-patch step
Filename:
MIME Type:
Creator:
Erik Jensen
Created:
2023-04-03 13:22:40 UTC
Size:
2.76 KB
patch
obsolete
>diff --git a/devel/root/Makefile b/devel/root/Makefile >index 9d3b5d1a5c..f362d9fad5 100644 >--- a/devel/root/Makefile >+++ b/devel/root/Makefile >@@ -82,4 +82,15 @@ PLIST_SUB+= ONLY_INSTALLED_WITH_LLVM_CLANG_13="" > PLIST_SUB+= ONLY_INSTALLED_WITH_LLVM_CLANG_13="@comment " > .endif > >-.include <bsd.port.mk> >+.include <bsd.port.pre.mk> >+ >+# 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 <bsd.port.post.mk> >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 0000000000..adabed818d >--- /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 64df1b9c2b..c118c7637b 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}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
erik
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 270625
:
241285
|
241293