diff --git a/packages/readme.md b/packages/readme.md index 26bc6cce55..e67a1c6e33 100644 --- a/packages/readme.md +++ b/packages/readme.md @@ -148,7 +148,7 @@ Full list of overwrittable functions. | unpack
pre_unpack
post_unpack | - | Extract the source from the downloaded file | | pre_patch
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 | -| configure_\[stage]
pre_configure_\[stage]
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
pre_configure_\[stage]
configure_\[stage]
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]
pre_make_\[stage]
post_make_\[stage] | yes | Build of the package | | makeinstall_\[stage]
pre_makeinstall_\[stage]
post_makeinstall_\[stage] | yes | Installation of the files in the correct pathes
host: TOOLCHAIN
target: SYSROOT and IMAGE
bootstrap and init: temporary destination | addon | - | Copy all files together for addon creation. This is requiered for addons | diff --git a/scripts/build b/scripts/build index 20c804ca89..1d068051c7 100755 --- a/scripts/build +++ b/scripts/build @@ -238,6 +238,7 @@ if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" -o -f "$PKG_MESON_SCRI fi # configure +pkg_call_exists pre_configure && pkg_call pre_configure pkg_call_exists pre_configure_$TARGET && pkg_call pre_configure_$TARGET if pkg_call_exists configure_$TARGET; then diff --git a/tools/pkgcheck b/tools/pkgcheck index af298edc6c..55282dc9b7 100755 --- a/tools/pkgcheck +++ b/tools/pkgcheck @@ -76,8 +76,8 @@ process_line() { [ -n "${matches}" ] && log "${filename}" ${lc} "FAIL" "late binding violation" "${matches:2}" } -init_multi_func() { - local f t multi +init_target_funcs() { + local f t funcs for t in target host init bootstrap; do for f in pre_build \ @@ -85,10 +85,10 @@ init_multi_func() { pre_make make post_make \ pre_makeinstall makeinstall post_makeinstall \ ; do - multi+=" ${f}_${t}" + funcs+=" ${f}_${t}" done done - echo "${multi:1}" + echo "${funcs:1}" } check_func_name() { @@ -98,7 +98,8 @@ check_func_name() { for f in configure_package \ pre_unpack unpack post_unpack \ pre_patch post_patch \ - ${MULTI_FUNC} \ + pre_configure \ + ${TARGET_FUNCS} \ pre_install post_install \ addon \ ; do @@ -146,7 +147,7 @@ process_pkg() { 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 for arg in ${@}; do