ports/devel/root/scripts/remove-modules-from-modulemap.sh
Erik Jensen e9e0b380a1 devel/root: Update to 6.26/10
- Port now compiles against C++17
- Added build of ROOT v7 preview features as default build option
- Added dependencies on devel/nlohmann-json, graphics/ftgl, print/gl2ps
  and devel/xxhash so ROOT does not use builtin versions of these libraries
- ROOT now builds on FreeBSD 12.3 (uses LLVM/Clang 10.0.1) -- a bit of
  .modulemap hacking was necessary; tested in poudriere jail on my own system
- ROOT *should* build on arm64 -- some files are not installed on arm64
  and some files are named differently

ChangeLog:	https://root.cern/doc/v626/release-notes.html#release-6.2610
PR:		268701
2023-01-10 09:15:46 +00:00

28 lines
423 B
Bash
Executable File

#!/bin/sh
# Script removes module definition blocks in LLVM/Clang .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"