xbps-src: refactor build logic into its own script (build.sh).
The build.sh script is now responsible to handle all the logic to build a source package and its subpackages, as well as all its required build dependencies. Thanks to this and subshells, dependencies are now built into its own child process, creating a process tree that can go nested as long as your system allows forking and has enough memory :-) This fixes some issues that have been while building pkgs that have lots of nested dependencies.
This commit is contained in:
parent
018e0086c4
commit
849d22e46d
10 changed files with 152 additions and 152 deletions
|
@ -24,11 +24,6 @@ for f in $XBPS_COMMONDIR/environment/build/*.sh; do
|
|||
source_file "$f"
|
||||
done
|
||||
|
||||
if [ -z $pkgname -o -z $version ]; then
|
||||
msg_error "$1: pkgname/version not set in pkg template!\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
XBPS_BUILD_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_build_done"
|
||||
XBPS_PRE_BUILD_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_pre_build_done"
|
||||
XBPS_POST_BUILD_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_post_build_done"
|
||||
|
@ -68,7 +63,6 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
touch -f $XBPS_BUILD_DONE
|
||||
|
||||
# Run post_build()
|
||||
if [ ! -f $XBPS_POST_BUILD_DONE ]; then
|
||||
|
@ -80,4 +74,6 @@ fi
|
|||
|
||||
run_pkg_hooks post-build
|
||||
|
||||
touch -f $XBPS_BUILD_DONE
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue