-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Utilize the new "all" ARCHITECTURES keyword in most recipes. #6189
Conversation
x86_64 is used as a baseline: the "x86_64" entry, whatever status it has, is transformed into "all", and then the other entries in ARCHITECTURES either dropped or rearranged appropriately.
Script used to edit recipes: #!/bin/bash
#
# Copyright 2021, Haiku, Inc. All rights reserved.
# Distributed under the terms of the MIT license.
#
# some stub functions so we don't get errors/warnings
getPackagePrefix()
{
:
}
defineDebugInfoPackage()
{
:
}
remove_old_arches()
(
set -f
IFS=' '
prefix=$1
shift
arches=""
for arg in "$@"; do
if [[ ! -z "$prefix" ]]; then
if [[ $(echo $arg | cut -c1) = "$prefix" ]]; then
arg_test=$(echo $arg | cut -c 2-)
else
arches="$arches $arg"
continue
fi
else
arg_test="$arg"
fi
if [[ "$arg_test" =~ ^(x86_64|arm|arm64|riscv64|ppc|x86_gcc2|m68k|x86|sparc)$ ]]; then
continue
fi
arches="$arches $arg"
done
echo "$arches"
)
FILES=$(git ls-files | fgrep .recipe)
MODIFIED=0
for file in $FILES; do
portVersion=1
source $file
prefix=$(echo $ARCHITECTURES | grep -o -P '.{0,1}x86_64')
if [ $? -eq 0 ]; then
#echo "editing $file"
prefix=$(echo "$prefix" | cut -c1)
if [[ $prefix != "?" ]] && [[ $prefix != '!' ]]; then
prefix=
fi
ARCHITECTURES=$(remove_old_arches "$prefix" $ARCHITECTURES)
ARCHITECTURES="${prefix}all $ARCHITECTURES"
ARCHITECTURES=$(echo $ARCHITECTURES)
echo $ARCHITECTURES
sed -i "/^ARCHITECTURES=/c\ARCHITECTURES=\"$ARCHITECTURES\"" $file
# trim trailing space while we're at it
sed -i 's/[ \t]*$//' $file
MODIFIED=$((MODIFIED+1))
fi
done
echo ""
echo "done; $MODIFIED recipes edited." |
Haven't had time to look into this, I was just wondering, if "all" is used will the recipes also build x86_gcc2 (currently disabled or marked broken) on buildmaster? |
If |
So, |
Yes. |
OK, will run some tests on 32bit later, will reports later :) |
On a sidenote, is buildmaster setup to build riscv/arm packages? |
No, not yet. |
The ARCHITECTURE description of the wiki at https://github.com/haikuports/haikuports/wiki/HaikuPorter-BuildRecipes could be updated as well. Maybe also the "generic_*" example recipies of haikuporter. |
I already added "all" there. Maybe not so easy to read, though... |
Yeah, maybe quote that example of "all !x86_gcc2" that supports all but gcc2 arches. |
x86_64 is used as a baseline: the "x86_64" entry, whatever status it has,
is transformed into "all", and then the other entries in ARCHITECTURES
either dropped or rearranged appropriately.