mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 19:26:50 +00:00
buildsystem: add pre_configure() function that is not target specific
This commit is contained in:
parent
72cdeda49e
commit
1d81d22225
@ -148,7 +148,7 @@ Full list of overwrittable functions.
|
|||||||
| unpack<br>pre_unpack<br>post_unpack | - | Extract the source from the downloaded file |
|
| unpack<br>pre_unpack<br>post_unpack | - | Extract the source from the downloaded file |
|
||||||
| pre_patch<br>post_patch | - | Apply the patches to the source, after extraction. The patch function it self is not allowed to overwritten |
|
| pre_patch<br>post_patch | - | Apply the patches to the source, after extraction. The patch function it self is not allowed to overwritten |
|
||||||
| pre_build_\[stage] | yes | Runs before of the start of the build |
|
| pre_build_\[stage] | yes | Runs before of the start of the build |
|
||||||
| configure_\[stage]<br>pre_configure_\[stage]<br>post_configure_\[stage] | yes | Configure the package for the compile. This is only relevant for toolchain, that supports it (e.g. meson, cmake, configure, manual) |
|
| pre_configure<br>pre_configure_\[stage]<br>configure_\[stage]<br>post_configure_\[stage] | yes | Configure the package for the compile. This is only relevant for toolchain, that supports it (e.g. meson, cmake, configure, manual) |
|
||||||
| make_\[stage]<br>pre_make_\[stage]<br>post_make_\[stage] | yes | Build of the package |
|
| make_\[stage]<br>pre_make_\[stage]<br>post_make_\[stage] | yes | Build of the package |
|
||||||
| makeinstall_\[stage]<br>pre_makeinstall_\[stage]<br>post_makeinstall_\[stage] | yes | Installation of the files in the correct pathes<br>host: TOOLCHAIN<br>target: SYSROOT and IMAGE<br>bootstrap and init: temporary destination
|
| makeinstall_\[stage]<br>pre_makeinstall_\[stage]<br>post_makeinstall_\[stage] | yes | Installation of the files in the correct pathes<br>host: TOOLCHAIN<br>target: SYSROOT and IMAGE<br>bootstrap and init: temporary destination
|
||||||
| addon | - | Copy all files together for addon creation. This is requiered for addons |
|
| addon | - | Copy all files together for addon creation. This is requiered for addons |
|
||||||
|
@ -238,6 +238,7 @@ if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" -o -f "$PKG_MESON_SCRI
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# configure
|
# configure
|
||||||
|
pkg_call_exists pre_configure && pkg_call pre_configure
|
||||||
pkg_call_exists pre_configure_$TARGET && pkg_call pre_configure_$TARGET
|
pkg_call_exists pre_configure_$TARGET && pkg_call pre_configure_$TARGET
|
||||||
|
|
||||||
if pkg_call_exists configure_$TARGET; then
|
if pkg_call_exists configure_$TARGET; then
|
||||||
|
@ -76,8 +76,8 @@ process_line() {
|
|||||||
[ -n "${matches}" ] && log "${filename}" ${lc} "FAIL" "late binding violation" "${matches:2}"
|
[ -n "${matches}" ] && log "${filename}" ${lc} "FAIL" "late binding violation" "${matches:2}"
|
||||||
}
|
}
|
||||||
|
|
||||||
init_multi_func() {
|
init_target_funcs() {
|
||||||
local f t multi
|
local f t funcs
|
||||||
|
|
||||||
for t in target host init bootstrap; do
|
for t in target host init bootstrap; do
|
||||||
for f in pre_build \
|
for f in pre_build \
|
||||||
@ -85,10 +85,10 @@ init_multi_func() {
|
|||||||
pre_make make post_make \
|
pre_make make post_make \
|
||||||
pre_makeinstall makeinstall post_makeinstall \
|
pre_makeinstall makeinstall post_makeinstall \
|
||||||
; do
|
; do
|
||||||
multi+=" ${f}_${t}"
|
funcs+=" ${f}_${t}"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
echo "${multi:1}"
|
echo "${funcs:1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
check_func_name() {
|
check_func_name() {
|
||||||
@ -98,7 +98,8 @@ check_func_name() {
|
|||||||
for f in configure_package \
|
for f in configure_package \
|
||||||
pre_unpack unpack post_unpack \
|
pre_unpack unpack post_unpack \
|
||||||
pre_patch post_patch \
|
pre_patch post_patch \
|
||||||
${MULTI_FUNC} \
|
pre_configure \
|
||||||
|
${TARGET_FUNCS} \
|
||||||
pre_install post_install \
|
pre_install post_install \
|
||||||
addon \
|
addon \
|
||||||
; do
|
; do
|
||||||
@ -146,7 +147,7 @@ process_pkg() {
|
|||||||
done <<< "$(grep -E ".*() {" "${filename}" | sed 's/[[:space:]]*{.*//' | sort | uniq -c | grep -v ^[[:space:]]*1[[:space:]])"
|
done <<< "$(grep -E ".*() {" "${filename}" | sed 's/[[:space:]]*{.*//' | sort | uniq -c | grep -v ^[[:space:]]*1[[:space:]])"
|
||||||
}
|
}
|
||||||
|
|
||||||
MULTI_FUNC="$(init_multi_func)"
|
TARGET_FUNCS="$(init_target_funcs)"
|
||||||
|
|
||||||
if [ $# -ne 0 ]; then
|
if [ $# -ne 0 ]; then
|
||||||
for arg in ${@}; do
|
for arg in ${@}; do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user